This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 168687 - Keyboard mapping occasionally breaks down on Windows 7
Summary: Keyboard mapping occasionally breaks down on Windows 7
Status: RESOLVED INCOMPLETE
Alias: None
Product: editor
Classification: Unclassified
Component: Key bindings (show other bugs)
Version: 6.x
Hardware: All Windows 7 x64
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: RANDOM
: 171419 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-16 15:39 UTC by swpalmer
Modified: 2009-09-04 08:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description swpalmer 2009-07-16 15:39:25 UTC
When I use NB 6.7 for any length of time on Windows 7 (64-bit) it comes to a point where I switch to the NB editor and 
start typing and things are just rong... for example one time it appeared that the keyboard was acting like a ZWERTY 
keyboard instead of a QWERTY keyboard (pressing the Q key typed a Z, and otehr keys in that area were mixed up), other 
times the cursor keys and enter key no longer worked, but typing letters was ok.  I confirmed that typing and cursors 
were still working properly in other native Windows applications, so it was just NB that lost it's mind about how the 
keyboard bindings were supposed to work.
This has happened to me several times, but I don't know yet how to trigger this behavior.
Comment 1 Vitezslav Stejskal 2009-07-16 16:58:53 UTC
Can you try other swing applications eg java notepad (java -jar $JAVA_HOME/demo/jfc/Notepad/Notepad.jar) and test if the
same happens with them? Thanks
Comment 2 Jiri Prox 2009-08-19 15:47:51 UTC
Unfortunately there is no feedback from reported, I'm afraid that without requested info we cannot do anything about it.
Closing as Invalid for now.

Feel free to reopen and provide requested info if it is still reproducible
thanks
Comment 3 swpalmer 2009-08-30 02:31:47 UTC
This is still reproducable... NB is in this state at this very moment (after I had left the IDE iconified for a day). I
started the Java notepad now and it is working... I will leave it running to see if it ever gets into the same state.

I have just discovered more information...  The Java editor window is currently ignoreing cursor keys and the enter
key.. but if I put the focus in the output panel (or project panel, or navigator panel, etc.), the cursor keys are
working fine!  So there is different behavior within Netbeans in different panels.

If the focus is in the editor window, cursor up and down are scrolling the text (like CTRL+UP/DOWN should?) instead of
moving the cursor position to other lines... there is no modifier key being pressed, and it would seem this is not a
problem with the keyboard because other applications are not affected.

When I press modifier keys (including CTRL)+Up/Down it does not scroll, nor does it move the cursor.
Comment 4 Vitezslav Stejskal 2009-08-31 13:54:36 UTC
From your description of the editor window behavior I assume that for some reason the window lost its keymap. Normally
all the keybindings are loaded when an editor window is opened and the map is set to this window. If the map is missing
the keystrokes are handled by the editor's parent in the containment hierarchy, which is a scrollpane. Therefore most
keys don't work and arrows scroll the text rather than moving the caret.

I'm not sure how to debug this. Does it always happen after the IDE is left idle for some time (eg. iconified)? If you
found a way how to reproduce this that would be great.
Comment 5 swpalmer 2009-09-01 03:22:53 UTC
I have always noticed this when returning to NB after some time, only on Windows 7 x64 (last available RC).  Everything was working normally when I last was 
typing in NB.  I would cycle through editing and debugging many times.  I would then go to some other application (web browser, maybe a game) and the 
editor keymap would be messed up when I returned.  I will continue to look for more information in hopes to narrow this down.

Note in the last case that I wrote about above, most printable characters were working as expected - I'm not sure what that means in terms of the"lost 
keymap" theory.  Also not the original example I gave where some keys were produce odd results - (e.g. hit the "Q" key typed a "Z").
Comment 6 Vitezslav Stejskal 2009-09-04 08:43:08 UTC
*** Issue 171419 has been marked as a duplicate of this issue. ***