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.
[NetBeans custom build 11/07; FC4; JDK 1.6.0-b59] Issue Summary: -------------- When you execute a shortcut in editor another character is typed into editor. Seems to be JDK 1.6.0-specific. Steps to Reproduce: ------------------- 1. Open new Options dialog. 2. Go to Keymaps. 3. Choose Edit | Delete line action and set shortcut Ctrl-Alt-Shift-W. 4. Click OK to close Options. 5. Go to Editor and press Ctrl-Alt-Shift-W. -> Line is deleted but a character W is typed as well.
I can reproduce it, seems to be JDK specific indeed. [nbdev 051107, JDK 1.6.0 beta b59, solaris 10/sparc]
The Ctrl-Alt-<key> or Ctrl-Alt-Shift-<key> are generally reserved for typing of international characters and they should not be used for shortcuts. It might be useful to mention this e.g. in the help or in the shortcut editing dialog. Not sure whether we'll be able to resolve this but we should inspect key events being sent e.g. by http://editor.netbeans.org/doc/KeyboardIssues/JEP.java
It happens with Ctrl-Alt shortcuts as well.
I also remember that there was a similar issue and Pavel F. has entered an issue against JDK regarding this.
Roman filled issue against Mustang, see issue #60874 for reference.
*** Issue 68718 has been marked as a duplicate of this issue. ***
This is JDK 6.0 specific, so why it isn't closed as dup of issue 60874?
I have a patch that fixes the problem. In fact the same code is used in the javax.swing.text.DefaultEditorKit so it should be safe. Nevertheless I would like to ask QE team to test it as much as possible - e.g. I've tested shortly on Linux with Czech keyboard on 1.4, 1.5, 1.6 to type Euro char (Alt+E) and it appears to work fine. Please test typing of the international letters. I've inspected key events for the international letters using the JEP app and it should be consistent that the KEY_TYPED events for the typ-able chars do not reflect the modifiers (although the corresponding KEY_PRESSED and KEY_RELEASED have them). As I said it's used in DefaultEditorKit so I'm confident that the patch is OK.
Created attachment 27162 [details] Possible patch to fix typing of extra letters when using Ctrl-Alt-<key> shortcuts
I'm confident that the patch is OK so I'll integrate today's evening.
Fixed in trunk: Checking in libsrc/org/netbeans/editor/BaseKit.java; /cvs/editor/libsrc/org/netbeans/editor/BaseKit.java,v <-- BaseKit.java new revision: 1.146; previous revision: 1.145
Verified.