Skip to content

Instantly share code, notes, and snippets.

@TeaDrivenDev
Created August 3, 2016 18:56
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 TeaDrivenDev/1f77d6730a7e678aaf1f8b4a7698fd6f to your computer and use it in GitHub Desktop.
Save TeaDrivenDev/1f77d6730a7e678aaf1f8b4a7698fd6f to your computer and use it in GitHub Desktop.
AutoHotkey script for F# development
; In case you think you may need Caps Lock again at some point,
; we'll move it over to Win+Caps Lock
#Persistent
SetCapsLockState, AlwaysOff
#Capslock::
If GetKeyState("CapsLock", "T") = 1
SetCapsLockState, AlwaysOff
Else
SetCapsLockState, AlwaysOn
Return
; Now for the F# hotkeys
; |> is Caps Lock
Capslock::SendInput |>{space}
; -> is Alt+Caps Lock
!Capslock::SendInput ->{space}
; >> is Ctrl+Caps Lock
^Capslock::SendInput >>{space}
; <| is Shift+Caps Lock
+Capslock::SendInput <|{space}
; <- is Shift+Alt+Caps Lock
+!Capslock::SendInput <-{space}
; << is Shift+Ctrl+Caps Lock
+^Capslock::SendInput <<{space}
; The following mappings' practicality is keyboard layout
; dependent
; -> German/UK
; let is Ctrl+#
^#::SendInput let{space}
; fun is Shift+Ctrl+#
+^#::SendInput fun{space}
; match with is Alt+Ctrl+#
!^#::SendInput match{space}{space}with{left}{left}{left}{left}{left}
; [| |] (Array) is Ctrl+^
^^::SendInput [|{space}{space}|]{left}{left}{left}
; (||) (Active Pattern) is Alt+^
!^::SendInput (||){space}{left}{left}{left}
; US
; let is Ctrl+\
;^\::SendInput let{space}
; fun is Shift+Ctrl+\
;+^\::SendInput fun{space}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment