Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Gram01

Pages: [1]
1
Support / Alt key
« on: March 13, 2014, 02:42:45 pm »
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
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 get
Unknown keyCode: 0x0
if I press Shift then the output I get
Shift

Pages: [1]