Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5f82577

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
Can send message to the monitor with Enter.
Removed the required `Ctrl/Cmd` modifier. Closes #572 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 35fcfb8 commit 5f82577

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

‎arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-input.tsx‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as React from '@theia/core/shared/react';
22
import { Key, KeyCode } from '@theia/core/lib/browser/keys';
33
import { Board } from '../../../common/protocol/boards-service';
4-
import { isOSX } from '@theia/core/lib/common/os';
54
import { DisposableCollection, nls } from '@theia/core/lib/common';
65
import { BoardsServiceProvider } from '../../boards/boards-service-provider';
76
import { MonitorModel } from '../../monitor-model';
@@ -81,8 +80,7 @@ export class SerialMonitorSendInput extends React.Component<
8180
const port = this.props.boardsServiceProvider.boardsConfig.selectedPort;
8281
return nls.localize(
8382
'arduino/serial/message',
84-
"Message ({0} + Enter to send message to '{1}' on '{2}')",
85-
isOSX ? '⌘' : nls.localize('vscode/keybindingLabels/ctrlKey', 'Ctrl'),
83+
"Message (Enter to send message to '{0}' on '{1}')",
8684
board
8785
? Board.toString(board, {
8886
useFqbn: false,
@@ -110,8 +108,8 @@ export class SerialMonitorSendInput extends React.Component<
110108
protected onKeyDown(event: React.KeyboardEvent<HTMLInputElement>): void {
111109
const keyCode = KeyCode.createKeyCode(event.nativeEvent);
112110
if (keyCode) {
113-
const { key, meta, ctrl } = keyCode;
114-
if (key === Key.ENTER&&((isOSX&&meta)||(!isOSX&&ctrl))) {
111+
const { key } = keyCode;
112+
if (key === Key.ENTER) {
115113
this.onSend();
116114
}
117115
}

‎i18n/en.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
"serial": {
337337
"autoscroll": "Autoscroll",
338338
"carriageReturn": "Carriage Return",
339-
"message": "Message ({0} + Enter to send message to '{1}' on '{2}')",
339+
"message": "Message (Enter to send message to '{0}' on '{1}')",
340340
"newLine": "New Line",
341341
"newLineCarriageReturn": "Both NL & CR",
342342
"noLineEndings": "No Line Ending",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /