aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/gh60/keymaps
diff options
context:
space:
mode:
authornoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-07-02 09:22:56 -0700
committerDrashna Jaelre <drashna@live.com>2019-07-02 09:22:56 -0700
commit308275909d081398231b4aa766846b63ffe7381a (patch)
treee43bc3330dbcb0aef2275cc7c24b155d61e0d2f9 /keyboards/gh60/keymaps
parentadda4e137e980d1597f7df7317a3419584e10d4f (diff)
downloadfirmware-308275909d081398231b4aa766846b63ffe7381a.tar.gz
firmware-308275909d081398231b4aa766846b63ffe7381a.tar.bz2
firmware-308275909d081398231b4aa766846b63ffe7381a.zip
[Keyboard] GH60 Configurator updates and modernization (#6232)
* Convert gh60.h to #pragma once include guard * Lint gh60.h This commit only changes white space. * Convert info.json to debug linting Making this file easier to read. * Put the label keys first for LAYOUT_60_ansi * Complete and correct key labels in info.json * Duplicate LAYOUT as LAYOUT_all Doing this for backwards compatibility. Has implications for user keymaps. * Update LAYOUT_all to make sense The original macro LAYOUT submitted for the GH60 gets a couple of things wrong: - K49 is placed between Space and Right Alt, when it's actually the right half of a split Backspace - K3C is assigned before K3D, when K3C is the 1u portion of a 1.75u/1u split Right Shift, and therefore K3D is actually to the left of K3C The LAYOUT_all macro corrects these issues, but the LAYOUT macro is unchanged, so as to not break user keymaps that depend on it. This commit also updates the default keymap to use the LAYOUT_all macro, and makes a minor change to the base layer to be more as a user would expect for the corresponding physical layout. * Correct the layout data for the LAYOUT macro in info.json Gives proper Configurator rendering. * Modernize default keymap Update the default keymap to use more modern QMK conventions. * Modernize the LED management code Update the LED management functions to use the GPIO functions, and clean up the led_set_kb() function. * Update key labels in info.json for LAYOUT_60_ansi_split_rshift Makes them consistent with the the rest of the file. * Update Docs links in readme file
Diffstat (limited to 'keyboards/gh60/keymaps')
-rw-r--r--keyboards/gh60/keymaps/default/keymap.c63
1 files changed, 23 insertions, 40 deletions
diff --git a/keyboards/gh60/keymaps/default/keymap.c b/keyboards/gh60/keymaps/default/keymap.c
index 581ba7e64..a8fd4f3c2 100644
--- a/keyboards/gh60/keymaps/default/keymap.c
+++ b/keyboards/gh60/keymaps/default/keymap.c
@@ -2,47 +2,30 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty */
- LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, TG(2), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSLS, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
- ),
- /* 1: fn */
- LAYOUT(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
- _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______
- ),
+ [0] = LAYOUT_all( /* 0: qwerty */
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, TG(2), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
+ ),
+
+ [1] = LAYOUT_all( /* 1: fn */
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
+ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [2] = LAYOUT_all( /* 2: arrows */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______,
+ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
- /* 2: arrows */
- LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP,
- _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT
- ),
-
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
- switch(id) {
- case 0:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- } else {
- unregister_code(KC_RSFT);
- }
- break;
- }
- return MACRO_NONE;
};
void matrix_scan_user(void) {