Category Archives: RaspberryPi

Pimoroni.com – Keybow and Keybow MINI

I saw this tweet and wanted to set something similar up for Microsoft Teams… i.e. to mute and unmute the microphone during a call.

We can see that the Arduino is emulating a HID and responding to an input (from a button press) – and sends the appropriate ‘keyboard short-cut‘.

In this example the key presses are

  • Command+Shift+M

I do have some Arduino’s laying around (as you do!) but can’t easily navigate the C/C++ language, so after some research i found myself on the pimoroni.com website looking at Keybow and Keybow mini – at the time only the mini was in stock, so i decided to take the plunge.

Arduino on Adafruit. Trinket USB volume knob and TrinketHidCombo code

…and this is where the ‘fun’ starts – if ‘teams’ is not in ‘focus’ i.e. in the foreground then this key sequence is presented to the application that is! So you first need to switch to teams by using MacOS spotlight and sending ‘teams.app’ – however this can considerably ‘slow’ down the responsiveness – i.e. its not instantaneous.

This becomes the sequence

function handle_minikey_01(pressed)
-- keybow.set_key("1", pressed)
-- green
    if pressed then
        keybow.set_pixel(1, 0, 255, 0)
        mac_snippets.spotlight("teams.app")
        keybow.set_modifier(keybow.LEFT_META, keybow.KEY_DOWN, keybow.LEFT_SHIFT)
        keybow.tap_key("M", pressed)
        keybow.set_modifier(keybow.LEFT_META, keybow.KEY_UP)
    else
       keybow.set_pixel(1, 0, 0, 0)
    end
end

In the end given the limited keys on the mini model i opted for one button to launch/switch to the Chrome.app, one button to switch to teams.app and the final button to just send the Teams keyboard short-cut to mute/unmute.

It took a bit of work to get it working, and only have this setup for a Mac (after obtaining a usb-c to micro-usb cable from Amazon)

Following this guide on pimoroni – there is a paragraph missing…

Note that if you’re using Keybow MINI then you’ll need to add the following bit of code….

 -- Keybow MINI --

function setup()
    keybow.use_mini()
    keybow.auto_lights(false)
    keybow.clear_lights()
end

…And the macos.lua shows launching ‘cmd’ instead of ‘terminal’

My completed macos.lua file is on github as is a working image that you can copy to a blank Fat32 formatted SD card.

3 keybow mini orientation

Now the keybow with 12 keys has arrived…

…and I found some github repositories that allows for ‘pages’ – i.e. over-comes the limit to the 12 keys…

…Watch this space!

  • Windows 10 – teams
  • Colour coded key presses
  • Pages