Home Download Buy Blog Forum Support

Keymapping "gray" (numeric) keypad keys

Keymapping "gray" (numeric) keypad keys

Postby gesman on Tue Jun 19, 2012 7:24 pm

Hello,
I creating Brief emulation via User keymap and it has special functions attached to "gray" (numeric) keypad keys: *, - and + (different from regular *, -, +)
For example gray * == "undo".
But this keymapping won't work because it will prevent entering * completely:
{ "keys": ["*"], "command": "undo" }

So I wonder if Sublime editor somehow allows differentiating between "gray" and normal keys?

Gleb
gesman
 
Posts: 2
Joined: Tue Jun 19, 2012 7:19 pm

Re: Keymapping "gray" (numeric) keypad keys

Postby gesman on Tue Jun 19, 2012 7:40 pm

PS: resolved:

{ "keys": ["keypad_multiply"], "command": "undo" }
OR:
{ "keys": ["keypad_multiply"], "command": "soft_undo" }

Gleb
gesman
 
Posts: 2
Joined: Tue Jun 19, 2012 7:19 pm

Re: Keymapping "gray" (numeric) keypad keys

Postby JeffD on Sun Jul 29, 2012 10:17 pm

A bit OT but for other people looking for 'keypad_insert' or 'keypad_ins', it's keypad0 :)
JeffD
 
Posts: 1
Joined: Sun Jul 29, 2012 3:28 pm

Re: Keymapping "gray" (numeric) keypad keys

Postby jsturtridge on Tue Aug 14, 2012 12:47 pm

And here's a fuller list of the numeric keypad items:

keypad0
keypad1
keypad2
keypad3
keypad4
keypad5
keypad6
keypad7
keypad8
keypad9
keypad_period
keypad_divide
keypad_multiply
keypad_minus
keypad_plus
keypad_enter

HTH - J.
jsturtridge
 
Posts: 1
Joined: Thu Jul 26, 2012 6:54 am

Re: Keymapping "gray" (numeric) keypad keys

Postby nick. on Tue Aug 14, 2012 12:53 pm

You can also enter sublime.log_input(True) in the console to see which keys are passed through to Sublime.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Keymapping "gray" (numeric) keypad keys

Postby dp0815 on Mon Aug 27, 2012 11:02 am

Hi Gleb!

Did you manage to create a complete brief keymap file?

I would love to have good old brief notation, and most likely I'm not the only one.
Could you possibly post your *.sublime-keymap file here?

It would be highly appreciated.
Thank you in advance!

Lukas
dp0815
 
Posts: 1
Joined: Mon Aug 27, 2012 10:57 am

Re: Keymapping "gray" (numeric) keypad keys

Postby linuxguy on Thu Oct 24, 2013 11:28 pm

For all you Brief, CRiSP, and MultiEdit users who want the Brief keystroke mappings, you can insert these into your Preferences...Key Bindings - User file:

{ "keys": ["alt+w"], "command": "save" },
{ "keys": ["alt+x"], "command": "exit" },
{ "keys": ["alt+e"], "command": "prompt_open_file" },
{ "keys": ["ctrl+-"], "command": "close_file" },
{ "keys": ["keypad_multiply"], "command": "undo" },
{ "keys": ["keypad_minus"], "command": "cut" },
{ "keys": ["keypad_plus"], "command": "copy" },
{ "keys": ["insert"], "command": "paste" },
{ "keys": ["alt+i"], "command": "toggle_overwrite" }

that's just a start. Much more can be added.
hope it helps,

Cool Linux Guy
"Life is good."
linuxguy
 
Posts: 1
Joined: Thu Oct 24, 2013 11:19 pm

Re: Keymapping "gray" (numeric) keypad keys

Postby tomconlon7@gmail.com on Wed Jul 16, 2014 10:52 am

Great - thanks gesman.

If anyone has more extensive Brief keystroke mappings and would like to share then that'd be appreciated.
Tom
tomconlon7@gmail.com
 
Posts: 1
Joined: Wed Jul 16, 2014 10:50 am

Re: Keymapping "gray" (numeric) keypad keys

Postby posniewski on Thu Jul 17, 2014 7:38 pm

IIRC, the keypadN only work when it's in numlock mode.

This sets keypad-5 (with numlock off) to scroll the line with the cursor to the center of the screen.
{ "keys": ["clear"], "command": "show_at_center" },

I prefer "soft_undo", which undoes motion in steps (though it does bundle some motion together) as well as actual edits.
{ "keys": ["keypad_multiply"], "command": "soft_undo" },
posniewski
 
Posts: 2
Joined: Wed Oct 10, 2012 1:21 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 21 guests