Skip to content

Build your personal knowledge base with Trilium Notes

feat(layout): keyboard shortcut for note info

Elian Doran4f1c19f1e29a
diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsx
index 424fd81fa0..cc20931d1a 100644
--- a/apps/client/src/widgets/layout/StatusBar.tsx
+++ b/apps/client/src/widgets/layout/StatusBar.tsx
@@ -222,8 +222,12 @@ export function NoteInfoBadge({ note, setSimilarNotesShown }: NoteInfoContext) {
const [ originalFileName ] = useNoteLabel(note, "originalFileName");
const noteType = useNoteProperty(note, "type");
const noteTypeMapping = useMemo(() => NOTE_TYPES.find(t => t.type === noteType), [ noteType ]);
+ const enabled = note && noteType && noteTypeMapping;
- return (note && noteType && noteTypeMapping &&
+ // Keyboard shortcut.
+ useTriliumEvent("toggleRibbonTabNoteInfo", () => enabled && dropdownRef.current?.show());
+
+ return (enabled &&
<StatusBarDropdown
icon="bx bx-info-circle"
title={t("status_bar.note_info_title")}