Reputation: 1201
I want to create a hotkey using a backslash key (\
). Namely, I would like to assign Media_Prev
to Windows button + backslash. I have tried both LWin & \::Media_Prev
and #\::Media_Prev
. However, these do not work: it just normally sends the backslash character. In AutoHotkey's key history, I do see that both \
and LWin
register when I press this key combination.
Interestingly, something like LWin & c::Media_Prev
or #v::Media_Prev
does work well, just not with the backslash character.
Upvotes: 1
Views: 4892
Reputation: 12184
I successfully tested the following:
<#vk dc::Send {Media_Prev}
<
is Left key#
is Windows keyVK DC
is virtual key number DC (you can find this code using AHK menu View > Key History and Script Info). With VK, the same key works regardless of active keyboard layout.Note: Don't do LWin & key
or Ctrl & key
etc... &
has a bit different meaning. For the above purpose AHK provides prefixes as shown above, e.g. ^b
or #F1
etc. See AHK help on Remapping Keys and Buttons
Upvotes: 1