-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard: Compress keymaps #25
Comments
I am no longer convinced of this:
|
#258 just defined a fixed keytab format at a fixed banked RAM location. LZSA gets the 1302 byte keymaps down to 438-478 bytes (average: 459). Plus 8 bytes index header. That's about 35 keyboard layouts. (The previous calculation assumed we'd compress PET and ISO separately.) |
I asked users in the forum |
Currently, we map the PS/2 scancode to the PETSCII or ISO-8859-15 character.
The PS/2 scancodes are very sparse, so each table is 91 bytes. But there are only 48 non-control keys on ISO keyboards.
By mapping the PS/2 scancode to a value from 0-47 first, and using a 48-entry table, the size of the tables can almost be cut in half.
In addition, the scripts should make sure identical maps (e.g. Ctrl+character on Nordic and US) only end up in the ROM once. So it may even make sense to break the 48 scancodes into "A-Z" (26) and "rest" (22), because A-Z tend to be the same for most keyboards.
The text was updated successfully, but these errors were encountered: