keySymsRemap before clipboard logic.

This commit is contained in:
Miroslav Šedivý 2022-05-03 21:56:37 +02:00
parent b7277bc291
commit b9c4a9b597

View File

@ -122,6 +122,8 @@
// Initialize Guacamole Keyboard // Initialize Guacamole Keyboard
this.keyboard.onkeydown = (key: number) => { this.keyboard.onkeydown = (key: number) => {
key = keySymsRemap(key)
if (!this.isControling) { if (!this.isControling) {
noKeyUp[key] = true noKeyUp[key] = true
return true return true
@ -138,12 +140,12 @@
const isCtrlKey = key == KeyTable.XK_Control_L || key == KeyTable.XK_Control_R const isCtrlKey = key == KeyTable.XK_Control_L || key == KeyTable.XK_Control_R
if (isCtrlKey) ctrlKey = key if (isCtrlKey) ctrlKey = key
this.webrtc.send('keydown', { this.webrtc.send('keydown', { key })
key: keySymsRemap(key),
})
return isCtrlKey return isCtrlKey
} }
this.keyboard.onkeyup = (key: number) => { this.keyboard.onkeyup = (key: number) => {
key = keySymsRemap(key)
if (key in noKeyUp) { if (key in noKeyUp) {
delete noKeyUp[key] delete noKeyUp[key]
return return
@ -152,9 +154,7 @@
const isCtrlKey = key == KeyTable.XK_Control_L || key == KeyTable.XK_Control_R const isCtrlKey = key == KeyTable.XK_Control_L || key == KeyTable.XK_Control_R
if (isCtrlKey) ctrlKey = 0 if (isCtrlKey) ctrlKey = 0
this.webrtc.send('keyup', { this.webrtc.send('keyup', { key })
key: keySymsRemap(key),
})
} }
this.keyboard.listenTo(this._textarea) this.keyboard.listenTo(this._textarea)