Page 1 of 1

Numpad 4 + Numpad 5 = Numpad 8 ?

Posted: 25 Sep 2017, 04:44
by henrychang
I wrote a script for entering numbers faster when the input method is in Chinese (which is my mother language).

Code: Select all

#1::Send {Numpad1}
#2::Send {Numpad2}
#3::Send {Numpad3}
#4::Send {Numpad4}
#5::Send {Numpad5}
#6::Send {Numpad6}
#7::Send {Numpad7}
#8::Send {Numpad8}
#9::Send {Numpad9}
#0::Send {Numpad0}
I think this is an simple script. However, pressing winkey+4+5 or pressing winkey+4 then release 4 and quickly press 5 will often give me a "485","458" or "548".
This bug also applies to winkey+6+7, giving me "687" or "768" or so.
Other combinations don't have any problems (like winkey+1+2).
What might be the cause of this bug?
Thank you in advance!

Re: Numpad 4 + Numpad 5 = Numpad 8 ?

Posted: 26 Sep 2017, 08:40
by dmg
I can't seem to reproduce the issue... If I can't see what it is doing then it is very hard to figure out WHY it might be doing it. :(

Can you explain more about how the script is supposed to be used?

Re: Numpad 4 + Numpad 5 = Numpad 8 ?

Posted: 26 Sep 2017, 14:16
by iPhilip
You might want to put this line:

Code: Select all

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
at the top of your script to improve reliability.

Re: Numpad 4 + Numpad 5 = Numpad 8 ?

Posted: 26 Sep 2017, 14:34
by Exaskryz
You mention Chinese is your mother language -- do you use Chinese language on your computer?

My suspicion is that your keyboard and/or the operating system language (and keyboard driver) are very peculiar. Have you tried NOT running your script and pressed Win+4+5to see if it produces a Numpad8 or 8? How about 4+5 without the Windows key?

There may be a workaround regardless if we can diagnose the problem. You can make a Numpad8 or 8 hotkey that does nothing by just using the Return command. You might even just turn on and off his hotkey with the Hotkey command.

Code: Select all

#4::
Hotkey, Numpad8, On
SetTimer, Numpad8_TurnOff, -200
Send {Numpad4}
return

Numpad8_TurnOff:
Hotkey, Numpad8, Off
return

Numpad8::return ; when on, the Numpad8 key is disabled
Now, it may not be the Numpad8 key that is the produced key stroke if all you see is "8" produced on screen. So you may need to turn off the 8 key as well by using 8::return instead. And also, initially, you may want to use in the auto-execute section Hotkey, Numpad8, Off.

Re: Numpad 4 + Numpad 5 = Numpad 8 ?

Posted: 01 May 2018, 00:26
by henrychang
Thanks everyone for the help. It turn out that even turning off the script will have this problem. I shifted the number hotkeys from windows key to alt key.