/
keybindingsLinux.js
121 lines (112 loc) 路 4.28 KB
/
keybindingsLinux.js
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Key bindings for Linux.
// NOTE: Avoid `Ctrl+Alt` and `Alt` shortcuts on Linux because Ubuntu based OSs have reserved system shortcuts (see GH#2370).
// Binding shortcuts to these modifiers will result in odd behavior on Ubuntu.
// NOTE: Don't use `Ctrl+Shift+U` because it's used IBus for unicode support.
// NOTE: We can't determine the character for a dead key and no translation is provided. E.g. Ctrl+` (=Ctrl+Shift+麓) on a
// none nodeadkeys german keyboard cannot be interpreted. In general don't bind default shortcuts to characters that
// can be produced with ^ or ` on any keyboard. --> ^, `, ", ~, ...
export default new Map([
// MarkText menu on macOS only
['mt.hide', ''],
['mt.hide-others', ''],
// File menu
['file.new-window', 'Ctrl+N'],
['file.new-tab', 'Ctrl+T'],
['file.open-file', 'Ctrl+O'],
['file.open-folder', 'Ctrl+Shift+O'],
['file.save', 'Ctrl+S'],
['file.save-as', 'Ctrl+Shift+S'],
['file.move-file', ''],
['file.rename-file', ''],
['file.print', ''],
['file.preferences', 'Ctrl+,'],
['file.close-tab', 'Ctrl+W'],
['file.close-window', 'Ctrl+Shift+W'],
['file.quit', 'Ctrl+Q'],
// Edit menu
['edit.undo', 'Ctrl+Z'],
['edit.redo', 'Ctrl+Shift+Z'],
['edit.cut', 'Ctrl+X'],
['edit.copy', 'Ctrl+C'],
['edit.paste', 'Ctrl+V'],
['edit.copy-as-markdown', 'Ctrl+Shift+C'],
['edit.copy-as-html', ''],
['edit.paste-as-plaintext', 'Ctrl+Shift+V'],
['edit.select-all', 'Ctrl+A'],
['edit.duplicate', 'Ctrl+Shift+E'],
['edit.create-paragraph', 'Ctrl+Shift+N'],
['edit.delete-paragraph', 'Ctrl+Shift+D'],
['edit.find', 'Ctrl+F'],
['edit.find-next', 'F3'],
['edit.find-previous', 'Shift+F3'],
['edit.replace', 'Ctrl+R'],
['edit.find-in-folder', 'Ctrl+Shift+F'],
['edit.screenshot', ''], // macOS only
// Paragraph menu
['paragraph.heading-1', 'Ctrl+Alt+1'],
['paragraph.heading-2', 'Ctrl+Alt+2'],
['paragraph.heading-3', 'Ctrl+Alt+3'],
['paragraph.heading-4', 'Ctrl+Alt+4'],
['paragraph.heading-5', 'Ctrl+Alt+5'],
['paragraph.heading-6', 'Ctrl+Alt+6'],
['paragraph.upgrade-heading', 'Ctrl+Plus'],
['paragraph.degrade-heading', 'Ctrl+-'],
['paragraph.table', 'Ctrl+Shift+T'],
['paragraph.code-fence', 'Ctrl+Shift+K'],
['paragraph.quote-block', 'Ctrl+Shift+Q'],
['paragraph.math-formula', 'Ctrl+Alt+M'],
['paragraph.html-block', 'Ctrl+Alt+H'],
['paragraph.order-list', 'Ctrl+G'],
['paragraph.bullet-list', 'Ctrl+H'],
['paragraph.task-list', 'Ctrl+Shift+X'],
['paragraph.loose-list-item', 'Ctrl+Shift+L'],
['paragraph.paragraph', 'Ctrl+Shift+0'],
['paragraph.horizontal-line', 'Ctrl+_'], // Ctrl+Shift+-
['paragraph.front-matter', 'Ctrl+Shift+Y'],
// Format menu
['format.strong', 'Ctrl+B'],
['format.emphasis', 'Ctrl+I'],
['format.underline', 'Ctrl+U'],
['format.superscript', ''],
['format.subscript', ''],
['format.highlight', 'Ctrl+Shift+H'],
['format.inline-code', 'Ctrl+Y'],
['format.inline-math', 'Ctrl+Shift+M'],
['format.strike', 'Ctrl+D'],
['format.hyperlink', 'Ctrl+L'],
['format.image', 'Ctrl+Shift+I'],
['format.clear-format', 'Ctrl+Shift+R'],
// Window menu
['window.minimize', 'Ctrl+M'],
['window.toggle-always-on-top', ''],
['window.zoom-in', ''],
['window.zoom-out', ''],
['window.toggle-full-screen', 'F11'],
// View menu
['view.command-palette', 'Ctrl+Shift+P'],
['view.source-code-mode', 'Ctrl+E'],
['view.typewriter-mode', 'Ctrl+Shift+G'],
['view.focus-mode', 'Ctrl+Shift+J'],
['view.toggle-sidebar', 'Ctrl+J'],
['view.toggle-toc', 'Ctrl+K'],
['view.toggle-tabbar', 'Ctrl+Shift+B'],
['view.toggle-dev-tools', 'Ctrl+Alt+I'],
['view.dev-reload', 'Ctrl+F5'],
['view.reload-images', 'F5'],
// ======== Not included in application menu ========================
['tabs.cycle-forward', 'Ctrl+Tab'],
['tabs.cycle-backward', 'Ctrl+Shift+Tab'],
['tabs.switch-to-left', 'Ctrl+PageUp'],
['tabs.switch-to-right', 'Ctrl+PageDown'],
['tabs.switch-to-first', 'Ctrl+1'],
['tabs.switch-to-second', 'Ctrl+2'],
['tabs.switch-to-third', 'Ctrl+3'],
['tabs.switch-to-fourth', 'Ctrl+4'],
['tabs.switch-to-fifth', 'Ctrl+5'],
['tabs.switch-to-sixth', 'Ctrl+6'],
['tabs.switch-to-seventh', 'Ctrl+7'],
['tabs.switch-to-eighth', 'Ctrl+8'],
['tabs.switch-to-ninth', 'Ctrl+9'],
['tabs.switch-to-tenth', 'Ctrl+0'],
['file.quick-open', 'Ctrl+P']
])