Control overrides/releases Alt Gr Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
PirateYarr
Posts: 2
Joined: 04 Dec 2021, 09:57

Control overrides/releases Alt Gr

Post by PirateYarr » 04 Dec 2021, 10:30

Hi!

I have a problem I have not been able to solve yet. I've been looking for an answer in the forums but couldn't find anything quite similar.

My case is: I'm trying to create a new arrow cluster on my keyboard. To do this, I'm using Alt Gr as a function key to rebind the i, j, k and l keys to up, left, down and right respectively. That part is easy and works fine. However, I want to be able to use the regular modifier such as CTRL or SHIFT to be able to use the new arrow keys to jump entire words such as CTRL + LEFT would do for instance. Likewise, I want to be able to hold SHIFT while holding Alt Gr to use the new arrow keys to select text, as SHIFT + LEFT does for example. And of course, I want to be able to use both CTRL and SHIFT at the same time as Alt Gr and the new arrow keys, to select entire words with the new arrow keys.

The problem is, as soon as I release CTRL while already holding Alt Gr and using ijkl keys for navigation, Alt Gr is released as well, forcing me to re-press Alt Gr to navigate with ijkl once again. Meanwhile, using SHIFT and Alt Gr + ijkl does nothing at all.

How can I tackle this problem? What causes the release of CTRL to also release Alt Gr? What causes the SHIFT button to completely block the Alt Gr + ijkl combo?

Here is the part of my script where Alt Gr is used as a modifier:

Code: Select all

; | Create a New Arrow Cluster +++++++++++++++++++ |
<^>!p::
	Send {Up}
	return

<^>!ö::
	Send {Down}
	return

<^>!l::
	Send {Left}
	return

<^>!ä::
	Send {Right}
	return
There are no parts of the script that use CTRL as a modifier.

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

Re: Control overrides/releases Alt Gr  Topic is solved

Post by mikeyww » 04 Dec 2021, 11:38

Code: Select all

<^>!j::Send {Left}
<^>!+j::Send +{Left}
<^>!>^j::Send ^{Left}
<^>!>^+j::Send ^+{Left}
There could be better approaches to this!

Perhaps of interest: viewtopic.php?p=432155#p432155

PirateYarr
Posts: 2
Joined: 04 Dec 2021, 09:57

Re: Control overrides/releases Alt Gr

Post by PirateYarr » 04 Dec 2021, 13:49

mikeyww wrote:
04 Dec 2021, 11:38

Code: Select all

<^>!j::Send {Left}
<^>!+j::Send +{Left}
<^>!>^j::Send ^{Left}
<^>!>^+j::Send ^+{Left}
There could be better approaches to this!

Perhaps of interest: viewtopic.php?p=432155#p432155
Hey, thanks for the reply! I understand your approach and it works, thank you for that. I agree with you - something tells me there is a better way to achieve this but I will implement this for now and look further into this after :)

Post Reply

Return to “Ask for Help (v1)”