1
How to correctly distinguish the pressing Alt?
when I call the following code at the output.
I get no code pressing Alt I get zero
Unknown keyCode: 0x0
if I press Shift then the output I get
Shift
when I call the following code at the output.
I get no code pressing Alt I get zero
Code: [Select]
KeyMapper keyMapper = new KeyMapper();
KeyState ks;
while( ( ks = keyMapper.poll() ) != KeyState.NONE )
{
System.out.println(KeyEvent.getKeyText(ks.getKeyCode())+" "+ks.getChar());
}
if I press alt then the output I getUnknown keyCode: 0x0
if I press Shift then the output I get
Shift