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 68209 - Shortcuts type extra characters into editor next to invoking the action
Summary: Shortcuts type extra characters into editor next to invoking the action
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords: JDK_SPECIFIC
: 68718 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-07 12:51 UTC by Roman Strobl
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Possible patch to fix typing of extra letters when using Ctrl-Alt-<key> shortcuts (673 bytes, patch)
2005-11-22 17:23 UTC, Miloslav Metelka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Strobl 2005-11-07 12:51:04 UTC
[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.
Comment 1 Max Sauer 2005-11-07 14:26:27 UTC
I can reproduce it, seems to be JDK specific indeed.

[nbdev 051107, JDK 1.6.0 beta b59, solaris 10/sparc]
Comment 2 Miloslav Metelka 2005-11-07 15:44:12 UTC
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
Comment 3 Roman Strobl 2005-11-07 16:18:12 UTC
It happens with Ctrl-Alt shortcuts as well.
Comment 4 Miloslav Metelka 2005-11-07 16:57:28 UTC
I also remember that there was a similar issue and Pavel F. has entered an issue
against JDK regarding this.
Comment 5 Pavel Flaska 2005-11-08 09:21:44 UTC
Roman filled issue against Mustang, see issue #60874 for reference.
Comment 6 Martin Roskanin 2005-11-16 15:38:36 UTC
*** Issue 68718 has been marked as a duplicate of this issue. ***
Comment 7 Marian Mirilovic 2005-11-17 18:49:08 UTC
This is JDK 6.0 specific, so why it isn't closed as dup of issue 60874?
Comment 8 Miloslav Metelka 2005-11-22 17:22:10 UTC
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.
Comment 9 Miloslav Metelka 2005-11-22 17:23:20 UTC
Created attachment 27162 [details]
Possible patch to fix typing of extra letters when using Ctrl-Alt-<key> shortcuts
Comment 10 Miloslav Metelka 2005-11-24 12:47:01 UTC
I'm confident that the patch is OK so I'll integrate today's evening.
Comment 11 Miloslav Metelka 2005-11-24 15:18:22 UTC
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
Comment 12 Miloslav Metelka 2005-11-24 15:29:05 UTC
*** Issue 68718 has been marked as a duplicate of this issue. ***
Comment 13 Roman Strobl 2005-12-02 12:39:36 UTC
Verified.