mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
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:
@@ -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()}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"terminal": {
|
||||
"copy": "Copy",
|
||||
"paste": "Paste",
|
||||
"selectAll": "Select All",
|
||||
"clear": "Clear"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
export enum TerminalStringId {
|
||||
Copy = 'terminal.copy',
|
||||
Paste = 'terminal.paste',
|
||||
SelectAll = 'terminal.selectAll',
|
||||
Clear = 'terminal.clear',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user