diff options
author | Miodec <[email protected]> | 2024-07-01 16:10:10 +0200 |
---|---|---|
committer | Miodec <[email protected]> | 2024-07-01 16:10:10 +0200 |
commit | b8fce15490da1c4bf634859dbabb7a4463cd47a0 (patch) | |
tree | 6adb7cf9530bc2ecda278f767ea0b4da5d6984cf | |
parent | 8e83dea30fcabbbfaeffa4f6d37d913c4d767edc (diff) | |
download | monkeytype-b8fce15490da1c4bf634859dbabb7a4463cd47a0.tar.gz monkeytype-b8fce15490da1c4bf634859dbabb7a4463cd47a0.zip |
impr(commandline): add vim keybinds for navigating up and down
-rw-r--r-- | frontend/src/ts/commandline/commandline.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/ts/commandline/commandline.ts b/frontend/src/ts/commandline/commandline.ts index a31b0c9a5..0b97dcb23 100644 --- a/frontend/src/ts/commandline/commandline.ts +++ b/frontend/src/ts/commandline/commandline.ts @@ -603,11 +603,11 @@ const modal = new AnimatedModal({ input.addEventListener("keydown", async (e) => { mouseMode = false; - if (e.key === "ArrowUp") { + if (e.key === "ArrowUp" || (e.key.toLowerCase() === "k" && e.ctrlKey)) { e.preventDefault(); await decrementActiveIndex(); } - if (e.key === "ArrowDown") { + if (e.key === "ArrowDown" || (e.key.toLowerCase() === "j" && e.ctrlKey)) { e.preventDefault(); await incrementActiveIndex(); } |