mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 17:41:54 +08:00
refactoring
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user