-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use mouse button combo as HotKey #2
Comments
Thanks for your feedback! Regarding the usage of both mouse buttons as the hotkey:
Regarding the UI blocking issue:
|
Thanks for the update, the reset.exe is useful!
I get where you are coming from. I'm also the living example of why having mouse button as a hot key is scary :D. On the other hand, I do believe an entirely trackball-driven work flow (independent of keyboard) is a legitimate use case. For example, in working with two computers -- each with their own trackball but only one keyboard shared between the two -- it would be useful to be able to use the script on the computer not currently connected to the keyboard. People coming from things like a Ploopy would also appreciate this kind of mouse button-driven "layer switch" (where the ball behaves differently depending on which "layer" the device is in, much like a programmable keyboard). What I'm trying to say is, the capability of having mouse button as the hotkey will bring this gem to a broader audience. Regarding blocking mouse input, would it be possible to just block cursor motion but not button clicks? Or automatically exit the scroll mode upon certain button presses but ignore the others? Incidentally I think being able to enter and exit scroll mode with different triggers would be a useful feature (e.g., enter only on a single hotkey, but exit on a broader selection, such as Esc). Taking a page from Ploopy (or any QMK device), logically it is to implement layer switching with mouse buttons, where the behavior of both the buttons and the ball are independent between different layers (the user is responsible for having an exit strategy from higher layers back to the base layer, but the "firmware" is responsible for providing a mechanism). I suppose the difficulty is really in implementing this logic in AHK (or perhaps AHK is not adequate in that regard -- I don't really have the grasp on AHK to tell).
The problem I had was that the script (through my faulty hotkey setup) blocked button clicks so I was able to invoke Task Manager but cannot kill the task using mouse clicks. This of course echoes your earlier comment that using mouse buttons as hotkeys is scary.
The registry thing is very minor and the reset.exe you provided would have been sufficient for the scenario that required me to go into the registry (namely to restore a clean slate). Unfortunately my knowledge of AHK stops at writing a simple keyboard remapper, but I'm definitely interested to look into it more when time permits, now that I have a motivation ;) |
It's been a while since I had time to work on this project, but I just released a new version that might address your needs in terms of mouse buttons. Not sure if you're still interested in using this script, but just thought I'd let you know. Any feedback would be immensely appreciated! |
Thank you! I tested one- and two-key MO with mouse buttons, and they both work very well (The one-key MO will block the original function of the assigned mouse button, which is why I also tried the two-key MO, and it works even with 2-key sym). The only thing I can think of that might potentially improve user experience is to change the mouse icon while in scroll mode, to give some visual indication. Would it be possible to add a one-key toggle with a delay (but in a sense opposite to the hold delay currently implemented for 2-key MO)? The use case I have in mind is to toggle scrolling by holding the middle mouse button for more than, say, 500 ms. A two-key toggle would also be very useful (so it doesn't block the function of the individual keys) but I imagine there are technical difficulties. Thanks again for the awesome work! |
Thank you very much for creating this script. This is the best drag scroll implementation I've used in terms of smoothness, not just among AHK scripts (the ones I found online previously were just unusable), but even when compared to e.g. XMBC. And I needed an AHK implementation because XMBC is blocked on work computer but AHK is allowed.
I'm trying to use a mouse combo of left+right click as the hotkey. For that I put
~RButton & LButton
as the HotKey in the Settings. This spits out the error message,and then points to line 144 as where the error happened, which is
How should I set the hotkey field to use the combination of left+right click to act as the hot key?
A somewhat unrelated issue that came up while I was trying to make the mouse button hotkey work: there is currently no way to disable the script, and no easy way to change the parameters, if/when the UI is blocked. I made the mistake of putting
LButton & RButton
as the first attempt of the hotkey, on top of having the script run automatically on startup. Needless to say, that freezes my mouse buttons (and movement for some reason), preventing me from accessing the UI to change it back, and since it's on startup autorun, it essentially locks up the machine. I was eventually able to kill AHK from cli (for anyone reading this and wondering, use win+r to open up cmd.exe, and then runtaskkill /f /im autohotkeyu64.exe
), and after that, upon reading the code, found out that the settings are stored in windows registry. I suggest adding a fail safe mechanism such as some hotkey to disable the script. Saving settings to a plain text file might also be more user-friendly under such circumstances (so I'd be able to revert the settings relatively easily with keyboard only operations).The text was updated successfully, but these errors were encountered: