JDK-4102301 : RFE: AltGr key needs to be defined in KeyEvent
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 1.1
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: other
  • Submitted: 1998-01-07
  • Updated: 1999-01-15
  • Resolved: 1999-01-15
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.
Other
1.2.0 1.2beta4Fixed
Related Reports
Relates :  
Relates :  
Description

Name: mf23781			Date: 01/07/98


The virtual key for right Alt which is ALTGr on PC keyboards, needs
to be defined in KeyEvent. We would like to use the following define
for this key
VK_ALT_GRAPH = 0xFF;
The AWInputEventHandler.java class currently has hard code 0xFF for
this virtual key. The keyevent class should be updated with this virtual
key value so the master list of virtual keys doesn't used the 0xff for
another virtual key.

src\share\sun\sun\awt\aw\AWInputEventHandler.java
   /**
     *
     */
    public void handleKeyEvent(
        JOSKeyEvent             keyEvent ) {
        int                     keyCode = keyEvent.getKeyCode();
        int                     id = keyEvent.getID();

        if ( inputEventTest != null ) {
            inputEventTest.handleKeyEvent( keyEvent );
            return;
        }

        switch ( id ) {
          case KeyEvent.KEY_PRESSED:
            if ( keyCode == KeyEvent.VK_CAPS_LOCK )
                isCapsLock = true;
            else if ( keyCode == KeyEvent.VK_NUM_LOCK )
                isNumLock = true;
            else if (keyCode == KeyEvent.VK_KANA) {
                // VK_KANA key should be handled as kana lock key
                isModeSwitch = !isModeSwitch;
            } else if (keyCode == 0xFF) {       // Alt_Graph
                isAltGraph = true;
            }
            break;
          case KeyEvent.KEY_RELEASED:
            if ( keyCode == KeyEvent.VK_CAPS_LOCK )
                isCapsLock = false;
            else if ( keyCode == KeyEvent.VK_NUM_LOCK ) {
                isNumLock = false;
            } else if (keyCode == 0xFF) {       // Alt_Graph
                isAltGraph = false;
            }
            break;
        }

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.2beta4 FIXED IN: 1.2beta4 INTEGRATED IN: 1.2beta4
14-06-2004

WORK AROUND Name: mf23781 Date: 01/07/98 ======================================================================
11-06-2004

SUGGESTED FIX See 4068241.
11-06-2004

EVALUATION [naoyuki 2/20/98] This is RFE for JDK. Implemented fix suggested in 4068241. norbert.lindenberg@Eng 1998-05-07
07-05-1998