HardWare:
A 9-key macropad by YMDK with per-key RGB lighting.
Tools:
QMK on GitHub ( QMK Configurator / ToolBox )
store the «default.c» for your keymap in «\qmk_firmware\keyboards\ymdk\ymd09\keymaps\default»
MSSYS «qmk compile -kb ymdk/ymd09 -km urs_01»
keymap.c example:
***********************************************************
#include QMK_KEYBOARD_H
enum {
Urs_1,
Urs_2,
Urs_3
};
bool process_record_user(uint16_t keycode, keyrecord_t *record){
switch(keycode){
case Urs_1:
if (record->event.pressed){
SEND_STRING("Hallo Urs");
}
else {
register_code(KC_ENT);
unregister_code(KC_ENT);
}
break;
case Urs_2:
if (record->event.pressed){
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_S);
}
else {
unregister_code(KC_LGUI);
unregister_code(KC_LSFT);
unregister_code(KC_S);
}
break;
}
return true;
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(Urs_1, Urs_2, Urs_3,
KC_KP_4, LT(1, KC_KP_5), KC_KP_6,
KC_KP_1, KC_KP_2, KC_KP_3),
[1] = LAYOUT(RGB_RMOD, RGB_VAI, RGB_MOD,
RGB_HUI, KC_TRNS, RGB_SAI,
RGB_HUD, RGB_VAD, RGB_SAD),
};
https://gist.github.com/panzerstadt for example