mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-04 02:34:43 +08:00
impr(commandline): add vim keybinds for navigating up and down
This commit is contained in:
parent
8e83dea30f
commit
b8fce15490
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue