XD68 Configurator Layout Support and Minor Refactor (#7904)

* XD68: QMK Configurator layout support

* elevate backlight breathing settings to keyboard level

* remove empty keymap config.h files

* rules.mk templating

* keymap polishing

- four-space indent
- keycode alignment
This commit is contained in:
James Young 2020-01-14 17:31:17 -08:00 committed by Joel Challis
parent 61cd180163
commit 537b8713e5
7 changed files with 251 additions and 99 deletions

View File

@ -50,6 +50,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_PIN F5
#define BACKLIGHT_LEVELS 6
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 6
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

156
keyboards/xd68/info.json Normal file
View File

@ -0,0 +1,156 @@
{
"keyboard_name": "xd68",
"url": "",
"maintainer": "qmk",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT_65_ansi": {
"key_count": 68,
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"1", "x":1, "y":0},
{"label":"2", "x":2, "y":0},
{"label":"3", "x":3, "y":0},
{"label":"4", "x":4, "y":0},
{"label":"5", "x":5, "y":0},
{"label":"6", "x":6, "y":0},
{"label":"7", "x":7, "y":0},
{"label":"8", "x":8, "y":0},
{"label":"9", "x":9, "y":0},
{"label":"0", "x":10, "y":0},
{"label":"-", "x":11, "y":0},
{"label":"=", "x":12, "y":0},
{"label":"Backspace", "x":13, "y":0, "w":2},
{"label":"Home", "x":15, "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":"Page Up", "x":15, "y":1},
{"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":"Page Down", "x":15, "y":2},
{"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":1.75},
{"label":"Up", "x":14, "y":3},
{"label":"End", "x":15, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"label":"Space", "x":3.75, "y":4, "w":6.25},
{"label":"Menu", "x":10, "y":4},
{"label":"Ctrl", "x":11, "y":4},
{"label":"Fn", "x":12, "y":4},
{"label":"Left", "x":13, "y":4},
{"label":"Down", "x":14, "y":4},
{"label":"Right", "x":15, "y":4}
]
},
"LAYOUT_65_iso": {
"key_count": 69,
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"1", "x":1, "y":0},
{"label":"2", "x":2, "y":0},
{"label":"3", "x":3, "y":0},
{"label":"4", "x":4, "y":0},
{"label":"5", "x":5, "y":0},
{"label":"6", "x":6, "y":0},
{"label":"7", "x":7, "y":0},
{"label":"8", "x":8, "y":0},
{"label":"9", "x":9, "y":0},
{"label":"0", "x":10, "y":0},
{"label":"-", "x":11, "y":0},
{"label":"=", "x":12, "y":0},
{"label":"Backspace", "x":13, "y":0, "w":2},
{"label":"Home", "x":15, "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":"PgUp", "x":15, "y":1},
{"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":"#", "x":12.75, "y":2},
{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
{"label":"PgDn", "x":15, "y":2},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"\\", "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},
{"label":"Up", "x":14, "y":3},
{"label":"End", "x":15, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"label":"Space", "x":3.75, "y":4, "w":6.25},
{"label":"Menu", "x":10, "y":4},
{"label":"Ctrl", "x":11, "y":4},
{"label":"Fn", "x":12, "y":4},
{"label":"Left", "x":13, "y":4},
{"label":"Down", "x":14, "y":4},
{"label":"Right", "x":15, "y":4}
]
}
}
}

View File

@ -1,5 +0,0 @@
#pragma once
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 6

View File

@ -17,12 +17,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Win |Alt | Space |App|Ctrl|FN |Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[_BL] = LAYOUT_65_ansi(
[_BL] = LAYOUT_65_ansi(
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_BSPC, KC_HOME,
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_PGUP,
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_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_APP, KC_RCTRL, MO(_FL), KC_LEFT,KC_DOWN,KC_RGHT
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_PGUP,
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_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _FL: Function Layer
@ -38,11 +38,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |HUD |SAD |VAD | RGB_Tog | | | | <M|V- |M> |
* `----------------------------------------------------------------'
*/
[_FL] = LAYOUT_65_ansi(
[_FL] = LAYOUT_65_ansi(
KC_GRV, 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_DEL, KC_INS,
RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE,
RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, _______, _______, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT
),
),
};

View File

@ -1,4 +0,0 @@
#pragma once
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 6

View File

@ -12,21 +12,24 @@ MCU = atmega32u4
BOOTLOADER = atmel-dfu
# QMK Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI support
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
UNICODE_ENABLE = no # Unicode
LAYOUTS = 65_ansi 65_iso