Recently got hold of a keybow2040 which I’m having a lot of fun with. What I’d like to do it be able to send multiple keys in response to a single key press (for example I press a single key on the keybow and it sends ALT+F4).
I put this code together -
combo_1 = [Keycode.ALT,Keycode.F4]
for k in combo_1:
However that has the the effect of sending the ALT keycode followed by the F4 keycode - not at the same time.
I’ve seen the docs on GitHub - pimoroni/keybow2040-circuitpython: CircuitPython library for the Pimoroni Keybow 2040 which documents key modifiers but that relates to multiple keypresses on the keybow to send a single keystroke.
Any ideas if its even possible?!
Something like this is I think what your after.
if pressed then
Thanks for the swift response. Thats an example for the keybow hardware and I’m using the keybow2040. I dont believe the code is cross compatible as thats written in lua and I believe the keybow2040 can only use CircuitPython.
Ah, OK, missed that, ops.
Well I’ve figured it out! Its pretty simple :D
If I want to send ALT and F4 (at the same time) in response to the 10th key on the keyboard being pressed:
if key.number == 9:
Can’t believe I didnt try that a few days ago!
That could come in handy for me, thanks for posting the solution. I have the PICO RGB Keypad base, and have it running a port of Keybow 2040 Circuit Python. I have plans for multi key on button press code.