Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » keybinding '+' key
keybinding '+' key [message #301646] Mon, 03 April 2006 13:46 Go to next message
Eclipse UserFriend
I want to bind a command to the Ctrl+'+' key combination. I'm using the keySequence M1++ in my plugin.xml, but it doesn't seem to work. If I change to some other key combination the command does work. So do I need to escape the + somehow? Or is it a special key like PAGE_UP or ARROW_LEFT?

Thanks,
Chris
Re: keybinding '+' key [message #301647 is a reply to message #301646] Mon, 03 April 2006 13:48 Go to previous messageGo to next message
Eclipse UserFriend
Check out the constants in SWT ... if ARROW_LEFT works maybe KEYPAD_ADD
will work.

Later,
PW
Re: keybinding '+' key [message #301803 is a reply to message #301646] Wed, 05 April 2006 19:34 Go to previous messageGo to next message
Eclipse UserFriend
I guess I will respond to my own post with the obvious answer. Don't bind to '+' and instead use '=' instead.

Chris
Re: keybinding '+' key [message #301804 is a reply to message #301803] Wed, 05 April 2006 20:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Does it work with the keypress Ctrl+Shift+=, since + is usually Shift+= on a keyboard? Just curious :-)

It would be better to use Ctrl++ and then have the user have to press Ctrl+Shift+=, since it's not always the case that the + is on the same key as the = is. Plus, if you have a numeric keypad, that is + as well.

Alex.
Re: keybinding '+' key [message #301901 is a reply to message #301804] Fri, 07 April 2006 17:26 Go to previous messageGo to next message
Eclipse UserFriend
No, actually it doesn't work for Ctrl+Shift+=.

When I first attempted to do this, I was originally trying trying to model the behavior after Firefox for increasing the text size. I just checked FF's behavior and it actually supports Ctrl+= and Ctrl+Shift+=. The accelerator shows 'Ctrl++'. That brings up an interesting question to me. If a person saw the accelerator of 'Ctrl++' would he normally press 'Ctrl+=' or 'Ctrl+Shift+='?

While searching for solutions to my problem, I came across <a href="http://jcommander.sourceforge.net/">JCommander</a> which uses 'Ctrl+='. I think this solution is good enough for me.

Also, I think you can get numpad + by using the special key of "NUMPAD_ADD".
Re: keybinding '+' key [message #302197 is a reply to message #301646] Sat, 15 April 2006 21:49 Go to previous message
Eclipse UserFriend
I believe you have something wrong some where else. I've just tested the keybinding M1++ and it worked perfectly well.

I'm using Eclipse 3.1.2 on WindosXP.
Previous Topic:Update Manager - Custom Install handler
Next Topic:Update Manager - Custom Installer
Goto Forum:
  


Current Time: Sun Nov 09 17:58:40 EST 2025

Powered by FUDForum. Page generated in 0.04199 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top