diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-09-16 18:54:12 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-09-16 18:54:12 -0700 |
commit | e403d15732e62fc9f1940ef14dc3b46bb11f5201 (patch) | |
tree | 81e8d387fe26be18f986fece6766c69c8ad57a2e /prototypes/browse/17-file-state-broken/main.mu | |
parent | 797c93e054d210a6d595f0b57fd3d9adb9669d8c (diff) | |
download | mu-e403d15732e62fc9f1940ef14dc3b46bb11f5201.tar.gz |
6794 - cleaner interface for keyboard
So far I've been assuming that read-key only works for ascii, and that I'd need to get more sophisticated both for multi-byte utf-8 and multi-byte terminal escape codes like arrow keys. Rather to my surprise, both work fine. We just need to adjust the types to reflect this fact.
Diffstat (limited to 'prototypes/browse/17-file-state-broken/main.mu')
-rw-r--r-- | prototypes/browse/17-file-state-broken/main.mu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prototypes/browse/17-file-state-broken/main.mu b/prototypes/browse/17-file-state-broken/main.mu index a7d41529..7ccd4b4b 100644 --- a/prototypes/browse/17-file-state-broken/main.mu +++ b/prototypes/browse/17-file-state-broken/main.mu @@ -19,7 +19,7 @@ fn main args: (addr array addr array byte) -> exit-status/ebx: int { compare done?, 0 break-if-= render fs, screen-position-state - var key/eax: byte <- read-key + var key/eax: grapheme <- read-key-from-real-keyboard compare key, 0x71 # 'q' loop-if-!= } |