Skip to content

Instantly share code, notes, and snippets.

View exoefe's full-sized avatar
🍦
Ice Cream

Alex exoefe

🍦
Ice Cream
View GitHub Profile
@ulic-youthlic
ulic-youthlic / capslock.ahk
Last active September 1, 2024 07:46
map my <CapsLock> to <Esc>(alone) and <C-x>(with other key) using AutoHotKey v2.0.
#Requires AutoHotkey v2
; Install the keyboard hook to capture the real key state of the keyboard
InstallKeybdHook(true)
; Disable the CapsLock key
SetCapsLockState("alwaysoff")
; Send esc key when Capslock is pressed as default
g_DoNotAbortSendEsc := true
$*Capslock::{ ; Capture CapsLock key press
global g_DoNotAbortSendEsc ; use global variable g_DoNotAbortSendEsc
@tanyuan
tanyuan / smart-caps-lock.md
Last active September 16, 2024 13:15
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.