Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

CapsLock to Modify j,k,i,m to arrows, but support modifiers


  • Please log in to reply
17 replies to this topic
rathkopf
  • Members
  • 14 posts
  • Last active: Jun 23 2010 05:32 PM
  • Joined: 22 Oct 2008
Infogulch:

Thanks, but I'm trying to do this within PKL so that I can also have the nice keyboard remapping.

DreymaR:

I glanced at the source, but the time to grock it would not be trivial. :(

Xavi
  • Guests
  • Last active:
  • Joined: --
Try this code out.

$*J::
if GetKeyState("Capslock", "T")
  send {blind}{left}
else
  send {blind}{j}
return

It passes any modifiers to the left arrows. In other words, CapLock + Shift+ J is equivalent to Shift + {leftarrow}

Check out http://www.the-xavi.com/key-remapper for a full example.

varad
  • Guests
  • Last active:
  • Joined: --
What about this?
The trick is that I disabled CapsLock and then set its function again.


#NoTrayIcon

SetCapsLockState, AlwaysOff

CapsLock & i::Send {Up}
CapsLock & k::Send {Down}
CapsLock & j::Send {Left}
CapsLock & l::Send {Right}
CapsLock & h::Send {PgUp}
CapsLock & n::Send {PgDn}
CapsLock & u::Send {Home}
CapsLock & o::Send {End}
CapsLock & y::Send {Insert}
CapsLock & z::Send {Insert}
CapsLock & m::Send {Del}

CapsLock::
  state := GetKeyState("Capslock", "T")
  if state
    SetCapsLockState, AlwaysOff
  else
    SetCapsLockState, AlwaysOn
return