How to reproduce:
Be sure that you use Linux, KDE and that the "NumLock"
key is on. When the jEdit window is in the foreground,
press Alt+Tab (so you switch to another window, say
your web browser). Then you switch back somehow (using
Alt+Tab or the mouse). Then you press "/" on the numpad.
"/" is inserted into the current text buffer.
The reason lies in the KeyEventWorkaround class. In an
attempt to work around certain key-event related bugs,
it also swallows some key-events.
It seems that most key-event workarounds are not needed
anymore (users need to have JDK 1.4 or greater). Also
the KeyEventWorkaround class intermixes working around
bugs and creating objects of type KeyEventTranslator.Key.
A KeyEventTranslator.Key object represents a hit key,
carring either character information if the key
represents a character to be inserted into the current
text buffer (e.g. the character 'A') or key information
if the key does not represent a character to be
inserted into the current text buffer.
To solve the problem, I circumvented the
KeyEventWorkaround class and reimplemented the
generation of KeyEventTranslator.Key objects.
The resulting patch is divided into two parts:
(1) jedit.simplifyKeyHandling.introduce.patch: This
patch just introduces the new simplified key handling,
but it does not enable it. Everything works as before
(including the bugs).
(2) jedit.simplifyKeyHandling.enable.patch This patch
just enables the simplified key handling.
It may be that the second patch lets some ancient
keyboard bugs reappear. If it is so, then revert the
second patch and please let me know what is wrong.