Hello.
In Java.
Whenever I press : <CTRL> + something.
I want to resolve the scan code (<CTRL>, <SHIFT>, <ALT> ... etc ...)
How ?
Thanks :)
Lew - 10 Aug 2007 13:59 GMT
> Hello.
> In Java.
> Whenever I press : <CTRL> + something.
> I want to resolve the scan code (<CTRL>, <SHIFT>, <ALT> ... etc ...)
> How ?
For Swing/AWT:
java.awt.event.KeyEvent.VK_ENTER
java.awt.event.InputEvent.SHIFT_DOWN_MASK
etc.
These values are received by KeyListener or KeyAdapter objects registered on
the component into which the user types.
<http://java.sun.com/javase/6/docs/api/java/awt/event/KeyEvent.html>
<http://java.sun.com/javase/6/docs/api/java/awt/event/InputEvent.html>

Signature
Lew
Eitan M - 10 Aug 2007 14:41 GMT
Roedy Green - 10 Aug 2007 17:21 GMT
>Whenever I press : <CTRL> + something.
>I want to resolve the scan code (<CTRL>, <SHIFT>, <ALT> ... etc ...)
>How ?
see http://mindprod.com/products2.html#KEYPLAYER

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
javayahtzee@gmail.com - 10 Aug 2007 17:29 GMT
If you are using a key listener you should try the 'getModifiers()'
method to see what keys (ctrl shift etc.) were used.