Skip to content

Instantly share code, notes, and snippets.

@justintanner
Created April 6, 2019 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justintanner/272aa3a9b5834a1e4027aaaa3702efbe to your computer and use it in GitHub Desktop.
Save justintanner/272aa3a9b5834a1e4027aaaa3702efbe to your computer and use it in GitHub Desktop.
Can AutohotKey emulate Emac's text selection?
#SingleInstance
#Installkeybdhook
#UseHook
SetKeyDelay 0
global selecting := False
SendWithShift(keys)
{
If (selecting)
{
Send +%keys%
}
Else
{
Send %keys%
}
}
^Space::
selecting := !selecting
Return
^n::
SendWithShift("{Down}")
Return
^p::
SendWithShift("{Up}")
Return
^f::
SendWithShift("{Right}")
Return
^b::
SendWithShift("{Left}")
Return
^a::
SendWithShift("{Home}")
Return
^e::
SendWithShift("{End}")
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment