forked from deephaven/web-client-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGlobalShortcuts.ts
More file actions
84 lines (82 loc) · 2.49 KB
/
GlobalShortcuts.ts
File metadata and controls
84 lines (82 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import ShortcutRegistry from './ShortcutRegistry';
import { MODIFIER, KEY } from './Shortcut';
const GLOBAL_SHORTCUTS = {
COPY: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.COPY',
name: 'Copy',
shortcut: [MODIFIER.CTRL, KEY.C],
macShortcut: [MODIFIER.CMD, KEY.C],
isEditable: false,
}),
PASTE: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.PASTE',
name: 'Paste',
shortcut: [MODIFIER.CTRL, KEY.V],
macShortcut: [MODIFIER.CMD, KEY.V],
isEditable: false,
}),
SAVE: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.SAVE',
name: 'Save',
shortcut: [MODIFIER.CTRL, KEY.S],
macShortcut: [MODIFIER.CMD, KEY.S],
isEditable: false,
}),
SELECT_ALL: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.SELECT_ALL',
name: 'Select All',
shortcut: [MODIFIER.CTRL, KEY.A],
macShortcut: [MODIFIER.CMD, KEY.A],
isEditable: false,
}),
REOPEN_CLOSED_PANEL: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.REOPEN_CLOSED_PANEL',
name: 'Re-open Closed Panel',
shortcut: [MODIFIER.ALT, MODIFIER.SHIFT, KEY.T],
macShortcut: [MODIFIER.OPTION, MODIFIER.SHIFT, KEY.T],
isEditable: true,
}),
LINKER: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.LINKER',
name: 'Linker',
shortcut: [MODIFIER.CTRL, KEY.L],
macShortcut: [MODIFIER.CMD, KEY.L],
}),
LINKER_CLOSE: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.LINKER_CLOSE',
name: 'Close Linker Overlay',
shortcut: [KEY.ESCAPE],
macShortcut: [KEY.ESCAPE],
isEditable: false,
}),
COPY_VERSION_INFO: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.COPY_VERSION_INFO',
name: 'Copy Version Info',
// alt vs shift to not be the devtools shortcut on each platform
shortcut: [MODIFIER.CTRL, MODIFIER.ALT, KEY.I],
macShortcut: [MODIFIER.CMD, MODIFIER.SHIFT, KEY.I],
isEditable: true,
}),
EXPORT_LOGS: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.EXPORT_LOGS',
name: 'Export Logs',
shortcut: [MODIFIER.CTRL, MODIFIER.ALT, MODIFIER.SHIFT, KEY.L],
macShortcut: [MODIFIER.CMD, MODIFIER.OPTION, MODIFIER.SHIFT, KEY.L],
isEditable: true,
}),
NEXT: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.NEXT',
name: 'Next',
shortcut: [KEY.ENTER],
macShortcut: [KEY.ENTER],
isEditable: false,
}),
PREVIOUS: ShortcutRegistry.createAndAdd({
id: 'GLOBAL.PREVIOUS',
name: 'Previous',
shortcut: [MODIFIER.SHIFT, KEY.ENTER],
macShortcut: [MODIFIER.SHIFT, KEY.ENTER],
isEditable: false,
}),
};
export default GLOBAL_SHORTCUTS;