mirror of https://github.com/logseq/logseq
fix: non-mac users will use Ctrl instead of Alt for selecting blocks
parent
c96eca3e88
commit
1418bfb205
|
@ -1907,7 +1907,7 @@
|
|||
(let [target (gobj/get e "target")
|
||||
button (gobj/get e "buttons")
|
||||
shift? (gobj/get e "shiftKey")
|
||||
meta? (gobj/get e "metaKey")]
|
||||
meta? (util/meta-key? e)]
|
||||
(if (and meta? (not (state/get-edit-input-id)))
|
||||
(do
|
||||
(util/stop e)
|
||||
|
@ -2013,7 +2013,7 @@
|
|||
(state/in-selection-mode?)
|
||||
(not (string/includes? content "```"))
|
||||
(not (gobj/get e "shiftKey"))
|
||||
(not (gobj/get e "metaKey")))
|
||||
(not (util/meta-key? e)))
|
||||
;; clear highlighted text
|
||||
(util/clear-selection!)))}
|
||||
(not slide?)
|
||||
|
|
|
@ -459,7 +459,7 @@
|
|||
[e]
|
||||
(state/hide-custom-context-menu!)
|
||||
(when (and (not (gobj/get e "shiftKey"))
|
||||
(not (gobj/get e "metaKey")))
|
||||
(not (util/meta-key? e)))
|
||||
(editor-handler/clear-selection!)))
|
||||
|
||||
(rum/defcs ^:large-vars/cleanup-todo sidebar <
|
||||
|
|
|
@ -1193,6 +1193,12 @@
|
|||
(defn meta-key-name []
|
||||
(if mac? "Cmd" "Ctrl")))
|
||||
|
||||
#?(:cljs
|
||||
(defn meta-key? [e]
|
||||
(if mac?
|
||||
(gobj/get e "metaKey")
|
||||
(gobj/get e "ctrlKey"))))
|
||||
|
||||
#?(:cljs
|
||||
(defn right-click?
|
||||
[e]
|
||||
|
|
Loading…
Reference in New Issue