Commit c8a62fe
committed
snowcap: lua: Add a method to get unprocessed key event
The on_key_pressed handler can be limiting since:
- it doesn't allow to react to key being released
- it doesn't transmit the processed `text` associated with keys when
using a layout with dead keys.
- it doesn't transmit captured events (I've added this one to conserve
the previous behavior.)
This commit address this by adding a on_key_event that transmit the key
state, whether it was captured on the server side, and the associated
text if available.1 parent 038dd5c commit c8a62fe
2 files changed
+43
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
172 | 206 | | |
173 | 207 | | |
174 | 208 | | |
175 | 209 | | |
176 | 210 | | |
177 | 211 | | |
178 | 212 | | |
179 | | - | |
| 213 | + | |
180 | 214 | | |
181 | 215 | | |
182 | 216 | | |
| |||
0 commit comments