I just recently noticed this problem. When I'm working in a java-based program, say JEdit, if the Numlock on my keyboard is on, I cannot press backspace, I cannot use the arrow keys, and no key on the right-most portion of the keyboard works (that includes any of the number keys arranged in a 3x3 pattern, the +, enter, delete, *, /, and any other keys I'm leaving out). I don't remember this being an issue with JDK 1.4. To work around this issue, I have to disable numlock entirely and use the number keys on the top of the keyboard. Besides the fact that this is an inconvenience, it affects any and every program running under the Java virtual machine, so it seems to be a problem in Java itself. To reiterate, if the numlock is turned on, no control characters whatsoever work (tab, backspace, not even the enter key on both sides). Fix: Unknown. How-To-Repeat: Use any program with the Java Virtual Machine (i.e. JEdit, BlueJ, DrJava, JBidWatcher; any program that handles input from the user). Make sure NumLock is turned on, then attempt to press enter, use the arrow keys, backspace, +, -, etc.
Responsible Changed From-To: freebsd-ports-bugs->phantom Over to maintainer.
State Changed From-To: open->feedback Submitter: does this problem still recur?
Responsible Changed From-To: phantom->freebsd-java Reassign from phantom since he has been inactive for more than one year. Hat: gnats-admin
The problem still occurs for me under jdk-1.5.0p2_6. -- Jonathan Chen <jonc@chen.org.nz>
State Changed From-To: feedback->open Submitter notes that this is still a problem.
This patch fixes the numlock problems described in this PR for both toolkits: Index: j2se/src/solaris/native/sun/awt/canvas.c =================================================================== RCS file: /home/Java/CVS/JDK2/javasrc_1_5_scsl/j2se/src/solaris/native/sun/awt/canvas.c,v retrieving revision 1.2 diff -u -r1.2 canvas.c --- j2se/src/solaris/native/sun/awt/canvas.c 10 Jan 2005 15:09:40 -0000 1.2 +++ j2se/src/solaris/native/sun/awt/canvas.c 19 Apr 2006 22:21:51 -0000 @@ -258,10 +258,10 @@ {java_awt_event_KeyEvent_VK_DOWN, XK_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, /* Keypad equivalents of Triangular Navigation Block */ - {java_awt_event_KeyEvent_VK_KP_LEFT, XK_KP_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, - {java_awt_event_KeyEvent_VK_KP_UP, XK_KP_Up, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, - {java_awt_event_KeyEvent_VK_KP_RIGHT, XK_KP_Right, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, - {java_awt_event_KeyEvent_VK_KP_DOWN, XK_KP_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_LEFT, XK_KP_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_UP, XK_KP_Up, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_RIGHT, XK_KP_Right, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_DOWN, XK_KP_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, /* Other vendor-specific Triangular Navigation Block */ {java_awt_event_KeyEvent_VK_LEFT, osfXK_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, @@ -1349,7 +1349,7 @@ { KeySym originalKeysym = *keysym; -#if !defined(__linux__) // XXXBSD: applies to FreeBSD? +#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* The following code on Linux will cause the keypad keys * not to echo on JTextField when the NumLock is on. The * keysyms will be 0, because the last parameter 2 is not defined. Index: j2se/src/solaris/native/sun/xawt/XWindow.c =================================================================== RCS file: /home/Java/CVS/JDK2/javasrc_1_5_scsl/j2se/src/solaris/native/sun/xawt/XWindow.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 XWindow.c --- j2se/src/solaris/native/sun/xawt/XWindow.c 8 Nov 2004 22:27:40 -0000 1.1.1.1 +++ j2se/src/solaris/native/sun/xawt/XWindow.c 19 Apr 2006 22:21:51 -0000 @@ -204,10 +204,10 @@ {java_awt_event_KeyEvent_VK_DOWN, XK_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, /* Keypad equivalents of Triangular Navigation Block */ - {java_awt_event_KeyEvent_VK_KP_LEFT, XK_KP_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, - {java_awt_event_KeyEvent_VK_KP_UP, XK_KP_Up, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, - {java_awt_event_KeyEvent_VK_KP_RIGHT, XK_KP_Right, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, - {java_awt_event_KeyEvent_VK_KP_DOWN, XK_KP_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_LEFT, XK_KP_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_UP, XK_KP_Up, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_RIGHT, XK_KP_Right, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, + {java_awt_event_KeyEvent_VK_DOWN, XK_KP_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD}, /* Other vendor-specific Triangular Navigation Block */ {java_awt_event_KeyEvent_VK_LEFT, osfXK_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, @@ -742,7 +742,7 @@ { KeySym originalKeysym = *keysym; -#ifndef __linux__ +#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* The following code on Linux will cause the keypad keys * not to echo on JTextField when the NumLock is on. The * keysyms will be 0, because the last parameter 2 is not defined.
State Changed From-To: open->closed Committed Kurt's fix. Thanks!
Is this really "closed"? I hadn't time to recompile the JDK yet (sorry for the noise, if this patch does indeed fix it all) and moreover I'm using diablo right now (the bug is the very same...) but reading the patch it seems to change only numpad-arrows stuff..? As the original reporter said "I cannot press backspace, I cannot use the arrow keys" and no insert/home/delete/end/pageup/pagedown.
On Wed, 03 May 2006 11:54:02 +0200, Lapo Luchini <lapo.luchini@gmail.com> wrote: > Is this really "closed"? > > I hadn't time to recompile the JDK yet (sorry for the noise, if this > patch does indeed fix it all) and moreover I'm using diablo right now > (the bug is the very same...) but reading the patch it seems to change > only numpad-arrows stuff..? > > As the original reporter said "I cannot press backspace, I cannot use > the arrow keys" and no insert/home/delete/end/pageup/pagedown. The problem is still reported to me by Mercury's users (port net-im/mercury), and I can confirm it myself: the "enter" key does not work, and neither backspace (^H works). Could you please re-open this PR? Truly yours, -- Th. Thomas.
I just reconfirmed the problem is fixed with both jedit and mercury. Please ensure you running with the latest java/jdk15 that includes the corrections. Regards, -Kurt