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

fix: Add delay to DemuxKeyMatrix along with columns_to_anodes and transpose options #9912

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

patricksurry
Copy link

I'm using a nullbitsco nibble which has a 16x5 matrix with the multiplexed via two '138 3:8 decoders.
With no delay the DemuxKeyMatrix scanner was giving phantom key strokes on almost every key press, where (r,c) is
pressed but (r,c), (r+1,c) and sometimes (r+2,c) register. I tried the same 1us delay as the basic KeyMatrix but
still saw echoes, especially where many bits change in the demux input. The qmk implementation uses a 5us delay
which also works here.

In passing this class would be more flexible if it supported the same columns_to_anodes parameter as KeyMatrix, and perhaps a way to transpose rows and columns. For example with the nibble it's actually the columns that are multiplexed not the rows but I can work around by pretending they're rows and transposing back to the keymap.

@dhalbert
Copy link
Collaborator

This looks fine! Would you like to add your proposed additions to the API?

@patricksurry
Copy link
Author

patricksurry commented Dec 25, 2024

work in progress - hard crash when using transpose, looking into it

@patricksurry
Copy link
Author

This is working for me now with transpose=True or False. I can't test columns_to_anodes=False since my hardware needs True (the original default case). The default case works fine and the code is essentially the same as the regular KeyMatrix

@patricksurry patricksurry changed the title fix: Add delay to DemuxKeyMatrix fix: Add delay to DemuxKeyMatrix along with column_to_anode and transpose options Dec 26, 2024
@patricksurry patricksurry changed the title fix: Add delay to DemuxKeyMatrix along with column_to_anode and transpose options fix: Add delay to DemuxKeyMatrix along with columns_to_anodes and transpose options Dec 26, 2024
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

Successfully merging this pull request may close these issues.

2 participants