Navigate items using keyboard

- previous/next item with `.,`
- confirm with `c`
- unconfirm with `u`
This commit is contained in:
Eike Kettner
2020-09-22 00:27:32 +02:00
parent dc0e05bc20
commit 60b8dc2134
10 changed files with 107 additions and 41 deletions

View File

@ -46,12 +46,16 @@ type KeyCode
| Enter
| Space
| ESC
| Letter_C
| Letter_N
| Letter_P
| Letter_H
| Letter_J
| Letter_K
| Letter_L
| Letter_U
| Point
| Comma
| Code Int
@ -79,6 +83,9 @@ intToKeyCode code =
27 ->
Just ESC
67 ->
Just Letter_C
72 ->
Just Letter_H
@ -97,6 +104,15 @@ intToKeyCode code =
80 ->
Just Letter_P
85 ->
Just Letter_U
188 ->
Just Comma
190 ->
Just Point
n ->
Just (Code n)