Last active
December 2, 2016 19:50
-
-
Save tamask/c5a056dc9b93c55898902d3163bfc0c6 to your computer and use it in GitHub Desktop.
Emacs keybindings and inverse mouse scroll via AutoHotKey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Capslock remapping should be done in the registry to avoid key repeat issues in here | |
; Capslock::Ctrl | |
WheelUp:: | |
Send {WheelDown} | |
Return | |
WheelDown:: | |
Send {WheelUp} | |
Return | |
; Emacs-style keybindings | |
#If !WinActive("ahk_class Emacs") && !WinActive("ahk_class mintty") && !WinActive("ahk_class GHOST_WindowClass") && !WinActive("ahk_class ConsoleWindowClass") | |
^a:: Send {Home} ; beginning of line | |
^!b:: Send ^b ; Use Control-Shift-b for bold instead of plain Control-b | |
^b:: Send {Left} ; Cursor left by one char | |
!b:: Send ^{Left} ; Cursor left by one word | |
^d:: Send {Del} ; Delete char | |
!d:: Send ^+{Right}{Delete} ; Delete word to the right | |
^e:: Send {End} ; End of line | |
^!f:: Send ^f ; Control-Alt-F to find | |
^f:: SendInput {Right} ; Cursor right by one char | |
!f:: Send ^{Right} ; Cursor right by one word | |
^+k:: Send ^k ; Use Control-Shift-k for inserting a link, instead of plain Control-K | |
^k:: Send +{End}^x ; Delete to end of line | |
!k:: Send {F8}!ef!n{NumPadDot}!f{Esc}^x ; Delete to end of sentence (actually, to next period character). | |
^n:: Send {Down} ; Cursor down one line | |
^+p:: Send ^p ; Use Control-Shift-p to print, instead of plain Control-p | |
^p:: Send {Up} ; Cursor up one line | |
;;^w:: Send ^x ; Cut | |
!w:: Send ^c ; Copy | |
^+y:: Send ^y ; Use Control-Shift-y for redo, instead of plain Control-y | |
^y:: Send +{Insert} ; Paste | |
#If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment