Thanks to the poster and the answers so far; these helped me solve my similar issue: I have keyboard shortcuts on my desktop PC's text editor that use Ctrl+Alt+..., and I wanted to be able to use them when accessing the machine remotely.
With this AHK script, I type Win instead of Alt and I'm able to accomplish the commented commands below. Now regardless of which PC I use to access the remote desktop PC (i.e., when home or traveling), I can use my shortcuts (and Win is pretty near Alt). Here's my AHK script:
;Send Ctrl+Alt+Left keys when user types Ctrl+Win+Left
^#Left::
send !^{Left}
return
;Send Ctrl+Alt+Right keys when user types Ctrl+Win+Right
^#Right::
send !^{Right}
return
;Send Ctrl+Alt+Up keys when user types Ctrl+Win+Up
^#Up::
send !^{Up}
return
;Send Ctrl+Alt+Down keys when user types Ctrl+Win+Down
^#Down::
send !^{Down}
return
;Send Ctrl+Alt+Shift+Left keys when user types Ctrl+Win+Shift+Left
^#+Left::
send !^+{Left}
return
;Send Ctrl+Alt+Shift+Right keys when user types Ctrl+Win+Shift+Right
^#+Right::
send !^+{Right}
return
;Send Ctrl+Alt+Shift+Up keys when user types Ctrl+Win+Shift+Up
^#+Up::
send !^+{Up}
return
;Send Ctrl+Alt+Shift+Down keys when user types Ctrl+Win+Shift+Down
^#+Down::
send !^+{Down}
return
Note, I use "Apply windows key combinations...On the remote computer" in Remote Desktop Connection, so I run this script on the remote computer.
While there are probably more efficient AHK ways to do this, the above works for me. Hope this helps someone else, too.
1
This combinations are Remote Desktop's hotkeys (https://serverfault.com/a/73568/238181)
– Lu55 – 2018-06-06T21:36:02.923possible duplicate of How to send Ctrl+Alt+End to Remote Desktop
– Ƭᴇcʜιᴇ007 – 2011-08-25T12:04:37.817