summaryrefslogtreecommitdiff
path: root/keyboards/dumbpad/v0x_right/templates/keymap.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-03-05 04:25:54 +0000
committerQMK Bot <hello@qmk.fm>2021-03-05 04:25:54 +0000
commit7e051e06191e5360d16921021982402a18beb1bb (patch)
tree5a309fa838e75a424232eed9915f98f5312baaa1 /keyboards/dumbpad/v0x_right/templates/keymap.c
parenta71fb6057dbc0fc022c675843196223f3a9493fd (diff)
parentd7aa245c3343542381ae0e9eb1b77eadca74da57 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/dumbpad/v0x_right/templates/keymap.c')
-rw-r--r--keyboards/dumbpad/v0x_right/templates/keymap.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/keyboards/dumbpad/v0x_right/templates/keymap.c b/keyboards/dumbpad/v0x_right/templates/keymap.c
new file mode 100644
index 0000000000..11ed745188
--- /dev/null
+++ b/keyboards/dumbpad/v0x_right/templates/keymap.c
@@ -0,0 +1,25 @@
+#include QMK_KEYBOARD_H
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
+
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ switch (get_highest_layer(layer_state)) {
+ case 0:
+ if (clockwise) {
+ tap_code(KC_MS_R);
+ } else {
+ tap_code(KC_MS_L);
+ }
+ break;
+
+ default:
+ if (clockwise) {
+ tap_code(KC_EQL);
+ } else {
+ tap_code(KC_MINS);
+ }
+ break;
+ }
+ }
+}