RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24 Topic is solved

Report problems with documented functionality
bengo
Posts: 4
Joined: 11 Dec 2017, 08:30

RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24

11 Dec 2017, 08:55

I have the following script:

Code: Select all

*RAlt::Send {LAlt Down}
*RAlt Up::Send {LAlt Up}
The intent is to map right-alt (AltGr) to be equivalent modifier key to left-alt.

This works as intended on my old laptop with v1.1.24.01, but not on v1.1.26.01
Both machines report Windows 10 version 1703

Seems like a bug to me?
lexikos
Posts: 6207
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24

13 Dec 2017, 05:32

It relates to this fix:
Fixed RAlt/LAlt:: sometimes failing to prevent menu activation after the user alt-tabs away from a window and reactivates it.
AltGr is not RAlt, but rather LCtrl + RAlt. Your hotkey blocks RAlt, but not LCtrl, so AltGr+x produces LCtrl+LAlt+x, which probably doesn't have the effect you desire. The new behaviour is more correct, in my opinion.

It worked as you intended in v1.1.26.00 and earlier because, as part of a broken workaround for menu activation issues, AutoHotkey was sending RAlt up after blocking RAlt (as a side-effect, the target window saw a lone RAlt-up, with no RAlt-down preceding it). It appears that the system injects LCtrl up before this RAlt up event. That being the case, you can get the same result as v1.1.26.00 and earlier by sending RAlt up:

Code: Select all

*RAlt::Send {Blind}{RAlt up}{LAlt Down}
*RAlt Up::Send {Blind}{LAlt Up}
The workaround is still needed on Windows 8.1 and earlier, but instead of just sending RAlt up, it is sent (to correct the system alt state) and then blocked (to prevent side-effects such as menu activation). The system still responds by "releasing" LCtrl, so this results in Windows 10 having different behaviour to previous versions. That being the case, it is probably better to apply the workaround on Windows 10 as well. If done, the script above will have the same effect as before, but your original script will work better than in v1.1.24.01. (If RAlt up is sent and not blocked, it causes the underlines - like in File - to disappear instead of staying visible until you actually release the key.)

If you are the administrator of your computer, you will likely get better results by remapping AltGr in the registry. See How to globally map AltGr key to Alt key? - Stack Overflow.
bengo
Posts: 4
Joined: 11 Dec 2017, 08:30

Re: RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24

20 Dec 2017, 11:37

Thanks a lot for the help and suggestions, I will try your modified code on v1.1.26.00
lexikos
Posts: 6207
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24

21 Dec 2017, 06:14

Why would you do that? My "modified code" was to get "the same result as v1.1.26.00" on v1.1.26.01. If you use v1.1.26.00, there is no need to modify the code.
bengo
Posts: 4
Joined: 11 Dec 2017, 08:30

Re: RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24

21 Dec 2017, 07:43

Sorry, I meant v1.1.26.01 (or latest version in general)
lexikos
Posts: 6207
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24  Topic is solved

27 Dec 2017, 04:48

Please confirm that your original script has the behaviour you expect on v1.1.27.00.
bengo
Posts: 4
Joined: 11 Dec 2017, 08:30

Re: RAlt to LAlt mapping broken in v1.1.26, worked in v1.1.24

04 Jan 2018, 10:51

Yes I believe it does, I used v1.1.27.02 for testing.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 6 guests