enhance(shortcuts): expose shortcut cmd map from the pallette cmd to display more information for plugin shortcut col

This commit is contained in:
charlie
2023-05-15 11:32:47 +08:00
parent be94f6886a
commit 7d5f4e62c1
4 changed files with 22 additions and 6 deletions

View File

@@ -944,10 +944,14 @@
(fn [v]
(vec (remove #(:inactive (get all-default-keyboard-shortcuts %)) v)))))
(def *shortcut-cmds (atom {}))
(defn add-shortcut!
[handler-id id shortcut-map]
(swap! config assoc-in [handler-id id] shortcut-map))
(swap! config assoc-in [handler-id id] shortcut-map)
(swap! *shortcut-cmds assoc id (:cmd shortcut-map)))
(defn remove-shortcut!
[handler-id id]
(swap! config medley/dissoc-in [handler-id id]))
(swap! config medley/dissoc-in [handler-id id])
(swap! *shortcut-cmds dissoc id))