summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/keyboard.js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-09-21 15:42:23 +0300
committerMaxim Devaev <[email protected]>2022-09-21 15:42:23 +0300
commitcb8534dfe72d0df4d13c36760c6d23bcd4bd0ff2 (patch)
tree2672f94a03300f000cc49f5b9ce756e07084723f /web/share/js/kvm/keyboard.js
parent0ebd2da83d7441389f0a54ea47123acca5a8d4db (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/keyboard.js')
-rw-r--r--web/share/js/kvm/keyboard.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/web/share/js/kvm/keyboard.js b/web/share/js/kvm/keyboard.js
index 4b30b2c6..7f4c4f84 100644
--- a/web/share/js/kvm/keyboard.js
+++ b/web/share/js/kvm/keyboard.js
@@ -89,7 +89,7 @@ export function Keyboard(__recordWsEvent) {
};
self.emit = function(code, state) {
- __keyboardHandler({code: code}, state);
+ __keypad.emitByCode(code, state);
};
var __updateOnlineLeds = function() {
@@ -126,9 +126,7 @@ export function Keyboard(__recordWsEvent) {
if (event.preventDefault) {
event.preventDefault();
}
- if (!event.repeat) {
- __keypad.emit(event.code, state);
- }
+ __keypad.emitByKeyEvent(event, state);
};
var __sendKey = function(code, state) {