• 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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: 21466
97
Chrome Eclipse IDE Java Spring Ubuntu VI Editor 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).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!