mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-14 18:20:30 +08:00
full touch support for keyboard
This commit is contained in:
parent
b1c1428923
commit
e389b7a302
@ -32,6 +32,8 @@ function Keyboard() {
|
|||||||
__clickHandler(el_key, false);
|
__clickHandler(el_key, false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
el_key.ontouchstart = (event) => __touchHandler(event, el_key, true);
|
||||||
|
el_key.ontouchend = (event) => __touchHandler(event, el_key, false);
|
||||||
__keys.push(el_key);
|
__keys.push(el_key);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -101,6 +103,12 @@ function Keyboard() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var __touchHandler = function(event, el_key, state) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
__clickHandler(el_key, state);
|
||||||
|
};
|
||||||
|
|
||||||
var __clickHandler = function(el_key, state) {
|
var __clickHandler = function(el_key, state) {
|
||||||
__commonHandler(el_key, state, "pressed");
|
__commonHandler(el_key, state, "pressed");
|
||||||
__unholdModifiers();
|
__unholdModifiers();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user