web linting

This commit is contained in:
Devaev Maxim
2018-08-07 19:09:47 +03:00
parent 20f7e2cde6
commit a844e9d152
10 changed files with 85 additions and 34 deletions

View File

@@ -50,7 +50,7 @@ var keyboard = new function() {
$("hid-keyboard-led").className = (focused ? "led-on" : "led-off");
};
this.releaseAll = function(ws) {
this.releaseAll = function() {
__keys.concat(__modifiers).forEach(function(el_key) {
if (__isActive(el_key)) {
keyboard.fireEvent(el_key.id, false);
@@ -61,13 +61,13 @@ var keyboard = new function() {
this.fireEvent = function(code, state) {
$("keyboard-window").dispatchEvent(new KeyboardEvent(
(state ? "keydown" : "keyup"),
{code: code},
{code: code}
));
};
var __keyboardHandler = function(event, state) {
event.preventDefault();
el_key = $(event.code);
var el_key = $(event.code);
if (el_key && !event.repeat) {
__commonHandler(el_key, state, "pressed");
if (__mac_cmd_hook) {