mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 21:51:29 +08:00
parent
f87f5467ad
commit
9819dfbf2d
1 changed files with 8 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue