Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6629657
Votes 0
Synopsis provide raw key code from underlying system without changing API.
Category java:classes_awt
Reported Against
Release Fixed 5.0u15(b01)
State 10-Fix Delivered, request for enhancement
Priority: 2-High
Related Bugs 4352104
Submit Date 14-NOV-2007
Description
There should be a way for Java programmer to obtain an unique identifier for a key pressed. Presently, we only have certain part of keys covered by VK_* java keycodes. Sometimes a KEY_PRESSED/KEY_RELEASED is completely useless, with all fields filled with zeroes. 

A proper solution to this would be manifold involving addition of more keycodes and providing means to query a KeyEvent about (in some sense) raw keycodes. However all this would require API change and is possible only in a new release (jdk7 I presume). 

There should be a way to make a partial fix suitable for an update release, without API change.
Posted Date : 2007-11-14 12:57:33.0
Work Around
N/A
Evaluation
Idea is, to append a raw (in some sense) keycode to a string returned by java.awt.event.KeyEvent.paramString().
In case of MS Windows, it may be a virtual keycode, in case of X Window - 1-st keycode from a keycode vector.
User may query paramString() and obtain a substring tagged by "rawCode=" and containing a decimal keycode value.
Posted Date : 2007-11-14 15:16:16.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang