ctrl alt del button

This commit is contained in:
elijahr2411 2023-01-28 00:03:29 -05:00
parent bb7e9f8cd8
commit 4a5286c6ed
2 changed files with 16 additions and 0 deletions

1
dist/index.html vendored
View file

@ -73,6 +73,7 @@
<button class="btn btn-secondary" id="changeUsernameBtn"><i class="fa-solid fa-signature"></i> Change Username</button>
<button class="btn btn-secondary" id="voteResetButton"><i class="fa-solid fa-rotate-left"></i> Vote for Reset</button>
<button class="btn btn-secondary" id="screenshotButton"><i class="fa-solid fa-camera"></i> Screenshot</button>
<button class="btn btn-secondary" id="ctrlAltDelBtn"><i class="fa-solid fa-gear"></i> Ctrl+Alt+Del</button>
<div id="staffbtns">
<button class="btn btn-secondary" id="restoreBtn"><i class="fa-solid fa-rotate-left"></i> Restore</button>
<button class="btn btn-secondary" id="rebootBtn"><i class="fa-solid fa-power-off"></i> Reboot</button>

View file

@ -26,6 +26,7 @@ const buttons = {
qemuMonitor: window.document.getElementById("qemuMonitorBtn"),
qemuMonitorSend: window.document.getElementById("qemuMonitorSendBtn"),
sendChat: window.document.getElementById("sendChatBtn"),
ctrlAltDel: window.document.getElementById("ctrlAltDelBtn"),
}
var hasTurn = false;
var vm;
@ -696,6 +697,20 @@ buttons.changeUsername.addEventListener('click', () => {
});
buttons.takeTurn.addEventListener('click', () => vm.turn());
buttons.voteReset.addEventListener('click', () => vm.voteReset(true));
buttons.ctrlAltDel.addEventListener('click', () => {
// Ctrl
vm.key(0xffe3, true);
// Alt
vm.key(0xffe9, true);
// Del
vm.key(0xffff, true);
// Ctrl
vm.key(0xffe3, false);
// Alt
vm.key(0xffe9, false);
// Del
vm.key(0xffff, false);
});
voteyesbtn.addEventListener('click', () => vm.voteReset(true));
votenobtn.addEventListener('click', () => vm.voteReset(false));
// Staff buttons