From 36937a0776a8705d1eb104287ba25a51cde5c6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 15 Jun 2020 17:28:05 +0200 Subject: [PATCH] gruacamole native kbd reset --- client/src/components/video.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/client/src/components/video.vue b/client/src/components/video.vue index 929385e3..75dceb64 100644 --- a/client/src/components/video.vue +++ b/client/src/components/video.vue @@ -159,7 +159,6 @@ private observer = new ResizeObserver(this.onResise.bind(this)) private focused = false private fullscreen = false - private activeKeys: Set = new Set() get admin() { return this.$accessor.user.admin @@ -346,7 +345,6 @@ } this.$client.sendData('keydown', { key }) - this.activeKeys.add(key) }; // @ts-ignore @@ -356,8 +354,16 @@ } this.$client.sendData('keyup', { key }) - this.activeKeys.delete(key) }; + + // @ts-ignore + this.kbdReset = () => { + // @ts-ignore + Keyboard.reset(); + } + + //Keyboard.release(keysym); + //Keyboard.type(str); } beforeDestroy() { @@ -432,10 +438,8 @@ return } - for (let key of this.activeKeys) { - this.$client.sendData('keyup', { key }) - this.activeKeys.delete(key) - } + // @ts-ignore + this.kbdReset(); } onMousePos(e: MouseEvent) {