I have a CODE v2B keyboard from WASD (tenkeyless -- the kind without the numpad). It's a nice keyboard, but has really limited programmability. WASD has released a newer CODE keyboard (the v3) with some of the features I want, but... this is a perfectly good keyboard still. Why throw it away?
So I took it apart. It turns out that it contains a removable controller module, nestled above the arrow keys. By replacing that controller module, I can fix the things about the keyboard that bug me, and make it do whatever I want.
(This also means that WASD could have released an upgrade module for their existing keyboards, but decided to sell you a whole new keyboard instead, because recycling is bad, I guess? Poor form, WASD.)
Getting this to work has required a fair amount of reverse engineering work, so I'm publishing the schematics and mechanicals so nobody has to go through it again. I'm not prepared to provide any support for this design, particularly for free -- good luck!
Hardware: schematic and layout at the fab-v1
tag have been built and work.
I've made a series of changes, hopefully for the better, since that tag; these
have not been tested.
Firmware: mostly parity with the original.
Before you ask: This board might be compatible with QMK? I don't know, I don't use QMK.
Configuration uses the DIP switches on the back of the keyboard, but their meanings have changed from the stock controller.
- DIP1: swap Left Ctrl and Caps Lock.
- DIP2: swap Alt and Super (Mac mode).
- DIP3: replace Menu key with Fn key.
- DIP4: replace Right Alt key with Menu key (which is the same keycode as the Compose Character key on Unix keyboards, so this effectively switches right Alt to Compose -- though you will need to adjust the X layout options to make this effective).
When Fn is enabled (DIP3), a subset of the standard media keys are available (rest are TODO):
- Fn+PgUp: Volume Up
- Fn+PgDn: Volume Down
In addition, pressing Fn+Esc enters DFU mode (see below).
I mostly program/debug the firmware using SWD. However, with the SWD connector soldered on, the keyboard case won't close. To replace the firmware with the case closed, you can use DFU mode.
- Ensure the Fn key is enabled (DIP3 set).
- Plug in the keyboard and press Fn+Esc.
- Run:
dfu-util -d 0483:df11 --alt 0 -s 0x08000000 -D path_to_file.bin -R
To get the binary file required by dfu-util
, you can do:
$ cd fw
$ cargo build --release
$ arm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/release/fourk fourk.bin