diff options
author | pabile <1162412+pabile@users.noreply.github.com> | 2020-05-10 12:46:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 21:46:17 -0700 |
commit | d15a60d2d318ede79746c09d5beb79ba72037f30 (patch) | |
tree | 2dfe12f8dff96d0a77128a12e9372ff2a36729fd /keyboards/pabile/p18/keymaps | |
parent | 73992c68d55430192ea3b11adfabae817393354e (diff) |
[Keyboard] Add P40, P20 and P18 Keyboards by pabile (#8759)
* Add files via upload
* removed
* Add files via upload
* Rename pabile40.c to p40.c
* Rename pabile40.h to p40.h
* Add files via upload
* Update p40.c
* Update p40.h
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Updated readme file
* Updated readme file
* Add files via upload
* modified: keyboards/pabile/p18/config.h
modified: keyboards/pabile/p18/keymaps/default/keymap.c
modified: keyboards/pabile/p18/p18.h
modified: keyboards/pabile/p18/rules.mk
modified: keyboards/pabile/p40/config.h
modified: keyboards/pabile/p40/keymaps/default/keymap.c
* config update
* Delete README.md.save
* Delete keymap.c.save
* Delete keymaps.c
* modified: keyboards/pabile/p18/keymaps/default/keymap.c
* Update p18.h
* testing layout config
* Create info.json
* Create info.json
* Create readme.md
* Update readme.md
* Updated description
* Updated description
* Update config.h
updated vendor ID to 0000
* Update keymap.c
removed unnecessary comments
* Update keyboards/pabile/p18/p18.h
* Update keyboards/pabile/p18/p18.h
* Update p18.h
removed unnecessary comments
* Update keyboards/pabile/p18/rules.mk
* Update keyboards/pabile/p18/rules.mk
* Update config.h
updated vendor id and removed unnecessary comments
* Update keyboards/pabile/p40/info.json
* Update keyboards/pabile/p40/keymaps/default/keymap.c
* Update keyboards/pabile/p40/p40.h
* Update keyboards/pabile/p40/p40.h
* Update keyboards/pabile/p40/p40.h
* Update keyboards/pabile/p40/rules.mk
* Update keyboards/pabile/p40/rules.mk
* Added p20 macropad
* Update README.md
* Updated VID and PID
* Updated VID and PID
* Update rules.mk
* Update config.h
* Update config.h
* Update config.h
* Update keymap.c
* Replaced blank keys with KC_NO
* Update keyboards/pabile/p18/keymaps/default/keymap.c
* Update keyboards/pabile/p18/p18.h
* Update keyboards/pabile/p18/rules.mk
* Update keyboards/pabile/p20/keymaps/default/keymap.c
* Update keymap.c
* Update keymap.c
* Update keyboards/pabile/p20/rules.mk
* Update keyboards/pabile/p40/info.json
* Update keyboards/pabile/p20/p20.h
* Updated product ID
* Updated product ID
* Update keyboards/pabile/p20/config.h
* Update keyboards/pabile/p20/p20.h
* Update keyboards/pabile/p20/p20.h
* Update keyboards/pabile/p20/keymaps/default/keymap.c
* Update keyboards/pabile/p18/readme.md
* Update keyboards/pabile/p20/README.md
* Update keyboards/pabile/p20/rules.mk
* Update keyboards/pabile/p20/rules.mk
* Update keyboards/pabile/p20/rules.mk
* Update keyboards/pabile/p20/rules.mk
* Update keyboards/pabile/p40/README.md
* Update keyboards/pabile/p40/rules.mk
* Update keyboards/pabile/p40/rules.mk
* Update keyboards/pabile/p18/rules.mk
* Update keyboards/pabile/p18/rules.mk
* Update keyboards/pabile/p40/config.h
* Update keyboards/pabile/p40/config.h
* Update keyboards/pabile/p18/readme.md
* Changed to lowercase filename
* Rename README.md to readme.md
* Update keyboards/pabile/p18/rules.mk
Diffstat (limited to 'keyboards/pabile/p18/keymaps')
-rw-r--r-- | keyboards/pabile/p18/keymaps/default/keymap.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/keyboards/pabile/p18/keymaps/default/keymap.c b/keyboards/pabile/p18/keymaps/default/keymap.c new file mode 100644 index 0000000000..d47982e562 --- /dev/null +++ b/keyboards/pabile/p18/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_MUTE, KC_P1, KC_P2, KC_P3, KC_TAB, + KC_ESC, KC_DEL, KC_P0, KC_PDOT, KC_PENT + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder below the controller */ + if (clockwise) { + tap_code(KC_VOLD); /*volume down*/ + } else { + tap_code(KC_VOLU); /*volume up*/ + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_WH_U); /*mouse wheel up*/ + } else { + tap_code(KC_WH_D); /*mouse wheel down*/ + } + } +} |