mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
enhance(ux): management for the property shortcuts in the global shortcuts module
This commit is contained in:
@@ -888,18 +888,7 @@
|
||||
util/node-test?
|
||||
(state/editing?))))
|
||||
(state/close-modal!)
|
||||
(hide-context-menu-and-clear-selection e))
|
||||
|
||||
(and
|
||||
(not (or (.-ctrlKey e) (.-metaKey e) (.-altKey e)))
|
||||
(not (util/input? (.-target e)))
|
||||
(not (seq @jump-handler/*jump-data))
|
||||
(not @(:editor/latest-shortcut @state/state))
|
||||
(not (state/editing?))
|
||||
(seq (state/get-selection-blocks)))
|
||||
(let [shift? (.-shiftKey e)
|
||||
shortcut (if shift? (str "shift+" (.-key e)) (.-key e))]
|
||||
(db-property-handler/set-property-by-shortcut! shortcut)))
|
||||
(hide-context-menu-and-clear-selection e)))
|
||||
(state/set-ui-last-key-code! (.-key e))))
|
||||
(mixins/listen state js/window "keyup"
|
||||
(fn [_e]
|
||||
|
||||
Reference in New Issue
Block a user