JDK-4072265 : Inconsistent values for keycode from the Numeric Keypad
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.1,1.1.4
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1,windows_nt
  • CPU: generic,x86
  • Submitted: 1997-08-15
  • Updated: 1998-01-23
  • Resolved: 1998-01-23
Related Reports
Duplicate :  
Description

Name: sg39081			Date: 08/15/97


The KeyEvent class gives 3 indications of keyboard activity -
   keyPressed(), keyTyped(), keyReleased()

For the keypad the value of the keycode field on keyPressed()
and keyReleased() is dependant on whether numlock is on or off.

e.g.
   the keypad del key
      Numlock on KEY_PRESSED gives a keycode of 110 which is
         different from the . key on the main keyboard
      Numlock off KEY_PRESSED gives a keycode of 127 which is
         the same as the DEL key on the main keyboard

This means it is not possible to consistantly tell whether
the key press being processed comes from the keypad or the 
main keyboard. As a result the additional VK_* codes provided
in JDK 1.1 are largely of no practical use what ever.


company - Pericom Software PLC , email - ###@###.###
======================================================================

Comments
PUBLIC COMMENTS duplicate of 4069679 4069679 is an RFE for 1.2
10-06-2004

EVALUATION This bug seems related to 4057663 if not exactly the same. Bug 4057663 has been fixed. xianfa.deng@Eng 1997-12-07 The original user who submitted this bug believes this bug is similiar to 4057663 but not the same. The user states that what this bug boils down to is the fact that it is is not always possible to tell which physical key was pressed to generate a logical keyTyped. On the user's keypad one of the keys is ". or Del" depending on the numlock key. If numlock is on, everything is fine you can tell the difference between . on the keypad and . on the keyboard If numlock is off it is not possible to tell whether Del was pressed on the keypad or the keyboard As some applications require the ability to remap the keyboard this is a real problem. The user has stated that you can call him if you need additional clarification. His phone number is in the comments section. sheri.good@Eng 1998-01-22
22-01-1998