Example from class
junit.extensions.jfcunit.keyboard.DefaultKeyMapping:
...
{
new Character('X'),
new JFCKeyStroke('X', KeyEvent.VK_X,
SHIFT, true)
},
...
{new Integer(KeyEvent.VK_X), new
JFCKeyStroke('x', 88, 0, true)},
...
In both cases the key is an upper case X: 'X' and
KeyEvent.VK_X both have an int-value of 88.
But in the second case (with the Integer key) it is
mapped to a lower case x with no modifiers.
For a lower case x, there is a mapping with a Character
key, but no mapping with an Integer key:
...
{new Character('x'), new JFCKeyStroke('x',
KeyEvent.VK_X, 0, true)},
...
The parameter of the KeyEventData constructor is an
int. So for the mapping, the Integer wrapper will be
used. Therefore the following invokation will return a
KeyEventData with an 'x' rather than an 'X':
new KeyEventData( this, control, 'X' )