Sep 16, 2020
Funny story

A few weeks ago I built a function to read keystrokes from the keyboard. (In machine code, of course.) I planned to support just ASCII keys to begin.

Today I tried to force myself to work on the rest. Terminal escape sequences like arrow keys, UTF-8, and somehow distinguishing between the two.

Surprise: both were already working! I just had to read 32 bits rather than 8 from stdin. Legal UTF-8 doesn't conflict with terminal escapes in 32-bit space.

https://github.com/akkartik/mu/commit/e403d15732

This post is part of my Freewheeling Apps Devlog.

Comments gratefully appreciated. Please send them to me by any method of your choice and I'll include them here.

archive
projects
writings
videos
subscribe
Mastodon
RSS (?)
twtxt (?)
Station (?)