release keys when window loosing focus

This commit is contained in:
Devaev Maxim
2018-07-27 11:29:44 +03:00
parent b7d933b6ce
commit d2da0829b9
3 changed files with 40 additions and 2 deletions

View File

@@ -2,11 +2,19 @@ var hid = new function() {
var __install_timer = null;
var __installed = false;
var __hidden_attr = null;
var __visibility_change_attr = null;
this.init = function() {
keyboard.init();
mouse.init();
}
this.releaseAll = function() {
keyboard.releaseAll();
mouse.releaseAll();
};
this.emitShortcut = function(...codes) {
console.log(codes);
var delay = 0;