2018-12-07 00:19:40 +01:00
|
|
|
#include QMK_KEYBOARD_H
|
2016-10-03 10:53:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
#define DEF 0
|
|
|
|
#define HDN 1
|
|
|
|
#define OSY 2
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
2018-12-07 00:19:40 +01:00
|
|
|
[DEF] = LAYOUT(
|
2021-12-14 13:41:16 +01:00
|
|
|
TO(HDN), KC_SLSH, KC_ASTR, KC_MINS,
|
|
|
|
KC_7, KC_8, KC_9, KC_PLUS,
|
|
|
|
KC_4, KC_5, KC_6,
|
|
|
|
KC_1, KC_2, KC_3,
|
|
|
|
KC_0, KC_DOT, KC_ENT
|
2018-12-07 00:19:40 +01:00
|
|
|
),
|
|
|
|
[HDN] = LAYOUT(
|
2021-12-14 13:41:16 +01:00
|
|
|
TO(OSY), KC_1, KC_2, KC_3,
|
|
|
|
KC_Q, KC_W, KC_E, KC_R,
|
|
|
|
KC_A, KC_S, KC_D,
|
|
|
|
KC_Z, KC_X, KC_C,
|
|
|
|
KC_LSFT, KC_LALT, KC_SPC
|
2018-12-07 00:19:40 +01:00
|
|
|
),
|
|
|
|
[OSY] = LAYOUT(
|
2021-12-14 13:41:16 +01:00
|
|
|
KC_A, KC_Q, KC_1, TO(DEF),
|
|
|
|
KC_S, KC_W, KC_2, KC_LALT,
|
|
|
|
KC_D, KC_E, KC_3,
|
|
|
|
KC_F, KC_R, KC_4,
|
|
|
|
KC_SPC, KC_T, KC_TAB
|
2018-12-07 00:19:40 +01:00
|
|
|
)
|
2016-10-03 10:53:09 +02:00
|
|
|
};
|
|
|
|
|
2019-02-15 05:07:13 +01:00
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
2016-10-03 10:53:09 +02:00
|
|
|
switch(keycode) {
|
2019-02-15 05:07:13 +01:00
|
|
|
case TO(HDN):
|
|
|
|
if (record->event.pressed) {
|
2024-05-02 11:48:49 +02:00
|
|
|
gpio_write_pin_high(C6);
|
2019-02-15 05:07:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case TO(OSY):
|
|
|
|
if (record->event.pressed) {
|
2024-05-02 11:48:49 +02:00
|
|
|
gpio_write_pin_low(C6);
|
|
|
|
gpio_write_pin_high(D4);
|
2019-02-15 05:07:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case TO(DEF):
|
|
|
|
if (record->event.pressed) {
|
2024-05-02 11:48:49 +02:00
|
|
|
gpio_write_pin_low(D4);
|
2019-02-15 05:07:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return true;
|
2016-10-03 10:53:09 +02:00
|
|
|
}
|
2018-12-07 00:19:40 +01:00
|
|
|
}
|