diff --git a/frontend/src/ts/elements/leaderboards.ts b/frontend/src/ts/elements/leaderboards.ts index 9d011b9a2..d6d1dc07e 100644 --- a/frontend/src/ts/elements/leaderboards.ts +++ b/frontend/src/ts/elements/leaderboards.ts @@ -796,3 +796,9 @@ $(document).on("click", "#top #menu .textButton", (e) => { } return false; }); + +$(document).on("keypress", "#top #menu .textButton", (e) => { + if (e.key === "Enter") { + $(e.currentTarget).trigger("click"); + } +}); diff --git a/frontend/src/ts/popups/contact-popup.ts b/frontend/src/ts/popups/contact-popup.ts index c48d6ce9d..b145d73f8 100644 --- a/frontend/src/ts/popups/contact-popup.ts +++ b/frontend/src/ts/popups/contact-popup.ts @@ -18,3 +18,23 @@ $(document.body).on("click", "#contactPopupWrapper", (e) => { }); } }); + +$(document.body).on( + "keypress", + "#contactPopupButton, #contactPopupButton2", + (e) => { + if (e.key === "Enter") { + $(e.currentTarget).trigger("click"); + } + } +); + +$(document).on("keydown", (e) => { + if (e.key === "Escape" && !$("#contactPopupWrapper").hasClass("hidden")) { + $("#contactPopupWrapper") + .css("opacity", 1) + .animate({ opacity: 0 }, 125, () => { + $("#contactPopupWrapper").addClass("hidden"); + }); + } +}); diff --git a/frontend/src/ts/popups/support-popup.ts b/frontend/src/ts/popups/support-popup.ts index 0bf12e5d1..6cb0c16a5 100644 --- a/frontend/src/ts/popups/support-popup.ts +++ b/frontend/src/ts/popups/support-popup.ts @@ -33,3 +33,23 @@ $(document.body).on("click", "#supportMeWrapper a.button", () => { $("#supportMeWrapper").addClass("hidden"); }); }); + +$(document.body).on( + "keypress", + "#supportMeButton, #supportMeAboutButton", + (e) => { + if (e.key === "Enter") { + $(e.currentTarget).trigger("click"); + } + } +); + +$(document).on("keydown", (e) => { + if (e.key === "Escape" && !$("#supportMeWrapper").hasClass("hidden")) { + $("#supportMeWrapper") + .css("opacity", 1) + .animate({ opacity: 0 }, 125, () => { + $("#supportMeWrapper").addClass("hidden"); + }); + } +}); diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 92f771b07..af30504e7 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -912,6 +912,12 @@ $(document.body).on("click", "#saveScreenshotButton", () => { screenshot(); }); +$("#saveScreenshotButton").on("keypress", (e) => { + if (e.key === "Enter") { + screenshot(); + } +}); + $(document).on("click", "#testModesNotice .textButton.blind", () => { UpdateConfig.setBlindMode(!Config.blindMode); }); diff --git a/frontend/static/html/bottom.html b/frontend/static/html/bottom.html index 050373dcd..d94c54460 100644 --- a/frontend/static/html/bottom.html +++ b/frontend/static/html/bottom.html @@ -19,7 +19,7 @@