Mechanical keyboard arrows example

Table of Contents

1 Description

This page describes how I built a small example keyboard using mechanical switches, qmk_firmware, and a pro micro.



2 News

  • 7 May 2017: Initial

3 Features

  • Small (2 rows, 3 columns)
  • Has arrows and home/end/pgup/pgdown
  • RGB backlighting (with 2 rgb leds)
  • Uses a cheap pro micro clone
  • Insert ascii by typing 8-bits using 2 buttons (for 1 and 0)

4 Use

  • Arrow keys are regular arrows
  • Holding either of the FN keys (SL, PS) changes arrow keys to (page up, home, page down, end)
  • Holding one FN key and pressing the other one switches to a new layout:
    • SL goes back to normal
    • Left toggle backlight
    • Down switches between backlight modes
    • Up and PS sends 1 and 0 to build a ascii letter. Every 8'th 1/0s sent will transmit its corresponding key. The ascii binary is typed in with most significant bit first. You type an 'A' (0100 0001) by pressing: PS, Up, Ps, Ps, Ps, Ps, Ps, Up. This is a simple implementation that does not support modifier keys (so no symbols or upper-case letters).

5 Keyboard

  • Switches are Gateron blue
  • Keycaps are from cheap ebay item called "White Doubleshot PBT Translucent 104 KeyCap backlit for Cherry MX Keyboard"
  • Backplate is a piece of cardboard
  • Case is a chopstick and some blu-tack

Obviously this is awful in every way but one; it works.



6 Build

I followed the excellent Quantum hand-wiring guide to wire up the switches.

To figure out which pins to use I found a pro micro avr pin image. I used these pins:

function pro micro pin avr pin
Row 1 A3 F4
Row 2 A2 F5
Column 1 15 B1
Column 2 A0 F7
Column 3 A1 F6
RGB data 14 B3

To flash the pro micro I used avrdude:

avrdude -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D \

This did not work at first, giving me the following error:

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding

I fixed this by taking a bit of wire and shorting the RST (reset) and GND pins on the pro micro a few times. This tells the pro micro to go into programmer mode.

I managed to wire everything up correctly the first time.

Howveer, I did mistype a key in the KEYMAP in daarrows.h so two switches were connected to k11. I debugged this by shorting the row and column pins on the pro micro, this also output the wrong character so I knew it had to be a software bug.

The rgb backlight did not work at first because I did not enabled it in keymaps/default/Makefile (only in

I manged setting an initial rgb backlight mode by changing the init code in daarrows.c. I searched a long time for a macro to set the default mode, but that does not seem to exist.

Author: Dan Amlund Thomsen

Created: 2017-05-07 Sun 18:37