This repository has been archived on 2026-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
panaremote/js/scripts.js

23 lines
483 B
JavaScript

/*function uniKeyCode(event) {
var key = event.keyCode;
document.getElementById("demo2").innerHTML = "Unicode KEY code: " + key;
}*/
document.addEventListener('keydown', (event) => {
const keyName = event.key;
if (keyName=="a"){
$.ajax
({
type: "GET",
url: "URL",
dataType: 'json',
async: false,
username: 'admin1',
password: 'panasonic',
data: '{ "comment" }',
success: function (){
alert('keydown event\n\n' + 'key: ' + keyName);
}
});
});