Skip to content

Instantly share code, notes, and snippets.

@alaindet
Created April 17, 2020 12:30
Show Gist options
  • Save alaindet/b968bf17302c669d23a894b7756778fd to your computer and use it in GitHub Desktop.
Save alaindet/b968bf17302c669d23a894b7756778fd to your computer and use it in GitHub Desktop.
AutoHotKey script to simulate Home and End with Ctrl+arrow left and Ctrl+arrow right
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^Left::Send {Home} ; Ctrl + Left = Home
+^Left::Send {LShift down}{Home}{LShift up} ; Ctrl+Shift+Left = Home (select to BOL)
^Right::Send {End} ; Ctrl+Right = End
+^Right::Send {LShift down}{End}{LShift up} ; Ctrl+Shift+Right = End (select to EOL)
; Using the "Appskey" to turn on/off remapping code
Appskey::
Suspend,Toggle
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment