This is a tool developed by a need. I bought an ErgoDox keyboard which allows for a complete re-map of every single key, sadly this is done with a unintuitive list of numbers in C
. In order to quickly try different configurations I developed this web page. It allows you to visually select the configuration for each key and generate the C
code to be compiled and injected into the keyboard hardware.
Layers could be added so while one of the keys is pressed the whole keyboard layout changes.
The configuration is saved in localStorage
so it's available after refreshing the page.
Note: Since this was a tool just for me, the output after pressing the GENERATE! button can be found in the browser's Developer Tools (F12)
Example of generated code:
#include <stdint.h>
#include <stddef.h>
#include <avr/pgmspace.h>
#include "../../../lib/data-types/misc.h"
#include "../../../lib/usb/usage-page/keyboard--short-names.h"
#include "../../../lib/key-functions/public.h"
#include "../matrix.h"
#include "../layout.h"
// FUNCTIONS ------------------------------------------------------------------
void kbfun_layer_pop_all(void) {
kbfun_layer_pop_1();
kbfun_layer_pop_2();
kbfun_layer_pop_3();
kbfun_layer_pop_4();
kbfun_layer_pop_5();
kbfun_layer_pop_6();
kbfun_layer_pop_7();
kbfun_layer_pop_8();
kbfun_layer_pop_9();
kbfun_layer_pop_10();
}
// DEFINITIONS ----------------------------------------------------------------
#define kprrel &kbfun_press_release
#define ktog &kbfun_toggle
#define ktrans &kbfun_transparent
#define lpush0 &kbfun_layer_pop_all
#define lpush1 &kbfun_layer_push_1
#define lpush2 &kbfun_layer_push_2
#define lpush3 &kbfun_layer_push_3
#define lpush4 &kbfun_layer_push_4
#define lpush5 &kbfun_layer_push_5
#define lpush6 &kbfun_layer_push_6
#define lpush7 &kbfun_layer_push_7
#define lpush8 &kbfun_layer_push_8
#define lpush9 &kbfun_layer_push_9
#define lpush10 &kbfun_layer_push_10
#define lpop0 &kbfun_layer_pop_all
#define lpop1 &kbfun_layer_pop_1
#define lpop2 &kbfun_layer_pop_2
#define lpop3 &kbfun_layer_pop_3
#define lpop4 &kbfun_layer_pop_4
#define lpop5 &kbfun_layer_pop_5
#define lpop6 &kbfun_layer_pop_6
#define lpop7 &kbfun_layer_pop_7
#define lpop8 &kbfun_layer_pop_8
#define lpop9 &kbfun_layer_pop_9
#define lpop10 &kbfun_layer_pop_10
#define dbtldr &kbfun_jump_to_bootloader
#define sshprre &kbfun_shift_press_release
#define altprre &kbfun_alt_press_release
#define guiprre &kbfun_gui_press_release
#define s2kcap &kbfun_2_keys_capslock_press_release
#define slpunum &kbfun_layer_push_numpad
#define slponum &kbfun_layer_pop_numpad
// ----------------------------------------------------------------------------
// LAYOUT ---------------------------------------------------------------------
const uint8_t PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS] = {
// LAYER $index
KB_MATRIX_LAYER(0, 41, 58, 59, 60, 61, 62, 63, 73, 20, 26, 8, 21, 23, 0, 1, 4, 22, 7, 9, 10, 225, 100, 29, 27, 6, 25, 1, 102, , , , 224, 0, 1, , , 2, 43, 41, 76, 64, 65, 66, 67, 68, 69, 0, 226, 28, 24, 12, 18, 19, , 11, 13, 14, 15, 53, , 227, 5, 17, 16, 54, 55, 225, 72, 128, 129, 127, 0, 4, 5, 3, , , 42, 44, 40),
// LAYER $index
KB_MATRIX_LAYER(0, ),
};
// ----------------------------------------------------------------------------
// PRESS ----------------------------------------------------------------------
const void_funptr_t PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS] = {
// LAYER $index
KB_MATRIX_LAYER(NULL, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, lpush0, lpush1, sshprre, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, lpush1, kprrel, , , , kprrel, lpush0, lpush1, , , lpush2, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, lpush0, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, , kprrel, kprrel, kprrel, kprrel, kprrel, , kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, NULL, lpush4, lpush5, lpush3, , , kprrel, kprrel, kprrel),
// LAYER $index
KB_MATRIX_LAYER(NULL, ),
};
// ----------------------------------------------------------------------------
// RELEASE --------------------------------------------------------------------
const void_funptr_t PROGMEM _kb_layout_release[KB_LAYERS][KB_ROWS][KB_COLUMNS] = {
// LAYER $index
KB_MATRIX_LAYER(NULL, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, NULL, lpop1, sshprre, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, NULL, kprrel, , , , kprrel, lpop0, lpop1, , , lpop2, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, lpop0, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, , kprrel, kprrel, kprrel, kprrel, kprrel, , kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, kprrel, NULL, lpop4, lpop5, lpop3, , , kprrel, kprrel, kprrel),
// LAYER $index
KB_MATRIX_LAYER(NULL, ),
};
// ----------------------------------------------------------------------------