MCPcopy Create free account
hub / github.com/experdot/pointer / AppShortcuts

Function AppShortcuts

src/renderer/src/components/common/AppShortcuts.tsx:15–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13}
14
15export function AppShortcuts(): null {
16 useHotkeys(
17 'mod+n',
18 (event) => {
19 if (shouldIgnoreAppShortcuts(event)) {
20 return
21 }
22
23 void dispatchAppShortcutAction('new-chat', event)
24 },
25 appShortcutOptions,
26 []
27 )
28
29 useHotkeys(
30 'mod+b',
31 (event) => {
32 if (shouldIgnoreAppShortcuts(event)) {
33 return
34 }
35
36 void dispatchAppShortcutAction('toggle-sidebar', event)
37 },
38 appShortcutOptions,
39 []
40 )
41
42 useHotkeys(
43 'mod+shift+f',
44 (event) => {
45 if (shouldIgnoreAppShortcuts(event)) {
46 return
47 }
48
49 void dispatchAppShortcutAction('global-search', event)
50 },
51 appShortcutOptions,
52 []
53 )
54
55 useEffect(() => {
56 return window.api.shortcuts.onAction((action) => {
57 void dispatchForwardedShortcutAction(action)
58 })
59 }, [])
60
61 return null
62}

Callers

nothing calls this directly

Calls 3

shouldIgnoreAppShortcutsFunction · 0.90

Tested by

no test coverage detected