mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 18:06:32 +00:00
enhance(shortcuts): expose shortcut cmd map from the pallette cmd to display more information for plugin shortcut col
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user