I would like to remap the standard Windows 10 Desktop hotkeys Ctrl-Win-Left (Right) to AltGr-Left (Right) so that I can change desktops with one hand.
I thought it should be pretty straghtforward, but I must be a dummy because I am running into all sorts of issues. Here is the script I have been playing with:
Code: Select all
#Requires AutoHotkey v2.0
>!Right::^<#Right
>!Left::^<#Left
; >!Left::Send '^<#{Left}'
; >!Left::Send "{LCtrl down}{LWin down}{Left}{LWin up}{LCtrl up}"
1. Lines 4 and 5 simply do not work. I tried all combinations of Send I could, none has ever done anything. I have no clue why.
2. The keyboard is configured as US International, thus it has AltGr (which works as expected and generates the right characters). However, <^>!Left (Right) never worked, only the above >!Left (Right). Experimented with a tilde as well, no luck.
3. Lines 2 and 3 sort of work, but they cause a weird activation of a window on the target desktop with the status bar popping up and the windows icon in it highlighted. When I use an alternative keyboard layout that does not have AltGr, only a regular Alt, then before switching the desktop the active window receives the angle bracket character (< or >).
In summary:
- I am unable to map just the Right Alt key as a modifier in either keyboard layout (US International or SK Qwerty)
- I am unable to reliably inject the right codes to just make the desktops switch without either dropping a character in the currently active window, or "activating" the to-be-active window.
Any help would be much appreciated.
Bill