Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

get the scan code of the key

Thread view: 
Eitan M - 10 Aug 2007 13:54 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.