Showing posts with label Autohotkey. Show all posts
Showing posts with label Autohotkey. Show all posts

Sunday, March 24, 2013

Vim like cursor keys Autohotkey

if you want to use vim cursor keys for directional navigation like h j k l, you could use the following auto hotkey script shared by redditt user dirtywizard.

HJKL navigation while holding down space key Autohotkey script :

 

    #If GetKeyState("Space", "P")
    $h::
    Send {LEFT}
    sendSpace := false
    return
    $j::
    Send {DOWN}
    sendSpace := false
    return
    $k::
    Send {UP}
    sendSpace := false
    return
    $l::
    Send {RIGHT}
    sendSpace := false
    return
    #If
     
    $Space::
    sendSpace := true
    return
     
    $Space Up::
    if (sendSpace)
        SendInput {Space}
    return
‏

r/vim discussion