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 32872 - option-letter menu shortcut echoes character
Summary: option-letter menu shortcut echoes character
Status: CLOSED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2003-04-14 17:26 UTC by rlucas
Modified: 2011-06-09 09:51 UTC (History)
1 user (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 rlucas 2003-04-14 17:26:34 UTC
Hi folks,

Using option-w to access the Window menu appropriately brings up the Window menu, 
but echoes (SIGMA).  Likewise option-e to access Edit brings up the Edit menu and 
echoes (accent aigu).  Appears to behave like this whenever the cursor is live (including 
in the source editor window or while renaming files).
Comment 1 jportway 2003-04-20 12:36:57 UTC
This bug exists in 3.5 beta, and is much more irritating than the previous bug report 
suggests. The problem is not so much with shortcuts like "close window", since they can 
be redefined (in the keyboard shortcuts window)to use (for instance) the normal "meta-
W" gesture that is normal for Mac-OS to close a window and that works. 
The real problem is shortcuts that can't be redefined - the ones that really cause me 
problems tend to be in the soure editor - "option-o" to jump to the source code of the 
current element, or "shift-option-i" (or was it just "option-i", I can't remember) to 
automatically import the current element. As far as I can tell these shortcuts can't be 
redefied, so are unusable on MacOS - instead of doing what they normally do, they type 
a character instead.
My prefered fix would not be to stop them typing the charcter - since this is normal 
MacOS behaviour for these key combinations, and it's conceivable that the user would 
actually want to type these characters (when editing XML, for instance) - I would prefer 
that ALL keyboard shortcuts be redefinable in the Keyboard Shortcuts window, and that 
Netbeans would have pre-defined Keyboard Shortcut sets. Different sets could mimic 
the keyboard shortcuts of other IDE's for instance, for people migrating from them. 
MacOS users could then have a set of keyboard shortcuts by default which followed the 
normal MacOS behaviour (ie. using the Meta (Apple, or "splat") key rather than option or 
ctrl). As it is at the moment, Netbeans is quite alien to a MacOS user until they take the 
considerable time required to go through every keyboard shortcut and redefine it to the 
normal MacOS style.
Comment 2 Tomas Hurka 2003-04-24 17:33:22 UTC
You are right. I don't know what is wrong. I will investigate. Reassigning to editor, which handles keyboard events.
Comment 3 Tomas Hurka 2003-04-25 12:56:53 UTC
This bug is caused by invalid order of key events. Interesting 
thing is that the order is invalid only for combination Alt+key. 
Key events for combination Ctrl+key or Meta+key are in correct 
order.

This is the output from JEP ( http://editor.netbeans.org/doc/KeyboardIssues/JEP.java ) when pressing Alt-O
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=18,keyChar='?',modifiers=Alt,extModifiers=Alt,keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyChar='',keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=79,keyChar='',modifiers=Alt,extModifiers=Alt,keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=79,keyChar='',modifiers=Alt,extModifiers=Alt,keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=18,keyChar='?',keyLocation=KEY_LOCATION_UNKNOWN] 

The correct output should be:
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=18,keyChar='?',modifiers=Alt,extModifiers=Alt,keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=79,keyChar='',modifiers=Alt,extModifiers=Alt,keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyChar='',keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=79,keyChar='',modifiers=Alt,extModifiers=Alt,keyLocation=KEY_LOCATION_UNKNOWN] 
--------------------------------------------------------------------------------
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=18,keyChar='?',keyLocation=KEY_LOCATION_UNKNOWN] 

This bug affects all keyboard shortcuts attached to Alt+key.
I believe this bug in Apple's JDK and reported it as Radar #3240233

Comment 4 Tomas Hurka 2003-07-16 14:20:00 UTC
This bug will be fixed in next JDK release and/or update from Apple.  
Comment 5 Tomas Hurka 2003-09-09 09:44:40 UTC
Fixed by Java 1.4.1 Update 1
Comment 6 Marian Mirilovic 2011-06-09 09:51:09 UTC
v/c