mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 16:26:18 +08:00
parent
f87f5467ad
commit
9819dfbf2d
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue