add CHAR_EVENT message type (next is to handle hjkl navigation)

This commit is contained in:
2024-10-17 01:38:31 +01:00
parent ce23e50c8d
commit c77777cc09
4 changed files with 16 additions and 4 deletions

View File

@@ -19,6 +19,16 @@ struct
(newApp, drawMsg)
end
fun handleChr (app, chr) =
let
val chr = Char.toString chr ^ "\n"
val () = print chr
in
(app, [])
end
fun update (app, msg) =
case msg of RESIZE_EVENT (width, height) => resizeText (app, width, height)
case msg of
RESIZE_EVENT (width, height) => resizeText (app, width, height)
| CHAR_EVENT chr => handleChr (app, chr)
end