From b9c4a9b5979b9541cb874feea7ef6716d5288afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 3 May 2022 21:56:37 +0200 Subject: [PATCH] keySymsRemap before clipboard logic. --- src/component/overlay.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/component/overlay.vue b/src/component/overlay.vue index 4a4cd05f..9efaf72d 100644 --- a/src/component/overlay.vue +++ b/src/component/overlay.vue @@ -122,6 +122,8 @@ // Initialize Guacamole Keyboard this.keyboard.onkeydown = (key: number) => { + key = keySymsRemap(key) + if (!this.isControling) { noKeyUp[key] = true return true @@ -138,12 +140,12 @@ const isCtrlKey = key == KeyTable.XK_Control_L || key == KeyTable.XK_Control_R if (isCtrlKey) ctrlKey = key - this.webrtc.send('keydown', { - key: keySymsRemap(key), - }) + this.webrtc.send('keydown', { key }) return isCtrlKey } this.keyboard.onkeyup = (key: number) => { + key = keySymsRemap(key) + if (key in noKeyUp) { delete noKeyUp[key] return @@ -152,9 +154,7 @@ const isCtrlKey = key == KeyTable.XK_Control_L || key == KeyTable.XK_Control_R if (isCtrlKey) ctrlKey = 0 - this.webrtc.send('keyup', { - key: keySymsRemap(key), - }) + this.webrtc.send('keyup', { key }) } this.keyboard.listenTo(this._textarea)