Macros now work using the F keys

pull/2358/head
Peter Goodhall 2023-08-01 16:05:30 +01:00
rodzic b13f2b032c
commit 3e43e613c2
1 zmienionych plików z 27 dodań i 0 usunięć

Wyświetl plik

@ -2,6 +2,33 @@ let function1Name, function1Macro, function2Name, function2Macro, function3Name,
getMacros();
document.addEventListener('keydown', function(event) {
if (event.key === 'F1') {
event.preventDefault();
morsekey_func1();
}
if (event.key === 'F2') {
event.preventDefault();
morsekey_func2();
}
if (event.key === 'F3') {
event.preventDefault();
morsekey_func3();
}
if (event.key === 'F4') {
event.preventDefault();
morsekey_func4();
}
if (event.key === 'F5') {
event.preventDefault();
morsekey_func5();
}
});
let sendText = document.getElementById("sendText");
let sendButton = document.getElementById("sendButton");