United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7124286 [macosx] Option modifier should work like AltGr as in Apple jdk 6
JDK-7124286 : [macosx] Option modifier should work like AltGr as in Apple jdk 6

Details
Type:
Bug
Submit Date:
2011-12-23
Status:
Closed
Updated Date:
2012-09-25
Project Name:
JDK
Resolved Date:
2012-04-04
Component:
client-libs
OS:
os_x
Sub-Component:
java.awt
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u4 (b18)

Related Reports

Sub Tasks

Description
http://java.net/jira/browse/MACOSX_PORT-654 submitted 2011/11/03 by Yuri Nesterenko
In Mac OS X, there's no AltGr key but regular Alt named Option should work in similar fashion. I'm afraid I've missed a discussion related to that so I'm filing a bug to attract attention (snapshot of kittens goes here).
Presently for instance Option + a in English US locale does not produce  (0xE5) and Option + 4 doesn't make a cent symbol 0xA2 like typing it in a console prompt does. It is a regression against Apple jdk 6.
Also, keytext for Option modifier is not defined neither in jdk 6 nor in this port.
I'm attaching a simple snippet printing key events just for convenience.

                                    

Comments
SUGGESTED FIX

The check needs to be refactored out of the performAction() method, so it could be overridden with a platform specfic implementation.
                                     
2012-03-15
EVALUATION

There is a check in actionPerformed() method of DefaultEditorKit that ensures that the character we get as a result of pressing letter + some modifiers is a printable one. The problem with this check is that it reflects the way things works on Windows: it allows ctrl + alt + letter combinations and blocks anything else.
                                     
2012-03-15



Hardware and Software, Engineered to Work Together