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 65399 - [50cat] Command key is not handled properly when trying to add a new Keymap Shortcut
Summary: [50cat] Command key is not handled properly when trying to add a new Keymap S...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 5.x
Hardware: Macintosh Mac OS X
: P3 blocker with 1 vote (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-29 17:45 UTC by dkkopp
Modified: 2007-11-05 13:40 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 dkkopp 2005-09-29 17:45:46 UTC
[ JDK VERSION : 1.5.0_04 ]

On OS X, the add shortcut code is not working correctly with the command key.

Open the new Options dialog.
Select Keymap.
Expand Project
Select Build Main Project.
Click on the Add button.
Press Command B

What shows up in the Shortcut text field is:

Meta+ Meta+B

The other control keys appear to work properly.
Comment 1 jrose 2005-10-22 23:52:34 UTC
Note that "Meta-" appears as soon as the modifier key is pressed.
Meta- appears by itself as if it were a separate bindable key.
(This is probably the bug.)
When pressing the shifted Z, "Meta-" appears again.
Press OK on dialog.
Press OK on Options panel.
Get a pop-up complaint about NPE.  Details below.
Cannot exit the Options panel until the offending new binding is removed.


java.lang.NullPointerException
    at org.netbeans.modules.options.actionsimpl.Utils.getKeyStroke(Utils.java:149)
    at org.netbeans.modules.options.actionsimpl.Utils.getKeyStrokes(Utils.java:101)
    at org.netbeans.modules.options.keymap.KeymapViewModel.convertToEmacs
(KeymapViewModel.java:346)
    at org.netbeans.modules.options.keymap.KeymapViewModel.apply(KeymapViewModel.java:321)
    at org.netbeans.modules.options.keymap.KeymapPanel.applyChanges(KeymapPanel.java:271)
    at org.netbeans.modules.options.keymap.KeymapPanelController.applyChanges
(KeymapPanelController.java:37)
    at org.netbeans.modules.options.OptionsPanel.save(OptionsPanel.java:322)
    at org.netbeans.modules.options.OptionsWindowAction.actionPerformed(OptionsWindowAction.java:
76)
    at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed
(NbPresenter.java:1066)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1872)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247)
    at java.awt.Component.processMouseEvent(Component.java:5166)
    at java.awt.Component.processEvent(Component.java:4963)
    at java.awt.Container.processEvent(Container.java:1613)
    at java.awt.Component.dispatchEventImpl(Component.java:3681)
    at java.awt.Container.dispatchEventImpl(Container.java:1671)
    at java.awt.Component.dispatchEvent(Component.java:3543)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3242)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172)
    at java.awt.Container.dispatchEventImpl(Container.java:1657)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3543)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Comment 2 Jan Jancura 2005-11-22 14:55:57 UTC
this bug has already been fixed