Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Patch for ALT Key Handling
Patch for ALT Key Handling
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Pink Olifaunt
(11 posts) Bio
|
Date
| Thu 19 Jul 2007 11:45 PM (UTC) Amended on Thu 19 Jul 2007 11:57 PM (UTC) by Pink Olifaunt
|
Message
| Hello everyone,
I like to use ALT for macros because it's the only modifier I can press without moving my fingers from the home row. Unfortunately ALT+[x] also opens menus, and releasing ALT focuses the menu bar, which tends to lead to accidental menu openings. For example, it's pretty frustrating to type "fl" to flee, only to be presented with the "Log Game" dialog because you've accidentally focused the menu bar :)
This isn't something that MUSHClient specifically does, rather the behaviour is common to any application that uses standard Windows menus. The same thing happens in ZMud and MM2K.
Since Nick has very kindly open-sourced MUSHClient, I've written a small patch against the 4.12 source which adds an option to the general prefs dialog that allows the user to suppress the standard processing of ALT. Specifically, when the option is turned on, ALT+[x] combinations no longer open menus, and releasing ALT or F10 no longer focuses the menu bar.
The implementation is to selectively throw away WM_SYSCOMMAND messages before they are passed to DefWindowProc. See the comments in the source if you're interested.
The patch is actually two patches, one against the 4.12 source and the other against the 4.11 resources project. The process for using them is something like this:
- 'cd' to the mushclient source directory and do "patch < mushclient_patch".
- 'cd' to the mushclient_resources directory and do "patch < mushclient_resources_patch".
- Build mushclient_resources to get a new 'en.dll'. You'll also need to copy 'resource.h' into the mushclient source directory, replacing the existing one.
- Build mushclient.
Naturally you'll need the GNU patch utility.
The patch is here:
http://pink.olifaunt.googlepages.com/altkey_patch.zip
and there's a binary here:
http://pink.olifaunt.googlepages.com/altkey_patch_binaries.zip
if you want to see it in "action".
I've been using the patched binary for a couple of days and haven't seen any problems, but if anyone actually uses this and finds one, feel free to PM me and I'll fix it.
|
http://pink.olifaunt.googlepages.com/home | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #1 on Fri 20 Jul 2007 05:23 AM (UTC) |
Message
| I'd love to see an option to disable the alt key by itself focusing on the menu bar. I use the alt key a lot to switch between desktops, and I frequently wind up in a menu option I didn't want.
Perhaps this patch could be added to the official MUSHclient program source, especially for those of us who can't compile due to a lack of MFC libraries. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Pink Olifaunt
(11 posts) Bio
|
Date
| Reply #2 on Fri 20 Jul 2007 06:50 AM (UTC) |
Message
|
Quote: I'd love to see an option to disable the alt key by itself focusing on the menu bar.
This patch does that too. |
http://pink.olifaunt.googlepages.com/home | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 20 Jul 2007 07:29 AM (UTC) |
Message
| Thank you for releasing that. You have the honour of being the first to post a suggested amendment to the source code.
I'll look at incorporating that into the next release. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Pink Olifaunt
(11 posts) Bio
|
Date
| Reply #4 on Sat 21 Jul 2007 07:00 PM (UTC) |
Message
| That's great, thanks! |
http://pink.olifaunt.googlepages.com/home | 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,182 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top