disabling tab when quick restart is set to esc

closes #3481
This commit is contained in:
Miodec 2022-08-31 12:52:29 +02:00
parent f87f5467ad
commit 9819dfbf2d

View file

@ -614,7 +614,10 @@ $(document).on("keydown", (e) => {
$.each(entries, (index, obj) => {
if ($(obj).hasClass("activeKeyboard")) activenum = index;
});
if (e.key === "ArrowUp" || (e.key === "Tab" && e.shiftKey)) {
if (
e.key === "ArrowUp" ||
(e.key === "Tab" && e.shiftKey && Config.quickRestart !== "esc")
) {
entries.removeClass("activeKeyboard");
if (activenum == 0) {
$(entries[entries.length - 1]).addClass("activeKeyboard");
@ -624,7 +627,10 @@ $(document).on("keydown", (e) => {
hoverId = $(entries[activenum]).attr("command") as string;
}
}
if (e.key === "ArrowDown" || (e.key === "Tab" && !e.shiftKey)) {
if (
e.key === "ArrowDown" ||
(e.key === "Tab" && !e.shiftKey && Config.quickRestart !== "esc")
) {
entries.removeClass("activeKeyboard");
if (activenum + 1 == entries.length) {
$(entries[0]).addClass("activeKeyboard");