microkeys
Keyboard shortcuts TypeScript can check. About 2 kB, inspired by tinykeys.
CtrlKCommand palette
GthenISD
CtrlAltShiftWin
Hold any modifier↑↑↓↓←→←→BA
10-key sequenceInstall
$ npm i microkeysUsage
import { microkeys } from "microkeys"
const unsubscribe = microkeys(window, {
"$mod+k": () => openPalette(),
"g i": () => goTo("/inbox"),
"Shift+(F[1-9])": (event) => openTab(event.key),
"Hyper+q": quit, // Type error: "Hyper" isn't a modifier
})