I am bilingual (English and Persian), and I regularly switch between keyboard input languages by pressing Alt + Shift. Since it's not an easy type, I am trying to create a hotstring in Auto Hot Key (AHK) to send Alt + Shift by pressing jf:
:*?:jf::
SendInput, {AltDown}{Shift}{AltUp}
Return
While this works perfect, I need to press the same keys in Persian language to switch back to English, so I updated the code to:
:*?:jf::
:*?:تب::
SendInput, {AltDown}{Shift}{AltUp}
Return
Now, the second line doesn't work, and by putting a breakpoint on the SendInput line, pressing those keys in Persian, does not even trigger the hotstring. Any solution? Thanks!
Here are the things I've tried to fix and failed:
- Using Send and SendInput methods
- swapping the order of
jfandتبlines - Compiling the code to see if the .exe works