Key combinations

Keybow received today, I want to use it with my Mac where I’m running Logic Pro X. Having to do multiple key presses sort of defeats the object since what I want is a number of keys set up to do regularly used strokes. So can anyone enlighten me as to how to get a Keybow press to emulate the cmd(option), ctrl and alt keys, singularly and in combination together and with an alpha-numeric ?

MTIA

You certainly can do that!

There’s quite a bit of detail on it in this tutorial, https://learn.pimoroni.com/tutorial/sandyj/using-macros-and-snippets-with-keybow, but here’s an example too.

function handle_key_00(pressed)
    if pressed then
        keybow.set_modifier(keybow.LEFT_META, keybow.KEY_DOWN)
        keybow.set_modifier(keybow.LEFT_CTRL, keybow.KEY_DOWN)
        keybow.set_modifier(keybow.LEFT_ALT, keybow.KEY_DOWN)
        keybow.tap_key("t", pressed)
        keybow.set_modifier(keybow.LEFT_META, keybow.KEY_UP)
        keybow.set_modifier(keybow.LEFT_CTRL, keybow.KEY_UP)
        keybow.set_modifier(keybow.LEFT_ALT, keybow.KEY_UP)
    end
end

So that’s made up example of holding down command, control, and alt and then tapping t, and finally releasing command, control, and alt again. Hopefully that makes sense?

Thanks Sandy, that’s a great help :-)

R

1 Like