about summary refs log tree commit diff stats
path: root/prototypes/browse/11.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-16 18:54:12 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-16 18:54:12 -0700
commite403d15732e62fc9f1940ef14dc3b46bb11f5201 (patch)
tree81e8d387fe26be18f986fece6766c69c8ad57a2e /prototypes/browse/11.mu
parent797c93e054d210a6d595f0b57fd3d9adb9669d8c (diff)
downloadmu-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/11.mu')
-rw-r--r--prototypes/browse/11.mu2
1 files changed, 1 insertions, 1 deletions
diff --git a/prototypes/browse/11.mu b/prototypes/browse/11.mu
index e3083c09..b7d20597 100644
--- a/prototypes/browse/11.mu
+++ b/prototypes/browse/11.mu
@@ -11,7 +11,7 @@ fn main args: (addr array addr array byte) -> exit-status/ebx: int {
   enable-keyboard-immediate-mode
   {
     render file, nrows, ncols
-    var key/eax: byte <- read-key
+    var key/eax: grapheme <- read-key-from-real-keyboard
     compare key, 0x71  # 'q'
     loop-if-!=
   }
=2cb2f83ce3519a40f752ca2be7a07669a125ed1b'>^
7f98e013 ^
de747e3d ^



7f98e013 ^
de747e3d ^

7f98e013 ^

de747e3d ^






406b821b ^


de747e3d ^
2a921693 ^





7f98e013 ^
2a921693 ^



7f98e013 ^
2a921693 ^

7f98e013 ^



2a921693 ^




406b821b ^
2a921693 ^
ac3e7dd9 ^






7f98e013 ^
ac3e7dd9 ^



7f98e013 ^
ac3e7dd9 ^

7f98e013 ^

ac3e7dd9 ^






406b821b ^









7f98e013 ^
406b821b ^



7f98e013 ^
406b821b ^











7f98e013 ^
406b821b ^



7f98e013 ^
406b821b ^


7f98e013 ^
406b821b ^


7f98e013 ^
406b821b ^

7f98e013 ^

406b821b ^










ac3e7dd9 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166