Want to make several Numpad keyboard combinations

Posted by Rivius on Sat 18 Sep 2010 04:14 AM — 12 posts, 49,892 views.

#0
I've been wanting to do a number of keystrokes to send commands for me. While MushClient allows me to use the numpad and CTRL+ Numpad, I've heard we can customize this further. I'd like to use, for example, tab+numpad or shift+numpad
USA #1
You can add arbitrary* keybindings using the Accelerator() scripting function. For example:

Accelerator("Ctrl+NumPad5", "foo")


If you want more complex bindings, you can use AcceleratorTo, which accepts a third argument, which acts similar to the "Send to" dropdown in the trigger/alias/timer editors. Pass send_to.script as the third argument and it'll run the second argument as a script. (Accelerator defaults to, um... Send to Execute, I believe.)

* barring OS/hardware limitations
#2
Ah! Ok then. But where do I add this?

And also, what would be the names of the keys /, *, -, + and Enter on the numpad?
Australia Forum Administrator #3
To see the names, go to the Input menu -> Key Name, and start pressing keys. The name is shown. Then you can copy and paste from the dialog.

As for where to put it, they need to be scripted into your workspace for each session.

There is an example of doing exactly that here:

Template:faq=39
Please read the MUSHclient FAQ - point 39.
#4
Ah! Thanks a lot Nick. One last thing! How would I make it so that with these accelerators I execute aliases?
Australia Forum Administrator #5
The default Accelerator (as on the FAQ page) does aliases.
#6
Unfortunately, it looks like using shift with the numpad ends up causing problems (such as scrolling up and down). Is there any work around to this? Or must I avoid using shift completely?
Amended on Sat 18 Sep 2010 05:59 AM by Rivius
USA #7
Shift+NumPad is a Windows thing. The operating system catches the keystroke and doesn't pass it to MC, unfortunately.

Vista/Win7 also eat Ctrl+Shift+0 for some reason.
#8
Ouch. Well I'm already using both Ctrl+Numpad and Alt+Numpad. What else can I use with it?
USA #9
Ctrl+Alt+Numpad
#10
Why not make a script that tracks your accelerator presses something like AcceleratorTo("numpad5",press(5),12)
Then have it check a code, example if you press 5540 make it do something, 341 something else, etc.
Australia Forum Administrator #11
Maybe the G15 keyboard or similar?

http://www.gammon.com.au/forum/?id=6656