* Use normalized strokes when removing duplicates only when appropriate * Use normalized stroke in `keymap.unbind` * Normalize strokes by sorting the modifiers before the keys This also sorts the modifiers in a fixed manner, decided by `modkeys.keys`. We need to do this because we display the strokes in a few places like the command palette.
15 lines
276 B
Lua
15 lines
276 B
Lua
local modkeys = {}
|
|
|
|
modkeys.map = {
|
|
["left ctrl"] = "ctrl",
|
|
["right ctrl"] = "ctrl",
|
|
["left shift"] = "shift",
|
|
["right shift"] = "shift",
|
|
["left alt"] = "alt",
|
|
["right alt"] = "altgr",
|
|
}
|
|
|
|
modkeys.keys = { "ctrl", "shift", "alt", "altgr" }
|
|
|
|
return modkeys
|