начало клавиш

This commit is contained in:
2021-06-21 18:25:56 +03:00
parent 95b92bee5a
commit bc93363aac
2 changed files with 34 additions and 2 deletions

View File

@@ -1,7 +1,5 @@
/*
мир.клавиши = {
};
*/
window.addEventListener("keydown", function(o) {
console.debug("keydown", o);
@@ -9,3 +7,20 @@ console.debug("keydown", o);
window.addEventListener("keyup", function(o) {
console.debug("keyup", o);
});
// // // //
мир.ключники.push(function(ключ, путь, значение){
if (!ключ.startsWith("клавиши"))
{
return;
}
var имя = путь[1];
console.debug("клавиша/действие", имя, значение);
});