From 2fb14845d503f01bc5a15c95c8d1d51be73f98b5 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 6 Dec 2018 15:19:40 -0800 Subject: handwired/gamenum Refactor, Configurator support and readme cleanup (#4563) * handwired/gamenum: refactor - layout macro KEYMAP renamed to LAYOUT - white space changes for alignment - default keymap - now uses #include QMK_KEYBOARD_H - updated layout macro names - white space changes (for readability) * handwired/gamenum: Configurator support * handwired/gamenum: readme cleanup - renamed file to lowercase - updated to match current QMK template more closely - edits to reflect the other changes in this PR --- .../handwired/gamenum/keymaps/default/keymap.c | 76 ++++++++++------------ 1 file changed, 36 insertions(+), 40 deletions(-) (limited to 'keyboards/handwired/gamenum/keymaps') diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c index 6950b741a3..a18ffc89b9 100644 --- a/keyboards/handwired/gamenum/keymaps/default/keymap.c +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -1,36 +1,32 @@ -#include "gamenum.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H -#define _______ KC_TRNS - #define DEF 0 #define HDN 1 #define OSY 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DEF] = KEYMAP( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ - KC_7, KC_8, KC_9, KC_PLUS, \ - KC_4, KC_5, KC_6, \ - KC_1, KC_2, KC_3, \ - KC_0, KC_DOT, KC_ENT \ -), -[HDN] = KEYMAP( - KC_FN1, KC_1, KC_2, KC_3, \ - KC_Q, KC_W, KC_E, KC_R, \ - KC_A, KC_S, KC_D, \ - KC_Z, KC_X, KC_C, \ - KC_LSFT, KC_LALT, KC_SPC \ -), -[OSY] = KEYMAP( - KC_A, KC_Q, KC_1, KC_FN2, \ - KC_S, KC_W, KC_2, KC_LALT, \ - KC_D, KC_E, KC_3, \ - KC_F, KC_R, KC_4, \ - KC_SPC, KC_T, KC_TAB \ -) + [DEF] = LAYOUT( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ + ), + [HDN] = LAYOUT( + KC_FN1, KC_1, KC_2, KC_3, \ + KC_Q, KC_W, KC_E, KC_R, \ + KC_A, KC_S, KC_D, \ + KC_Z, KC_X, KC_C, \ + KC_LSFT, KC_LALT, KC_SPC \ + ), + [OSY] = LAYOUT( + KC_A, KC_Q, KC_1, KC_FN2, \ + KC_S, KC_W, KC_2, KC_LALT, \ + KC_D, KC_E, KC_3, \ + KC_F, KC_R, KC_4, \ + KC_SPC, KC_T, KC_TAB \ + ) }; @@ -48,21 +44,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { bool process_record_user (uint16_t keycode, keyrecord_t *record) { switch(keycode) { case KC_FN0: - if (record->event.pressed) { - PORTC |= (1 << 6); // PC6 goes high - } - break; + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + break; case KC_FN1: - if (record->event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes high - PORTD |= (1<<4); - } - break; + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + break; case KC_FN2: - if (record->event.pressed) { - PORTD &= ~(1 << 4); // PC6 goes high - } - break; + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + break; } return true; -} \ No newline at end of file +} -- cgit v1.2.3