United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 4435010 No way to determine if KeyTyped valid key sequence
4435010 : No way to determine if KeyTyped valid key sequence

Details
Type:
Enhancement
Submit Date:
2001-04-06
Status:
Open
Updated Date:
2008-04-08
Project Name:
JDK
Resolved Date:
Component:
client-libs
OS:
solaris_7,generic
Sub-Component:
java.awt
CPU:
sparc,generic
Priority:
P4
Resolution:
Unresolved
Affected Versions:
1.1.8,1.3.0,1.4.0
Targeted Versions:

Related Reports
Duplicate:
Relates:

Sub Tasks

Description
We had a meeting on this a while back, but I'm going to file a bug on it as we are running into this problem more and more.
The basic problem is that when Swing gets a KeyTyped event we have no way of knowing if it is a valid key combination, or perhaps the only way to type the key. For example, pressing Ctrl-c results in a KeyTyped with a 'c' char and CTRL modifier. Typically you don't want such key sequences to appear in a text widgets, and thus we filter them. We also filter Alt keys for the same reason. The problem then comes that in some locales and some keyboards you need to type alt to produce certain characters. Since we filter these out, the user can then no longer enter these characters.

. Don't produce KeyTyped events unless this is the only way to enter the character.
. Provide some API to determine if this is the only way to enter the character.

                                    

Comments
EVALUATION

We should try to look at this in the Merlin time frame.  
However, changing the way we report modifiers will 
be hard; there are a number of regression tests that 
codify the way we do it now, and we have at least one 
licensee who feels strongly that we should do it this way.  

Commit to fix in merlin (swing).  
eric.hawkes@eng 2001-04-06
                                     
2001-04-06



Hardware and Software, Engineered to Work Together