From 4da9d2ef6f3f3a91738a209f8e692d7294ef70d5 Mon Sep 17 00:00:00 2001 From: "J.Flanagan" Date: Wed, 23 Oct 2019 23:36:40 -0500 Subject: [Keyboard] Add GTM Pad macropad (#7123) * initial commit begin development of Grand Theft Macro Pad (2key2crawl clone) * Minor Changes Changes to readme.md Changes to config.h matrix pins Changes to gtm.h layout Changes to rules.mk * initial commit begin development of Grand Theft Macro Pad (2key2crawl clone) * Minor Changes Changes to readme.md Changes to config.h matrix pins Changes to gtm.h layout Changes to rules.mk * Update keyboards/sck/gtm/readme.md Co-Authored-By: fauxpark * Update keyboards/sck/gtm/readme.md Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Update keyboards/sck/gtm/rules.mk Co-Authored-By: fauxpark * Changes to gtm.h Changes to layout to be correct for matrix_cols and matrix_col_pins * Minor Changes Removed rotary encoder index in keymaps per suggestion --- keyboards/sck/gtm/keymaps/default/keymap.c | 24 ++++++++++++++++++++++++ keyboards/sck/gtm/keymaps/tabs/keymap.c | 24 ++++++++++++++++++++++++ keyboards/sck/gtm/keymaps/vol/keymap.c | 23 +++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 keyboards/sck/gtm/keymaps/default/keymap.c create mode 100644 keyboards/sck/gtm/keymaps/tabs/keymap.c create mode 100644 keyboards/sck/gtm/keymaps/vol/keymap.c (limited to 'keyboards/sck/gtm/keymaps') diff --git a/keyboards/sck/gtm/keymaps/default/keymap.c b/keyboards/sck/gtm/keymaps/default/keymap.c new file mode 100644 index 0000000000..218a1d107e --- /dev/null +++ b/keyboards/sck/gtm/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } +} + diff --git a/keyboards/sck/gtm/keymaps/tabs/keymap.c b/keyboards/sck/gtm/keymaps/tabs/keymap.c new file mode 100644 index 0000000000..9a60e0f053 --- /dev/null +++ b/keyboards/sck/gtm/keymaps/tabs/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code16(C(KC_T)); + } else { + tap_code16(C(KC_W)); + } +} + diff --git a/keyboards/sck/gtm/keymaps/vol/keymap.c b/keyboards/sck/gtm/keymaps/vol/keymap.c new file mode 100644 index 0000000000..e3d01439d3 --- /dev/null +++ b/keyboards/sck/gtm/keymaps/vol/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), + +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} -- cgit v1.2.1