enhance: binding decorations

This commit is contained in:
Konstantinos Kaloutas
2022-09-16 13:57:00 +03:00
parent b6ad16417e
commit 33edc94de3

View File

@@ -93,11 +93,12 @@
(defn decorate-binding [binding]
(-> (if (string? binding) binding (str/join "+" binding))
(str/replace "mod" (if util/mac? "cmd" "ctrl"))
(str/replace "mod" (if util/mac? "" "ctrl"))
(str/replace "alt" (if util/mac? "opt" "alt"))
(str/replace "shift+/" "?")
(str/replace "left" "←")
(str/replace "right" "→")
(str/replace "shift" "⇧")
(str/replace "open-square-bracket" "[")
(str/replace "close-square-bracket" "]")
(str/lower-case)))