add Select All to terminal context menu

The usual keyboard shortcut of Ctrl-A is not allowed since that triggers
raw REPL mode in MicroPython.
This commit is contained in:
David Lechner
2021-01-24 10:55:00 -06:00
parent 9b0427fd33
commit fcb0bf3d9c
3 changed files with 7 additions and 0 deletions
+5
View File
@@ -149,6 +149,11 @@ class Terminal extends React.Component<TerminalProps> {
icon="clipboard"
label={isMacOS() ? 'Cmd-V' : 'Ctrl-V'}
/>
<MenuItem
onClick={() => this.xterm.selectAll()}
text={i18n.translate(TerminalStringId.SelectAll)}
icon="blank"
/>
<MenuDivider />
<MenuItem
onClick={(): void => this.xterm.clear()}
+1
View File
@@ -2,6 +2,7 @@
"terminal": {
"copy": "Copy",
"paste": "Paste",
"selectAll": "Select All",
"clear": "Clear"
}
}
+1
View File
@@ -6,5 +6,6 @@
export enum TerminalStringId {
Copy = 'terminal.copy',
Paste = 'terminal.paste',
SelectAll = 'terminal.selectAll',
Clear = 'terminal.clear',
}