diff options
author | Jesse Leventhal <45154268+jessel92@users.noreply.github.com> | 2020-01-07 17:29:45 -0500 |
---|---|---|
committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-01-07 14:29:45 -0800 |
commit | 0c86cfeaed23377862356326c0f26191f74d899f (patch) | |
tree | 845044fda9e3592fcffb325a2d4e10d2c2f72a73 /keyboards/ncc1701kb/keymaps/default | |
parent | b69457a192374522de9662a219165ddfdd83afc2 (diff) | |
download | firmware-0c86cfeaed23377862356326c0f26191f74d899f.tar.gz firmware-0c86cfeaed23377862356326c0f26191f74d899f.tar.bz2 firmware-0c86cfeaed23377862356326c0f26191f74d899f.zip |
[Keyboard] Added NCC-1701-KB 3x3 Keypad with Encoder and Keymap (#7819)
* Added NCC-1701-KB Keypad and Keymap
* Update keyboards/ncc1701kb/config.h
* Update keyboards/ncc1701kb/config.h
* Update keyboards/ncc1701kb/config.h
* Update keyboards/ncc1701kb/config.h
* Update keyboards/ncc1701kb/ncc1701kb.h
* Update keyboards/ncc1701kb/readme.md
* Update keyboards/ncc1701kb/readme.md
* Update keyboards/ncc1701kb/readme.md
* Fixed changes rules.mk bootloader
* Fixed rules.mk Build Options
* Recomended fauxpark changes/fixes
* Update keyboards/ncc1701kb/ncc1701kb.h
* Update keyboards/ncc1701kb/ncc1701kb.h
* Update keyboards/ncc1701kb/readme.md
* Update keyboards/ncc1701kb/readme.md
Diffstat (limited to 'keyboards/ncc1701kb/keymaps/default')
-rw-r--r-- | keyboards/ncc1701kb/keymaps/default/keymap.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/keyboards/ncc1701kb/keymaps/default/keymap.c b/keyboards/ncc1701kb/keymaps/default/keymap.c new file mode 100644 index 000000000..a3e3d819f --- /dev/null +++ b/keyboards/ncc1701kb/keymaps/default/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYER 0 + * ,-----------------------. + * | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (VOLUME CONTROL) + * |-------+-------+-------| + * | STOP | PLAY | MEDIA | + * |-------+-------+-------| + * | CALC | MAIL | PC/FN | + * `-----------------------' + */ +[0] = LAYOUT( + KC_MPRV, KC_MUTE, KC_MNXT, + KC_MSTP, KC_MPLY, KC_MSEL, + KC_CALC, KC_MAIL, LT(1, KC_MYCM) +), + +/* LAYER 1 + * ,-----------------------. + * |BL TOG | | BREATH| + * |-------+-------+-------| + * | BL + | BL - |BL CYCL| + * |-------+-------+-------| + * | BL ON | BL OFF| | + * `-----------------------' + */ +[1] = LAYOUT( + BL_TOGG, KC_TRNS, BL_BRTG, + BL_INC, BL_DEC, BL_STEP, + BL_ON, BL_OFF, KC_TRNS +) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +}
\ No newline at end of file |