Force correct (right or left) shift key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kenneth_chiu
Posts: 2
Joined: 19 Aug 2017, 11:34

Force correct (right or left) shift key

19 Aug 2017, 12:21

My daughter often uses the wrong shift key (for example, using the left shift key when typing capital F or dollar sign). I'd like to write a script that will force the correct shift key. It seems that one way to do this would be to just create a wildcard modifier hotkey for every key, and then use GetKeyState and if-statements to differentiate between the different cases. This would be tedious, however. I was wondering if there was a better way to do this.
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: Force correct (right or left) shift key

19 Aug 2017, 14:16

repeat for each key / wrong shift combo

Code: Select all

LShift & f::
LShift & 5::
return

Edit:
or maybe something like

Code: Select all

for k, v in StrSplit("qazwsedcrfv``12345")
	Hotkey, LShift & %v%, nothing
for k, v in StrSplit("tgbyhnujmik,ol.p;/[']\67890-=")
	Hotkey, RShift & %v%, nothing
return

nothing:
return
kenneth_chiu
Posts: 2
Joined: 19 Aug 2017, 11:34

Re: Force correct (right or left) shift key

24 Aug 2017, 18:00

Excellent, the second suggestion seems to working fine. Thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], gabelynn1 and 334 guests