Page 1 of 1

not work when !]:: Send("^{Insert}a")

Posted: 15 Feb 2024, 00:02
by ZhuangQu

Code: Select all

!]:: Send("^{Insert}a")
When pressing Alt+] we expect it to copy and type "a", but "a" is not typed as expected (select all instead).

For comparison, the following code works fine when pressing Shift+]

Code: Select all

+]:: Send("^{Insert}a")

Re: not work when !]:: Send("^{Insert}a")

Posted: 15 Feb 2024, 00:28
by ZhuangQu
My version is 2.0.10

Re: not work when !]:: Send("^{Insert}a")

Posted: 17 Feb 2024, 17:32
by mcl
ZhuangQu wrote: When pressing Alt+] we expect it to copy and type "a", but "a" is not typed as expected (select all instead).
Is this behaviour consistent between left Alt and right Alt? I have a suspicion it's AltGr issue.

Re: not work when !]:: Send("^{Insert}a")

Posted: 18 Feb 2024, 07:35
by ZhuangQu
mcl wrote:
17 Feb 2024, 17:32
Is this behaviour consistent between left Alt and right Alt? I have a suspicion it's AltGr issue.
Thank you for your insight! This bug only occurs at the right Alt.

Re: not work when !]:: Send("^{Insert}a")

Posted: 01 Mar 2024, 00:16
by lexikos
I am dubious. The hotkey !]:: would not execute if you held AltGr, because the system treats AltGr as Alt+Ctrl. Pressing AltGr+] would have the same effect as without the script, which is not to select all. On the US International layout, it is to produce ». Even !»:: doesn't execute if I press AltGr+], although ^»:: does.

Re: not work when !]:: Send("^{Insert}a")

Posted: 14 Mar 2024, 02:30
by ZhuangQu
lexikos wrote:
01 Mar 2024, 00:16
I am dubious. The hotkey !]:: would not execute if you held AltGr, because the system treats AltGr as Alt+Ctrl. Pressing AltGr+] would have the same effect as without the script, which is not to select all. On the US International layout, it is to produce ». Even !»:: doesn't execute if I press AltGr+], although ^»:: does.
Can you reproduce this bug on the right Alt? The left Alt is fine.

Re: not work when !]:: Send("^{Insert}a")

Posted: 14 Mar 2024, 03:32
by lexikos
Alt and AltGr are not the same thing. AltGr is always on the right.

What keyboard layout are you using?

Re: not work when !]:: Send("^{Insert}a")

Posted: 15 Mar 2024, 06:59
by ZhuangQu
lexikos wrote:
14 Mar 2024, 03:32
Alt and AltGr are not the same thing. AltGr is always on the right.

What keyboard layout are you using?
I'm in China and I use US keyboard layout, so I don't have the AltGr key. When executing

Code: Select all

!]:: Send("^{Insert}a")
my AutoHotkey history is

Code: Select all

A5  138	 	d	3.50	RAlt           	
DD  01B	 	d	0.31	]              	
A2  01D	i	d	0.00	LControl       	
A5  138	i	u	0.00	RAlt           	
2D  152	i	d	0.00	Insert         	
2D  152	i	u	0.00	Insert         	
41  01E	i	d	0.00	a              	
41  01E	i	u	0.00	a              	
11  01D	i	d	0.00	Control        	
A5  138	i	d	0.00	RAlt           	
11  01D	i	u	0.00	Control        	
DD  01B	 	u	0.09	]              	
A5  138	 	u	0.03	RAlt           	
There's no AltGr.

Re: not work when !]:: Send("^{Insert}a")  Topic is solved

Posted: 22 Mar 2024, 20:15
by lexikos
Fixed by v2.0.12.

@ZhuangQu it would have been helpful to say that when mcl first brought up AltGr.