forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add via support to keebio/bdn9 (qmk#8620)
Signed-off-by: Joshua Rubin <[email protected]>
- Loading branch information
1 parent
fa860d5
commit 97f1088
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
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( | ||
_______, _______, _______, | ||
_______, _______, _______, | ||
_______, _______, _______ | ||
) | ||
|
||
}; | ||
|
||
void encoder_update_user(uint8_t index, bool clockwise) { | ||
if (index == 0) { | ||
if (clockwise) { | ||
tap_code(KC_VOLU); | ||
} else { | ||
tap_code(KC_VOLD); | ||
} | ||
} else if (index == 1) { | ||
if (clockwise) { | ||
tap_code(KC_WH_U); | ||
} else { | ||
tap_code(KC_WH_D); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
VIA_ENABLE = yes | ||
LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
MOUSEKEY_ENABLE = yes | ||
CONSOLE_ENABLE = no | ||
COMMAND_ENABLE = no |