Skip to content
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

No ESC key. #13

Open
grymoire opened this issue Jun 22, 2022 · 9 comments
Open

No ESC key. #13

grymoire opened this issue Jun 22, 2022 · 9 comments

Comments

@grymoire
Copy link

I tried the keyboard on a raspberry pi, and quickly found no ESC key.
I couldn't even hit CNTL-[

This made exiting vi difficult..

@arturo182
Copy link
Contributor

Yes, there is no ESC key by default, all four top buttons don't send any events over USB. This can be changed by customizing the firmware, you can chose one of the values from here https://github.com/solderparty/i2c_puppet/blob/main/app/keyboard.h#L25 and fill it out here: https://github.com/solderparty/i2c_puppet/blob/main/app/usb.c#L63

@grymoire
Copy link
Author

Thanks for your help. I'm making progress with the changes. I'm also adding Control-characters.

@grymoire
Copy link
Author

grymoire commented Jul 2, 2022

Finally got it working with control codes and the missing ASCII characters remapped to the top 4 keys. I will make the repository available in a bit.

@grymoire
Copy link
Author

Here's my updated version with the missing characters
https://github.com/grymoire/i2c_puppet-Linux

@jakobi
Copy link

jakobi commented Jul 21, 2022

@grymoire

Thank you, grymoire, I was missing these as well for use with linux (and raspberry pi's :-))

I noted in xev, that keypresses are immediately followed by release events, also there's no middle mouse button, and the longpress on the mouse sensor/key is funny: button1 press+release, 1s, button 3 press, [waiting for user to release key], button 3 release. Also there's no way to send any (and also the more useful separate) lshift/lalt press/release events (maybe with your version for ctrl/sym?) .

Separate press/release would also allow key repeat while the key is pressed on linux.
[https://github.com//issues/5](see issue 5)

What would you suggest to use to add these further missing keys and buttons, something like ctrl-lshift, with the currently sent ESC key being delayed with a timeout?

(lshift on the bb20 for me is a bit funny in my fw version: ESC press+immediate-release, then IFF further kept press + a letter key, it continues to immediately send the combo of shift press, key press, key release, shift-release, which - same as button3 - has quite restricted usability).

Do you think splitting the press/release events is feasable given the structure of the i2c-puppet (and ram/flash space constraints)?

(All I did upto now, was merely a very quick skimming the source to confirm that the keys I couldn't trigger are indeed missing, and while you made my day, I've also still to look into building the firmware to update my bb20. Too little time..., sigh)

Thx,
Peter

@grymoire
Copy link
Author

First of all, look at LINUX Readme to see how I debugged the code. It might help you if you make any modifications. You can add as many print commands you want without affecting the keyboard functionality.

Second - I didn't modify the basic flow of the code much. Arturo has a SYM-lock and number-lock mechanism, and he distinguishes between presses and releases, and the mouse functions. I left that alone, but and frankly didn't spend much time understanding all of the logic flow. To be honest, I didn't need to. So, honestly, I'm not sure how to answer your question. Maybe Arturo can offer some advice.

@rej696
Copy link

rej696 commented Jul 9, 2023

@grymoire thanks for your notes, they are very helpful! I have been commenting the code base here https://github.com/rej696/bbq20/tree/rowan with a view to do something similar to you, but to refactor things slightly to more easily allow custom keymaps and layers like QMK (rather than hardcoding characters). I saw that you also modified the hex values of the KEY_X_Y macros for the buttons etc. would you be able to explain why you had to do that?

Additionally, I am a bit confused by the difference between kbd_entries and btn_entries, as they both seem to be handled in the same way, and it appears that the right button is considered a button (in the btn_entres table) and the other buttons are considered keys (in the kbd_entries table). Can anyone explain why this is and what is going on here.

@grymoire
Copy link
Author

grymoire commented Jul 9, 2023

As I recall, I had the keyboard working, but when I tried the Linux login screen, some buttons - like DELETE - didn't work. I think that's why I modified the KEY_X_Y map. It's been a while, and I have some personal things to take care up. I'll check it out later when I have time.

@grymoire
Copy link
Author

grymoire commented Jul 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants