From a3f5ffc15a48f4e4a31fb581fdb1b94e956f7252 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 27 Jul 2021 20:12:53 +0800 Subject: [PATCH] fix on linux numpadenter --- src/ui/index.tis | 3 ++- src/ui/msgbox.tis | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/index.tis b/src/ui/index.tis index ae965ddf9..27a9852b3 100644 --- a/src/ui/index.tis +++ b/src/ui/index.tis @@ -673,7 +673,8 @@ function formatId(id) { event keydown (evt) { if (!evt.shortcutKey) { if (evt.keyCode == Event.VK_ENTER || - (view.mediaVar("platform") == "OSX" && evt.keyCode == 0x4C)) { + (is_osx && evt.keyCode == 0x4C) || + (is_linux && evt.keyCode == 65421)) { var el = $(button#connect); view.focus = el; el.sendEvent("click"); diff --git a/src/ui/msgbox.tis b/src/ui/msgbox.tis index 144530dc5..447e657f8 100644 --- a/src/ui/msgbox.tis +++ b/src/ui/msgbox.tis @@ -230,7 +230,8 @@ event click $(button#submit) { event keydown (evt) { if (!evt.shortcutKey) { if (evt.keyCode == Event.VK_ENTER || - (view.mediaVar("platform") == "OSX" && evt.keyCode == 0x4C)) { + (is_osx && evt.keyCode == 0x4C) || + (is_linux && evt.keyCode == 65421)) { submit(); } if (evt.keyCode == Event.VK_ESCAPE) {