diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsx index cc20931d1..00a57b573 100644 --- a/apps/client/src/widgets/layout/StatusBar.tsx +++ b/apps/client/src/widgets/layout/StatusBar.tsx @@ -1,6 +1,6 @@ import "./StatusBar.css"; -import { Locale } from "@triliumnext/commons"; +import { KeyboardActionNames, Locale } from "@triliumnext/commons"; import { Dropdown as BootstrapDropdown } from "bootstrap"; import clsx from "clsx"; import { type ComponentChildren } from "preact"; @@ -381,12 +381,18 @@ function AttributesPane({ note, noteContext, attributesShown, setAttributesShown //#region Note paths function NotePaths({ note, hoistedNoteId, notePath }: StatusBarContext) { + const dropdownRef = useRef(null); const sortedNotePaths = useSortedNotePaths(note, hoistedNoteId); const count = sortedNotePaths?.length ?? 0; + const enabled = count > 1; - return (count > 1 && + // Keyboard shortcut. + useTriliumEvent("toggleRibbonTabNotePaths", () => enabled && dropdownRef.current?.show()); + + return (enabled &&