Archived
2
0

Merge branch 'kbd-modifier-state-sync' of github.com:m1k1o/neko into dev

This commit is contained in:
m1k1o
2020-06-20 00:57:57 +02:00
6 changed files with 81 additions and 5 deletions

View File

@ -498,16 +498,33 @@
if (!this.hosting || this.locked) {
return
}
this.onMousePos(e)
}
onMouseEnter(e: MouseEvent) {
if(this.hosting) {
this.$accessor.remote.syncKeyboardModifierState({
capsLock: e.getModifierState("CapsLock"),
numLock: e.getModifierState("NumLock"),
scrollLock: e.getModifierState("ScrollLock"),
})
}
this._overlay.focus()
this.onFocus()
this.focused = true
}
onMouseLeave(e: MouseEvent) {
if(this.hosting) {
this.$accessor.remote.setKeyboardModifierState({
capsLock: e.getModifierState("CapsLock"),
numLock: e.getModifierState("NumLock"),
scrollLock: e.getModifierState("ScrollLock"),
})
}
this.focused = false
}