Archived
2
0

gruacamole native kbd reset

This commit is contained in:
Miroslav Šedivý 2020-06-15 17:28:05 +02:00
parent d2477a37d0
commit 36937a0776

View File

@ -159,7 +159,6 @@
private observer = new ResizeObserver(this.onResise.bind(this)) private observer = new ResizeObserver(this.onResise.bind(this))
private focused = false private focused = false
private fullscreen = false private fullscreen = false
private activeKeys: Set<number> = new Set()
get admin() { get admin() {
return this.$accessor.user.admin return this.$accessor.user.admin
@ -346,7 +345,6 @@
} }
this.$client.sendData('keydown', { key }) this.$client.sendData('keydown', { key })
this.activeKeys.add(key)
}; };
// @ts-ignore // @ts-ignore
@ -356,8 +354,16 @@
} }
this.$client.sendData('keyup', { key }) this.$client.sendData('keyup', { key })
this.activeKeys.delete(key)
}; };
// @ts-ignore
this.kbdReset = () => {
// @ts-ignore
Keyboard.reset();
}
//Keyboard.release(keysym);
//Keyboard.type(str);
} }
beforeDestroy() { beforeDestroy() {
@ -432,10 +438,8 @@
return return
} }
for (let key of this.activeKeys) { // @ts-ignore
this.$client.sendData('keyup', { key }) this.kbdReset();
this.activeKeys.delete(key)
}
} }
onMousePos(e: MouseEvent) { onMousePos(e: MouseEvent) {