How make "alt gr" + "<" give me "ctrl" Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
temptest
Posts: 3
Joined: 18 May 2022, 03:57

How make "alt gr" + "<" give me "ctrl"

Post by temptest » 18 May 2022, 04:14

I bought a new laptop and did not notice at the time in the store that it did not have any right ctrl key, they move the key for "<>|" there instead. Which is a bit irritating because now I need to do some shortcuts commands with both hands instead of only with right hand as before. The keys are now "space", "alt gr", "<>|", "arrow keys".

Is it possible with AHK to make so when I press both "alt gr"+"<" it will give me "ctrl"? Exemple so I could do like "virtul-ctrl"+"other key" command? How would a script like that look like? Thanks

User avatar
mikeyww
Posts: 26940
Joined: 09 Sep 2014, 18:38

Re: How make "alt gr" + "<" give me "ctrl"  Topic is solved

Post by mikeyww » 18 May 2022, 05:32

I'm not sure whether this always works, but it's an idea. It's for US keyboard, where , and < are on the same key.

Code: Select all

<^>!<::
SetKeyDelay -1
Send {Blind}{Ctrl DownR}{, up}{Shift up}{RAlt up}
SoundBeep, 1500
KeyWait, `,
Send {Blind}{Ctrl up}
SoundBeep, 1000
Return

temptest
Posts: 3
Joined: 18 May 2022, 03:57

Re: How make "alt gr" + "<" give me "ctrl"

Post by temptest » 19 May 2022, 13:26

mikeyww wrote:
18 May 2022, 05:32
I'm not sure whether this always works, but it's an idea. It's for US keyboard, where , and < are on the same key.

Code: Select all

<^>!<::
SetKeyDelay -1
Send {Blind}{Ctrl DownR}{, up}{Shift up}{RAlt up}
SoundBeep, 1500
KeyWait, `,
Send {Blind}{Ctrl up}
SoundBeep, 1000
Return
Thanks for the try, but unfortunately it did not work.

User avatar
mikeyww
Posts: 26940
Joined: 09 Sep 2014, 18:38

Re: How make "alt gr" + "<" give me "ctrl"

Post by mikeyww » 19 May 2022, 13:57

OK. Worked here!

KeyHistory will show you the keys being pressed. You may be able to adjust accordingly.

temptest
Posts: 3
Joined: 18 May 2022, 03:57

Re: How make "alt gr" + "<" give me "ctrl"

Post by temptest » 19 May 2022, 16:01

SORRY, it did work, Thanks :D

I first tested it with the stand alone AutoHotkey_2.0-beta.3 that didn´t need to be installed, but I just got a lot of errors then. But this time, after I saw your last comment that it work for you, I installed AHK (with AutoHotkey_1.1.34.02_setup.exe) and this time it work. So it was shit behind the keyboard, me :)

Thanks a lot again, I really appreciate your help.

Post Reply

Return to “Ask for Help (v1)”