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 60835 - Alt+P shortcut writes "PI" to editor
Summary: Alt+P shortcut writes "PI" to editor
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 5.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: SIMPLEFIX
: 64011 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-11 12:19 UTC by Jaromir Uhrik
Modified: 2007-11-05 13:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot attached... (9.34 KB, image/png)
2005-07-11 12:19 UTC, Jaromir Uhrik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2005-07-11 12:19:06 UTC
The shortcut for constructor parameters completion is Alt+P now. Pressing this
combination on Mac causes writing of "PI" into editor. See attached screenshot.
Comment 1 Jaromir Uhrik 2005-07-11 12:19:56 UTC
Created attachment 23051 [details]
Screenshot attached...
Comment 2 Martin Matula 2005-09-11 20:09:46 UTC
*** Issue 64011 has been marked as a duplicate of this issue. ***
Comment 3 Martin Matula 2005-09-11 20:10:11 UTC
This looks similar to issue 52142. Probably a duplicate.
Comment 4 _ tboudreau 2005-09-16 08:58:38 UTC
The bug here is that the binding tries to use Alt on the mac.  Alt cannot be
used for keybindings on macintosh - it is used in most european locales for
composing international characters.

There is automagic support for keybindings which map to Alt on PC, Ctrl on mac -
just specify the binding using "O" rather than "A" in the layer (i.e. O-P, not A-P).

Do the same for Ctrl-based bindings - specify "D-P" to get Command-P on mac,
Ctrl-P everywhere else.

All Ctrl-based keybindings in NetBeans should be mapped to Command on mac (using
"D" in the binding descriptor does this).  All Alt-based keybindings in NetBeans
should be mapped to Ctrl on mac (using "O" in the binding descriptor does this).
  Do not try to do Alt-based keybindings on mac, it won't work (or if it does,
it will block some users from normal typing).

Suggest either close this issue as wontfix and open a new one, or change its
description to "Parameter completion should not be hard-bound to Alt"
Comment 5 _ tboudreau 2005-09-29 06:41:25 UTC
This really needs to be fixed for 5.0 - just bind it to Ctrl (or use the O- shortcut binding and it will work 
everywhere).  It's a 2 character change to fix this.
Comment 6 Miloslav Metelka 2005-11-07 14:35:14 UTC
Will be fixed into 5.0. We need to check whether the action is properly
configurable in the CompletionImpl.
Comment 7 Miloslav Metelka 2005-11-15 10:16:57 UTC
The shortcut is taken dynamically from the options. Reassigning to Hanz to
change the "A" modifier to "O" as suggested by Tim.
Comment 8 Jan Jancura 2005-11-16 23:00:22 UTC
Is it still valid? I can not find such action in NetBeans.
Comment 9 Jan Jancura 2005-11-29 08:15:27 UTC
There is no such shortcut.
Comment 10 Jaromir Uhrik 2005-12-08 09:34:58 UTC
This doesn't work for me. This is still valid issue and I agree with Tim that it
should be fixed for 5.0. 
Comment 11 Jan Jancura 2006-01-03 09:02:20 UTC
Too late to fix in nb5.0.
Comment 12 Max Sauer 2006-11-20 15:51:49 UTC
This issue is still valid inside current trunk.
---
NetBeans IDE Dev (Build 20061120-1032)
1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-64
Mac OS X version 10.4.8 running on ppc
en_US (nb); MacRoman
Comment 13 Max Sauer 2006-11-20 15:57:45 UTC
Sorry. It looks like the shortcut has been removed from default configuration. Nothing is currently bound 
to "Options|Keymap|Other|Show CC Tip Popup". Ctrl-P is currently free, will it be possible to map this 
shortcut to this action just for Mac users?
Comment 14 Vitezslav Stejskal 2006-12-04 03:31:12 UTC
Alt-P should be fixed now as well as some other keybindings. I don't have Mac,
can somebody please test it on Mac. Thanks.

Checking in NetBeans-keybindings.xml;
/cvs/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml,v
 <--  NetBeans-keybindings.xml
new revision: 1.4; previous revision: 1.3
done
Comment 15 Jaromir Uhrik 2006-12-06 08:21:03 UTC
NetBeans IDE Dev (Build 200612051900)
1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-64
Mac OS X version 10.4.8 running on ppc
en_US (nb); MacRoman

I still have the same problem with "PI". Sorry but I have to reopen this issue
again.
Comment 16 Vitezslav Stejskal 2007-01-22 07:52:24 UTC
I am sorry, this will sound really stupid, but what exactly do you mean that you
have the same problem? The tooltip-show action is now bound to Ctrl+P on Mac.
Pressing Alt+P on Mac will not invoke the action, but it will write 'something'
to the editor (probably the "PI"). Could you please check that Ctrl+P shows the
tooltip?

Please see also my comments to issue #77129.
Comment 17 Jaromir Uhrik 2007-03-21 15:27:16 UTC
Ctrl-P is now working fine for invoking tool-tip with method parameters.
Verified in following build:
NetBeans IDE Dev (Build 200703181900)
1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87
Mac OS X version 10.4.8 running on i386
en_US (nb); MacRoman