Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How to find the ASCII value of any key I press from Keyboard(specially Escape,F1,etc.)  RSS feed

 
Greenhorn
Posts: 12
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello guys,
I am trying to find the ASCII value of Escape in java language ....Please help me in solving this problem

Also tell me how to find the ASCII value of non-printable characters when I press any key like F1 , etc
 
Sheriff
Posts: 21421
94
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think all those keys have ASCII values. They have key codes, available through the KeyEvent constants, but that's not the same as ASCII values. ASCII implies characters, and the list is found at http://www.asciitable.com/. Note that F1-F12 are not on the list, but Escape is (with value 27, the same as the key code).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!