mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 14:39:48 +00:00
fix: cross-platform shotcuts (#10590)
This PR also simplifies the implementation of shui/shortcut a lot. * fix: consistent char for the Enter key * fix: show ctrl instead of ⌘ for copy ref * fix: "Ctrl" should be split from "Ctrl X"
This commit is contained in:
@@ -665,8 +665,8 @@
|
||||
(shui/shortcut "/" context)
|
||||
[:div "to filter search results"]]
|
||||
[:div.flex.flex-row.gap-1.items-center.opacity-50.hover:opacity-100
|
||||
(shui/shortcut "mod enter" context)
|
||||
[:div "to open search in the sidebar"]]]))
|
||||
(shui/shortcut ["mod" "enter"] context)
|
||||
[:div "to open search in the sidebar"]]]) )
|
||||
|
||||
(rum/defcs tip <
|
||||
{:init (fn [state]
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
|
||||
(cond
|
||||
(or unset? user-binding (false? user-binding))
|
||||
[:code.dark:bg-green-800.bg-green-300
|
||||
[:code
|
||||
(if unset?
|
||||
(t :keymap/unset)
|
||||
(str (t :keymap/custom) ": "
|
||||
|
||||
@@ -140,10 +140,10 @@
|
||||
(let [tmp (cond
|
||||
(false? binding)
|
||||
(cond
|
||||
(and util/mac? (= k :editor/kill-line-after)) "system default: ctrl k"
|
||||
(and util/mac? (= k :editor/beginning-of-block)) "system default: ctrl a"
|
||||
(and util/mac? (= k :editor/end-of-block)) "system default: ctrl e"
|
||||
(and util/mac? (= k :editor/backward-kill-word)) "system default: opt delete"
|
||||
(and util/mac? (= k :editor/kill-line-after)) "ctrl k"
|
||||
(and util/mac? (= k :editor/beginning-of-block)) "ctrl a"
|
||||
(and util/mac? (= k :editor/end-of-block)) "ctrl e"
|
||||
(and util/mac? (= k :editor/backward-kill-word)) "opt delete"
|
||||
:else (t :keymap/disabled))
|
||||
|
||||
(string? binding)
|
||||
|
||||
Reference in New Issue
Block a user