JDK-4488881 : RFE: KeyStroke.getKeyStroke inconsistent with KeyEvent.getKeyText
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.1
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-08-07
  • Updated: 2003-04-24
  • Resolved: 2003-04-24
Related Reports
Duplicate :  
Description

Name: yyT116575			Date: 08/06/2001


java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

see http://mindprod.com/gotchas.html#KEYNAMES

The names of keys used by
KeyStroke.getKeyStroke and KeyEvent.getKeyText are inconsistent.

There needs to be a new method created to either accept getKeyText 
names or produce getKeyStroke names, or make the names used by 
the existing methods compatible.

These names are needed to record and playback keystrokes using 
human-readable text files for intermediate storage.
(Review ID: 129497) 
======================================================================

Comments
EVALUATION As the bulk of KeyStroke is now in java.awt.AWTKeyStroke, I'm reassigning this to AWT. One point though, we obviously can't change the Strings that either of these take/produce at this point:( scott.violet@eng 2001-08-07 If we changed any of these now, it would break anyone who is using the current strings. eric.hawkes@eng 2001-08-07 Most of the docs for AWT and Swing classes that implement toString say that the return value can change between implementations. As well they should: if we add new fields to these classes, the new fields should be added to the output of toString() as well. We are planning to fix this rfe in AWT and Swing under 4370733. ###@###.### 2003-04-23
23-04-2003