How to make the keys in a hotkey global so when you change the input, still that hotkey work?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

How to make the keys in a hotkey global so when you change the input, still that hotkey work?

16 Oct 2016, 11:44

so let's say i have two input (english, persian) and i want to make keys in this hotkey (!w::SendInput, ^c) global (not sure if it's the right term) so if for example i pressed !w or (equivalent key in persian input), i want it sends ^c, in both cases. so normally i tried to also define the same hotkey for persian input: !ص::SendInput, ^c but then i'm using scite4autohotkey, and i get this message, that i don't want to see every time i reload:
Image
I'm pretty sure there's a good workaround or something, appreciate any help guys

Code: Select all

!w::SendInput, ^c
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

Re: How to make the keys in a hotkey global so when you change the input, still that hotkey work?

16 Oct 2016, 12:28

HotKeyIt wrote:Use Virtual Key and Scan Code: !VK57SC011::SendInput, ^c
thanks HotKeyIt :)

Edit: it works fine in english input, but in persian input it sends x, not ^c ? why?
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

Re: How to make the keys in a hotkey global so when you change the input, still that hotkey work?

16 Oct 2016, 12:59

HotKeyIt wrote:!VK57SC011::SendInput, ^{VK43SC03E}
oh, now I see where I goofed, thanks
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

Re: How to make the keys in a hotkey global so when you change the input, still that hotkey work?

22 Oct 2016, 12:14

HotKeyIt wrote:!VK57SC011::SendInput, ^{VK43SC03E}
i don't know what's wrong but, for example i have this part in my script for "notepad":

Code: Select all

#IfWinActive, ahk_exe NOTEPAD.EXE
!VK46SC021::SendInput, ^{VK46SC021}	; !f::SendInput, ^f
and this one for SciTE (and a couple other like this for other windows with different wintitles):

Code: Select all

#IfWinActive, ahk_class SciTEWindow
!f::SendInput, ^f
now; !f works fine in notepad (in both input lang), but it opens menu bar "File" drop down in SciTE and other windows , as if i didn't defined !f::SendInput, ^f in those windows, but if i change !f::SendInput, ^{f} in those wins to !VK46SC021::SendInput, ^{VK46SC021}, it pretty much does what it should (it kept alt down one time).

but i simply looking for something that change my keyboard keys in script to global in all languages then i don't have to find VK and SC for every hotkey that i want to put in script. I wish there was a code that i could put in my script and its keys would became global in all languages and then its hotkeys wouldn't have problem in different languages :(

i really need to get this to work, appreciate any help, tnx ;)
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

Re: How to make the keys in a hotkey global so when you change the input, still that hotkey work?

16 Nov 2016, 02:41

any other way? guys I need your help, this is becoming annoying :(
I mean there gutta be some script or something to add to script to solve this

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], ntepa, vanove and 176 guests