Normalize strokes in fixed order (#1572)

* 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.
This commit is contained in:
Guldoman
2023-08-26 08:52:10 +08:00
committed by takase1121
parent eb27e543b4
commit 3d93e16597
3 changed files with 24 additions and 18 deletions
+1 -1
View File
@@ -13,6 +13,6 @@ modkeys.map = {
["right alt"] = "altgr",
}
modkeys.keys = { "cmd", "ctrl", "alt", "option", "altgr", "shift" }
modkeys.keys = { "ctrl", "alt", "option", "altgr", "shift", "cmd" }
return modkeys