fix on cm (connectin not closed somehow) and refactor isEnterKey

This commit is contained in:
open-trade
2022-02-09 16:06:44 +08:00
parent d313fa92e1
commit 4945605009
9 changed files with 49 additions and 27 deletions

View File

@@ -174,9 +174,7 @@ class MsgboxComponent: Reactor.Component {
event keydown (evt) {
if (!evt.shortcutKey) {
if (evt.keyCode == Event.VK_ENTER ||
(is_osx && evt.keyCode == 0x4C) ||
(is_linux && evt.keyCode == 65421)) {
if (isEnterKey(evt)) {
this.submit();
}
if (evt.keyCode == Event.VK_ESCAPE) {