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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Hotkeys From Other Windows

Hotkeys From Other Windows

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


Posted by Xvordan   (29 posts)  [Biography] bio
Date Mon 04 Jul 2016 11:37 PM (UTC)
Message
I'm trying to develop a plugin set for a visually impaired friend of mine. She wants the ability to hit tab to go from the main output window to an output log which would let her easily re-read history from the mud, without it scrolling away. That part I can handle, but she also wants tab to be able to switch her right back to the output window. Can MUSHClient accept script accelerators if the main output window is not currently the one in focus? More specifically, can MUSH capture keystrokes if I'm in a notepad window?

I know I can use control tab to do all this, but they have various physical complications which makes activating multikey combinations a strain on their hands.
[Go to top] top

Posted by Nick Gammon   Australia  (22,991 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 05 Jul 2016 (UTC)
Message
I don't think I can remap hotkeys like that. A possible solution is the "recent history" plugin:

http://gammon.com.au/forum/?id=9454

It may not suit, but it shows current output in a miniwindow, and appears when you scroll back. So, you can scroll back and read old conversations without missing any new messages.

Another possibility is the Chat Capture Miniwindow:

http://gammon.com.au/forum/?id=10728

That takes the opposite approach, chats (or anything you choose) are saved in a miniwindow, so you can scroll back and look at them while the main output continues in the output window.

Since both of these are miniwindows in the main window, you should be able to remap accelerator keys to suit using them.

Being miniwindows you also can choose whatever font or font size you like for rendering the text.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Wuggly   USA  (112 posts)  [Biography] bio
Date Reply #2 on Tue 05 Jul 2016 02:12 AM (UTC)

Amended on Tue 05 Jul 2016 02:14 AM (UTC) by Wuggly

Message
Would Activate() or ActivateClient() work for something like that?

Template:function=Activate Activate

The documentation for the Activate script function is available online. It is also in the MUSHclient help file.



Template:function=ActivateClient ActivateClient

The documentation for the ActivateClient script function is available online. It is also in the MUSHclient help file.

[Go to top] top

Posted by Nick Gammon   Australia  (22,991 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 05 Jul 2016 10:41 AM (UTC)
Message
I don't see how they will help because you can't map a hotkey to them when the notepad window is active.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Wuggly   USA  (112 posts)  [Biography] bio
Date Reply #4 on Tue 05 Jul 2016 05:52 PM (UTC)

Amended on Tue 05 Jul 2016 06:26 PM (UTC) by Wuggly

Message
Right. Would probably be easier if he used another program, like autohotkey.

https://autohotkey.com/

It's been a few years since I've used it, but here's a very simple example using the 1 and 2 keys to switch between the windows.


1::WinActivate, MUSHclient
2::WinActivate, Untitled - Notepad


I'm sure there's better ways, like assigning alt+tab to just tab or something.
[Go to top] top

Posted by Nick Gammon   Australia  (22,991 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Tue 05 Jul 2016 07:55 PM (UTC)
Message
I haven't used Autohotkey, but that may be a solution. Depending on how fancy you wanted to get, you could also try something like an Arduino Micro or Arduino Leonardo.

They have a USB interface, and can "pretend" to be a keyboard. You could conceivably wire one up to a nice large switch (push-button) in such a way that when you want to do something you thump the switch.

Then the Leonardo/Micro could send Ctrl+Tab to the PC. You would need some minimal assembly skills to connect the switch to the device in a reasonably secure manner. For example, a plastic box, drill a hole for the switch's physical mounting, and run a couple of wires to the Arduino.

There must also be commercial devices that do a similar thing - programmable keyboards. I know of a foot-switch, for example, which is used to stop and start playback of an audio file while you are transcribing speech. I presume it can be configured to send whatever key strokes you want.

Having said that though, Autohotkey might be the simplest, if you can get it to work.

- 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.


17,698 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]