From 3a4a28a38b53e67edd1141bf435df09d0a89466b Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 24 May 2018 15:26:38 -0700 Subject: [PATCH] Refactor for Alps64 (#3029) * Refactor for Alps64 * Reverts deletion of LAYOUT_kc macro; renames LAYOUT_standard_60 to LAYOUT_60_ansi * Add LAYOUTS = 60_ansi to rules.mk * Rename LAYOUT_standard_60 to LAYOUT_60_ansi in info.json --- keyboards/alps64/alps64.h | 2 +- keyboards/alps64/info.json | 2 +- keyboards/alps64/keymaps/default/keymap.c | 17 +++++++++-------- keyboards/alps64/rules.mk | 2 ++ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/keyboards/alps64/alps64.h b/keyboards/alps64/alps64.h index a7ac93421..4e8587435 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -55,7 +55,7 @@ along with this program. If not, see . { K70, K71, K72, K73, K74, K75, K76, K77 } \ } -#define LAYOUT_standard_60( \ +#define LAYOUT_60_ansi( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ diff --git a/keyboards/alps64/info.json b/keyboards/alps64/info.json index 41735cf7e..1f1af4f1f 100644 --- a/keyboards/alps64/info.json +++ b/keyboards/alps64/info.json @@ -9,7 +9,7 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, - "LAYOUT_standard_60": { + "LAYOUT_60_ansi": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index 12f78952d..dd598379e 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -1,12 +1,13 @@ -#include "alps64.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - LAYOUT_kc( \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \ - LCTL,LGUI,LALT, SPC, APP, RALT,RGUI,RCTL), + /* 0: qwerty */ + LAYOUT_all( \ + KC_GRV, 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_NUHS, KC_BSPC, \ + 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_BSLS, \ + 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_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESC, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL + ), }; const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 621dc5a95..4f35faac2 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -64,3 +64,5 @@ CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA + +LAYOUTS = 60_ansi