FolkComputer / folk

🎁 Physical computing system.
https://folk.computer
Apache License 2.0
75 stars 4 forks source link

Regional Keyboards #148

Closed s-ol closed 3 months ago

s-ol commented 3 months ago

Caveat: since there is no "default" keymap anymore, the web-keyboards page doesn't show which keys are pressed but just adds a . each time a key is down. Keyboards that are not configured (associated to a page/program) still send events, but they use an invented keysym (Unknown_$scancode) and are not grabbed by folk.

lib/keymap.tcl has both a C/libkeymap and sh/dumpkeys implementation; the former requires building kbd with --enable-libkeymap (not the default on Debian) and the latter requires root access. Either way the console-data package needs to be installed. That should be the case on most end-user Linux boxes, but if needed we could ship a default keymap as fallback (sudo dumpkeys -kf | gzip, ~3kb)

s-ol commented 3 months ago

This is ready for review but I could give #131 a shot while I'm at it

cwervo commented 3 months ago

@s-ol Navigation (UP, DOWN, etc.) and typing/deleting characters works in the editor but none of the Control_ characters seems to be firing so I can't save, print, etc. Are you seeing the same?

Ah, I needed console-data, I'll make a note about this in the README in this PR

s-ol commented 3 months ago

Ah, I needed console-data, I'll make a note about this in the README in this PR

Huh, this is an interesting failure mode. So it seems before installing console-data you had a working dumpkeys command but the default kernel keymap didn't bind the Control_* keysyms? What distribution did you test this on?

cwervo commented 3 months ago

This was on Ubuntu 23.04