diff --git a/src/main/frontend/components/cmdk/core.cljs b/src/main/frontend/components/cmdk/core.cljs index 12004f482e..7513da5530 100644 --- a/src/main/frontend/components/cmdk/core.cljs +++ b/src/main/frontend/components/cmdk/core.cljs @@ -908,7 +908,7 @@ (shui/shortcut "/") [:div "to filter search results"]] [:div.flex.flex-row.gap-1.items-center.opacity-50.hover:opacity-100 - (shui/shortcut ["mod" "enter"]) + (shui/shortcut ["mod" "enter"] {:style :combo}) [:div "to open search in the sidebar"]]])) (rum/defcs tip < @@ -936,9 +936,16 @@ [[:span.opacity-60 text] ;; shortcut (when (not-empty shortcut) - (shui/shortcut shortcut {:style :separate - :interactive? false - :aria-hidden? true}))])) + (let [has-modifier? (and (coll? shortcut) + (some #(#{"shift" "ctrl" "alt" "cmd" "mod" "⌘" "⌥" "⌃"} + (string/lower-case (str %))) + shortcut)) + style (if (and (> (count shortcut) 1) has-modifier?) + :combo + :auto)] + (shui/shortcut shortcut {:style style + :interactive? false + :aria-hidden? true})))])) (rum/defc hints [state]