#keypad code check?
1 messages · Page 1 of 1 (latest)
intended behavior is a keypad with two modifier keys to select alternate functions where defined
currently waiting for hardware before testing
you probably want layer = int(key[3])) otherwise it's a string
otherwise it does what one would expect, for now
still trying to puzzle out a straightforward method for ignoring empty layers
you might also want to use key.startswith('mod')
didn't know about that one
personally I don't ignore empty layers, just repeat the keys in the layer definition
maybe my code will give you some inspiration? https://github.com/deshipu/ukeeb/blob/main/ukeeb.py
just curious: why not use key_number_to_row_column?
in yours
looks quite effective though
it didn't exist when I wrote it
makes sense
updated line 38, I think it should behave as intended now w.r.t. layer fall-through
ah yes
a bit confusing calling this "key"
how about "layers"
hmm, not good
then it doesn't fit with mods
the way I think of it is that each "key" is a position on the keypad
by the way, you can't have mods on layers
in this case, I don't intend to
I usually have "raise" and "lower" going to layer 1 and 2, and then pressing both takes me to layer 3
I considered that, would be possible by changing line 36 to += and mirroring it on line 40 with -=
but this is basically "minimum viable" code for the specific project in mind, without much regard to extensibility
at the moment I just don't have enough stuff that I want a macro key for 😛
thought you might be interested to hear that it seems to be working now