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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  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] Refresh page


Posted by Rivius   (99 posts)  [Biography] 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
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] 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
[Go to top] top

Posted by Rivius   (99 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] top

Posted by Rivius   (99 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] top

Posted by Rivius   (99 posts)  [Biography] 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?
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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.
[Go to top] top

Posted by Rivius   (99 posts)  [Biography] 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?
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #9 on Sun 19 Sep 2010 05:20 PM (UTC)
Message
Ctrl+Alt+Numpad
[Go to top] top

Posted by Ogomez92   (42 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] 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.


31,411 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] 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]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]