-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add keyboard support #4
Conversation
Binary based on commit 82a6c47 (using command |
This is on my rM2 with keyd running and the folio connected, but after forgetting to run with rm2fb-clien. The app never quits, but never displays. Running with rm2fb-client works as expected. I thought I didn't need to for things built with libremarkable. On my rM1 it opens and runs fine, but I'm not setup for a fake keyboard unfortunately, so I can't really test that side of the functionality. I'm sure it'll work though if it's working with keyd on the rM2. |
I think I'm using an older version of libremarkable here, which didn't include the integrated swtfb client. I created an issue to update it. |
Sounds good. I don't expect things like A-Z not to work. But maybe some edge-cases like certain symbols. Some might be missing, but some might also be wrongly mapped. Especially in regards to the keys for the doom controls not being where expected. When running doomarkable with |
I should probably also take a look into keyd. Is that purely a software keyboard or does it require the folio? |
Purely software. It requires the uinput module, and then it grabs all keyboard devices and emits its own events based off of what was pressed and it's mappings to a new evdev device created by uinput. uinput also handles things like key repeat automatically. toltec-dev/toltec#744 Here is a working package you can use. You should be able to ignore virtual keyboards when checking to see if a physical keyboard is connected by just checking what bus it's on. I haven't implemented that quite yet, but my code in oxide does filter out keyd specifically: I also ignore anything with a vendor or product identifier of 0x0000, which most of the build in input has for some reason. |
Got to test it now. Seems solid. Makes one really feel the latency now, but still plays way better than with touch. |
Part 1 of solving #2
@Eeems could you test out whether this works on the rM 1? I could test adding and removing keyboards, but broke my flimsy, only Micro-USB-OTG adapter before I could test the new mappings I added:
doomarkable/src/evdev_keyboard.rs
Lines 162 to 270 in f59178c
Mappings are based on doomkeys.h, with some guesswork based on this wiki article.
I do not have a folio, and plugging a USB-C-OTG Adapter in didn't make the keyboard appear for me like it did on the rM 1.