#2534 Please Test: NumPad keys after Alt+Tab window switch

closed-fixed
None
5
2008-05-10
2006-05-13
No

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.

Expected behaviour:
"/" is inserted into the current text buffer.

Actual behaviour:
nothing happens.

Discussion:
The reason lies in the KeyEventWorkaround class. In an
attempt to work around certain key-event related bugs,
it also swallows some key-events.

Solution:
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.

Thank you.

Discussion

  • Alan Ezust

    Alan Ezust - 2006-05-13
    • assigned_to: nobody --> ezust
     
  • Alan Ezust

    Alan Ezust - 2006-06-05
    • assigned_to: ezust --> nobody
     
  • Alan Ezust

    Alan Ezust - 2006-06-05
    • assigned_to: nobody --> mediumnet
     
  • Alan Ezust

    Alan Ezust - 2006-06-05

    Logged In: YES
    user_id=935841

    This bug is marked as "fixed", but still left "open" in
    status because we want more people to test the new keyboard
    handling functionality.

    It's been committed to CVS:jedit 4.3pre5.

     
  • Alan Ezust

    Alan Ezust - 2006-06-05
    • summary: NumPad keys do not work after Alt+Tab window switch --> Please Test: NumPad keys after Alt+Tab window switch
    • status: open --> open-fixed
     
  • Matthieu Casanova

    Logged In: YES
    user_id=285591

    Hi, another bug that is fixed by the new keyboard handling
    is the following :
    I add a line
    :encoding=UTF-324354: (an encoding that doesn't exists)
    I have the dialog complaining about that, and after the
    dialog is closed my numpad do not work. But the patch fixes it.

    But I have a new bug :
    I have a shortcut ctrl+alt+F to add explicit fold that is
    broken by the new keyboard handling.
    This is probably related with bug 1493185

     
  • Xuan Baldauf

    Xuan Baldauf - 2006-06-22

    Logged In: YES
    user_id=506885

    Hello kpouer,

    please retest this problem using newest jEdit from CVS. I
    cannot reproduce your Ctrl+Alt+F-Problem with the newest CVS
    version.

    I cannot find any bugs of the new key event handling
    anymore, so I'm closing this bug as fixed. Does anybody
    disagree?

     
  • Xuan Baldauf

    Xuan Baldauf - 2006-06-22
    • status: open-fixed --> closed-fixed
     
  • Matthieu Casanova

    • status: closed-fixed --> open
     
  • Matthieu Casanova

    Logged In: YES
    user_id=285591

    Hi, I reopen the bug because it stills happens here. With
    new keyboard handling I'm unable to type CTRL+ALT+F
    When using Keyboard tester it gets nothing
    here are the debug informations
    Event KEY_PRESSED,keyCode=0x12,keyChar=0xffff,modifiers=0x8
    filtered
    Event KEY_PRESSED,keyCode=0x11,keyChar=0xffff,modifiers=0xa
    filtered
    Event KEY_PRESSED,keyCode=0x46,keyChar=0x6,modifiers=0xa passed
    Event KEY_RELEASED,keyCode=0x11,keyChar=0xffff,modifiers=0x8
    filtered
    Event KEY_RELEASED,keyCode=0x12,keyChar=0xffff,modifiers=0x0
    filtered
    Event KEY_RELEASED,keyCode=0x46,keyChar=0x6,modifiers=0x0 passed

    Matthieu

     
  • Xuan Baldauf

    Xuan Baldauf - 2006-06-23

    Logged In: YES
    user_id=506885

    Hello Matthieu,

    could you try to "reinstall" they key combination Ctrl+Alt+F
    in the "Utilities/Global Options.../Shortcuts" menu?

    Because, with old key handling, when pressing Ctrl+Alt+F, I
    receive "CA+f f" as shortcut, which is wrong indeed. With
    new key handling, when pressing Ctrl+Alt+F, I receive
    "CA+f", which should be correct.

    Maybe you stored the shortcut at a time where new key
    handling was not activated.

     
  • Matthieu Casanova

    Logged In: YES
    user_id=285591

    Hi, I tried but it's not working, with the new keyboard
    handling pressing ctrl+alt+F when setting a shortcut or in
    keyboard tester do nothing.

     
  • Xuan Baldauf

    Xuan Baldauf - 2006-06-23

    Logged In: YES
    user_id=506885

    Hello Matthieu,

    I would like you to specify your operating system, Java
    version, desktop manager. Can you write the exact text
    showed in the shortcut settings for the shortcut (like
    "CA+f" or "CA+F").

     
  • Matthieu Casanova

    Logged In: YES
    user_id=285591

    Hi, I'm using Windows XP SP2. I tried with JVM 1.4.2_09 and
    1.5.0_07, both have the same bug.
    Nothing showed in the shortcut settings when I try to set it
    using new keyboard handling

     
  • Xuan Baldauf

    Xuan Baldauf - 2006-09-21

    Logged In: YES
    user_id=506885

    Hello kpouer,

    does the problem still persist with the current SVN trunk
    version of jEdit? I'm currently unable to reproduce the problem.

     
  • Xuan Baldauf

    Xuan Baldauf - 2006-09-21
    • status: open --> open-fixed
     
  • CharlesB05

    CharlesB05 - 2007-02-21

    Logged In: YES
    user_id=1213997
    Originator: NO

    The bug is still here in 4.3 pre9
    after a alt-tab the num pad doesn't work.

    config:
    Windows XP
    french keyboard
    JRE 5.0 update 11

     
  • batooh

    batooh - 2007-11-15

    Logged In: YES
    user_id=1845541
    Originator: NO

    Hi, I'm currently using jEdit 4.3pre11 (Java 1.6.0_03) and recently noticed the Alt+Tab numpad bug. It occurs for me on both, Linux and Windows.
    After switching with Alt+Tab between different windows the numpad will not work unless a regular key is pressed.
    I hope someone is able to find a solution for this bug as it can get quite annoying (at least when not looking at the screen while typing).

     
  • Xuan Baldauf

    Xuan Baldauf - 2007-11-16

    Logged In: YES
    user_id=506885
    Originator: YES

    batooh,

    is this bug reproducible if you switch on "Utilities/Global options.../jEdit/General/Use new keyboard handling (experimental)"?

     
  • batooh

    batooh - 2007-11-16

    Logged In: YES
    user_id=1845541
    Originator: NO

    Hello mediumnet, I activated the "Use simplifed keyboard handling" option and it solved the problem on Linux immediately. Thank you for the hint, I wasn't aware of that option.

    And I'm afraid, but I guess I was wrong when I said the problem would also appear on Windows. I tried to reproduce it today on Windows XP but to my surprise the numpad worked as it is expected to do. So there doesn't seem to be a problem at all.

     
  • Alan Ezust

    Alan Ezust - 2008-05-10
    • status: open-fixed --> closed-fixed
     
  • Alan Ezust

    Alan Ezust - 2008-05-10

    Logged In: YES
    user_id=935841
    Originator: NO

    Simplified keyboard handling is now removed from jEdit core.
    Any bugs against keyboard handling should be re-filed.

     

Log in to post a comment.