Raspberry Pi Kits

Pimoroni Keybow

Keybow Mini Kit

Keybow Mini Kit

In my last post, I spoke about how I won £50 to spend on Pimoroni’s excellent store. Well along with the Mote, I also purchased a Keybow Mini (shown above). This device allows you to program in keypress macros, so when you press one of the keys – the device can send a series of key presses to your computer.

At work, we have two internet connections, on restricted to work use, the other for personal use. So I wrote a macro to allow me to flip between them at the press of one of the keys.

Another of the macros will open up a Remote Desktop to our test server in one press.

You can turn Windows 10 system-wide proxy on and off using the following macro:

function handle_minikey_02(pressed)
    if pressed then
		keybow.set_pixel(2, 0, 0, 128)
		keybow.tap_left_meta()
		keybow.sleep(500)
		keybow.text("proxy")
		keybow.sleep(500)
		keybow.tap_enter()
		keybow.sleep(500)
		keybow.set_pixel(2, 128, 0, 128)
		keybow.tap_tab()
		keybow.tap_tab()
		keybow.tap_tab()
		keybow.tap_tab()
		keybow.tap_tab()
		keybow.tap_tab()
		keybow.set_pixel(2, 0, 0, 128)
		keybow.tap_enter()
		keybow.sleep(500)
		keybow.tap_tab()
		keybow.sleep(500)
		keybow.tap_tab()
		keybow.sleep(500)
		keybow.tap_space()
		keybow.sleep(500)
		keybow.tap_enter()
		keybow.sleep(500)
		keybow.tap_tab()
		keybow.sleep(500)
		keybow.tap_enter()
		keybow.set_pixel(0, 0, 0, 0)
	else
		keybow.set_pixel(0, 0, 0, 0)
	end
end

What this macro does is to open the start menu, type in proxy, runs the control panel applet to the proxy. It then tabs to the settings for turning the system-wide proxy off, un-checks the box and saves the settings.

Running the macro a second time turns the proxy back on again. So, now you have a quick proxy toggle.

You can quickly launch a remote desktop connection using the following macro:

function handle_minikey_00(pressed)
    if pressed then
		keybow.set_pixel(0, 255, 0, 255)
		keybow.set_modifier(keybow.LEFT_META, keybow.KEY_DOWN)
		keybow.tap_key("r", pressed)
		keybow.set_modifier(keybow.LEFT_META, keybow.KEY_UP)
		keybow.sleep(500)
		keybow.text("mstsc")
		keybow.sleep(500)
		keybow.tap_enter()
		keybow.sleep(500)
		keybow.text("REMOTE MACHINE NAME")
		keybow.sleep(500)
		keybow.tap_enter()
		keybow.set_pixel(0, 0, 0, 0)
	else
		keybow.set_pixel(0, 0, 0, 0)
	end
end

This will open the Windows Run dialogue, enter in “MSTSC” and press enter. You can then automatically enter the remote machine name and press enter again.

If I come up with any more interesting macros, I will add new posts with the details.

Comments are Closed

Theme by Anders Norén