开发者

Autohotkey: re-map arrow keys

开发者 https://www.devze.com 2023-02-06 04:16 出处:网络
I\'m trying to re-map the arrow keys to a combination of Alt-key to get them more centered on the keyboard. The problem is that I cant get the combination with shift to work (for selecting text while

I'm trying to re-map the arrow keys to a combination of Alt-key to get them more centered on the keyboard. The problem is that I cant get the combination with shift to work (for selecting text while moving the cursor).

This is a starting point:

lalt & ö开发者_JS百科:: Send, {left}
lalt & å:: Send, {up}
lalt & -:: Send, {down}
lalt & ä:: Send, {right}

Any tips would be appreciated.


This only fixes it for Shift.

lalt & ö::
  If GetKeyState("Shift", "D") = true
    Send, +{Left}
  Else
    Send, {Left}
Return

lalt & å::
  If GetKeyState("Shift", "D") = true
    Send, +{Up}
  Else
    Send, {Up}
Return

lalt & -::
  If GetKeyState("Shift", "D") = true
    Send, +{Down}
  Else
    Send, {Down}
Return

lalt & ä::
  If GetKeyState("Shift", "D") = true
    Send, +{Right}
  Else
    Send, {Right}
Return


You can declare alt modifier with ! and shift with +
Combine them to give alt + shift

!ö:: Send, {left}
!å:: Send, {up}
!-:: Send, {down}
!ä:: Send, {right}

+!ö:: Send, +{left}
+!å:: Send, +{up}
+!-:: Send, +{down}
+!ä:: Send, +{right}
0

精彩评论

暂无评论...
验证码 换一张
取 消