Commit d2399289 by Owen Ryan Ang

Fixed issue on starting keymetrics.

parent 74ae382e
...@@ -556,19 +556,18 @@ export function removeLoadingScreen() { ...@@ -556,19 +556,18 @@ export function removeLoadingScreen() {
function init() { function init() {
let started_flag = false; let started_flag = false;
window.onkeydown = (key) => { window.onkeydown = (e) => {
console.log(e);
if (!started_flag) { if (!started_flag) {
if (searchStringInArray(`${key.key}`, keyArray) == true || key.ctrlKey && key.key) { if (searchStringInArray(`${e.key}`, keyArray) == true || e.ctrlKey && e.key) {
console.log('Invalid key cannot Start'); console.log('Invalid key cannot Start');
} else { } else {
started_flag = true; started_flag = true;
startMetricCapture(); startMetricCapture();
} }
} }
}
window.onkeydown = (e) => {
console.log(e);
// e.preventDefault(); // e.preventDefault();
if (e.ctrlKey == true && e.keyCode == 69) { if (e.ctrlKey == true && e.keyCode == 69) {
createRejectWindow(); createRejectWindow();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment