Tab

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jrachr
Posts: 543
Joined: 01 Mar 2021, 17:33

Tab

15 Oct 2021, 17:43

Why does this not work ~Q::Tab
User avatar
mikeyww
Posts: 26849
Joined: 09 Sep 2014, 18:38

Re: Tab

15 Oct 2021, 20:10

If your goal is to send Tab after Shift+Q, you can do it this way:

Code: Select all

~+q::Send {Tab}
jrachr
Posts: 543
Joined: 01 Mar 2021, 17:33

Re: Tab

16 Oct 2021, 07:55

Sorry Mike. Should have been a little more clear. My goal is to be able to use q as tab hence ~q::Tab but still have q as normal key. According to documentation using the tilde should make it work but for me it does not. Any ideas? Tk's
User avatar
mikeyww
Posts: 26849
Joined: 09 Sep 2014, 18:38

Re: Tab

16 Oct 2021, 08:00

When you press the key Q, what should happen?
jrachr
Posts: 543
Joined: 01 Mar 2021, 17:33

Tab

16 Oct 2021, 11:59

When I press q(Does not have to be Capitol q) I want it to be Tab but also remain q if I am using it as a regular letter. IE when notepad,word,is open etc. As I said according to documentation if I have the ~ in front of it it should work but it does not. Tk's.
User avatar
mikeyww
Posts: 26849
Joined: 09 Sep 2014, 18:38

Re: Tab

16 Oct 2021, 16:16

Your description is not clear. Give specific examples for each case. Are you simply wanting different actions depending on the specific target window? If so, then what are the specific windows, and what should happen in each of them?
jrachr
Posts: 543
Joined: 01 Mar 2021, 17:33

Re: Tab

16 Oct 2021, 20:16

I want q to be the Tab Key. But I also want it to be the q key.
20170201225639
Posts: 144
Joined: 01 Feb 2017, 22:57

Re: Tab

16 Oct 2021, 20:29

jrachr wrote:
16 Oct 2021, 11:59
When I press q(Does not have to be Capitol q) I want it to be Tab but also remain q if I am using it as a regular letter. IE when notepad,word,is open etc. As I said according to documentation if I have the ~ in front of it it should work but it does not. Tk's.
but how's the computer supposed to tell when you want which to happen?

Code: Select all

#If not NotepadWordEtcIsOpen()
q::Tab
#If

NotepadWordEtcIsOpen(){
for i, e in ["ahk_exe notepad.exe", "ahk_class OpusApp"]
    if WinActive(e)
        return 1
}
User avatar
mikeyww
Posts: 26849
Joined: 09 Sep 2014, 18:38

Re: Tab

17 Oct 2021, 05:05

Code: Select all

GroupAdd, q, ahk_exe notepad.exe
GroupAdd, q, ahk_exe WINWORD.exe
GroupAdd, q, ahk_exe iexplore.exe
GroupAdd, q, ahk_exe chrome.exe
GroupAdd, q, ahk_exe firefox.exe
GroupAdd, q, ahk_exe msedge.exe
#IfWinNotActive ahk_group q
q::Tab
#IfWinNotActive
jrachr
Posts: 543
Joined: 01 Mar 2021, 17:33

Re: Tab

17 Oct 2021, 07:10

Thank you all for your help.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: dipahk and 242 guests