I use a program that uses \ as a shortcut.

I use a French AZERTY keyboard, where the backslash can only be typed using a key combination: Alt Gr+8 (or Ctrl+Alt+8).

So I cannot activate the shortcut (unless I switch Windows to a US keyboard layout).

I thought AutoHotkey would be able to solve the issue, but remapping a key to backslash does not work as intended:

; TRY 1: using Send
Send \

; TRY 2: simple remap

AutoHotkey actually sends the key combination Ctrl+Alt+8, so the shortcut is not triggered.

Is there any way for AutoHotkey to send the "real" \ key, while keeping my AZERTY layout in Windows?

  • Try this example of mapping Ctrl-X to your key-sequence : ^x::send {Ctrl down} {Alt down} 8 {Alt up} {Ctrl up} – harrymc Apr 23 at 11:06
  • @harrymc This does not work. A key sequence is not recognized by the program as a valid shortcut. Doing this manually does work either. – Sébastien Apr 25 at 6:55
  • This worked for me, but may not solve your specific problem. – harrymc Apr 25 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.