I'm gaming with only one hand and need to get one of my mouse buttons to toggle shift when pressed. I'm using:
xbutton2::
toggle := !toggle
if toggle
Send {LShift down}
else{
Send {LShift up}
return
Which will hold down the shift key but will not release it until I actually press the shift key itself regardless of toggle state (you can tell it's toggling because I have to push xbutton2 twice to toggle it back to on). {LShift up} doesn't actually seem to let go of the key press. It does the exact same thing with Ctrl.
Any insight would be appreciated. Would it be easy to just send a single LShift keypress after it's toggled off again?
Toggle to hold down not releasing key
-
- Posts: 5
- Joined: 09 Mar 2020, 16:01
Re: Toggle to hold down not releasing key
Hallo,
try:
or:
try:
Code: Select all
*XButton2 Up::Send,% GetKeyState("LShift")?"{LShift Up}":"{LShift DownR}"
Code: Select all
#InstallKeybdHook
XButton2 Up::Send, {LShift DownR}
<+XButton2 Up::Send, {LShift Up}
-
- Posts: 5
- Joined: 09 Mar 2020, 16:01
Re: Toggle to hold down not releasing key
Thanks Rohwedder, that works just fine!
Who is online
Users browsing this forum: mexican scientist and 72 guests