Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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