JDK-6299362 : ALT_GRAPH_MASK must be set on pressing Right-Alt key on windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: generic
  • Submitted: 2005-07-20
  • Updated: 2016-03-31
  • Resolved: 2016-03-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Duplicate :  
Description
ALT_GRAPH_MASK must be set on pressing Right-Alt key on windows. As of now for both left and right, ALT_MASK is set. The location of key is returned properly.

Compile and run attached KeyMaskTest
Press Right-ALT key
If isAltGraphDown returns false, bug is reproduced

The mask is set properly on solaris.
###@###.### 2005-07-20 14:47:15 GMT

Comments
JDK-8041928 is fixed in JDK9
25-03-2016

EVALUATION Looks like the problem depends on keyboard model. I reproduced the behavior on Linux with standard PC105 keyboard. The same situation is on Windows. But the situation is different on Solaris with Sun keyboard. ###@###.### 2005-07-20 16:54:55 GMT 1) On Windows, right alt is AltGr only in some keyboard layouts (e.g. German or US International). In other layouts (e.g. US layout), it's just "right alt". 2) Current WmKeyDown/WmKeyUp code doesn't have correct handling of AltGr, like WmChar has. According to this, we can have ALT_GRAPH modifiers in KEY_TYPED events, but not in KEY_PRESSED or KEY_RELEASED events. This should be fixed. 3) Third, AltGr can be emulated on other keyboard layouts with Ctrl+Alt. However, I seriously doubt we should convert Ctrl+Alt to AltGraph in all cases. Linux needs separate investigation and a separate bug filed, as it's completely different code. ###@###.### 2005-07-21 13:25:43 GMT
20-07-2005