[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Want to make several Numpad keyboard combinations

Want to make several Numpad keyboard combinations

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Rivius   (99 posts)  Bio
Date Sat 18 Sep 2010 04:14 AM (UTC)
Message
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
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Sat 18 Sep 2010 04:19 AM (UTC)
Message
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

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Rivius   (99 posts)  Bio
Date Reply #2 on Sat 18 Sep 2010 04:31 AM (UTC)
Message
Ah! Ok then. But where do I add this?

And also, what would be the names of the keys /, *, -, + and Enter on the numpad?
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 18 Sep 2010 05:08 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Rivius   (99 posts)  Bio
Date Reply #4 on Sat 18 Sep 2010 05:20 AM (UTC)
Message
Ah! Thanks a lot Nick. One last thing! How would I make it so that with these accelerators I execute aliases?
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 18 Sep 2010 05:26 AM (UTC)
Message
The default Accelerator (as on the FAQ page) does aliases.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Rivius   (99 posts)  Bio
Date Reply #6 on Sat 18 Sep 2010 05:58 AM (UTC)

Amended on Sat 18 Sep 2010 05:59 AM (UTC) by Rivius

Message
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?
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #7 on Sat 18 Sep 2010 06:02 AM (UTC)
Message
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.
Top

Posted by Rivius   (99 posts)  Bio
Date Reply #8 on Sun 19 Sep 2010 04:46 PM (UTC)
Message
Ouch. Well I'm already using both Ctrl+Numpad and Alt+Numpad. What else can I use with it?
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #9 on Sun 19 Sep 2010 05:20 PM (UTC)
Message
Ctrl+Alt+Numpad
Top

Posted by Ogomez92   (42 posts)  Bio
Date Reply #10 on Tue 21 Sep 2010 05:24 AM (UTC)
Message
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.
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #11 on Tue 21 Sep 2010 05:45 AM (UTC)
Message
Maybe the G15 keyboard or similar?

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

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


34,042 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]