qmk-keychron-q3-colemak-dh/keyboards/keebio/bdn9/rev2/keymaps/vial/keymap.c
ambustion 1998b3e69f
Added support for Keebio BDN9 and Cannon Keys db60 (#80)
* Add support for CannonKeys db60 and Keebio BDN9

* remove db60 config from bdn9

* Removed suggested changes

* updated a few keys for db60

* Removed erroneus db60.json and fixed rule.mk

* Set unlock combo and removed rgb features not on board.

* Added config for Keebio KBO-5000

Not totally sure if size of firmware is too close to the edge or how that impacts vial. 588 bytes free when building firmware.

* Added security keys to keebio bdn9

* added RGB_Matrix_Enable

* Update rules.mk for rev1 fw size limitations

* Moved bdn9 keymap to rev2/keymaps/vial as rev1 build has firmware size limitation
2021-12-21 23:58:37 -05:00

68 lines
1.2 KiB
C

#include QMK_KEYBOARD_H
enum encoder_names {
_LEFT,
_RIGHT,
_MIDDLE,
};
enum layer_names {
_ZERO,
_ONE,
_TWO,
_THREE
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ZERO] = LAYOUT(
KC_MPLY, KC_HOME, KC_MUTE,
MO(1), KC_UP, RGB_MOD,
KC_LEFT, KC_DOWN, KC_RGHT
),
[_ONE] = LAYOUT(
RESET, BL_STEP, KC_STOP,
_______, KC_HOME, RGB_MOD,
KC_MPRV, KC_END , KC_MNXT
),
[_TWO] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[_THREE] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
)
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
else if (index == _MIDDLE) {
if (clockwise) {
tap_code(KC_DOWN);
} else {
tap_code(KC_UP);
}
}
else if (index == _RIGHT) {
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return true;
}