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 60874 - Ctrl+Alt shortcuts don't work in editor under JDK 6.0
Summary: Ctrl+Alt shortcuts don't work in editor under JDK 6.0
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All Linux
: P4 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
: 60302 65663 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-12 12:08 UTC by Marian Mirilovic
Modified: 2007-11-05 13:44 UTC (History)
5 users (show)

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 Marian Mirilovic 2005-07-12 12:08:17 UTC
NB.dev(continual build 12/07), JDK 6.0(b42)

Steps to reproduce:
- run IDE
- open project
- write some code and select it
- press Ctrl+Alt+S (Surround with ...) or Ctrl+Alt+F (Find usages ..)
-> code is replaced by "S" or "F" !

I found out that it works well with JDK 5.0_04 as well as all other combinations
of shortcuts work (Alt+Shift, Ctrl+Shift). All shortcuts work without any
problems in Views (Project, Files, ...)
Probably it's a JDK bug, but we need to adress it before releasing JDK6.0.
Comment 1 Roman Strobl 2005-07-12 12:21:23 UTC
Mariane, it works for me under WinXP with b42. On which OS does it fail?
Comment 2 Roman Strobl 2005-07-12 12:25:54 UTC
*** Issue 60302 has been marked as a duplicate of this issue. ***
Comment 3 Marian Mirilovic 2005-07-12 12:46:40 UTC
Linux RH 9 / Gnome
Comment 4 Jesse Glick 2005-07-12 23:09:00 UTC
FC3 + Gnome for me. The shortcuts work, but they also insert the (unmodified)
letter in the editor window.
Comment 5 Miloslav Metelka 2005-09-06 08:23:42 UTC
We should examine the behavior by using instructions in
http://editor.netbeans.org/doc/KeyboardIssues/KeyboardIssues.html
Reassigning to Pavel.
Comment 6 Pavel Flaska 2005-09-06 15:37:46 UTC
The character is written before the action is called. Bug is mostly
reproducible, but sometimes it works correctly.
Comment 7 Pavel Flaska 2005-09-06 16:49:06 UTC
The difference is in key event. When you type ctrl+alt+s, you will get different
value in keyChar attribute:
JDK1.5: java.awt.event.KeyEvent[keyChar='s']
JDK1.6: java.awt.event.KeyEvent[keyChar='^S']

All other attributes in event is the same, i.e. modifiers are Ctrl+Alt etc.
Comment 8 Jesse Glick 2005-09-06 19:14:18 UTC
Sounds like a Mustang bug to me - will you file it?
Comment 9 Pavel Flaska 2005-09-07 10:30:58 UTC
Jano will suggest better shortcuts. We should not use Ctrl+Alt shortcuts as
default, because Ctrl+Alt is used for writing local characters. There are still
possibility that user will redefine shortcuts. One solution is forbid Ctrl+Alt
shortcut.
Comment 10 Pavel Flaska 2005-09-07 10:33:30 UTC
I will file the bug to Mustang and will add reference here.
Comment 11 Pavel Flaska 2005-09-08 16:20:54 UTC
Romane, can you add the reference to Mustang bug? Thanks.
Comment 12 Roman Strobl 2005-09-08 16:48:49 UTC
Sorry I forgot, here it is:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6320676

It will take some time before it appears on web.
Comment 13 Pavel Flaska 2005-09-20 10:16:56 UTC
Jano, can you, please, suggest another keyboard shortcuts?
Comment 14 jrojcek 2005-09-21 12:07:48 UTC
New shortcuts:

Find Usages: Alt-Shift-U (Ctrl-Shift-U on Mac)
Surround with: Alt-Shift-W (Ctrl-Shift-W on Mac)

For release after 5.0 we'll do a complete revamp of NetBeans shortcuts.

Please talk to Hanz, as I already told him to change the shortcuts for 5.0. So it might be already done. 
Thanks.
Comment 15 Pavel Flaska 2005-09-21 14:55:09 UTC
Changed shortcuts.

Checking in refactoring/src/org/netbeans/modules/refactoring/resources/mf-layer.xml;
/cvs/refactoring/src/org/netbeans/modules/refactoring/resources/mf-layer.xml,v 
<--  mf-layer.xml
new revision: 1.31; previous revision: 1.30
done
Checking in
java/editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml;
/cvs/java/editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml,v
 <--  DefaultKeyBindings.xml
new revision: 1.4; previous revision: 1.3
done

Lowering priority as it is reproducible only with Tiger with user redefined
shortcuts.
Comment 16 Marian Mirilovic 2005-11-15 10:56:07 UTC
*** Issue 65663 has been marked as a duplicate of this issue. ***
Comment 17 Miloslav Metelka 2005-11-29 15:31:50 UTC
This is IMHO fixed by fix of issue 68209.
Comment 18 Marian Mirilovic 2006-01-16 15:15:34 UTC
verified in NB 5.0 - RC1