ROAR
ROAR

Reputation: 1324

Autohotkey: re-map arrow keys

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 & ö:: Send, {left}
lalt & å:: Send, {up}
lalt & -:: Send, {down}
lalt & ä:: Send, {right}

Any tips would be appreciated.

Upvotes: 1

Views: 1711

Answers (2)

Nimo71
Nimo71

Reputation: 11

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}

Upvotes: 1

Zusukar
Zusukar

Reputation: 382

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

Upvotes: 1

Related Questions