From 25d1901d7a275e05b29630b877f0fa41224a91db Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 29 Oct 2019 23:57:21 +0000 Subject: [PATCH 001/226] Update software backlight to precalculated duty patterns --- quantum/backlight/backlight_soft.c | 37 ++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/quantum/backlight/backlight_soft.c b/quantum/backlight/backlight_soft.c index a6aba7782cba..f481dbae890b 100644 --- a/quantum/backlight/backlight_soft.c +++ b/quantum/backlight/backlight_soft.c @@ -20,6 +20,7 @@ { BACKLIGHT_PIN } #endif +static uint16_t s_duty_pattern = 0; static const pin_t backlight_pins[] = BACKLIGHT_PIN_INIT; #define BACKLIGHT_LED_COUNT (sizeof(backlight_pins) / sizeof(pin_t)) @@ -46,21 +47,43 @@ void backlight_off(pin_t backlight_pin) { } void backlight_init_ports(void) { - // Setup backlight pin as output and output to on state. - FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) + // Setup backlight pin as output and output to off state. + FOR_EACH_LED(setPinOutput(backlight_pin); backlight_off(backlight_pin);) } +// clang-format off + +/** \brief PWM duty patterns + * + * We scale the current backlight level to an index within this array. This allows + * backlight_task to focus on just switching LEDs on/off, and we can predict the duty pattern + */ +static uint16_t backlight_duty_table[] = { + 0b0000000000000000, + 0b1000000000000000, + 0b1000000010000000, + 0b1000001000010000, + 0b1000100010001000, + 0b1001001001001000, + 0b1010101010101010, + 0b1110111011101110, + 0b1111111111111111, +}; +#define backlight_duty_table_size (sizeof(backlight_duty_table) / sizeof(backlight_duty_table[0])) + +// clang-format on + +static uint8_t scale_backlight(uint8_t v) { return v * (backlight_duty_table_size - 1) / BACKLIGHT_LEVELS; } + +void backlight_set(uint8_t level) { s_duty_pattern = backlight_duty_table[scale_backlight(level)]; } + void backlight_task(void) { static uint8_t backlight_tick = 0; - if ((0xFFFF >> (get_backlight_level() * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + if (s_duty_pattern & ((uint16_t)1 << backlight_tick)) { FOR_EACH_LED(backlight_on(backlight_pin);) } else { FOR_EACH_LED(backlight_off(backlight_pin);) } backlight_tick = (backlight_tick + 1) % 16; } - -void backlight_set(uint8_t level) { - // noop as backlight_task uses get_backlight_level() -} From ad36bb37dd775de5132a68fbd6ad9cdf73b0c070 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Sat, 16 Nov 2019 03:20:57 +0900 Subject: [PATCH 002/226] [Keyboard] Add keyboard Nafuda (#7367) * [Keyboard] Add keyboard Nafuda Add Nafuda keyboard. A 7 keys keyboard. Salicylic-acid3 * Update keyboards/nafuda/info.json * Update keyboards/nafuda/readme.md * Update keyboards/nafuda/readme.md * Update keyboards/nafuda/nafuda.h * Update keyboards/nafuda/readme.md * Update keyboards/nafuda/rules.mk * Update keyboards/nafuda/rules.mk * Update keyboards/nafuda/rules.mk * Update keyboards/nafuda/rules.mk * info.json Update * Update keyboards/nafuda/rules.mk --- keyboards/nafuda/config.h | 69 ++++++++++++++++++++++ keyboards/nafuda/info.json | 20 +++++++ keyboards/nafuda/keymaps/default/config.h | 23 ++++++++ keyboards/nafuda/keymaps/default/keymap.c | 61 +++++++++++++++++++ keyboards/nafuda/keymaps/default/readme.md | 34 +++++++++++ keyboards/nafuda/nafuda.c | 5 ++ keyboards/nafuda/nafuda.h | 24 ++++++++ keyboards/nafuda/readme.md | 17 ++++++ keyboards/nafuda/rules.mk | 33 +++++++++++ 9 files changed, 286 insertions(+) create mode 100644 keyboards/nafuda/config.h create mode 100644 keyboards/nafuda/info.json create mode 100644 keyboards/nafuda/keymaps/default/config.h create mode 100644 keyboards/nafuda/keymaps/default/keymap.c create mode 100644 keyboards/nafuda/keymaps/default/readme.md create mode 100644 keyboards/nafuda/nafuda.c create mode 100644 keyboards/nafuda/nafuda.h create mode 100644 keyboards/nafuda/readme.md create mode 100644 keyboards/nafuda/rules.mk diff --git a/keyboards/nafuda/config.h b/keyboards/nafuda/config.h new file mode 100644 index 000000000000..3db4401d49fd --- /dev/null +++ b/keyboards/nafuda/config.h @@ -0,0 +1,69 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0012 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT nafuda +#define DESCRIPTION A custom cursorpad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { F4, F5, F6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 7 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/nafuda/info.json b/keyboards/nafuda/info.json new file mode 100644 index 000000000000..d5bf2b055e79 --- /dev/null +++ b/keyboards/nafuda/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "nafuda", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Mouse", "x":1, "y":0}, + {"label":"Backspace", "x":0, "y":0.5}, + {"label":"\u2191", "x":1, "y":1}, + {"label":"Browser", "x":2, "y":0.5}, + {"label":"\u2190", "x":0, "y":1.5}, + {"label":"\u2193", "x":1, "y":2}, + {"label":"\u2192", "x":2, "y":1.5} + ] + } + } +} diff --git a/keyboards/nafuda/keymaps/default/config.h b/keyboards/nafuda/keymaps/default/config.h new file mode 100644 index 000000000000..e35fe2ccd76d --- /dev/null +++ b/keyboards/nafuda/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2018 Salicylic_acid3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + diff --git a/keyboards/nafuda/keymaps/default/keymap.c b/keyboards/nafuda/keymaps/default/keymap.c new file mode 100644 index 000000000000..f0baff6c2251 --- /dev/null +++ b/keyboards/nafuda/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE, + _MOUSE, + _BROWSER, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //|-------------------------------------------| + TG(_MOUSE), + //|---------------+---------------+-----------| +LT(_ADJUST, KC_BSPC), KC_UP,TG(_BROWSER), + //|---------------+---------------+-----------| + KC_LEFT, KC_DOWN, KC_RIGHT + //|-------------------------------------------| + ), + + [_MOUSE] = LAYOUT( + //|-------------------------------------------| + TG(_MOUSE), + //|---------------+---------------+-----------| + KC_BTN1, KC_MS_U, KC_BTN2, + //|---------------+---------------+-----------| + KC_MS_L, KC_MS_D, KC_MS_R + //|-------------------------------------------| + ), + + [_BROWSER] = LAYOUT( + //|-------------------------------------------| + LCTL(KC_W), + //|---------------+---------------+-----------| + LCTL(LSFT(KC_T)), KC_WH_U,TG(_BROWSER), + //|---------------+---------------+-----------| + LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB) + //|-------------------------------------------| + ), + + [_ADJUST] = LAYOUT( /* Base */ + //|-------------------------------------------| + RGB_VAD, + //|---------------+---------------+-----------| + MO(_ADJUST), RGB_SAD, RGB_VAI, + //|---------------+---------------+-----------| + RGB_MOD, RGB_TOG, RGB_SAI + //|-------------------------------------------| + ) +}; diff --git a/keyboards/nafuda/keymaps/default/readme.md b/keyboards/nafuda/keymaps/default/readme.md new file mode 100644 index 000000000000..b84276bf8a45 --- /dev/null +++ b/keyboards/nafuda/keymaps/default/readme.md @@ -0,0 +1,34 @@ +# The default keymap for nafuda + +## Base +| 1 | 2 | 3 | +|:--------------:|:--------:|:-----:| +| | MOUSE | | +| ADJUST or BSPC | UP |BROWSER| +| LEFT | DOWN | RIGHT| + + +## MOUSE +| 1 | 2 | 3 | +|:--------:|:--------:|:---------:| +| | BASE | | +| Btn 1 | MOUSE_UP | Btn2 | +|MOUSE_LEFT|MOUSE_DOWN|MOUSE_RIGHT| + + +## BROWSER +| 1 | 2 | 3 | +|:-----------:|:--------:|:-------:| +| | LCTL(W) | | +| LCTL+LSFT(T)| WHEEL_UP | BROWSER | +|LCTL+SFT(TAB)|WHEEL_DOWN|LCTL(TAB)| + + +## Adjust +| 1 | 2 | 3 | +|:-------:|:-------:|:------:| +| | RGB_VAD | | +| Adjust | RGB_SAD | RGB_VAI| +| RGB_MOD | RGB_TOG | RGB_SAI| + + diff --git a/keyboards/nafuda/nafuda.c b/keyboards/nafuda/nafuda.c new file mode 100644 index 000000000000..d2061181e73a --- /dev/null +++ b/keyboards/nafuda/nafuda.c @@ -0,0 +1,5 @@ +#include "nafuda.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/nafuda/nafuda.h b/keyboards/nafuda/nafuda.h new file mode 100644 index 000000000000..008a9c16f4bc --- /dev/null +++ b/keyboards/nafuda/nafuda.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +/* + * ,-----------------. + * | | L01 | | + * |-----------------+ + * | L10 | L11 | L12 | + * |-----------------+ + * | L20 | L21 | L22 | + * |-----------------' + */ + +#define LAYOUT( \ + L01, \ + L10, L11, L12, \ + L20, L21, L22 \ + ) \ + { \ + {KC_NO, L01,KC_NO }, \ + { L10, L11, L12 }, \ + { L20, L21, L22 } \ + } diff --git a/keyboards/nafuda/readme.md b/keyboards/nafuda/readme.md new file mode 100644 index 000000000000..73007ed01e62 --- /dev/null +++ b/keyboards/nafuda/readme.md @@ -0,0 +1,17 @@ +# nafuda + +![nafuda](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190608/20190608024901.jpg) + +This is 7 keys cursor macropad. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: Nafuda PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1271706) + +Make example for this keyboard (after setting up your build environment): + + make nafuda:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/nafuda-build-guide) diff --git a/keyboards/nafuda/rules.mk b/keyboards/nafuda/rules.mk new file mode 100644 index 000000000000..bdc8634648e9 --- /dev/null +++ b/keyboards/nafuda/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +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. +TAP_DANCE_ENABLE = no +OLED_DRIVER_ENABLE = no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + From 381b73fcac169338a1dcf433694108a29870a57e Mon Sep 17 00:00:00 2001 From: Richard Baptist Date: Fri, 15 Nov 2019 22:12:34 +0100 Subject: [PATCH 003/226] Fix the RGB_MATRIX_RAINBOW_PINWHEELS animation (#7365) The internal naming was `PINWHEELS` instead of `RAINBOW_PINWHEELS` causing a mismatch between animation definition and the function. --- quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index 4f69456c3acb..1cd4ed2acf06 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -1,13 +1,13 @@ #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -RGB_MATRIX_EFFECT(PINWHEELS) +RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static HSV PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { +static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128; return hsv; } -bool PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &PINWHEELS_math); } +bool RAINBOW_PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_PINWHEELS_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS From f6b5f6db7665512cece0223ce4d19c5b17455ef4 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 15 Nov 2019 14:27:46 -0800 Subject: [PATCH 004/226] Improvements to Solenoid feature (#7369) * Error out when Solenid pin is not defined Instead of defaulting to a (literally) random pin, error out instead. Because this pin may be used, or because that pin may not be exposed, or may not exist. * Remove 'SOLENOID_ACTIVE' setting since it's not used * Update documentation --- docs/feature_haptic_feedback.md | 14 +++++++++----- drivers/haptic/solenoid.h | 6 +----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index d9e445de86a6..227363322733 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -41,11 +41,15 @@ First you will need a build a circuit to drive the solenoid through a mosfet as [Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf) -Select a pin that has PWM for the signal pin -``` -#define SOLENOID_PIN *pin* -``` +| Settings | Default | Description | +|--------------------------|---------------|-------------------------------------------------------| +|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | +|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | +|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | +|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | + +?> Dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds. Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin. @@ -151,4 +155,4 @@ This will set what sequence HPT_RST will set as the active mode. If not defined, ### DRV2605L Continuous Haptic Mode -This mode sets continuous haptic feedback with the option to increase or decrease strength. \ No newline at end of file +This mode sets continuous haptic feedback with the option to increase or decrease strength. diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h index 53dc626e33f8..dd6ececa685e 100644 --- a/drivers/haptic/solenoid.h +++ b/drivers/haptic/solenoid.h @@ -29,12 +29,8 @@ # define SOLENOID_MIN_DWELL 4 #endif -#ifndef SOLENOID_ACTIVE -# define SOLENOID_ACTIVE false -#endif - #ifndef SOLENOID_PIN -# define SOLENOID_PIN F6 +# error SOLENOID_PIN not defined #endif void solenoid_buzz_on(void); From 0f0c73f14a8ffb83a79b51582c0e7465c2411749 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Fri, 15 Nov 2019 17:01:50 -0600 Subject: [PATCH 005/226] Updated slave encoder sync to reduce dropped pulses (#7325) * Updated slave encoder sync to reduce dropped pulses * Fixing encoder direction * Encoder behavior fixes, tested * Update keyboards/rgbkb/sol/keymaps/xulkal/rules.mk To make fauxpark happy Co-Authored-By: fauxpark * Update custom_encoder.c * Update rules.mk --- quantum/encoder.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/quantum/encoder.c b/quantum/encoder.c index 36a6403b3676..e86a0045c6f4 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -38,14 +38,15 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B; static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; +static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; #ifdef SPLIT_KEYBOARD // right half encoders come over as second set of encoders -static int8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0}; +static uint8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0}; // row offsets for each hand static uint8_t thisHand, thatHand; #else -static int8_t encoder_value[NUMBER_OF_ENCODERS] = {0}; +static uint8_t encoder_value[NUMBER_OF_ENCODERS] = {0}; #endif __attribute__((weak)) void encoder_update_user(int8_t index, bool clockwise) {} @@ -78,14 +79,16 @@ void encoder_init(void) { } static void encoder_update(int8_t index, uint8_t state) { - encoder_value[index] += encoder_LUT[state & 0xF]; - if (encoder_value[index] >= ENCODER_RESOLUTION) { - encoder_update_kb(index, false); - } - if (encoder_value[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_pulses[index] += encoder_LUT[state & 0xF]; + if (encoder_pulses[index] >= ENCODER_RESOLUTION) { + encoder_value[index]++; encoder_update_kb(index, true); } - encoder_value[index] %= ENCODER_RESOLUTION; + if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_value[index]--; + encoder_update_kb(index, false); + } + encoder_pulses[index] %= ENCODER_RESOLUTION; } void encoder_read(void) { @@ -101,11 +104,22 @@ void encoder_read(void) { } #ifdef SPLIT_KEYBOARD -void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, encoder_state, sizeof(encoder_state)); } +void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_value[thisHand], sizeof(uint8_t) * NUMBER_OF_ENCODERS); } void encoder_update_raw(uint8_t* slave_state) { for (int i = 0; i < NUMBER_OF_ENCODERS; i++) { - encoder_update(i + thatHand, slave_state[i]); + uint8_t index = i + thatHand; + int8_t delta = slave_state[i] - encoder_value[index]; + while (delta > 0) { + delta--; + encoder_value[index]++; + encoder_update_kb(index, true); + } + while (delta < 0) { + delta++; + encoder_value[index]--; + encoder_update_kb(index, false); + } } } #endif From b94f6cb116f1628f6d14ff3b1365bcbae6792dea Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 16 Nov 2019 00:07:21 +0000 Subject: [PATCH 006/226] Port SPLIT_USB_DETECT to crkbd (#7195) --- keyboards/crkbd/rev1/matrix.c | 5 +- keyboards/crkbd/rev1/split_util.c | 82 +++++++++++++++++++++++-------- 2 files changed, 63 insertions(+), 24 deletions(-) diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/matrix.c index dd93506db1d2..9d86879d6c80 100644 --- a/keyboards/crkbd/rev1/matrix.c +++ b/keyboards/crkbd/rev1/matrix.c @@ -133,9 +133,8 @@ void rx_led_off(void) void matrix_init(void) { - debug_enable = true; - debug_matrix = true; - debug_mouse = true; + split_keyboard_setup(); + // initialize row and col unselect_rows(); init_cols(); diff --git a/keyboards/crkbd/rev1/split_util.c b/keyboards/crkbd/rev1/split_util.c index e1ff8b4379dc..c0d44af29433 100644 --- a/keyboards/crkbd/rev1/split_util.c +++ b/keyboards/crkbd/rev1/split_util.c @@ -7,6 +7,11 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" +#include "wait.h" + +#ifdef EE_HANDS +# include "eeconfig.h" +#endif #ifdef USE_MATRIX_I2C # include "i2c.h" @@ -14,19 +19,59 @@ # include "split_scomm.h" #endif +#ifndef SPLIT_USB_TIMEOUT +# define SPLIT_USB_TIMEOUT 2500 +#endif + volatile bool isLeftHand = true; -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif +bool waitForUsb(void) { + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { + // This will return true of a USB connection has been established + if (UDADDR & _BV(ADDEN)) { + return true; + } + wait_ms(100); + } + + // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow + (USBCON &= ~(_BV(USBE) | _BV(OTGPADE))); + + return false; +} + +__attribute__((weak)) bool is_keyboard_left(void) { +#if defined(SPLIT_HAND_PIN) + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInput(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); +#elif defined(EE_HANDS) + return eeconfig_read_handedness(); +#elif defined(MASTER_RIGHT) + return !is_keyboard_master(); +#endif + + return is_keyboard_master(); +} + +__attribute__((weak)) bool is_keyboard_master(void) { + static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; + + // only check once, as this is called often + if (usbstate == UNKNOWN) { +#if defined(SPLIT_USB_DETECT) + usbstate = waitForUsb() ? MASTER : SLAVE; +#elif defined(__AVR__) + USBCON |= (1 << OTGPADE); // enables VBUS pad + wait_us(5); + + usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS +#else + usbstate = MASTER; +#endif + } + + return (usbstate == MASTER); } static void keyboard_master_setup(void) { @@ -47,14 +92,9 @@ static void keyboard_slave_setup(void) { #endif } -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< Date: Fri, 15 Nov 2019 22:22:48 -0300 Subject: [PATCH 007/226] [Keymap] add_mouse_keys (#7372) --- layouts/community/ortho_4x12/jotix/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 9a2f1fc66375..1d6e8f89aa33 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -32,9 +32,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_VOLD,KC_MUTE,KC_VOLU,KC_MINS, KC_EQL,KC_LBRC,KC_RBRC,_______,_______,_______,_______, + _______,KC_VOLD,KC_MUTE,KC_VOLU,KC_MINS, KC_EQL,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,_______,_______,_______,_______, + _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_UNDS,KC_PLUS,KC_BTN1,KC_BTN2,_______,_______,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ From 897888db419239f013561b155de5993b1966820e Mon Sep 17 00:00:00 2001 From: jorgemanzo Date: Fri, 4 Oct 2019 23:38:34 -0700 Subject: [PATCH 008/226] Add CLI command for flashing a keyboard A new CLI subcommand was added, flash, which behaves very similar to the already present compile CLI comamnd, but with the added ability to target a bootloader. The command is used like so: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]. A -kb and -km is expected, or a configurator export JSON filename. A bootloader can be specified using -bl , and if left unspecified, the target is assumed to be :flash. -bl can be used to list the available bootloaders. If -km is provided, but no -kb , then a message is printed suggesting the user to run qmk list_keyboards. --- docs/cli.md | 24 +++++++ lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/compile.py | 14 ++-- lib/python/qmk/cli/flash.py | 87 +++++++++++++++++++++++ lib/python/qmk/commands.py | 57 +++++++++++++++ lib/python/qmk/tests/test_cli_commands.py | 3 + 6 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 lib/python/qmk/cli/flash.py create mode 100644 lib/python/qmk/commands.py diff --git a/docs/cli.md b/docs/cli.md index fb7d17d2a10e..1c095272212c 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -95,6 +95,30 @@ qmk compile qmk compile -kb -km ``` +## `qmk flash` + +This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. +To specify a different bootloader, use `-bl `. Visit +for more details of the available bootloaders. + +**Usage for Configurator Exports**: + +``` +qmk flash -bl +``` + +**Usage for Keymaps**: + +``` +qmk flash -kb -km -bl +``` + +**Listing the Bootloaders** + +``` +qmk flash -b +``` + ## `qmk config` This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md). diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 1b83e78c704c..72ee38f5620f 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -7,6 +7,7 @@ from . import config from . import docs from . import doctor +from . import flash from . import hello from . import json from . import list diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 6646891b306b..c7093d421566 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -9,6 +9,9 @@ from argparse import FileType from milc import cli +from qmk.commands import create_make_command +from qmk.commands import parse_configurator_json +from qmk.commands import compile_configurator_json import qmk.keymap import qmk.path @@ -30,20 +33,21 @@ def compile(cli): """ if cli.args.filename: # Parse the configurator json - user_keymap = json.load(cli.args.filename) + user_keymap = parse_configurator_json(cli.args.filename) # Generate the keymap keymap_path = qmk.path.keymap(user_keymap['keyboard']) cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path) - qmk.keymap.write(user_keymap['keyboard'], user_keymap['keymap'], user_keymap['layout'], user_keymap['layers']) + + # Compile the keymap + command = compile_configurator_json(cli.args.filename) + cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - # Compile the keymap - command = ['make', ':'.join((user_keymap['keyboard'], user_keymap['keymap']))] elif cli.config.compile.keyboard and cli.config.compile.keymap: # Generate the make command for a specific keyboard/keymap. - command = ['make', ':'.join((cli.config.compile.keyboard, cli.config.compile.keymap))] + command = create_make_command(cli.config.compile.keyboard, cli.config.compile.keymap) else: cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`.') diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py new file mode 100644 index 000000000000..8f7bb55a22d5 --- /dev/null +++ b/lib/python/qmk/cli/flash.py @@ -0,0 +1,87 @@ +"""Compile and flash QMK Firmware + +You can compile a keymap already in the repo or using a QMK Configurator export. +A bootloader must be specified. +""" +import os +import sys +import subprocess +from argparse import FileType + +from milc import cli +from qmk.commands import create_make_command +from qmk.commands import parse_configurator_json +from qmk.commands import compile_configurator_json + +import qmk.path + + +def print_bootloader_help(): + """Prints the available bootloaders listed in docs.qmk.fm. + """ + cli.log.info('Here are the available bootloaders:') + cli.echo('\tdfu') + cli.echo('\tdfu-ee') + cli.echo('\tdfu-split-left') + cli.echo('\tdfu-split-right') + cli.echo('\tavrdude') + cli.echo('\tBootloadHID') + cli.echo('\tdfu-util') + cli.echo('\tdfu-util-split-left') + cli.echo('\tdfu-util-split-right') + cli.echo('\tst-link-cli') + cli.echo('For more info, visit https://docs.qmk.fm/#/flashing') + +@cli.argument('-bl', '--bootloader', default='flash', help='The flash command, corresponding to qmk\'s make options of bootloaders.') +@cli.argument('filename', nargs='?', arg_only=True, help='The configurator export JSON to compile. Use this if you dont want to specify a keymap and keyboard.') +@cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.') +@cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.') +@cli.argument('-b', '--bootloaders', action='store_true', help='List the available bootloaders.') +@cli.subcommand('QMK Flash.') +def flash(cli): + """Compile and or flash QMK Firmware or keyboard/layout + + If a Configurator JSON export is supplied this command will create a new keymap. Keymap and Keyboard arguments + will be ignored. + + If no file is supplied, keymap and keyboard are expected. + + If bootloader is omitted, the one according to the rules.mk will be used. + + """ + command = [] + if cli.args.bootloaders: + # Provide usage and list bootloaders + cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') + print_bootloader_help() + return False + + elif cli.args.keymap and not cli.args.keyboard: + # If only a keymap was given but no keyboard, suggest listing keyboards + cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') + cli.log.error('run \'qmk list_keyboards\' to find out the supported keyboards') + return False + + elif cli.args.filename: + # Get keymap path to log info + user_keymap = parse_configurator_json(cli.args.filename) + keymap_path = qmk.path.keymap(user_keymap['keyboard']) + + cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path) + + # Convert the JSON into a C file and write it to disk. + command = compile_configurator_json(cli.args.filename, cli.args.bootloader) + + cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) + + elif cli.args.keyboard and cli.args.keymap: + # Generate the make command for a specific keyboard/keymap. + command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, cli.args.bootloader) + + else: + cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') + cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`. You can also specify a bootloader with --bootloader. Use --bootloaders to list the available bootloaders.') + return False + + cli.log.info('Flashing keymap with {fg_cyan}%s\n\n', ' '.join(command)) + subprocess.run(command) \ No newline at end of file diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py new file mode 100644 index 000000000000..9fbf00f16517 --- /dev/null +++ b/lib/python/qmk/commands.py @@ -0,0 +1,57 @@ +"""Functions that build make commands +""" +import json +import qmk.keymap + +def create_make_command(keyboard, keymap, target=None): + """Create a make compile command + + Args: + keyboard + The path of the keyboard, for example 'plank' + + keymap + The name of the keymap, for example 'algernon' + + target + Usually a bootloader. + + Returns: + A command that can be run to make the specified keyboard and keymap + """ + if target is None: + return ['make', ':'.join((keyboard, keymap))] + return ['make', ':'.join((keyboard, keymap, target))] + +def parse_configurator_json(configurator_filename): + """Open and parse a configurator json export + """ + file = open(configurator_filename) + user_keymap = json.load(file) + file.close() + return user_keymap + +def compile_configurator_json(configurator_filename, bootloader=None): + """Convert a configurator export JSON file into a C file + + Args: + configurator_filename + The configurator JSON export file + + bootloader + A bootloader to flash + + Returns: + A command to run to compile and flash the C file. + """ + # Parse the configurator json + user_keymap = parse_configurator_json(configurator_filename) + + # Write the keymap C file + qmk.keymap.write(user_keymap['keyboard'], user_keymap['keymap'], user_keymap['layout'], user_keymap['layers']) + + # Return a command that can be run to make the keymap and flash if given + if bootloader is None: + return create_make_command(user_keymap['keyboard'], user_keymap['keymap']) + return create_make_command(user_keymap['keyboard'], user_keymap['keymap'], bootloader) + diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 85d4d91af1c2..dcab8bdae421 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -13,6 +13,9 @@ def test_cformat(): def test_compile(): assert check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default').returncode == 0 +def test_flash(): + assert check_subcommand('flash', '-b').returncode == 1 + assert check_subcommand('flash').returncode == 1 def test_config(): result = check_subcommand('config') From 7891de7f6d64431cedbd580a3f7863533dc8be88 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 16 Nov 2019 07:10:19 +0000 Subject: [PATCH 009/226] format code according to conventions [skip ci] --- lib/python/qmk/cli/compile.py | 3 +-- lib/python/qmk/cli/flash.py | 3 ++- lib/python/qmk/commands.py | 4 +++- lib/python/qmk/tests/test_cli_commands.py | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index c7093d421566..5c29800096e6 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -38,13 +38,12 @@ def compile(cli): # Generate the keymap keymap_path = qmk.path.keymap(user_keymap['keyboard']) cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path) - + # Compile the keymap command = compile_configurator_json(cli.args.filename) cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - elif cli.config.compile.keyboard and cli.config.compile.keymap: # Generate the make command for a specific keyboard/keymap. command = create_make_command(cli.config.compile.keyboard, cli.config.compile.keymap) diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index 8f7bb55a22d5..37556aaafd38 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -32,6 +32,7 @@ def print_bootloader_help(): cli.echo('\tst-link-cli') cli.echo('For more info, visit https://docs.qmk.fm/#/flashing') + @cli.argument('-bl', '--bootloader', default='flash', help='The flash command, corresponding to qmk\'s make options of bootloaders.') @cli.argument('filename', nargs='?', arg_only=True, help='The configurator export JSON to compile. Use this if you dont want to specify a keymap and keyboard.') @cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.') @@ -84,4 +85,4 @@ def flash(cli): return False cli.log.info('Flashing keymap with {fg_cyan}%s\n\n', ' '.join(command)) - subprocess.run(command) \ No newline at end of file + subprocess.run(command) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 9fbf00f16517..f83a89578e27 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -3,6 +3,7 @@ import json import qmk.keymap + def create_make_command(keyboard, keymap, target=None): """Create a make compile command @@ -23,6 +24,7 @@ def create_make_command(keyboard, keymap, target=None): return ['make', ':'.join((keyboard, keymap))] return ['make', ':'.join((keyboard, keymap, target))] + def parse_configurator_json(configurator_filename): """Open and parse a configurator json export """ @@ -31,6 +33,7 @@ def parse_configurator_json(configurator_filename): file.close() return user_keymap + def compile_configurator_json(configurator_filename, bootloader=None): """Convert a configurator export JSON file into a C file @@ -54,4 +57,3 @@ def compile_configurator_json(configurator_filename, bootloader=None): if bootloader is None: return create_make_command(user_keymap['keyboard'], user_keymap['keymap']) return create_make_command(user_keymap['keyboard'], user_keymap['keymap'], bootloader) - diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index dcab8bdae421..3f75cef3e1d2 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -13,10 +13,12 @@ def test_cformat(): def test_compile(): assert check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default').returncode == 0 + def test_flash(): assert check_subcommand('flash', '-b').returncode == 1 assert check_subcommand('flash').returncode == 1 + def test_config(): result = check_subcommand('config') assert result.returncode == 0 From 634b277b0710245ec1fbf167e20929aa8f28c020 Mon Sep 17 00:00:00 2001 From: Robert Akhmerov Date: Sat, 16 Nov 2019 20:20:49 +0300 Subject: [PATCH 010/226] [Docs] Explain Tap Dance interruption (#5520) --- docs/feature_tap_dance.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 7427a77146b5..f48f11b1cb1a 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -333,6 +333,8 @@ And then simply use `TD(X_CTL)` anywhere in your keymap. If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace. +> In this configuration "hold" takes place **after** tap dance timeout (see `ACTION_TAP_DANCE_FN_ADVANCED_TIME`). To achieve instant hold, remove `state->interrupted` checks in conditions. As a result you may use comfortable longer tapping periods to have more time for taps and not to wait too long for holds (try starting with doubled `TAPPING_TERM`). + ### Example 5: Using tap dance for advanced mod-tap and layer-tap keys Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`. From 46d0fe44f357f0435d3335cbe5e361324d4236f6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 16 Nov 2019 12:46:35 -0800 Subject: [PATCH 011/226] [Keyboard] Cutie Club Wraith: Configurator Bugfix for LAYOUT_iso (#7376) * debug lint info.json Because I need to debug this file. * move ISO Enter to the proper location in sequence * add key counts because I like having them --- keyboards/cutie_club/wraith/info.json | 189 ++++++++++++++++++++++++-- 1 file changed, 177 insertions(+), 12 deletions(-) diff --git a/keyboards/cutie_club/wraith/info.json b/keyboards/cutie_club/wraith/info.json index c75f925d3fdf..51ca82677f41 100644 --- a/keyboards/cutie_club/wraith/info.json +++ b/keyboards/cutie_club/wraith/info.json @@ -1,15 +1,180 @@ { - "keyboard_name": "wraith", - "url": "", - "maintainer": "amberstarlight", - "width": 16, - "height": 6, - "layouts": { - "LAYOUT_ansi": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Prt Sc", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Insert", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Delete", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Pg Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Pg Dn", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":7}, {"label":"Alt", "x":10.75, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] - }, - "LAYOUT_iso": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Prt Sc", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Insert", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Delete", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Pg Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Pg Dn", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":7}, {"label":"Alt", "x":10.75, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + "keyboard_name": "wraith", + "url": "", + "maintainer": "amberstarlight", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_ansi": { + "key_count": 80, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Prt Sc", "x":14, "y":0}, + {"label":"Fn", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"#", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Insert", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"Delete", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + {"label":"Pg Up", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"Pg Dn", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.5}, + {"label":"Alt", "x":2.25, "y":5, "w":1.5}, + {"x":3.75, "y":5, "w":7}, + {"label":"Alt", "x":10.75, "y":5, "w":1.5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] + }, + "LAYOUT_iso": { + "key_count": 81, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Prt Sc", "x":14, "y":0}, + {"label":"Fn", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"\"", "x":2, "y":1}, + {"label":"\u00a3", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Insert", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"Delete", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"@", "x":11.75, "y":3}, + {"label":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Pg Up", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"|", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"Pg Dn", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.5}, + {"label":"Alt", "x":2.25, "y":5, "w":1.5}, + {"x":3.75, "y":5, "w":7}, + {"label":"Alt", "x":10.75, "y":5, "w":1.5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] + } } - } } From 7b6c8e89cacceb7e4e751c174e8c4e32489a7b29 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 17 Nov 2019 17:04:44 +0100 Subject: [PATCH 012/226] Doc fix to conform with #7221 (#7392) --- docs/documentation_templates.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/documentation_templates.md b/docs/documentation_templates.md index ba3830b64c7f..85d3893b71ac 100644 --- a/docs/documentation_templates.md +++ b/docs/documentation_templates.md @@ -28,9 +28,9 @@ the Ctrl, Alt, or GUI modifiers are held down. A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) -Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) -Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 -Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) +* Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +* Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 +* Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): @@ -38,5 +38,3 @@ Make example for this keyboard (after setting up your build environment): See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). ``` - -There needs to be two spaces at the end of the `Keyboard Maintainer` and `Hardware Supported` lines for it to render correctly with Markdown. From 6b18ca2875ceb38011f32f2d17238ba55ce7ad67 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 17 Nov 2019 08:12:57 -0800 Subject: [PATCH 013/226] Add Community Layout: 60_abnt2 (#7381) * Add Community Layout: 60_abnt2 Add a 60% version of the standard keyboard layout used in Brazil. * Enable 60_abnt2 support for DZ60 * fix the indenting in the Community Layout keymap --- keyboards/dz60/rules.mk | 2 +- .../60_abnt2/default_60_abnt2/keymap.c | 22 ++++++ layouts/default/60_abnt2/info.json | 76 +++++++++++++++++++ layouts/default/60_abnt2/layout.json | 5 ++ layouts/default/60_abnt2/readme.md | 3 + 5 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 layouts/default/60_abnt2/default_60_abnt2/keymap.c create mode 100644 layouts/default/60_abnt2/info.json create mode 100644 layouts/default/60_abnt2/layout.json create mode 100644 layouts/default/60_abnt2/readme.md diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index d2faa99897c4..556d9e55c75e 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -25,4 +25,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 diff --git a/layouts/default/60_abnt2/default_60_abnt2/keymap.c b/layouts/default/60_abnt2/default_60_abnt2/keymap.c new file mode 100644 index 000000000000..c66cba7bee1e --- /dev/null +++ b/layouts/default/60_abnt2/default_60_abnt2/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H +#include "keymap_br_abnt2.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_abnt2( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_abnt2( + BR_QUOT, 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, + _______, _______, _______, _______, RESET, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/layouts/default/60_abnt2/info.json b/layouts/default/60_abnt2/info.json new file mode 100644 index 000000000000..e7472bd78967 --- /dev/null +++ b/layouts/default/60_abnt2/info.json @@ -0,0 +1,76 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_abnt2": { + "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":"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":"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.5, "y":1, "w":1.5}, + {"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":"/", "x":12.25, "y":3}, + {"label":"Shift", "x":13.25, "y":3, "w":1.75}, + {"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":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"MO(1)", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/layouts/default/60_abnt2/layout.json b/layouts/default/60_abnt2/layout.json new file mode 100644 index 000000000000..c550379d850b --- /dev/null +++ b/layouts/default/60_abnt2/layout.json @@ -0,0 +1,5 @@ +[{a:7,f:5},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5,w2:1.25,h2:2,x2:0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +[{w:1.25},"","","","","","","","","","","","","",{w:1.75},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/default/60_abnt2/readme.md b/layouts/default/60_abnt2/readme.md new file mode 100644 index 000000000000..d363e0d5cbd0 --- /dev/null +++ b/layouts/default/60_abnt2/readme.md @@ -0,0 +1,3 @@ +# 60_abnt2 + +![60% ABNT2 layout](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/layouts/default/60_abnt2/keyboard-layout.png) From a91c0c476507cb8c12840abb59bff34ab0de3c03 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 17 Nov 2019 14:02:26 +0000 Subject: [PATCH 014/226] Run clang-format manually to fix recently changed files --- drivers/haptic/DRV2605L.c | 12 ++- drivers/haptic/haptic.c | 85 +++++++++---------- drivers/haptic/haptic.h | 16 ++-- quantum/backlight/backlight_avr.c | 2 +- quantum/config_common.h | 39 ++++----- quantum/dip_switch.c | 37 ++++---- quantum/encoder.c | 8 +- quantum/keymap_extras/keymap_italian.h | 54 ++++++------ .../keymap_extras/keymap_italian_osx_ansi.h | 60 ++++++------- .../keymap_extras/keymap_italian_osx_iso.h | 60 ++++++------- quantum/process_keycode/process_tap_dance.h | 6 +- quantum/quantum.c | 2 +- quantum/quantum.h | 5 +- quantum/quantum_keycodes.h | 2 +- quantum/rgblight.c | 2 +- quantum/stm32/chconf.h | 39 ++++++--- tmk_core/common/arm_atsam/suspend.c | 3 +- tmk_core/common/eeconfig.c | 4 +- tmk_core/common/host.c | 2 +- tmk_core/common/led.h | 10 +-- .../protocol/arm_atsam/usb/usb_protocol_hid.h | 7 +- tmk_core/protocol/chibios/usb_main.c | 6 +- tmk_core/protocol/iwrap/iwrap.c | 3 +- tmk_core/protocol/lufa/adafruit_ble.cpp | 6 +- 24 files changed, 235 insertions(+), 235 deletions(-) diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 728554b01ebc..c40731913bd9 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -115,15 +115,13 @@ void DRV_init(void) { } void DRV_rtp_init(void) { - DRV_write(DRV_GO, 0x00); - DRV_write(DRV_RTP_INPUT, 20); //20 is the lowest value I've found where haptics can still be felt. - DRV_write(DRV_MODE, 0x05); - DRV_write(DRV_GO, 0x01); + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_RTP_INPUT, 20); // 20 is the lowest value I've found where haptics can still be felt. + DRV_write(DRV_MODE, 0x05); + DRV_write(DRV_GO, 0x01); } -void DRV_amplitude(uint8_t amplitude) { - DRV_write(DRV_RTP_INPUT, amplitude); -} +void DRV_amplitude(uint8_t amplitude) { DRV_write(DRV_RTP_INPUT, amplitude); } void DRV_pulse(uint8_t sequence) { DRV_write(DRV_GO, 0x00); diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c index 989970beeeda..2ce279b753ae 100644 --- a/drivers/haptic/haptic.c +++ b/drivers/haptic/haptic.c @@ -169,12 +169,12 @@ void haptic_set_mode(uint8_t mode) { } void haptic_set_amplitude(uint8_t amp) { - haptic_config.amplitude = amp; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); - #ifdef DRV2605L - DRV_amplitude(amp); - #endif + haptic_config.amplitude = amp; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); +#ifdef DRV2605L + DRV_amplitude(amp); +#endif } void haptic_set_buzz(uint8_t buzz) { @@ -211,52 +211,50 @@ uint8_t haptic_get_dwell(void) { } void haptic_enable_continuous(void) { - haptic_config.cont = 1; - xprintf("haptic_config.cont = %u\n", haptic_config.cont); - eeconfig_update_haptic(haptic_config.raw); - #ifdef DRV2605L - DRV_rtp_init(); - #endif + haptic_config.cont = 1; + xprintf("haptic_config.cont = %u\n", haptic_config.cont); + eeconfig_update_haptic(haptic_config.raw); +#ifdef DRV2605L + DRV_rtp_init(); +#endif } void haptic_disable_continuous(void) { - haptic_config.cont = 0; - xprintf("haptic_config.cont = %u\n", haptic_config.cont); - eeconfig_update_haptic(haptic_config.raw); - #ifdef DRV2605L - DRV_write(DRV_MODE,0x00); - #endif + haptic_config.cont = 0; + xprintf("haptic_config.cont = %u\n", haptic_config.cont); + eeconfig_update_haptic(haptic_config.raw); +#ifdef DRV2605L + DRV_write(DRV_MODE, 0x00); +#endif } void haptic_toggle_continuous(void) { #ifdef DRV2605L -if (haptic_config.cont) { - haptic_disable_continuous(); - } else { - haptic_enable_continuous(); - } - eeconfig_update_haptic(haptic_config.raw); + if (haptic_config.cont) { + haptic_disable_continuous(); + } else { + haptic_enable_continuous(); + } + eeconfig_update_haptic(haptic_config.raw); #endif } - void haptic_cont_increase(void) { - uint8_t amp = haptic_config.amplitude + 10; - if (haptic_config.amplitude >= 120) { - amp = 120; - } - haptic_set_amplitude(amp); + uint8_t amp = haptic_config.amplitude + 10; + if (haptic_config.amplitude >= 120) { + amp = 120; + } + haptic_set_amplitude(amp); } void haptic_cont_decrease(void) { - uint8_t amp = haptic_config.amplitude - 10; - if (haptic_config.amplitude < 20) { - amp = 20; - } - haptic_set_amplitude(amp); + uint8_t amp = haptic_config.amplitude - 10; + if (haptic_config.amplitude < 20) { + amp = 20; + } + haptic_set_amplitude(amp); } - void haptic_play(void) { #ifdef DRV2605L uint8_t play_eff = 0; @@ -269,7 +267,6 @@ void haptic_play(void) { } bool process_haptic(uint16_t keycode, keyrecord_t *record) { - if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); } @@ -300,16 +297,16 @@ bool process_haptic(uint16_t keycode, keyrecord_t *record) { if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); } - if (keycode == HPT_CONT && record->event.pressed) { - haptic_toggle_continuous(); + if (keycode == HPT_CONT && record->event.pressed) { + haptic_toggle_continuous(); } - if (keycode == HPT_CONI && record->event.pressed) { - haptic_cont_increase(); + if (keycode == HPT_CONI && record->event.pressed) { + haptic_cont_increase(); } - if (keycode == HPT_COND && record->event.pressed) { - haptic_cont_decrease(); + if (keycode == HPT_COND && record->event.pressed) { + haptic_cont_decrease(); } - + if (haptic_config.enable) { if (record->event.pressed) { // keypress diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h index 2f6eb31fc2da..5d3bd1c31032 100644 --- a/drivers/haptic/haptic.h +++ b/drivers/haptic/haptic.h @@ -34,14 +34,14 @@ typedef union { uint32_t raw; struct { - bool enable :1; - uint8_t feedback :2; - uint8_t mode :7; - bool buzz :1; - uint8_t dwell :7; - bool cont :1; - uint8_t amplitude :8; - uint16_t reserved :7; + bool enable : 1; + uint8_t feedback : 2; + uint8_t mode : 7; + bool buzz : 1; + uint8_t dwell : 7; + bool cont : 1; + uint8_t amplitude : 8; + uint16_t reserved : 7; }; } haptic_config_t; diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index 648a37adf37e..edda6ea0b602 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -191,7 +191,7 @@ void backlight_off(pin_t backlight_pin) { # define FOR_EACH_LED(x) \ for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ - pin_t backlight_pin = backlight_pins[i]; \ + pin_t backlight_pin = backlight_pins[i]; \ { x } \ } diff --git a/quantum/config_common.h b/quantum/config_common.h index f42df6357d67..c1c1d4bd423b 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -303,25 +303,26 @@ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ sei(); \ } while (0) -# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) -# define SERIAL_UART_BAUD 115200 -# define SERIAL_UART_DATA UDR1 - /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ -# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1) -# define SERIAL_UART_RXD_VECT USART1_RX_vect -# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) -# define SERIAL_UART_INIT() do { \ - UCSR1A = _BV(U2X1); \ - /* baud rate */ \ - UBRR1L = SERIAL_UART_UBRR; \ - /* baud rate */ \ - UBRR1H = SERIAL_UART_UBRR >> 8; \ - /* enable TX */ \ - UCSR1B = _BV(TXEN1); \ - /* 8-bit data */ \ - UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ - sei(); \ - } while(0) +# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +# define SERIAL_UART_BAUD 115200 +# define SERIAL_UART_DATA UDR1 +/* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ +# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1) +# define SERIAL_UART_RXD_VECT USART1_RX_vect +# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +# define SERIAL_UART_INIT() \ + do { \ + UCSR1A = _BV(U2X1); \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX */ \ + UCSR1B = _BV(TXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + sei(); \ + } while (0) # else # error "USART configuration is needed." # endif diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index 3b5a8dadc9bd..ab74222d1008 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -21,40 +21,33 @@ // for memcpy #include - #if !defined(DIP_SWITCH_PINS) -# error "No DIP switch pads defined by DIP_SWITCH_PINS" +# error "No DIP switch pads defined by DIP_SWITCH_PINS" #endif -#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad)/sizeof(pin_t)) -static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; -static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 }; -static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 }; - +#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(pin_t)) +static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; +static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; +static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; -__attribute__((weak)) -void dip_switch_update_user(uint8_t index, bool active) {} +__attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {} -__attribute__((weak)) -void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); } +__attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); } -__attribute__((weak)) -void dip_switch_update_mask_user(uint32_t state) {} +__attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {} -__attribute__((weak)) -void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); } +__attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); } void dip_switch_init(void) { - for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { - setPinInputHigh(dip_switch_pad[i]); - } - dip_switch_read(true); + for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { + setPinInputHigh(dip_switch_pad[i]); + } + dip_switch_read(true); } - void dip_switch_read(bool forced) { - bool has_dip_state_changed = false; - uint32_t dip_switch_mask = 0; + bool has_dip_state_changed = false; + uint32_t dip_switch_mask = 0; for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { dip_switch_state[i] = !readPin(dip_switch_pad[i]); diff --git a/quantum/encoder.c b/quantum/encoder.c index e86a0045c6f4..4aeb3d0cde4e 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -37,8 +37,8 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B; static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; -static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; -static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; +static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; +static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; #ifdef SPLIT_KEYBOARD // right half encoders come over as second set of encoders @@ -84,7 +84,7 @@ static void encoder_update(int8_t index, uint8_t state) { encoder_value[index]++; encoder_update_kb(index, true); } - if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise encoder_value[index]--; encoder_update_kb(index, false); } @@ -109,7 +109,7 @@ void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_valu void encoder_update_raw(uint8_t* slave_state) { for (int i = 0; i < NUMBER_OF_ENCODERS; i++) { uint8_t index = i + thatHand; - int8_t delta = slave_state[i] - encoder_value[index]; + int8_t delta = slave_state[i] - encoder_value[index]; while (delta > 0) { delta--; encoder_value[index]++; diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index a8c03b884f9a..063700aa0b08 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -78,36 +78,36 @@ #define IT_MINS KC_SLSH // - and _ // shifted characters -#define IT_DEGR LSFT(IT_AACC) // ° -#define IT_EXLM LSFT(KC_1) // ! -#define IT_DQOT LSFT(KC_2) // " -#define IT_STRL LSFT(KC_3) // £ -#define IT_DLR LSFT(KC_4) // $ -#define IT_PERC LSFT(KC_5) // % -#define IT_AMPR LSFT(KC_6) // & -#define IT_SLSH LSFT(KC_7) // / -#define IT_LPRN LSFT(KC_8) // ( -#define IT_RPRN LSFT(KC_9) // ) -#define IT_EQL LSFT(KC_0) // = -#define IT_QST LSFT(IT_APOS) // ? -#define IT_CRC LSFT(IT_IACC) // ^ -#define IT_ASTR LSFT(IT_PLUS) // * -#define IT_MORE LSFT(IT_LESS) // > -#define IT_COLN LSFT(IT_DOT) // : -#define IT_SCLN LSFT(IT_COMM) // ; -#define IT_UNDS LSFT(IT_MINS) // _ +#define IT_DEGR LSFT(IT_AACC) // ° +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ // Alt Gr-ed characters -#define IT_LCBR ALGR(KC_7) // { -#define IT_LBRC ALGR(IT_EACC) // [ -#define IT_RBRC ALGR(IT_PLUS) // ] -#define IT_RCBR ALGR(KC_0) // } -#define IT_AT ALGR(IT_OACC) // @ -#define IT_EURO ALGR(KC_E) // € -#define IT_PIPE LSFT(IT_BSLS) // | -#define IT_SHRP ALGR(IT_AACC) // # +#define IT_LCBR ALGR(KC_7) // { +#define IT_LBRC ALGR(IT_EACC) // [ +#define IT_RBRC ALGR(IT_PLUS) // ] +#define IT_RCBR ALGR(KC_0) // } +#define IT_AT ALGR(IT_OACC) // @ +#define IT_EURO ALGR(KC_E) // € +#define IT_PIPE LSFT(IT_BSLS) // | +#define IT_SHRP ALGR(IT_AACC) // # // Deprecated -#define IT_X_PLUS X_RBRACKET // # +#define IT_X_PLUS X_RBRACKET // # #endif diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h index 2b7160ff33b7..fa12d05dce66 100644 --- a/quantum/keymap_extras/keymap_italian_osx_ansi.h +++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h @@ -65,7 +65,7 @@ #define IT_COMM KC_COMM // , and ; #define IT_APOS KC_MINS // ' and ? #define IT_BSLS KC_NUBS // \ and | -#define IT_LESS KC_GRV // < and > +#define IT_LESS KC_GRV // < and > #define IT_MINS KC_SLSH // - and _ // accented vowels (regular, with shift, with option, with option and shift) @@ -77,37 +77,37 @@ #define IT_IACC KC_EQL // ì, ^, ˆ, ± // shifted characters -#define IT_EXLM LSFT(KC_1) // ! -#define IT_DQOT LSFT(KC_2) // " -#define IT_STRL LSFT(KC_3) // £ -#define IT_DLR LSFT(KC_4) // $ -#define IT_PERC LSFT(KC_5) // % -#define IT_AMPR LSFT(KC_6) // & -#define IT_SLSH LSFT(KC_7) // / -#define IT_LPRN LSFT(KC_8) // ( -#define IT_RPRN LSFT(KC_9) // ) -#define IT_EQL LSFT(KC_0) // = -#define IT_DEGR LSFT(IT_AACC) // ° -#define IT_QST LSFT(IT_APOS) // ? -#define IT_CRC LSFT(IT_IACC) // ^ -#define IT_ASTR LSFT(IT_PLUS) // * -#define IT_MORE LSFT(IT_LESS) // > -#define IT_COLN LSFT(IT_DOT) // : -#define IT_SCLN LSFT(IT_COMM) // ; -#define IT_UNDS LSFT(IT_MINS) // _ -#define IT_LCBR LSFT(IT_LBRC) // { -#define IT_RCBR LSFT(IT_RBRC) // } -#define IT_PIPE LSFT(IT_BSLS) // | +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_DEGR LSFT(IT_AACC) // ° +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ +#define IT_LCBR LSFT(IT_LBRC) // { +#define IT_RCBR LSFT(IT_RBRC) // } +#define IT_PIPE LSFT(IT_BSLS) // | // Alt -ed characters -#define IT_LBRC LALT(IT_EACC) // [ -#define IT_RBRC LALT(IT_PLUS) // ] -#define IT_AT LALT(IT_OACC) // @ -#define IT_EURO LALT(KC_E) // € -#define IT_SHRP LALT(IT_AACC ) // # -#define IT_ACUT LALT(KC_8) // ´ -#define IT_GRAVE LALT(KC_9) // ` -#define IT_TILDE LALT(KC_5) // ~ +#define IT_LBRC LALT(IT_EACC) // [ +#define IT_RBRC LALT(IT_PLUS) // ] +#define IT_AT LALT(IT_OACC) // @ +#define IT_EURO LALT(KC_E) // € +#define IT_SHRP LALT(IT_AACC) // # +#define IT_ACUT LALT(KC_8) // ´ +#define IT_GRAVE LALT(KC_9) // ` +#define IT_TILDE LALT(KC_5) // ~ #define IT_PLMN LALT(LSFT(IT_IACC)) // ± #endif diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h index 5c920014a183..a9b36f16e6e7 100644 --- a/quantum/keymap_extras/keymap_italian_osx_iso.h +++ b/quantum/keymap_extras/keymap_italian_osx_iso.h @@ -65,7 +65,7 @@ #define IT_COMM KC_COMM // , and ; #define IT_APOS KC_MINS // ' and ? #define IT_BSLS KC_GRV // \ and | -#define IT_LESS KC_NUBS// < and > +#define IT_LESS KC_NUBS // < and > #define IT_MINS KC_SLSH // - and _ // accented vowels (regular, with shift, with option, with option and shift) @@ -77,37 +77,37 @@ #define IT_IACC KC_EQL // ì, ^, ˆ, ± // shifted characters -#define IT_EXLM LSFT(KC_1) // ! -#define IT_DQOT LSFT(KC_2) // " -#define IT_STRL LSFT(KC_3) // £ -#define IT_DLR LSFT(KC_4) // $ -#define IT_PERC LSFT(KC_5) // % -#define IT_AMPR LSFT(KC_6) // & -#define IT_SLSH LSFT(KC_7) // / -#define IT_LPRN LSFT(KC_8) // ( -#define IT_RPRN LSFT(KC_9) // ) -#define IT_EQL LSFT(KC_0) // = -#define IT_DEGR LSFT(IT_AACC) // ° -#define IT_QST LSFT(IT_APOS) // ? -#define IT_CRC LSFT(IT_IACC) // ^ -#define IT_ASTR LSFT(IT_PLUS) // * -#define IT_MORE LSFT(IT_LESS) // > -#define IT_COLN LSFT(IT_DOT) // : -#define IT_SCLN LSFT(IT_COMM) // ; -#define IT_UNDS LSFT(IT_MINS) // _ -#define IT_LCBR LSFT(IT_LBRC) // { -#define IT_RCBR LSFT(IT_RBRC) // } -#define IT_PIPE LSFT(IT_BSLS) // | +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_DEGR LSFT(IT_AACC) // ° +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ +#define IT_LCBR LSFT(IT_LBRC) // { +#define IT_RCBR LSFT(IT_RBRC) // } +#define IT_PIPE LSFT(IT_BSLS) // | // Alt -ed characters -#define IT_LBRC LALT(IT_EACC) // [ -#define IT_RBRC LALT(IT_PLUS) // ] -#define IT_AT LALT(IT_OACC) // @ -#define IT_EURO LALT(KC_E) // € -#define IT_SHRP LALT(IT_AACC ) // # -#define IT_ACUT LALT(KC_8) // ´ -#define IT_GRAVE LALT(KC_9) // ` -#define IT_TILDE LALT(KC_5) // ~ +#define IT_LBRC LALT(IT_EACC) // [ +#define IT_RBRC LALT(IT_PLUS) // ] +#define IT_AT LALT(IT_OACC) // @ +#define IT_EURO LALT(KC_E) // € +#define IT_SHRP LALT(IT_AACC) // # +#define IT_ACUT LALT(KC_8) // ´ +#define IT_GRAVE LALT(KC_9) // ` +#define IT_TILDE LALT(KC_5) // ~ #define IT_PLMN LALT(LSFT(IT_IACC)) // ± #endif diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 8f3f3ff3c607..09ceef74d86f 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -63,10 +63,10 @@ typedef struct { { .fn = {qk_tap_dance_pair_on_each_tap, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset}, .user_data = (void *)&((qk_tap_dance_pair_t){kc1, kc2}), } # define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) \ - { .fn = { qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer, layer_move }), } + { .fn = {qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset}, .user_data = (void *)&((qk_tap_dance_dual_role_t){kc, layer, layer_move}), } # define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ - { .fn = { NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer, layer_invert }), } + { .fn = {NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset}, .user_data = (void *)&((qk_tap_dance_dual_role_t){kc, layer, layer_invert}), } # define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) @@ -79,8 +79,6 @@ typedef struct { # define ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term) \ { .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset}, .user_data = NULL, .custom_tapping_term = tap_specific_tapping_term, } - - extern qk_tap_dance_action_t tap_dance_actions[]; /* To be used internally */ diff --git a/quantum/quantum.c b/quantum/quantum.c index c27c3aba6180..2e5e6376b7c1 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1116,7 +1116,7 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { #endif led_set_kb(usb_led); - led_update_kb((led_t) usb_led); + led_update_kb((led_t)usb_led); } //------------------------------------------------------------------------------ diff --git a/quantum/quantum.h b/quantum/quantum.h index 7988c587881d..6beab65a329e 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -146,14 +146,13 @@ extern layer_state_t layer_state; #endif #ifdef DIP_SWITCH_ENABLE - #include "dip_switch.h" +# include "dip_switch.h" #endif #ifdef DYNAMIC_MACRO_ENABLE - #include "process_dynamic_macro.h" +# include "process_dynamic_macro.h" #endif - // Function substitutions to ease GPIO manipulation #if defined(__AVR__) typedef uint8_t pin_t; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 51a7e290fa62..66a3c66e8570 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -771,4 +771,4 @@ enum quantum_keycodes { #define DM_PLY1 DYN_MACRO_PLAY1 #define DM_PLY2 DYN_MACRO_PLAY2 -#endif // QUANTUM_KEYCODES_H +#endif // QUANTUM_KEYCODES_H diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 80f276139c75..7949bb688eda 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -919,7 +919,7 @@ void rgblight_effect_snake(animation_status_t *anim) { ledp->g = 0; ledp->b = 0; # ifdef RGBW - ledp->w = 0; + ledp->w = 0; # endif for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { k = pos + j * increment; diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h index f7b1b077d358..6b691950a619 100644 --- a/quantum/stm32/chconf.h +++ b/quantum/stm32/chconf.h @@ -419,34 +419,39 @@ * @note It is invoked from within @p chThdInit() and implicitly from all * the threads creation APIs. */ -# define CH_CFG_THREAD_INIT_HOOK(tp) \ - { /* Add threads initialization code here.*/ } +# define CH_CFG_THREAD_INIT_HOOK(tp) \ + { /* Add threads initialization code here.*/ \ + } /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. */ -# define CH_CFG_THREAD_EXIT_HOOK(tp) \ - { /* Add threads finalization code here.*/ } +# define CH_CFG_THREAD_EXIT_HOOK(tp) \ + { /* Add threads finalization code here.*/ \ + } /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. */ # define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ - { /* Context switch code here.*/ } + { /* Context switch code here.*/ \ + } /** * @brief ISR enter hook. */ # define CH_CFG_IRQ_PROLOGUE_HOOK() \ - { /* IRQ prologue code here.*/ } + { /* IRQ prologue code here.*/ \ + } /** * @brief ISR exit hook. */ # define CH_CFG_IRQ_EPILOGUE_HOOK() \ - { /* IRQ epilogue code here.*/ } + { /* IRQ epilogue code here.*/ \ + } /** * @brief Idle thread enter hook. @@ -455,7 +460,8 @@ * @note This macro can be used to activate a power saving mode. */ # define CH_CFG_IDLE_ENTER_HOOK() \ - { /* Idle-enter code here.*/ } + { /* Idle-enter code here.*/ \ + } /** * @brief Idle thread leave hook. @@ -464,22 +470,25 @@ * @note This macro can be used to deactivate a power saving mode. */ # define CH_CFG_IDLE_LEAVE_HOOK() \ - { /* Idle-leave code here.*/ } + { /* Idle-leave code here.*/ \ + } /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. */ # define CH_CFG_IDLE_LOOP_HOOK() \ - { /* Idle loop code here.*/ } + { /* Idle loop code here.*/ \ + } /** * @brief System tick event hook. * @details This hook is invoked in the system tick handler immediately * after processing the virtual timers queue. */ -# define CH_CFG_SYSTEM_TICK_HOOK() \ - { /* System tick event code here.*/ } +# define CH_CFG_SYSTEM_TICK_HOOK() \ + { /* System tick event code here.*/ \ + } /** * @brief System halt hook. @@ -487,7 +496,8 @@ * the system is halted. */ # define CH_CFG_SYSTEM_HALT_HOOK(reason) \ - { /* System halt code here.*/ } + { /* System halt code here.*/ \ + } /** * @brief Trace hook. @@ -495,7 +505,8 @@ * trace buffer. */ # define CH_CFG_TRACE_HOOK(tep) \ - { /* Trace code here.*/ } + { /* Trace code here.*/ \ + } /** @} */ diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c index 2dad005706cd..d1077be4c20c 100644 --- a/tmk_core/common/arm_atsam/suspend.c +++ b/tmk_core/common/arm_atsam/suspend.c @@ -7,7 +7,8 @@ * * FIXME: needs doc */ -void suspend_idle(uint8_t time) { /* Note: Not used anywhere currently */ } +void suspend_idle(uint8_t time) { /* Note: Not used anywhere currently */ +} /** \brief Run user level Power down * diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 72f198d6cec9..7cec4bd7df4c 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -51,10 +51,10 @@ void eeconfig_init_quantum(void) { // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS // within the emulated eeprom via dfu-util or another tool #if defined INIT_EE_HANDS_LEFT - #pragma message "Faking EE_HANDS for left hand" +# pragma message "Faking EE_HANDS for left hand" eeprom_update_byte(EECONFIG_HANDEDNESS, 1); #elif defined INIT_EE_HANDS_RIGHT - #pragma message "Faking EE_HANDS for right hand" +# pragma message "Faking EE_HANDS for right hand" eeprom_update_byte(EECONFIG_HANDEDNESS, 0); #endif diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c index 713b0d945644..e7d92cfac69e 100644 --- a/tmk_core/common/host.c +++ b/tmk_core/common/host.c @@ -41,7 +41,7 @@ uint8_t host_keyboard_leds(void) { } led_t host_keyboard_led_state(void) { - if (!driver) return (led_t) {0}; + if (!driver) return (led_t){0}; return (led_t)((*driver->keyboard_leds)()); } diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index daf974bed48c..990282862b5a 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h @@ -36,11 +36,11 @@ extern "C" { typedef union { uint8_t raw; struct { - bool num_lock : 1; - bool caps_lock : 1; - bool scroll_lock : 1; - bool compose : 1; - bool kana : 1; + bool num_lock : 1; + bool caps_lock : 1; + bool scroll_lock : 1; + bool compose : 1; + bool kana : 1; uint8_t reserved : 3; }; } led_t; diff --git a/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h b/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h index 2f8a39bdd8aa..fb97f63cef97 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h +++ b/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h @@ -186,9 +186,10 @@ COMPILER_PACK_RESET() #define USB_HID_COUNTRY_UK 32 // UK #define USB_HID_COUNTRY_US 33 // US #define USB_HID_COUNTRY_YUGOSLAVIA 34 // Yugoslavia -#define USB_HID_COUNTRY_TURKISH_F 35 // Turkish-F - //! @} - //! @} +#define USB_HID_COUNTRY_TURKISH_F \ + 35 // Turkish-F + //! @} + //! @} //! @} //! \name HID KEYS values diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index f7bfa20b2e33..b90bcd037298 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -310,7 +310,7 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) { case USB_EVENT_SUSPEND: #ifdef SLEEP_LED_ENABLE sleep_led_enable(); -#endif /* SLEEP_LED_ENABLE */ +#endif /* SLEEP_LED_ENABLE */ /* Falls into.*/ case USB_EVENT_UNCONFIGURED: /* Falls into.*/ @@ -453,9 +453,9 @@ static bool usb_request_hook_cb(USBDriver *usbp) { #ifdef NKRO_ENABLE keymap_config.nkro = !!keyboard_protocol; if (!keymap_config.nkro && keyboard_idle) { -#else /* NKRO_ENABLE */ +#else /* NKRO_ENABLE */ if (keyboard_idle) { -#endif /* NKRO_ENABLE */ +#endif /* NKRO_ENABLE */ /* arm the idle timer if boot protocol & idle */ osalSysLockFromISR(); chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); diff --git a/tmk_core/protocol/iwrap/iwrap.c b/tmk_core/protocol/iwrap/iwrap.c index 05e632da3823..4d0ca5756b90 100644 --- a/tmk_core/protocol/iwrap/iwrap.c +++ b/tmk_core/protocol/iwrap/iwrap.c @@ -320,7 +320,8 @@ static void send_mouse(report_mouse_t *report) { #endif } -static void send_system(uint16_t data) { /* not supported */ } +static void send_system(uint16_t data) { /* not supported */ +} static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index 505794a80c96..7b3ffdef7a75 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -31,9 +31,9 @@ #define ConnectionUpdateInterval 1000 /* milliseconds */ #ifdef SAMPLE_BATTERY -#ifndef BATTERY_LEVEL_PIN -# define BATTERY_LEVEL_PIN 7 -#endif +# ifndef BATTERY_LEVEL_PIN +# define BATTERY_LEVEL_PIN 7 +# endif #endif static struct { From e58dd1a09a908934e7de1ed839f58634f20bc9fb Mon Sep 17 00:00:00 2001 From: Luiz Correia Date: Sun, 17 Nov 2019 21:10:16 -0300 Subject: [PATCH 015/226] [Keyboard] Add abnt2 layout to gh60 (#7371) * [keymap] Add abnt2 format to gh60 * Fix typing errors * Change key names to capitals * Fix layout define * Apply suggestions from code review * Fix layout define again I used a k * Remove layer variable * Update keyboards/dz60/keymaps/default_abnt2/readme.md * Make changes from noroadsleft --- keyboards/gh60/revc/info.json | 411 +----------------- .../gh60/revc/keymaps/default_abnt2/keymap.c | 83 ++++ .../gh60/revc/keymaps/default_abnt2/readme.md | 15 + keyboards/gh60/revc/revc.h | 27 ++ 4 files changed, 141 insertions(+), 395 deletions(-) create mode 100644 keyboards/gh60/revc/keymaps/default_abnt2/keymap.c create mode 100644 keyboards/gh60/revc/keymaps/default_abnt2/readme.md diff --git a/keyboards/gh60/revc/info.json b/keyboards/gh60/revc/info.json index e2a774645733..51c61f318292 100644 --- a/keyboards/gh60/revc/info.json +++ b/keyboards/gh60/revc/info.json @@ -9,417 +9,38 @@ "height": 5, "layouts": { "LAYOUT_all": { - "key_count": 65, - "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}, - {"label":"Backspace Extra", "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":"ISO Hash", "x":12.75, "y":2}, - {"label":"Enter", "x":13.75, "y":2, "w":1.25}, - {"label":"Shift", "x":0, "y":3, "w":1.25}, - {"label":"ISO Backslash", "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":"HHKB Fn", "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}, - {"label":"Space", "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} - ] + "key_count":65, + "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},{"label":"Backspace Extra","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":"ISO Hash","x":12.75,"y":2},{"label":"Enter","x":13.75,"y":2,"w":1.25},{"label":"Shift","x":0,"y":3,"w":1.25},{"label":"ISO Backslash","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":"HHKB Fn","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},{"label":"Space","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": { - "key_count": 65, - "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}, - {"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":"ISO Hash", "x":12.75, "y":2}, - {"label":"Enter", "x":13.75, "y":2, "w":1.25}, - {"label":"Shift", "x":0, "y":3, "w":1.25}, - {"label":"ISO Backslash", "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":"HHKB Fn", "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}, - {"label":"Space", "x":3.75, "y":4, "w":6.25}, - {"label":"Backspace Extra", "x":14, "y":0}, - {"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} - ] + "key_count":65, + "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},{"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":"ISO Hash","x":12.75,"y":2},{"label":"Enter","x":13.75,"y":2,"w":1.25},{"label":"Shift","x":0,"y":3,"w":1.25},{"label":"ISO Backslash","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":"HHKB Fn","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},{"label":"Space","x":3.75,"y":4,"w":6.25},{"label":"Backspace Extra","x":14,"y":0},{"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_60_ansi": { - "key_count": 61, - "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}, - {"label":"Space", "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} - ] + "key_count":61, + "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},{"label":"Space","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_60_iso": { - "key_count": 62, - "layout": [ - {"label":"\u00ac", "x":0, "y":0}, - {"label":"!", "x":1, "y":0}, - {"label":"\"", "x":2, "y":0}, - {"label":"\u00a3", "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":"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":"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":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}, - {"label":"Space", "x":3.75, "y":4, "w":6.25}, - {"label":"AltGr", "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} - ] + "key_count":62, + "layout": [{"label":"\u00ac","x":0,"y":0},{"label":"!","x":1,"y":0},{"label":"\"","x":2,"y":0},{"label":"\u00a3","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":"Enter","x":13.75,"y":1,"w":1.25,"h":2},{"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":"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":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},{"label":"Space","x":3.75,"y":4,"w":6.25},{"label":"AltGr","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_60_ansi_split_bs_rshift": { - "key_count": 63, - "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}, - {"label":"Backspace Extra", "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":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":"HHKB Fn", "x":14, "y":3}, - {"label":"Ctrl", "x":0, "y":4, "w":1.5}, - {"label":"Win", "x":1.5, "y":4}, - {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space", "x":4, "y":4, "w":6}, - {"label":"Alt", "x":10, "y":4, "w":1.5}, - {"label":"Win", "x":11.5, "y":4}, - {"label":"Menu", "x":12.5, "y":4}, - {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} - ] + "key_count":63, + "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},{"label":"Backspace Extra","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":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":"HHKB Fn","x":14,"y":3},{"label":"Ctrl","x":0,"y":4,"w":1.5},{"label":"Win","x":1.5,"y":4},{"label":"Alt","x":2.5,"y":4,"w":1.5},{"label":"Space","x":4,"y":4,"w":6},{"label":"Alt","x":10,"y":4,"w":1.5},{"label":"Win","x":11.5,"y":4},{"label":"Menu","x":12.5,"y":4},{"label":"Ctrl","x":13.5,"y":4,"w":1.5}] }, "LAYOUT_60_ansi_split_rshift": { "key_count": 62, - "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":1.75}, - {"label":"HHKB Fn", "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}, - {"label":"Space", "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": [{"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":1.75}, {"label":"HHKB Fn", "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}, {"label":"Space", "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_60_abnt2": { + "key_count": 63, + "layout": [{"label":"Esc", "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":"\u00a8", "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":"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":"\u00c7", "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":"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":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.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":"AltGr", "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/gh60/revc/keymaps/default_abnt2/keymap.c b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c new file mode 100644 index 000000000000..633b053e6901 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c @@ -0,0 +1,83 @@ +/* Copyright 2019 Luiz Correia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include QMK_KEYBOARD_H +#include "keymap_br_abnt2.h" + +enum layer_names { + _BL, + _FL, + _CL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0 (BR ABNT2 Layout shown) + * ,-----------------------------------------------------------. + * |Esc|1 !|2 @|3 #|4 $|5 %|6 ¨|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |' `|{ [|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L | Ç |^ ~|} ]| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|; :|/ ?|Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |GUI|Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [_BL] = LAYOUT_60_abnt2( + KC_GESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), + + + [_FL] = LAYOUT_60_abnt2( + 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, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LGUI, XXXXXXX, KC_RALT, KC_RGUI, _______, KC_RCTL), + + [_CL] = LAYOUT_60_abnt2( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX), + +}; + +void matrix_scan_user(void) { + + if (layer_state_is(_FL)) { + gh60_wasd_leds_on(); + gh60_fn_led_on(); + } else { + gh60_wasd_leds_off(); + gh60_fn_led_off(); + } + + if (layer_state_is(_CL)) { + gh60_poker_leds_on(); + gh60_esc_led_on(); + } else { + gh60_poker_leds_off(); + gh60_esc_led_off(); + } + +}; diff --git a/keyboards/gh60/revc/keymaps/default_abnt2/readme.md b/keyboards/gh60/revc/keymaps/default_abnt2/readme.md new file mode 100644 index 000000000000..fe81001a7ef9 --- /dev/null +++ b/keyboards/gh60/revc/keymaps/default_abnt2/readme.md @@ -0,0 +1,15 @@ +# BR ABNT2 layout + +This is a Brazilian ABNT2 keymap for the GH60 in a standard layout. + +The top-left sends Escape normally, but becomes a quote key when +tapped whilst either Fn or GUI are held down. + +## Layout Image + +![Layout Image](http://s2.glbimg.com/hlQMZ_E87B3DB_96rVuO_pY2Yy8=/695x0/s.glbimg.com/po/tt2/f/original/2016/06/21/900px-kb_portuguese_brazilsvg_.png) + +---- +### References + +1. [Grave Escape - QMK Firmware Documentation](https://docs.qmk.fm/#/feature_grave_esc) diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h index 048263ba7319..dda7a0db6d3b 100644 --- a/keyboards/gh60/revc/revc.h +++ b/keyboards/gh60/revc/revc.h @@ -115,3 +115,30 @@ inline void gh60_wasd_leds_off(void) { setPinInput(F7); writePinLow(F7); } { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } + +/* LAYOUT_60_abnt2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │ 3d │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ + * │40 │41 │42 │45 │4a │4b │4c │4d │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +*/ +#define LAYOUT_60_abnt2( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K4A, K4B,K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} From cee8df3edf8494eb53d7208ba17dbb90b8516f25 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 18 Nov 2019 10:09:57 +0900 Subject: [PATCH 016/226] [Docs] Modified the description about setting debug_enable in `docs/faq_debug.md`. (#7394) --- docs/faq_debug.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 5cc20251d309..1e0cdc82bf91 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -27,7 +27,7 @@ You may need privilege to access the device on OS like Linux. Check: - *hid_listen* finds your device. See above. - Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). -- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. +- set `debug_enable=true`. See [Testing and Debugging](newbs_testing_debugging.md#debugging) - try using 'print' function instead of debug print. See **common/print.h**. - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). From b608bddc5edae7ccce8108d9c7777437160f3cb3 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Mon, 18 Nov 2019 00:25:35 -0800 Subject: [PATCH 017/226] knight Indicator light fix (#7398) * knight Indicator light fix * Update knight.c * Update knight.c * Update knight.c * Update knight.c --- .../xbows/knight/keymaps/default/keymap.c | 4 +-- keyboards/xbows/knight/knight.c | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/keyboards/xbows/knight/keymaps/default/keymap.c b/keyboards/xbows/knight/keymaps/default/keymap.c index a6a65437aa7d..d032e1f2ce08 100644 --- a/keyboards/xbows/knight/keymaps/default/keymap.c +++ b/keyboards/xbows/knight/keymaps/default/keymap.c @@ -2,14 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = 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_DEL, KC_PSCR, KC_ESC, KC_TAB, KC_BSPC, MO(1), + 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_DEL, KC_PSCR, KC_ESC , KC_TAB, KC_BSPC, MO(1), 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_EQL, 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_P7, KC_P8, KC_P9, KC_PMNS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_LCTL, KC_LGUI, KC_LALT,KC_SPC, KC_LCTL, KC_LSFT,KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_ENT), [1] = 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_DEL, KC_PSCR, KC_ESC, KC_TAB, KC_BSPC,KC_TRNS, + 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_DEL, KC_PSCR, RESET, KC_TAB, KC_BSPC,KC_TRNS, 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_BSPC, KC_NLCK,KC_PSLS,KC_PAST,KC_EQL, 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_P7, KC_P8, KC_P9, KC_PMNS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, BL_STEP,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_PPLS, diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c index 1b8adc8c2acc..f697f23f97a0 100644 --- a/keyboards/xbows/knight/knight.c +++ b/keyboards/xbows/knight/knight.c @@ -1,19 +1,23 @@ #include "knight.h" + void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { setPinOutput(D1); + writePinHigh(D1); setPinOutput(E2); - matrix_init_user(); -}; -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(D1); - } else { - writePinLow(D1); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(E2); - } else { - writePinLow(E2); + writePinHigh(E2); +} +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E2, !led_state.caps_lock); + writePin(D1, !led_state.num_lock); } - led_set_user(usb_led); + return true; } From 9c58da6b121ca36f616f8a9a78dd4c2234bd5942 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Mon, 18 Nov 2019 14:54:50 -0800 Subject: [PATCH 018/226] Improve a number of things about how MILC operates (#7344) * Pull in updates for MILC * Remove the shadow argparser * Make it easier to reason about arguments and how they're translated into the config tree * Populate self.config during init to support setting user.qmk_home for the global CLI * Remove the short argument -c so that we can unambiguously determine the config file location without doing full argument processing * Remove the --save-config option as it's a little confusing anyway * Use Pathlib for path manipulation * Fix commands with no arguments --- lib/python/milc.py | 167 ++++++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 85 deletions(-) diff --git a/lib/python/milc.py b/lib/python/milc.py index 7b130bdea606..e8599eff3f0b 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -20,6 +20,7 @@ import shlex import sys from decimal import Decimal +from pathlib import Path from tempfile import NamedTemporaryFile from time import sleep @@ -39,7 +40,7 @@ from appdirs import user_config_dir # Disable logging until we can configure it how the user wants -logging.basicConfig(filename='/dev/null') +logging.basicConfig(stream=os.devnull) # Log Level Representations EMOJI_LOGLEVELS = { @@ -96,7 +97,6 @@ def format_ansi(text): class ANSIFormatter(logging.Formatter): """A log formatter that inserts ANSI color. """ - def format(self, record): msg = super(ANSIFormatter, self).format(record) return format_ansi(msg) @@ -105,7 +105,6 @@ def format(self, record): class ANSIEmojiLoglevelFormatter(ANSIFormatter): """A log formatter that makes the loglevel an emoji on UTF capable terminals. """ - def format(self, record): if UNICODE_SUPPORT: record.levelname = EMOJI_LOGLEVELS[record.levelname].format(**ansi_colors) @@ -115,7 +114,6 @@ def format(self, record): class ANSIStrippingFormatter(ANSIFormatter): """A log formatter that strips ANSI. """ - def format(self, record): msg = super(ANSIStrippingFormatter, self).format(record) return ansi_escape.sub('', msg) @@ -127,7 +125,6 @@ class Configuration(object): This class never raises IndexError, instead it will return None if a section or option does not yet exist. """ - def __contains__(self, key): return self._config.__contains__(key) @@ -214,9 +211,8 @@ def handle_store_boolean(self, *args, **kwargs): class SubparserWrapper(object): - """Wrap subparsers so we can populate the normal and the shadow parser. + """Wrap subparsers so we can track what options the user passed. """ - def __init__(self, cli, submodule, subparser): self.cli = cli self.submodule = submodule @@ -232,26 +228,30 @@ def completer(self, completer): self.subparser.completer = completer def add_argument(self, *args, **kwargs): + """Add an argument for this subcommand. + + This also stores the default for the argument in `self.cli.default_arguments`. + """ if 'action' in kwargs and kwargs['action'] == 'store_boolean': + # Store boolean will call us again with the enable/disable flag arguments return handle_store_boolean(self, *args, **kwargs) self.cli.acquire_lock() self.subparser.add_argument(*args, **kwargs) - - if 'default' in kwargs: - del kwargs['default'] - if 'action' in kwargs and kwargs['action'] == 'store_false': - kwargs['action'] == 'store_true' - self.cli.subcommands_default[self.submodule].add_argument(*args, **kwargs) + if self.submodule not in self.cli.default_arguments: + self.cli.default_arguments[self.submodule] = {} + self.cli.default_arguments[self.submodule][self.cli.get_argument_name(*args, **kwargs)] = kwargs.get('default') self.cli.release_lock() class MILC(object): """MILC - An Opinionated Batteries Included Framework """ - def __init__(self): """Initialize the MILC object. + + version + The version string to associate with your CLI program """ # Setup a lock for thread safety self._lock = threading.RLock() if thread else None @@ -263,9 +263,10 @@ def __init__(self): self._inside_context_manager = False self.ansi = ansi_colors self.arg_only = [] - self.config = Configuration() + self.config = None self.config_file = None - self.version = os.environ.get('QMK_VERSION', 'unknown') + self.default_arguments = {} + self.version = 'unknown' self.release_lock() # Figure out our program name @@ -273,6 +274,7 @@ def __init__(self): self.prog_name = self.prog_name.split('/')[-1] # Initialize all the things + self.read_config_file() self.initialize_argparse() self.initialize_logging() @@ -282,7 +284,7 @@ def description(self): @description.setter def description(self, value): - self._description = self._arg_parser.description = self._arg_defaults.description = value + self._description = self._arg_parser.description = value def echo(self, text, *args, **kwargs): """Print colorized text to stdout. @@ -311,12 +313,9 @@ def initialize_argparse(self): self.acquire_lock() self.subcommands = {} - self.subcommands_default = {} self._subparsers = None - self._subparsers_default = None self.argwarn = argcomplete.warn self.args = None - self._arg_defaults = argparse.ArgumentParser(**kwargs) self._arg_parser = argparse.ArgumentParser(**kwargs) self.set_defaults = self._arg_parser.set_defaults self.print_usage = self._arg_parser.print_usage @@ -329,25 +328,18 @@ def completer(self, completer): self._arg_parser.completer = completer def add_argument(self, *args, **kwargs): - """Wrapper to add arguments to both the main and the shadow argparser. + """Wrapper to add arguments and track whether they were passed on the command line. """ if 'action' in kwargs and kwargs['action'] == 'store_boolean': return handle_store_boolean(self, *args, **kwargs) - if kwargs.get('add_dest', True) and args[0][0] == '-': - kwargs['dest'] = 'general_' + self.get_argument_name(*args, **kwargs) - if 'add_dest' in kwargs: - del kwargs['add_dest'] - self.acquire_lock() + self._arg_parser.add_argument(*args, **kwargs) + if 'general' not in self.default_arguments: + self.default_arguments['general'] = {} + self.default_arguments['general'][self.get_argument_name(*args, **kwargs)] = kwargs.get('default') - # Populate the shadow parser - if 'default' in kwargs: - del kwargs['default'] - if 'action' in kwargs and kwargs['action'] == 'store_false': - kwargs['action'] == 'store_true' - self._arg_defaults.add_argument(*args, **kwargs) self.release_lock() def initialize_logging(self): @@ -374,15 +366,14 @@ def initialize_logging(self): self.add_argument('--log-file-fmt', default='[%(levelname)s] [%(asctime)s] [file:%(pathname)s] [line:%(lineno)d] %(message)s', help='Format string for log file.') self.add_argument('--log-file', help='File to write log messages to') self.add_argument('--color', action='store_boolean', default=True, help='color in output') - self.add_argument('-c', '--config-file', help='The config file to read and/or write') - self.add_argument('--save-config', action='store_true', help='Save the running configuration to the config file') + self.add_argument('--config-file', help='The location for the configuration file') + self.arg_only.append('config_file') def add_subparsers(self, title='Sub-commands', **kwargs): if self._inside_context_manager: raise RuntimeError('You must run this before the with statement!') self.acquire_lock() - self._subparsers_default = self._arg_defaults.add_subparsers(title=title, dest='subparsers', **kwargs) self._subparsers = self._arg_parser.add_subparsers(title=title, dest='subparsers', **kwargs) self.release_lock() @@ -404,10 +395,12 @@ def find_config_file(self): if self.config_file: return self.config_file - if self.args and self.args.general_config_file: - return self.args.general_config_file + if '--config-file' in sys.argv: + return Path(sys.argv[sys.argv.index('--config-file') + 1]).expanduser().resolve() - return os.path.join(user_config_dir(appname='qmk', appauthor='QMK'), '%s.ini' % self.prog_name) + filedir = user_config_dir(appname='qmk', appauthor='QMK') + filename = '%s.ini' % self.prog_name + return Path(filedir) / filename def get_argument_name(self, *args, **kwargs): """Takes argparse arguments and returns the dest name. @@ -446,7 +439,7 @@ def argument_function(handler): def arg_passed(self, arg): """Returns True if arg was passed on the command line. """ - return self.args_passed[arg] in (None, False) + return self.default_arguments.get(arg) != self.args[arg] def parse_args(self): """Parse the CLI args. @@ -459,25 +452,22 @@ def parse_args(self): self.acquire_lock() self.args = self._arg_parser.parse_args() - self.args_passed = self._arg_defaults.parse_args() if 'entrypoint' in self.args: self._entrypoint = self.args.entrypoint - if self.args.general_config_file: - self.config_file = self.args.general_config_file - self.release_lock() - def read_config(self): - """Parse the configuration file and determine the runtime configuration. + def read_config_file(self): + """Read in the configuration file and store it in self.config. """ self.acquire_lock() + self.config = Configuration() self.config_file = self.find_config_file() - if self.config_file and os.path.exists(self.config_file): + if self.config_file and self.config_file.exists(): config = RawConfigParser(self.config) - config.read(self.config_file) + config.read(str(self.config_file)) # Iterate over the config file options and write them into self.config for section in config.sections(): @@ -487,8 +477,10 @@ def read_config(self): # Coerce values into useful datatypes if value.lower() in ['1', 'yes', 'true', 'on']: value = True - elif value.lower() in ['0', 'no', 'false', 'none', 'off']: + elif value.lower() in ['0', 'no', 'false', 'off']: value = False + elif value.lower() in ['none']: + continue elif value.replace('.', '').isdigit(): if '.' in value: value = Decimal(value) @@ -497,32 +489,44 @@ def read_config(self): self.config[section][option] = value - # Fold the CLI args into self.config + self.release_lock() + + def merge_args_into_config(self): + """Merge CLI arguments into self.config to create the runtime configuration. + """ + self.acquire_lock() for argument in vars(self.args): if argument in ('subparsers', 'entrypoint'): continue - if '_' in argument: - section, option = argument.split('_', 1) - else: - section = self._entrypoint.__name__ - option = argument - - if option not in self.arg_only: - if hasattr(self.args_passed, argument): + if argument not in self.arg_only: + # Find the argument's section + if self._entrypoint.__name__ in self.default_arguments and argument in self.default_arguments[self._entrypoint.__name__]: + argument_found = True + section = self._entrypoint.__name__ + if argument in self.default_arguments['general']: + argument_found = True + section = 'general' + + if not argument_found: + raise RuntimeError('Could not find argument in `self.default_arguments`. This should be impossible!') + exit(1) + + # Merge this argument into self.config + if argument in self.default_arguments: arg_value = getattr(self.args, argument) if arg_value: - self.config[section][option] = arg_value + self.config[section][argument] = arg_value else: - if option not in self.config[section]: - self.config[section][option] = getattr(self.args, argument) + if argument not in self.config[section]: + self.config[section][argument] = getattr(self.args, argument) self.release_lock() def save_config(self): """Save the current configuration to the config file. """ - self.log.debug("Saving config file to '%s'", self.config_file) + self.log.debug("Saving config file to '%s'", str(self.config_file)) if not self.config_file: self.log.warning('%s.config_file file not set, not saving config!', self.__class__.__name__) @@ -530,31 +534,34 @@ def save_config(self): self.acquire_lock() + # Generate a sanitized version of our running configuration config = RawConfigParser() - config_dir = os.path.dirname(self.config_file) - for section_name, section in self.config._config.items(): config.add_section(section_name) for option_name, value in section.items(): if section_name == 'general': - if option_name in ['save_config']: + if option_name in ['config_file']: continue - config.set(section_name, option_name, str(value)) + if value is not None: + config.set(section_name, option_name, str(value)) - if not os.path.exists(config_dir): - os.makedirs(config_dir) + # Write out the config file + config_dir = self.config_file.parent + if not config_dir.exists(): + config_dir.mkdir(parents=True, exist_ok=True) - with NamedTemporaryFile(mode='w', dir=config_dir, delete=False) as tmpfile: + with NamedTemporaryFile(mode='w', dir=str(config_dir), delete=False) as tmpfile: config.write(tmpfile) # Move the new config file into place atomically if os.path.getsize(tmpfile.name) > 0: - os.rename(tmpfile.name, self.config_file) + os.rename(tmpfile.name, str(self.config_file)) else: - self.log.warning('Config file saving failed, not replacing %s with %s.', self.config_file, tmpfile.name) + self.log.warning('Config file saving failed, not replacing %s with %s.', str(self.config_file), tmpfile.name) + # Housekeeping self.release_lock() - cli.log.info('Wrote configuration to %s', shlex.quote(self.config_file)) + cli.log.info('Wrote configuration to %s', shlex.quote(str(self.config_file))) def __call__(self): """Execute the entrypoint function. @@ -603,16 +610,11 @@ def add_subcommand(self, handler, description, name=None, **kwargs): name = handler.__name__.replace("_", "-") self.acquire_lock() + kwargs['help'] = description - self.subcommands_default[name] = self._subparsers_default.add_parser(name, **kwargs) self.subcommands[name] = SubparserWrapper(self, name, self._subparsers.add_parser(name, **kwargs)) self.subcommands[name].set_defaults(entrypoint=handler) - if name not in self.__dict__: - self.__dict__[name] = self.subcommands[name] - else: - self.log.debug("Could not add subcommand '%s' to attributes, key already exists!", name) - self.release_lock() return handler @@ -620,7 +622,6 @@ def add_subcommand(self, handler, description, name=None, **kwargs): def subcommand(self, description, **kwargs): """Decorator to register a subcommand. """ - def subcommand_function(handler): return self.add_subcommand(handler, description, **kwargs) @@ -644,9 +645,9 @@ def setup_logging(self): self.log_format = self.config['general']['log_fmt'] if self.config.general.color: - self.log_format = ANSIEmojiLoglevelFormatter(self.args.general_log_fmt, self.config.general.datetime_fmt) + self.log_format = ANSIEmojiLoglevelFormatter(self.args.log_fmt, self.config.general.datetime_fmt) else: - self.log_format = ANSIStrippingFormatter(self.args.general_log_fmt, self.config.general.datetime_fmt) + self.log_format = ANSIStrippingFormatter(self.args.log_fmt, self.config.general.datetime_fmt) if self.log_file: self.log_file_handler = logging.FileHandler(self.log_file, self.log_file_mode) @@ -673,13 +674,9 @@ def __enter__(self): colorama.init() self.parse_args() - self.read_config() + self.merge_args_into_config() self.setup_logging() - if 'save_config' in self.config.general and self.config.general.save_config: - self.save_config() - exit(0) - return self def __exit__(self, exc_type, exc_val, exc_tb): From 23f828a2f3021f8167c4e17eac7cbe4683824ca5 Mon Sep 17 00:00:00 2001 From: shela Date: Tue, 19 Nov 2019 17:38:50 +0900 Subject: [PATCH 019/226] [Docs] Fix Japanese country flag (#7407) --- docs/_langs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_langs.md b/docs/_langs.md index b318687d04c1..7fb4a29d33f5 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -5,4 +5,4 @@ - [:fr: Français](/fr-fr/) - [:he: עברית](/he-il/) - [:ru: Русский](/ru-ru/) - - [:ja: 日本語](/ja/) + - [:jp: 日本語](/ja/) From 687a24f2980e6e490ac8e43104f4176b033c9243 Mon Sep 17 00:00:00 2001 From: Mihai Olteanu Date: Tue, 19 Nov 2019 15:41:35 +0200 Subject: [PATCH 020/226] Fix typo and code indentation (#7410) --- docs/feature_rgblight.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 397dde587df2..2e9610163b47 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -363,8 +363,8 @@ Using the `rgblight_set_clipping_range()` function, you can prepare more buffers You can set the Clipping Range by executing the following code. ```c -// some soruce - rgblight_set_clipping_range(3, 4); +// some source +rgblight_set_clipping_range(3, 4); ``` clip direct From bb87bdec82433053eef68caa5fe4a03083a13e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8F=E3=81=BE=E3=81=8A=E5=B7=A5=E6=88=BF?= <52371962+kumaokobo@users.noreply.github.com> Date: Wed, 20 Nov 2019 05:51:47 +0900 Subject: [PATCH 021/226] [Keyboard] Add Kudox column-staggered layout. (#7400) * Add Kudox columner layout. * Remove an extra comma from info.json. --- keyboards/kudox/columner/columner.c | 0 keyboards/kudox/columner/columner.h | 23 +++++ keyboards/kudox/columner/config.h | 91 +++++++++++++++++++ keyboards/kudox/columner/info.json | 77 ++++++++++++++++ .../kudox/columner/keymaps/default/config.h | 17 ++++ .../kudox/columner/keymaps/default/keymap.c | 63 +++++++++++++ .../kudox/columner/keymaps/default/readme.md | 1 + keyboards/kudox/columner/readme.md | 32 +++++++ keyboards/kudox/columner/rules.mk | 0 keyboards/kudox/kudox.h | 3 + 10 files changed, 307 insertions(+) create mode 100644 keyboards/kudox/columner/columner.c create mode 100644 keyboards/kudox/columner/columner.h create mode 100644 keyboards/kudox/columner/config.h create mode 100644 keyboards/kudox/columner/info.json create mode 100644 keyboards/kudox/columner/keymaps/default/config.h create mode 100644 keyboards/kudox/columner/keymaps/default/keymap.c create mode 100644 keyboards/kudox/columner/keymaps/default/readme.md create mode 100644 keyboards/kudox/columner/readme.md create mode 100644 keyboards/kudox/columner/rules.mk diff --git a/keyboards/kudox/columner/columner.c b/keyboards/kudox/columner/columner.c new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kudox/columner/columner.h b/keyboards/kudox/columner/columner.h new file mode 100644 index 000000000000..dcc745ddb799 --- /dev/null +++ b/keyboards/kudox/columner/columner.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/kudox/columner/config.h b/keyboards/kudox/columner/config.h new file mode 100644 index 000000000000..a76bce09dafa --- /dev/null +++ b/keyboards/kudox/columner/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9691 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Keyboard +#define DESCRIPTION Split column staggered 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox/columner/info.json b/keyboards/kudox/columner/info.json new file mode 100644 index 000000000000..8d98c817881e --- /dev/null +++ b/keyboards/kudox/columner/info.json @@ -0,0 +1,77 @@ +{ + "url": "http://kumaokobo.com/", + "maintainer": "Kumao Kobo", + "keyboard_name": "Kudox Keyboard Columner", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0.5, "w":1.25}, + {"label":"1", "x":1.25, "y":0.5}, + {"label":"2", "x":2.25, "y":0.25}, + {"label":"3", "x":3.25, "y":0}, + {"label":"4", "x":4.25, "y":0.25}, + {"label":"5", "x":5.25, "y":0.5}, + {"label":"6", "x":11, "y":0.5}, + {"label":"7", "x":12, "y":0.25}, + {"label":"8", "x":13, "y":0}, + {"label":"9", "x":14, "y":0.25}, + {"label":"0", "x":15, "y":0.5}, + {"label":"\u2190", "x":16, "y":0.5, "w":1.25}, + {"label":"Tab", "x":0, "y":1.5, "w":1.25}, + {"label":"Q", "x":1.25, "y":1.5}, + {"label":"W", "x":2.25, "y":1.25}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1.25}, + {"label":"T", "x":5.25, "y":1.5}, + {"label":"{", "x":6.25, "y":1.25, "h":1.25}, + {"label":"}", "x":10, "y":1.25, "h":1.25}, + {"label":"Y", "x":11, "y":1.5}, + {"label":"U", "x":12, "y":1.25}, + {"label":"I", "x":13, "y":1}, + {"label":"O", "x":14, "y":1.25}, + {"label":"P", "x":15, "y":1.5}, + {"label":"\\", "x":16, "y":1.5, "w":1.25}, + {"label":"Ctrl", "x":0, "y":2.5, "w":1.25}, + {"label":"A", "x":1.25, "y":2.5}, + {"label":"S", "x":2.25, "y":2.25}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2.25}, + {"label":"G", "x":5.25, "y":2.5}, + {"label":"H", "x":11, "y":2.5}, + {"label":"J", "x":12, "y":2.25}, + {"label":"K", "x":13, "y":2}, + {"label":"L", "x":14, "y":2.25}, + {"label":";", "x":15, "y":2.5}, + {"label":"Enter", "x":16, "y":2.5, "w":1.25}, + {"label":"Shift", "x":0, "y":3.5, "w":1.25}, + {"label":"Z", "x":1.25, "y":3.5}, + {"label":"X", "x":2.25, "y":3.25}, + {"label":"V", "x":4.25, "y":3.25}, + {"label":"C", "x":3.25, "y":3}, + {"label":"B", "x":5.25, "y":3.5}, + {"label":"-", "x":6.25, "y":2.5, "h":1.25}, + {"label":"=", "x":10, "y":2.5, "h":1.25}, + {"label":"N", "x":11, "y":3.5}, + {"label":"M", "x":12, "y":3.25}, + {"label":",", "x":13, "y":3}, + {"label":".", "x":14, "y":3.25}, + {"label":"/", "x":15, "y":3.5}, + {"label":"Shift", "x":16, "y":3.5, "w":1.25}, + {"label":"Alt", "x":0, "y":4.5, "w":1.25}, + {"label":"'", "x":1.25, "y":4.5}, + {"label":"~", "x":2.25, "y":4.25}, + {"label":"Del", "x":3.25, "y":4}, + {"label":"LANG2", "x":4.25, "y":4.5}, + {"label":"GUI", "x":5.25, "y":4.75}, + {"label":"Space", "x":6.25, "y":5}, + {"label":"Space", "x":10, "y":5}, + {"label":"GUI", "x":11, "y":4.75}, + {"label":"LANG2", "x":12, "y":4.5}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4.25}, + {"label":"\u2191", "x":15, "y":4.5}, + {"label":"\u2192", "x":16, "y":4.5, "w":1.25} + ] + } + } +} diff --git a/keyboards/kudox/columner/keymaps/default/config.h b/keyboards/kudox/columner/keymaps/default/config.h new file mode 100644 index 000000000000..f5bf85cca0ab --- /dev/null +++ b/keyboards/kudox/columner/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Kumao Kobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once diff --git a/keyboards/kudox/columner/keymaps/default/keymap.c b/keyboards/kudox/columner/keymaps/default/keymap.c new file mode 100644 index 000000000000..84ebcc906b15 --- /dev/null +++ b/keyboards/kudox/columner/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NUMB 2 + +// Shortcut to make keymap more readable +#define KC_ALES LALT_T(KC_ESC) + +#define KC_LGENT MT(KC_LGUI, KC_ENT) +#define KC_RGENT MT(KC_RGUI, KC_ENT) + +#define KC_L1NUM LT(_NUMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LBRC , KC_RBRC ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_MINS , KC_EQL ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + 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_ALES ,KC_QUOT ,KC_GRV ,KC_DEL ,KC_L2SYM,KC_LGENT,KC_SPC , KC_SPC ,KC_RGENT,KC_L1NUM,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F11 , KC_F12 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_DQUO ,KC_QUOT ,KC_TILD ,KC_ASTR ,KC_PLUS ,_______ , _______ ,_______ ,_______ ,_______ ,KC_TILD ,KC_GRV ,KC_JYEN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,_______ ,KC_MINS , _______ ,_______ ,_______ ,KC_DQUO ,KC_QUOT ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_NUMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_7 ,KC_8 ,KC_9 ,KC_ASTR ,KC_PLUS ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_4 ,KC_5 ,KC_6 ,KC_0 ,KC_MINS , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_1 ,KC_2 ,KC_3 ,KC_DOT ,KC_SLSH , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,KC_JYEN ,KC_0 ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/kudox/columner/keymaps/default/readme.md b/keyboards/kudox/columner/keymaps/default/readme.md new file mode 100644 index 000000000000..13d9e8bee104 --- /dev/null +++ b/keyboards/kudox/columner/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kudox Keyboard Columner diff --git a/keyboards/kudox/columner/readme.md b/keyboards/kudox/columner/readme.md new file mode 100644 index 000000000000..0c62174bcf62 --- /dev/null +++ b/keyboards/kudox/columner/readme.md @@ -0,0 +1,32 @@ +# The Kudox Keyboard Columner + +

+Kudox logo +

+ +

+Kudox Columner +

+ +- Keyboard Maintainer: [Kumao Kobo](https://github.com/kumaokobo) +- Hardware Supported: Kudox Columner PCB rev1.0 w/ Pro Micro + +Make example for this keyboard (after setting up your build environment): + +```sh +make kudox/columner:default +``` + + +Example of flashing this keyboard: + +```sh +make kudox/columner:default:flash +``` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + + +## Layout + +![layout](https://raw.githubusercontent.com/kumaokobo/kudox-keyboard/master/img/kudox-columner-layout-rev1.png) diff --git a/keyboards/kudox/columner/rules.mk b/keyboards/kudox/columner/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kudox/kudox.h b/keyboards/kudox/kudox.h index 176f02fb5f98..09549fbc5556 100644 --- a/keyboards/kudox/kudox.h +++ b/keyboards/kudox/kudox.h @@ -22,5 +22,8 @@ #ifdef KEYBOARD_kudox_rev2 #include "rev2.h" #endif +#ifdef KEYBOARD_kudox_columner + #include "columner.h" +#endif #include "quantum.h" From c1c27b83aa9a3a57da43749854ee3c5182e63826 Mon Sep 17 00:00:00 2001 From: Erovia Date: Tue, 19 Nov 2019 21:56:01 +0100 Subject: [PATCH 022/226] [Keyboard] Add support for the THE30 keyboard (#7390) --- keyboards/lazydesigners/the30/config.h | 42 ++++++++++++++ keyboards/lazydesigners/the30/info.json | 44 +++++++++++++++ .../the30/keymaps/default/keymap.c | 56 +++++++++++++++++++ .../the30/keymaps/default/readme.md | 25 +++++++++ keyboards/lazydesigners/the30/readme.md | 21 +++++++ keyboards/lazydesigners/the30/rules.mk | 35 ++++++++++++ keyboards/lazydesigners/the30/the30.c | 16 ++++++ keyboards/lazydesigners/the30/the30.h | 38 +++++++++++++ 8 files changed, 277 insertions(+) create mode 100644 keyboards/lazydesigners/the30/config.h create mode 100644 keyboards/lazydesigners/the30/info.json create mode 100644 keyboards/lazydesigners/the30/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/the30/keymaps/default/readme.md create mode 100644 keyboards/lazydesigners/the30/readme.md create mode 100644 keyboards/lazydesigners/the30/rules.mk create mode 100644 keyboards/lazydesigners/the30/the30.c create mode 100644 keyboards/lazydesigners/the30/the30.h diff --git a/keyboards/lazydesigners/the30/config.h b/keyboards/lazydesigners/the30/config.h new file mode 100644 index 000000000000..fdd76fe730e7 --- /dev/null +++ b/keyboards/lazydesigners/the30/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2019 Erovia + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0030 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT THE30 +#define DESCRIPTION A 30% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2 } +#define MATRIX_COL_PINS { B1, B2, B3, D4, D6, D7, B4, B5, B6, C6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/lazydesigners/the30/info.json b/keyboards/lazydesigners/the30/info.json new file mode 100644 index 000000000000..97974112ebe8 --- /dev/null +++ b/keyboards/lazydesigners/the30/info.json @@ -0,0 +1,44 @@ +{ + "keyboard_name": "THE30", + "url": "http://lazydesigners.cn", + "maintainer": "Erovia", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "key_count": 30, + "layout": [ + {"label":"Q", "x":0, "y":0}, + {"label":"W", "x":1, "y":0}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0}, + {"label":"T", "x":4, "y":0}, + {"label":"Y", "x":5, "y":0}, + {"label":"U", "x":6, "y":0}, + {"label":"I", "x":7, "y":0}, + {"label":"O", "x":8, "y":0}, + {"label":"P", "x":9, "y":0}, + {"label":"A", "x":0, "y":1}, + {"label":"S", "x":1, "y":1}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1}, + {"label":"G", "x":4, "y":1}, + {"label":"H", "x":5, "y":1}, + {"label":"J", "x":6, "y":1}, + {"label":"K", "x":7, "y":1}, + {"label":"L", "x":8, "y":1}, + {"label":"ENTER", "x":9, "y":1}, + {"label":"Z", "x":0, "y":2}, + {"label":"X", "x":1, "y":2}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2}, + {"label":"B", "x":4, "y":2}, + {"label":"N", "x":5, "y":2}, + {"label":"M", "x":6, "y":2}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2}, + {"label":"/", "x":9, "y":2} + ] + } + } +} diff --git a/keyboards/lazydesigners/the30/keymaps/default/keymap.c b/keyboards/lazydesigners/the30/keymaps/default/keymap.c new file mode 100644 index 000000000000..e15fad7eb349 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 Erovia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _FN +}; + +/* Press for Enter, hold for FN layer */ +#define FN_ENT LT(_FN, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | + * |-------------------------------------------------| + * | A | S | D | F | G | H | J | K | L |ENT | + * |-------------------------------------------------| + * | Z | X | C | V | B | N | M | , | . | / | + * `-------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FN_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + ), +/* + * ,-------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + * |-------------------------------------------------| + * | | | | | | | | | | | + * |-------------------------------------------------| + * |RST |ERST| | |SPC | | | | | | + * `-------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_3x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, EEP_RST, _______, _______, KC_SPC, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/lazydesigners/the30/keymaps/default/readme.md b/keyboards/lazydesigners/the30/keymaps/default/readme.md new file mode 100644 index 000000000000..7df2b3b0a973 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/default/readme.md @@ -0,0 +1,25 @@ +# The default keymap for THE30 + +_Very simple keymap for testing and for easy access to RESET_ + +## QWERTY (Normal) Layer +``` +,-------------------------------------------------. +| Q | W | E | R | T | Y | U | I | O | P | +|-------------------------------------------------| +| A | S | D | F | G | H | J | K | L |ENT | +|-------------------------------------------------| +| Z | X | C | V | B | N | M | , | . | / | +`-------------------------------------------------' +``` + +## FN Layer +``` +,-------------------------------------------------. +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | +|-------------------------------------------------| +| | | | | | | | | | | +|-------------------------------------------------| +|RST |ERST| | |SPC | | | | | | +`-------------------------------------------------' +``` diff --git a/keyboards/lazydesigners/the30/readme.md b/keyboards/lazydesigners/the30/readme.md new file mode 100644 index 000000000000..a00e4d1fa126 --- /dev/null +++ b/keyboards/lazydesigners/the30/readme.md @@ -0,0 +1,21 @@ +# THE30 + +![the30](https://i.loli.net/2019/11/06/KTn3dNjreigovRz.jpg) + +A 30% custom keyboard designed and produced by [LazyDesigners](http://lazydesigners.cn). + +* Keyboard Maintainer: [Erovia](https://github.com/Erovia) +* Hardware Supported: THE30 +* Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/the30:default + +Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)): + + make lazydesigners/the30:default:flash + +To enter the bootloader, either press the RESET button on the PCB or the RESET button if the current keymap has one. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/lazydesigners/the30/rules.mk b/keyboards/lazydesigners/the30/rules.mk new file mode 100644 index 000000000000..6c1e24fda066 --- /dev/null +++ b/keyboards/lazydesigners/the30/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# 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 = no # Commands for debug and configuration +# 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 = no # 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 + +# Support community keymaps +LAYOUTS = ortho_3x10 diff --git a/keyboards/lazydesigners/the30/the30.c b/keyboards/lazydesigners/the30/the30.c new file mode 100644 index 000000000000..c41e16dc0893 --- /dev/null +++ b/keyboards/lazydesigners/the30/the30.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Erovia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "the30.h" diff --git a/keyboards/lazydesigners/the30/the30.h b/keyboards/lazydesigners/the30/the30.h new file mode 100644 index 000000000000..82a6bf8ba547 --- /dev/null +++ b/keyboards/lazydesigners/the30/the30.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Erovia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* + * ,-------------------------------------------------. + * | | | | | | | | | | | + * |-------------------------------------------------| + * | | | | | | | | | | | + * |-------------------------------------------------| + * | | | | | | | | | | | + * `-------------------------------------------------' + */ + +#define LAYOUT_ortho_3x10( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ +} From 25e9853efe28e8897cd9128d7515d3f60f482aad Mon Sep 17 00:00:00 2001 From: Erovia Date: Tue, 19 Nov 2019 22:00:45 +0100 Subject: [PATCH 023/226] [Core] Fix ps2avrgb template (#7412) --- quantum/template/ps2avrgb/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 4deb719f5a66..d93512bca6db 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D #define DEVICE_VER 0x0001 -#define MANUFACTURER You +#define MANUFACTURER %YOUR_NAME% #define PRODUCT %KEYBOARD% #define DESCRIPTION A custom keyboard From 03e50e6dc9f661cdce4156279f1229af80b91b8e Mon Sep 17 00:00:00 2001 From: angelbirth Date: Wed, 20 Nov 2019 07:21:19 +0700 Subject: [PATCH 024/226] ASH-1800 (#7031) * my custom layout * asd * use qmk-dfu * :) * ganti keymap lagi * my custom layout * asd * use qmk-dfu * :) * ganti keymap lagi * my custom layout * asd * use qmk-dfu * :) * ganti keymap lagi * Add handwired2x2 project, define pins for atmega328p in config_common.h * Add USB IDs * my custom KBD75 layout * renaldi danang's numpad * my redox keymap * reynaldi danang's numpad * asdasd * ASH-1800 * added description and layer 1 * added requested changes from fauxpark * forgot to include this * USB descriptor parameter: - assign product id - assign description edit formatting on readme.md * update USB descriptor: change manufacturer * review from fauxpark and noroadsleft * remove extra files * removed unnecessary comment * minor cleanup --- keyboards/ash1800/ash1800.c | 25 + keyboards/ash1800/ash1800.h | 51 ++ keyboards/ash1800/config.h | 253 +++++++++ keyboards/ash1800/info.json | 539 ++++++++++++++++++++ keyboards/ash1800/keymaps/default/keymap.c | 37 ++ keyboards/ash1800/keymaps/default/readme.md | 1 + keyboards/ash1800/readme.md | 15 + keyboards/ash1800/rules.mk | 33 ++ 8 files changed, 954 insertions(+) create mode 100644 keyboards/ash1800/ash1800.c create mode 100644 keyboards/ash1800/ash1800.h create mode 100644 keyboards/ash1800/config.h create mode 100644 keyboards/ash1800/info.json create mode 100644 keyboards/ash1800/keymaps/default/keymap.c create mode 100644 keyboards/ash1800/keymaps/default/readme.md create mode 100644 keyboards/ash1800/readme.md create mode 100644 keyboards/ash1800/rules.mk diff --git a/keyboards/ash1800/ash1800.c b/keyboards/ash1800/ash1800.c new file mode 100644 index 000000000000..5b1d1c45f2b5 --- /dev/null +++ b/keyboards/ash1800/ash1800.c @@ -0,0 +1,25 @@ +/* Copyright 2019 angelbirth + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "ash1800.h" + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(NUM_LOCK_LED_PIN, !led_state.num_lock); + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock); + } + return true; +} \ No newline at end of file diff --git a/keyboards/ash1800/ash1800.h b/keyboards/ash1800/ash1800.h new file mode 100644 index 000000000000..bcfb2ec5d057 --- /dev/null +++ b/keyboards/ash1800/ash1800.h @@ -0,0 +1,51 @@ +/* Copyright 2019 angelbirth + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k60, k61, k62, k63, k04, k05, k06, k07, k08, k54, k55, k56, k57, \ + k64, k65, k66, k67, \ + k10, k11, k12, k13, k70, k71, k72, k73, k14, k15, k16, k17, k18, k19, k74, k75, k76, k77, \ + k20, k21, k22, k23, k80, k81, k82, k83, k24, k25, k26, k27, k28, k29, k84, k85, k86, k87, \ + k30, k31, k32, k33, k90, k91, k92, k93, k34, k35, k36, k37, k38, k94, k95, k96, k97, \ + k40, k41, k42, k43, ka0, ka1, ka2, ka3, k44, k45, k46, k47, k48, ka9, ka4, ka5, ka6, ka7, \ + k50, k51, k52, k53, kb4, kb7, ka8, kb8, kb9, kb5, kb6 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, KC_NO, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, KC_NO, KC_NO }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, KC_NO, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, KC_NO, KC_NO }, \ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, kb4, kb5, kb6, kb7, kb8, kb9 } \ +} + \ No newline at end of file diff --git a/keyboards/ash1800/config.h b/keyboards/ash1800/config.h new file mode 100644 index 000000000000..9f25a0f11641 --- /dev/null +++ b/keyboards/ash1800/config.h @@ -0,0 +1,253 @@ +/* +Copyright 2019 angelbirth + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1800 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hasyim Ashari +#define PRODUCT ASH-1800 +#define DESCRIPTION An attempt to make a cherry g80/g81 clone + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D0, D1, D2, D3, D5, D4, D6 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, B0, B2, B1, B3, B7, C7 } +#define UNUSED_PINS + +#define NUM_LOCK_LED_PIN E6 +#define CAPS_LOCK_LED_PIN F0 +#define SCROLL_LOCK_LED_PIN F7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ash1800/info.json b/keyboards/ash1800/info.json new file mode 100644 index 000000000000..102b78b0eef6 --- /dev/null +++ b/keyboards/ash1800/info.json @@ -0,0 +1,539 @@ +{ + "keyboard_name": "ASH-1800", + "maintainer": "angelbirth", + "width": 19.5, + "height": 7.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "label": "Esc", + "x": 0, + "y": 0 + }, + { + "label": "F1", + "x": 1.25, + "y": 0 + }, + { + "label": "F2", + "x": 2.25, + "y": 0 + }, + { + "label": "F3", + "x": 3.25, + "y": 0 + }, + { + "label": "F4", + "x": 4.25, + "y": 0 + }, + { + "label": "F5", + "x": 5.5, + "y": 0 + }, + { + "label": "F6", + "x": 6.5, + "y": 0 + }, + { + "label": "F7", + "x": 7.5, + "y": 0 + }, + { + "label": "F8", + "x": 8.5, + "y": 0 + }, + { + "label": "F9", + "x": 9.75, + "y": 0 + }, + { + "label": "F10", + "x": 10.75, + "y": 0 + }, + { + "label": "F11", + "x": 11.75, + "y": 0 + }, + { + "label": "F12", + "x": 12.75, + "y": 0 + }, + { + "label": "Insert", + "x": 15.5, + "y": 0 + }, + { + "label": "Home", + "x": 16.5, + "y": 0 + }, + { + "label": "PgUp", + "x": 17.5, + "y": 0 + }, + { + "label": "PrtSc", + "x": 18.5, + "y": 0 + }, + { + "label": "Del", + "x": 15.5, + "y": 1 + }, + { + "label": "End", + "x": 16.5, + "y": 1 + }, + { + "label": "PgDn", + "x": 17.5, + "y": 1 + }, + { + "label": "Scroll Lock", + "x": 18.5, + "y": 1 + }, + { + "label": "~", + "x": 0, + "y": 2 + }, + { + "label": "!", + "x": 1, + "y": 2 + }, + { + "label": "@", + "x": 2, + "y": 2 + }, + { + "label": "#", + "x": 3, + "y": 2 + }, + { + "label": "$", + "x": 4, + "y": 2 + }, + { + "label": "%", + "x": 5, + "y": 2 + }, + { + "label": "^", + "x": 6, + "y": 2 + }, + { + "label": "&", + "x": 7, + "y": 2 + }, + { + "label": "", + "x": 8, + "y": 2 + }, + { + "label": "(", + "x": 9, + "y": 2 + }, + { + "label": ")", + "x": 10, + "y": 2 + }, + { + "label": "_", + "x": 11, + "y": 2 + }, + { + "label": "+", + "x": 12, + "y": 2 + }, + { + "label": "Backspace", + "x": 13, + "y": 2, + "w": 2 + }, + { + "label": "Num Lock", + "x": 15.5, + "y": 2 + }, + { + "label": "/", + "x": 16.5, + "y": 2 + }, + { + "x": 17.5, + "y": 2 + }, + { + "label": "Pause", + "x": 18.5, + "y": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 3 + }, + { + "label": "W", + "x": 2.5, + "y": 3 + }, + { + "label": "E", + "x": 3.5, + "y": 3 + }, + { + "label": "R", + "x": 4.5, + "y": 3 + }, + { + "label": "T", + "x": 5.5, + "y": 3 + }, + { + "label": "Y", + "x": 6.5, + "y": 3 + }, + { + "label": "U", + "x": 7.5, + "y": 3 + }, + { + "label": "I", + "x": 8.5, + "y": 3 + }, + { + "label": "O", + "x": 9.5, + "y": 3 + }, + { + "label": "P", + "x": 10.5, + "y": 3 + }, + { + "label": "{", + "x": 11.5, + "y": 3 + }, + { + "label": "}", + "x": 12.5, + "y": 3 + }, + { + "label": "|", + "x": 13.5, + "y": 3, + "w": 1.5 + }, + { + "label": "7", + "x": 15.5, + "y": 3 + }, + { + "label": "8", + "x": 16.5, + "y": 3 + }, + { + "label": "9", + "x": 17.5, + "y": 3 + }, + { + "label": "-", + "x": 18.5, + "y": 3 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 4, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 4 + }, + { + "label": "S", + "x": 2.75, + "y": 4 + }, + { + "label": "D", + "x": 3.75, + "y": 4 + }, + { + "label": "F", + "x": 4.75, + "y": 4 + }, + { + "label": "G", + "x": 5.75, + "y": 4 + }, + { + "label": "H", + "x": 6.75, + "y": 4 + }, + { + "label": "J", + "x": 7.75, + "y": 4 + }, + { + "label": "K", + "x": 8.75, + "y": 4 + }, + { + "label": "L", + "x": 9.75, + "y": 4 + }, + { + "label": ":", + "x": 10.75, + "y": 4 + }, + { + "label": "\"", + "x": 11.75, + "y": 4 + }, + { + "label": "Enter", + "x": 12.75, + "y": 4, + "w": 2.25 + }, + { + "label": "4", + "x": 15.5, + "y": 4 + }, + { + "label": "5", + "x": 16.5, + "y": 4 + }, + { + "label": "6", + "x": 17.5, + "y": 4 + }, + { + "label": "+", + "x": 18.5, + "y": 4 + }, + { + "label": "Shift", + "x": 0, + "y": 5, + "w": 1.25 + }, + { + "label": "ISO1", + "x": 1.25, + "y": 5 + }, + { + "label": "Z", + "x": 2.25, + "y": 5 + }, + { + "label": "X", + "x": 3.25, + "y": 5 + }, + { + "label": "C", + "x": 4.25, + "y": 5 + }, + { + "label": "V", + "x": 5.25, + "y": 5 + }, + { + "label": "B", + "x": 6.25, + "y": 5 + }, + { + "label": "N", + "x": 7.25, + "y": 5 + }, + { + "label": "M", + "x": 8.25, + "y": 5 + }, + { + "label": "<", + "x": 9.25, + "y": 5 + }, + { + "label": ">", + "x": 10.25, + "y": 5 + }, + { + "label": "?", + "x": 11.25, + "y": 5 + }, + { + "label": "Shift", + "x": 12.25, + "y": 5, + "w": 1.75 + }, + { + "label": "up", + "x": 14.25, + "y": 5.25 + }, + { + "label": "1", + "x": 15.5, + "y": 5 + }, + { + "label": "2", + "x": 16.5, + "y": 5 + }, + { + "label": "3", + "x": 17.5, + "y": 5 + }, + { + "label": "Enter", + "x": 18.5, + "y": 5, + "h": 2 + }, + { + "label": "Ctrl", + "x": 0, + "y": 6, + "w": 1.25 + }, + { + "label": "OS", + "x": 1.25, + "y": 6, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 6, + "w": 1.25 + }, + { + "x": 3.75, + "y": 6, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 6, + "w": 1.5 + }, + { + "label": "Ctrl", + "x": 11.5, + "y": 6, + "w": 1.5 + }, + { + "label": "left", + "x": 13.25, + "y": 6.25 + }, + { + "label": "down", + "x": 14.25, + "y": 6.25 + }, + { + "label": "right", + "x": 15.25, + "y": 6.25 + }, + { + "label": "0", + "x": 16.5, + "y": 6 + }, + { + "label": ".", + "x": 17.5, + "y": 6 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/ash1800/keymaps/default/keymap.c b/keyboards/ash1800/keymaps/default/keymap.c new file mode 100644 index 000000000000..f1b52b14d6fd --- /dev/null +++ b/keyboards/ash1800/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 angelbirth + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_INS, KC_HOME, KC_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, MO(1), + 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_P7, KC_P8, KC_P9, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_BSLS, 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______ + ), +}; diff --git a/keyboards/ash1800/keymaps/default/readme.md b/keyboards/ash1800/keymaps/default/readme.md new file mode 100644 index 000000000000..de61a6971329 --- /dev/null +++ b/keyboards/ash1800/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ash1800 diff --git a/keyboards/ash1800/readme.md b/keyboards/ash1800/readme.md new file mode 100644 index 000000000000..93257e755e62 --- /dev/null +++ b/keyboards/ash1800/readme.md @@ -0,0 +1,15 @@ +# ash1800 + +![ash1800](https://i.imgur.com/YP173rP.jpg) + +ASH-1800 is an attempt to make a cheap g80/g81 clone. + +* Keyboard Maintainer: [angelbirth](https://github.com/angelbirth) +* Hardware Supported: ASH-1800, ATMega32u4 +* Hardware Availability: private GB + +Make example for this keyboard (after setting up your build environment): + + make ash1800:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ash1800/rules.mk b/keyboards/ash1800/rules.mk new file mode 100644 index 000000000000..b4f1dacac836 --- /dev/null +++ b/keyboards/ash1800/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +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 From 831696611aaa000330f14ef35df02e163dbc548d Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 19 Nov 2019 18:02:23 -0800 Subject: [PATCH 025/226] [Keyboard] dz60rgb_wkl malposition fix (#7418) fix malposition combile in config.qmk.fm --- keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h | 4 ++-- .../dz60rgb_wkl/keymaps/default/keymap.c | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h index f017b94cb576..46b07fdb0de9 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h @@ -2,9 +2,9 @@ #define XXX KC_NO #include "quantum.h" #define LAYOUT_HHKB( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D,\ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,\ K40, K41, K42, K45, K4A, K4B, K4D \ ) { \ diff --git a/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c index f2de98df028a..c7e69a5be07e 100644 --- a/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c @@ -6,22 +6,22 @@ #define _LAYER4 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT_HHKB( /* Base */ - KC_GESC, 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_GESC, 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_DEL, 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, - CTL_T(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_DEL, KC_ENT, + CTL_T(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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_RCTL), [_LAYER1] = LAYOUT_HHKB( /* FN */ - KC_GRAVE, 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_TRNS, - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,\ - KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, KC_TRNS,\ + KC_GRAVE, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_LAYER2] = LAYOUT_HHKB( /* FN2 */ - KC_TRNS, 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_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, 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_TRNS, + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; void matrix_init_user(void) { From 8725f37de7b7b3aa8a13fadaa2e5746a08781f9f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Nov 2019 16:17:08 +1100 Subject: [PATCH 026/226] [Keymap] Update to qwerty_code_friendly (#7416) - Move space to thumb cluster. - Make L1 and L2 symmetrical. - Add App & Menu keys. --- .../ergodox/qwerty_code_friendly/keymap.c | 74 ++++++++++--------- .../ergodox/qwerty_code_friendly/readme.md | 28 ++++--- 2 files changed, 58 insertions(+), 44 deletions(-) diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index f2aa255a4c22..bf20e76a5371 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -24,34 +24,37 @@ #define CFQ_USE_DYNAMIC_MACRO - #if !defined(CFQ_USER_KEY0) -# define CFQ_USER_KEY0 KC_BSPC +# define CFQ_USER_KEY0 KC_APP #endif #if !defined(CFQ_USER_KEY1) -# define CFQ_USER_KEY1 CFQ_KC_FN1 +# define CFQ_USER_KEY1 KC_MENU #endif #if !defined(CFQ_USER_KEY2) -# define CFQ_USER_KEY2 KC_INS +# define CFQ_USER_KEY2 KC_BSPC #endif #if !defined(CFQ_USER_KEY3) -# define CFQ_USER_KEY3 KC_NLCK +# define CFQ_USER_KEY3 KC_DEL #endif #if !defined(CFQ_USER_KEY4) -# define CFQ_USER_KEY4 KC_BSPC +# define CFQ_USER_KEY4 KC_SPC #endif #if !defined(CFQ_USER_KEY5) -# define CFQ_USER_KEY5 KC_DEL +# define CFQ_USER_KEY5 CFQ_KC_FN1 #endif #if !defined(CFQ_USER_KEY6) # define CFQ_USER_KEY6 KC_CAPS #endif #if !defined(CFQ_USER_KEY7) -# define CFQ_USER_KEY7 CFQ_KC_FN3 +# define CFQ_USER_KEY7 KC_INS #endif #if !defined(CFQ_USER_KEY8) # define CFQ_USER_KEY8 KC_DEL #endif +#if !defined(CFQ_USER_KEY9) +# define CFQ_USER_KEY9 KC_BSPC +#endif + #ifdef CFQ_USE_80_KEYS # define LAYOUT_ergodox_76_or_80 LAYOUT_ergodox_80 @@ -240,10 +243,10 @@ static char cfq_word_lut_title_caps[ sizeof(CFQ_WORD_Y) + sizeof(CFQ_WORD_Z) ]; -#define LAYER_BASE 0 /* default layer */ -#define LAYER_KPAD 1 /* keypad */ -#define LAYER_MDIA 2 /* media keys */ -#define LAYER_FKEY 3 /* F-Keys & Words */ +#define LAYER_BASE 0 /* Default Layer. */ +#define LAYER_KPAD 1 /* Keypad, Bracket Pairs & Macro Record. */ +#define LAYER_FKEY 2 /* Function Keys, Media & Mouse Keys. */ +#define LAYER_WORD 3 /* Entire Words (one for each key) & Numbers. */ enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, /* can always be here */ @@ -307,20 +310,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - * | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del | + * | LCtl |Super | Alt | App | Menu | | Left | Down | Up |Right | Del | * '----------------------------------' '----------------------------------' * .-------------. .-------------. - * | Ins |NumClk| | Home | End | + * |BSpace| Del | | Home | End | * .------+------+------| |------+------+------. * | | |CapsLk| | PgUp | | | - * |BSpace| Del |------| |------| ~L2 |Enter | - * | | | ~L3 | | PgDn | | | + * |Space | ~L1 |------| |------| ~L2 |Enter | + * | | |Insert| | PgDn | | | * '--------------------' '--------------------' * * Optional overrides: see CFQ_USER_KEY# defines. - * * .--------------------------------------------------. .--------------------------------------------------. - * | | | | | | | | | | | | | | | USR0 | + * | | | | | | | | | | | | | | | USR9 | * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -328,7 +330,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - * | | | | USR1 | | | | | | | USR8 | + * | | | | USR0 | USR1 | | | | | | USR8 | * '----------------------------------' '----------------------------------' * .-------------. .-------------. * | USR2 | USR3 | | | | @@ -347,12 +349,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, - KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY1, KC_SPC, + KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY0, CFQ_USER_KEY1, CFQ_USER_KEY2, CFQ_USER_KEY3, K80(L0K0), K80(L0K1), CFQ_USER_KEY6, CFQ_USER_KEY4, CFQ_USER_KEY5, CFQ_USER_KEY7, /* right hand */ - KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, CFQ_USER_KEY0, + KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, CFQ_USER_KEY9, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, @@ -361,7 +363,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, K80(L0K2), K80(L0K3), KC_PGDN, CFQ_KC_FN2, KC_ENT ), -/* Keymap 1: KeyPad, Macro Record +/* Keymap 1: Keypad, Bracket Pairs & Macro Record * * .--------------------------------------------------. .--------------------------------------------------. * | | | | | | | {} | | }{ | |NumLck| / | * | - | | @@ -377,12 +379,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .-------------. .-------------. * |Start1|Start2| | | | * .------+------+------| |------+------+------. - * | | | Stop | | | | | - * |Play1 |Play2 |------| |------| | | - * | | | | | | | | + * | | |Play1 | | | | | + * | Stop | |------| |------| | | + * | | |Play2 | | | | | * '--------------------' '--------------------' */ -/* KEYPAD & MACRO */ [LAYER_KPAD] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_CBR, @@ -391,8 +392,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_ANG, M_BRACKET_IN_BRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, - K80(L1K0), K80(L1K1), DYN_REC_STOP, - DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_TRNS, + K80(L1K0), K80(L1K1), DYN_MACRO_PLAY1, + DYN_REC_STOP, KC_TRNS, DYN_MACRO_PLAY2, /* right hand */ M_BRACKET_OUT_CBR, KC_TRNS, KC_NLCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, M_BRACKET_OUT_PRN, M_ARROW_LEQL, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, @@ -403,7 +404,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, K80(L1K2), K80(L1K3), KC_TRNS, KC_TRNS, KC_TRNS ), -/* Keymap 2: FKeys, media & mouse keys +/* Keymap 2: Function Keys, Media & Mouse Keys * * .--------------------------------------------------. .--------------------------------------------------. * | | | | | | | | | Mute | | F10 | F11 | F12 | | | @@ -424,8 +425,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | MNxt | | | * '--------------------' '--------------------' */ -/* MEDIA, MOUSE & NUMBERS */ -[LAYER_MDIA] = LAYOUT_ergodox_76_or_80( +[LAYER_FKEY] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_WH_U, @@ -446,6 +446,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MNXT, KC_TRNS, KC_MPLY ), /* Keymap 3: Entire Words (one for each key) & Numbers + * + * Activate by holding L1 & L2. * * .--------------------------------------------------. .--------------------------------------------------. * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | @@ -466,9 +468,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * '--------------------' '--------------------' */ - -/* FKEY & WORDS */ -[LAYER_FKEY] = LAYOUT_ergodox_76_or_80( +[LAYER_WORD] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, M_WORD_Q, M_WORD_W, M_WORD_E, M_WORD_R, M_WORD_T, KC_TRNS, @@ -490,6 +490,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +uint32_t layer_state_set_user(uint32_t state) { + /* Use layer 3 when 1 & 2 are pressed. */ + state = update_tri_layer_state(state, LAYER_KPAD, LAYER_FKEY, LAYER_WORD); + return state; +} + #define WITHOUT_MODS(...) \ do { \ uint8_t _real_mods = get_mods(); \ diff --git a/layouts/community/ergodox/qwerty_code_friendly/readme.md b/layouts/community/ergodox/qwerty_code_friendly/readme.md index 319ea50b9a33..e615fa28f077 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/readme.md +++ b/layouts/community/ergodox/qwerty_code_friendly/readme.md @@ -61,20 +61,20 @@ using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make. |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del | + | LCtl |Super | Alt | App | Menu | | Left | Down | Up |Right | Del | '----------------------------------' '----------------------------------' .-------------. .-------------. - | Ins |NumClk| | Home | End | + |BSpace| Del | | Home | End | .------+------+------| |------+------+------. | | |CapsLk| | PgUp | | | - |BSpace| Del |------| |------| ~L2 |Enter | - | | | ~L3 | | PgDn | | | + |Space | ~L1 |------| |------| ~L2 |Enter | + | | |Insert| | PgDn | | | '--------------------' '--------------------' Optional overrides: see CFQ_USER_KEY# defines. .--------------------------------------------------. .--------------------------------------------------. -| | | | | | | | | | | | | | | USR0 | +| | | | | | | | | | | | | | | USR9 | |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| | | | | | | | | | | | | | | | | |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -82,7 +82,7 @@ Optional overrides: see CFQ_USER_KEY# defines. |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | | | | | | | | | | | | | | | | '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' - | | | | USR1 | | | | | | | USR8 | + | | | | USR0 | USR1 | | | | | | USR8 | '----------------------------------' '----------------------------------' .-------------. .-------------. | USR2 | USR3 | | | | @@ -93,7 +93,7 @@ Optional overrides: see CFQ_USER_KEY# defines. '--------------------' '--------------------' ``` -## Keymap 1: KeyPad, Macro Record +## Keymap 1: KeyPad, Bracket Pairs & Macro Record Notes: @@ -115,9 +115,9 @@ Notes: .-------------. .-------------. |Start1|Start2| | | | .------+------+------| |------+------+------. - | | | Stop | | | | | - |Play1 |Play2 |------| |------| | | - | | | | | | | | + | | |Play1 | | | | | + | Stop | |------| |------| | | + | | |Play2 | | | | | '--------------------' '--------------------' ``` @@ -146,6 +146,8 @@ Notes: ## Keymap 3: User Defined Words & Numbers +Activate by holding L1 & L2. + This is for assigning whole words to single keys. You can define the arguments (which must be quoted) using: `CFQ_WORD_[A-Z]` eg: `-DCFQ_WORD_E=\"my@email.com\"` @@ -178,6 +180,12 @@ Notes: ## Changelog +- 2019/11/20 + Move space to thumb cluster + Make L1 and L2 symmetrical. + Activate L3 by holding L1 & L2. + Add App & Menu keys. + - 2018/10/19 Move F-Keys to key-pad like layout. From acd02e4469ac2befd981da8349a05ef7e2c949fa Mon Sep 17 00:00:00 2001 From: ashpil Date: Tue, 19 Nov 2019 22:06:16 -0800 Subject: [PATCH 027/226] [Keyboard] Add support for Model M USB C Controller (#7393) * added usb c model m * added readme * Update keyboards/ashpil/modelm_usbc/rules.mk * Update keyboards/ashpil/modelm_usbc/rules.mk * Update keyboards/ashpil/modelm_usbc/rules.mk * Update keyboards/ashpil/modelm_usbc/rules.mk * Update keyboards/ashpil/modelm_usbc/rules.mk * Update keyboards/ashpil/modelm_usbc/rules.mk * cleaned up code * removed combo from keymap * added reset to default * Update keyboards/ashpil/modelm_usbc/rules.mk * bootmagic and simplifying default * Update rules.mk * removed duplicates * updated readme * Update keyboards/ashpil/modelm_usbc/README.md * Update modelm_usbc.h * Update keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c * Update keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c * Update keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c * full support for either ANSI or ISO * Update keyboards/ashpil/modelm_usbc/info.json * Update keyboards/ashpil/modelm_usbc/info.json * Update keyboards/ashpil/modelm_usbc/info.json * Resize the ISO Enter key * ANSI Enter and Left Shift keys resize --- keyboards/ashpil/modelm_usbc/README.md | 14 ++ keyboards/ashpil/modelm_usbc/config.h | 128 ++++++++++++++++++ keyboards/ashpil/modelm_usbc/info.json | 15 ++ .../modelm_usbc/keymaps/ashpil/config.h | 24 ++++ .../modelm_usbc/keymaps/ashpil/keymap.c | 47 +++++++ .../modelm_usbc/keymaps/ashpil/rules.mk | 1 + .../modelm_usbc/keymaps/default/keymap.c | 27 ++++ keyboards/ashpil/modelm_usbc/modelm_usbc.c | 35 +++++ keyboards/ashpil/modelm_usbc/modelm_usbc.h | 64 +++++++++ keyboards/ashpil/modelm_usbc/rules.mk | 33 +++++ 10 files changed, 388 insertions(+) create mode 100644 keyboards/ashpil/modelm_usbc/README.md create mode 100644 keyboards/ashpil/modelm_usbc/config.h create mode 100644 keyboards/ashpil/modelm_usbc/info.json create mode 100644 keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h create mode 100644 keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c create mode 100644 keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk create mode 100644 keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c create mode 100644 keyboards/ashpil/modelm_usbc/modelm_usbc.c create mode 100644 keyboards/ashpil/modelm_usbc/modelm_usbc.h create mode 100644 keyboards/ashpil/modelm_usbc/rules.mk diff --git a/keyboards/ashpil/modelm_usbc/README.md b/keyboards/ashpil/modelm_usbc/README.md new file mode 100644 index 000000000000..261d97ab4906 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/README.md @@ -0,0 +1,14 @@ +# USB C Model M + +![modelm_usbc](https://raw.githubusercontent.com/ashpil/Model-M-Type-C-Controller/master/images/render.png) + +This is a configuration of QMK intended to be used with the [USB C Model M alt controller](https://github.com/ashpil/Model-M-Type-C-Controller "USB C Model M alt controller"). Many thanks to iw0rm3r for working on a similar project and providing the foundation for this! + +* Keyboard Maintainer: [ashpil](https://github.com/ashpil) +* Hardware Supported: [USB C Model M alt controller](https://github.com/ashpil/Model-M-Type-C-Controller) + +Make example for this keyboard (after setting up your build environment): + + make ashpil/modelm_usbc:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ashpil/modelm_usbc/config.h b/keyboards/ashpil/modelm_usbc/config.h new file mode 100644 index 000000000000..df4ed32277ff --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/config.h @@ -0,0 +1,128 @@ +/* +Copyright 2019 ashpil + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ashpil +#define PRODUCT IBM Model M 101/102 +#define DESCRIPTION Controlled by AVR chip + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C7, C6, C5, C4, C3, C2, C1, C0 } +#define MATRIX_COL_PINS { E6, E7, F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#define DEBOUNCE 5 + + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 2 \ No newline at end of file diff --git a/keyboards/ashpil/modelm_usbc/info.json b/keyboards/ashpil/modelm_usbc/info.json new file mode 100644 index 000000000000..e24a27f200a3 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "IBM Model M 101 ANSI/102 ISO", + "url": "https://github.com/ashpil/qmk_firmware/tree/master/keyboards/ashpil/modelm_usbc", + "maintainer": "ashpil", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_iso_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + }, + "LAYOUT_fullsize_ansi_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h new file mode 100644 index 000000000000..d5cef677e8c2 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 ashpil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here + + +/* Add combos */ +#define COMBO_COUNT 1 +#define COMBO_TERM 200 diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c new file mode 100644 index 000000000000..35b45e9ccf8c --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 ashpil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fullsize_ansi_wkl( /* Base layer */ + 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_PSCR, KC_SLCK, KC_PAUS, + 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_BSPC, KC_MEDIA_PLAY_PAUSE, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), +}; + +enum combo_events { + CTRL_PAUS_RESET, +}; + +const uint16_t PROGMEM reset_combo[] = {KC_LCTL, KC_PAUS, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [CTRL_PAUS_RESET] = COMBO_ACTION(reset_combo), +}; + +void process_combo_event(uint8_t combo_index, bool pressed) { + switch(combo_index) { + case CTRL_PAUS_RESET: + if (pressed) { + reset_keyboard(); + } + break; + } +} \ No newline at end of file diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk new file mode 100644 index 000000000000..23b7c173b8b3 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes # Reset combo \ No newline at end of file diff --git a/keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c new file mode 100644 index 000000000000..5bf60cf55836 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 ashpil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fullsize_ansi_wkl( /* Base layer */ + 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_PSCR, KC_SLCK, KC_PAUS, + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), +}; diff --git a/keyboards/ashpil/modelm_usbc/modelm_usbc.c b/keyboards/ashpil/modelm_usbc/modelm_usbc.c new file mode 100644 index 000000000000..e505c72233ba --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/modelm_usbc.c @@ -0,0 +1,35 @@ +/* Copyright 2019 ashpil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "modelm_usbc.h" + +void keyboard_pre_init_kb(void) { + /* Setting status LEDs pins to output and +5V (off) */ + setPinOutput(D5); + setPinOutput(D6); + setPinOutput(D7); + writePinHigh(D5); + writePinHigh(D6); + writePinHigh(D7); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, !led_state.num_lock); + writePin(D6, !led_state.caps_lock); + writePin(D7, !led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/ashpil/modelm_usbc/modelm_usbc.h b/keyboards/ashpil/modelm_usbc/modelm_usbc.h new file mode 100644 index 000000000000..da50b865c73d --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/modelm_usbc.h @@ -0,0 +1,64 @@ +/* Copyright 2019 ashpil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +#define LAYOUT_fullsize_ansi_wkl( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, K2O, K2P, K2Q, \ + K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ + { KC_NO, KC_NO, K5A, KC_NO, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ + { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ + { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ + { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ + { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ + { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ + { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, KC_NO, K4R, K4S, K4T, K5P, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D } \ +} + +#define LAYOUT_fullsize_iso_wkl( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ + { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ + { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ + { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ + { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ + { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ + { KC_NO, KC_NO, K2B, K2C, K2D, K2E, KC_NO, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ + { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D } \ +} diff --git a/keyboards/ashpil/modelm_usbc/rules.mk b/keyboards/ashpil/modelm_usbc/rules.mk new file mode 100644 index 000000000000..2b2e83c65d06 --- /dev/null +++ b/keyboards/ashpil/modelm_usbc/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +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 \ No newline at end of file From 3b9a139c0768069aea87aad0bea329acfe6fac67 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Wed, 20 Nov 2019 22:48:05 +0900 Subject: [PATCH 028/226] fix feature_advanced_keycodes.md's link (#7421) docs/feature_advanced_keycodes.md has: ``` [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) ``` change to: ``` [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) ``` --- docs/feature_advanced_keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index f748ccd70c2f..e73258d51191 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -15,7 +15,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it mo ## Caveats -Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. +Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two. From b90edb75a3540a9efa9fb2e37a5a610163d889a4 Mon Sep 17 00:00:00 2001 From: kuchosauronad0 <22005492+kuchosauronad0@users.noreply.github.com> Date: Wed, 20 Nov 2019 12:02:56 -0800 Subject: [PATCH 029/226] [Docs] Start of German translation of documentation (#6909) * Initial commit * Fix links so that they point to the german translation * minor changes to the wording of some sentences * correctly capitalize second person pronouns * Fix links so that they point to the german translation * minor changes to the wording of some sentences * correctly capitalize second person pronouns * Translate newbs_learn_more_resources.md * Clear up some phrases * Add newbs_building_firmware.md, fix spelling * Add newbs_building_firmware.md, fix spelling * Update docs/de/_summary.md Danke * Update docs/de/README.md * Update docs/de/_summary.md Ich wollte es kuerzer halten damit die Navigationsleiste nicht zu breit wird, aber das ist halt die deutsche Sprache :) * Update docs/de/newbs.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs.md * Update docs/de/newbs_learn_more_resources.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs.md * Update docs/de/newbs.md * Update docs/de/newbs.md * Update docs/de/README.md * Update docs/de/README.md * Update docs/de/README.md * Update docs/de/README.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_learn_more_resources.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_learn_more_resources.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_learn_more_resources.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_getting_started.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Update docs/de/newbs_building_firmware.md * Apply suggestions from code review * Add translation of newbs_flashing.md * Apply suggestions from code review Danke * Add translation of Zadig-guide * Translate newbs_testing_debugging.md to german Co-Authored-By: Max Rumpf Co-Authored-By: geisterfurz007 --- docs/de/README.md | 33 +++ docs/de/_summary.md | 121 +++++++++ docs/de/driver_installation_zadig.md | 47 ++++ docs/de/newbs.md | 22 ++ docs/de/newbs_building_firmware.md | 78 ++++++ docs/de/newbs_flashing.md | 369 ++++++++++++++++++++++++++ docs/de/newbs_getting_started.md | 101 +++++++ docs/de/newbs_learn_more_resources.md | 14 + docs/de/newbs_testing_debugging.md | 100 +++++++ 9 files changed, 885 insertions(+) create mode 100644 docs/de/README.md create mode 100644 docs/de/_summary.md create mode 100644 docs/de/driver_installation_zadig.md create mode 100644 docs/de/newbs.md create mode 100644 docs/de/newbs_building_firmware.md create mode 100644 docs/de/newbs_flashing.md create mode 100644 docs/de/newbs_getting_started.md create mode 100644 docs/de/newbs_learn_more_resources.md create mode 100644 docs/de/newbs_testing_debugging.md diff --git a/docs/de/README.md b/docs/de/README.md new file mode 100644 index 000000000000..88239d45d49d --- /dev/null +++ b/docs/de/README.md @@ -0,0 +1,33 @@ +# Quantum Mechanical Keyboard Firmware + +[![Aktuelle Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## Was ist QMK Firmware? + +QMK (*Quantum Mechanical Keyboard*) ist eine Open-Source-Community, welche die QMK-Firmware, die QMK-Toolbox, [qmk.fm](https://qmk.fm) und diese Dokumententation betreut. QMK-Firmware ist eine Weiterentwicklung der [tmk\_keyboard](http://github.com/tmk/tmk_keyboard)-Tastatur-Firmware mit vielen nützlichen Zusatzfunktionen für Atmel AVR-Prozessoren. Ursprünglich wurde sie für Produkte von [OLKB](http://olkb.com), das [ErgoDox EZ](http://www.ergodox-ez.com) und das [Clueboard](http://clueboard.co/) entwickelt. Im Laufe der Zeit wurde sie mit Hilfe von [ChibiOS](http://chibios.org) auch für die ARM-Architektur angepasst. Außerdem ist es inzwischen möglich, auch handverdrahtete Tastaturen und selbst geätzte PCBs mit QMK zu verwenden. + +## Bezugsquelle für QMK + +Wenn Du vorhast, deine Tastatur, Tastaturbelegung oder Features zu QMK beizusteuern, geht das am einfachsten, indem Du das [Repository auf Github](https://github.com/qmk/qmk_firmware#fork-destination-box) forkst, die Änderungen in deinem lokalen Repo vornimmst und anschließend einen [Pull Request](https://github.com/qmk/qmk_firmware/pulls) einreichst. + +Ansonsten kannst Du es als [zip](https://github.com/qmk/qmk_firmware/zipball/master) oder [tar](https://github.com/qmk/qmk_firmware/tarball/master) herunterladen, oder es direkt via git klonen (`git clone git@github.com:qmk/qmk_firmware.git` bzw. `git clone https://github.com/qmk/qmk_firmware.git`). + + +## Anleitung fürs Kompilieren + +Bevor Du in der Lage bist, die Firmware zu kompilieren, musst Du eine [Entwicklungsumgebung](de/getting_started_build_tools.md) für AVR und/oder ARM aufsetzen. Danach kannst Du mit dem `make` Befehl eine Keymap für deine Tastatur erzeugen. Die Notation dafür ist: + + make planck/rev4:default + +Dies generiert die Revision `rev4` für eine Tastatur vom Type `planck` mit der `default` Tastaturbelegung. Nicht alle Tastaturen haben Revisionen (auch bekannt als Subprojekt oder Unterordner) weswegen dies auch ausgelassen werden kann: + + make preonic:default + +## Möglichkeiten der Anpassung + +QMK hat viele [Features](de/features.md), die es zu entdecken gibt. In der [Dokumentation](https://docs.qmk.fmk) kannst Du Dir einen Überblick verschaffen. Die meisten Features basieren darauf, die [Tastaturbelegung](de/keymap.md) anzupassen und das Verhalten der [Keycodes](de/keycodes.md) zu verändern. diff --git a/docs/de/_summary.md b/docs/de/_summary.md new file mode 100644 index 000000000000..37768355f218 --- /dev/null +++ b/docs/de/_summary.md @@ -0,0 +1,121 @@ +* [Anleitung für Anfänger](de/newbs.md) + * [Erste Schritte](de/newbs_getting_started.md) + * [Die erste Firmware](de/newbs_building_firmware.md) + * [Firmware flashen](de/newbs_flashing.md) + * [Testen und Debuggen](de/newbs_testing_debugging.md) + * [Git Tips und Tricks](de/newbs_best_practices.md) + * [Hilfreiche Ressourcen](de/newbs_learn_more_resources.md) + +* [QMK Basics](de/README.md) + * [QMK Einführung](de/getting_started_introduction.md) + * [QMK CLI](de/cli.md) + * [QMK CLI Konfiguration](de/cli_configuration.md) + * [Zu QMK beitragen](de/contributing.md) + * [Anleitung für Github](de/getting_started_github.md) + * [Nach Hilfe fragen](de/getting_started_getting_help.md) + +* [Breaking Changes](de/breaking_changes.md) + * [2019 Aug 30](de/ChangeLog/20190830.md) + +* [FAQ](de/faq.md) + * [Häufige Fragen](de/faq_general.md) + * [Build/Kompilieren](de/faq_build.md) + * [Debugging/Troubleshooting](de/faq_debug.md) + * [Keymap](de/faq_keymap.md) + * [Treiber Installation mit Zadig](de/driver_installation_zadig.md) + +* Detailierte Guides + * [Build Tools installieren](de/getting_started_build_tools.md) + * [Vagrant Guide](de/getting_started_vagrant.md) + * [Build/Compile Anleitung](de/getting_started_make_guide.md) + * [Firmware flashen](de/flashing.md) + * [Funktionalität anpassen](de/custom_quantum_functions.md) + * [Keymap Überblick](de/keymap.md) + +* [Hardware](de/hardware.md) + * [AVR Prozessoren](de/hardware_avr.md) + * [Treiber](de/hardware_drivers.md) + +* Referenz + * [Tastatur Richtlinien](de/hardware_keyboard_guidelines.md) + * [Konfigurations Optionen](de/config_options.md) + * [Keycodes](de/keycodes.md) + * [Coding Konventionen - C](de/coding_conventions_c.md) + * [Coding Konventionen - Python](de/coding_conventions_python.md) + * [Dokumentations Best Practices](de/documentation_best_practices.md) + * [Dokumentations Templates](de/documentation_templates.md) + * [Glossar](de/reference_glossary.md) + * [Unit Testing](de/unit_testing.md) + * [Nützliche Funktionen](de/ref_functions.md) + * [Configurator Support](de/reference_configurator_support.md) + * [info.json Format](de/reference_info_json.md) + * [Python CLI Development](de/cli_development.md) + +* [Features](de/features.md) + * [Basic Keycodes](de/keycodes_basic.md) + * [US ANSI Shifted Keys](de/keycodes_us_ansi_shifted.md) + * [Quantum Keycodes](de/quantum_keycodes.md) + * [Advanced Keycodes](de/feature_advanced_keycodes.md) + * [Audio](de/feature_audio.md) + * [Auto Shift](de/feature_auto_shift.md) + * [Backlight](de/feature_backlight.md) + * [Bluetooth](de/feature_bluetooth.md) + * [Bootmagic](de/feature_bootmagic.md) + * [Combos](de/feature_combo.md) + * [Command](de/feature_command.md) + * [Debounce API](de/feature_debounce_type.md) + * [DIP Switch](de/feature_dip_switch.md) + * [Dynamic Macros](de/feature_dynamic_macros.md) + * [Encoders](de/feature_encoders.md) + * [Grave Escape](de/feature_grave_esc.md) + * [Haptic Feedback](de/feature_haptic_feedback.md) + * [HD44780 LCD Controller](de/feature_hd44780.md) + * [Key Lock](de/feature_key_lock.md) + * [Layouts](de/feature_layouts.md) + * [Leader Key](de/feature_leader_key.md) + * [LED Matrix](de/feature_led_matrix.md) + * [Macros](de/feature_macros.md) + * [Mouse Keys](de/feature_mouse_keys.md) + * [OLED Driver](de/feature_oled_driver.md) + * [One Shot Keys](de/feature_advanced_keycodes.md#one-shot-keys) + * [Pointing Device](de/feature_pointing_device.md) + * [PS/2 Mouse](de/feature_ps2_mouse.md) + * [RGB Lighting](de/feature_rgblight.md) + * [RGB Matrix](de/feature_rgb_matrix.md) + * [Space Cadet](de/feature_space_cadet.md) + * [Split Keyboard](de/feature_split_keyboard.md) + * [Stenography](de/feature_stenography.md) + * [Swap Hands](de/feature_swap_hands.md) + * [Tap Dance](de/feature_tap_dance.md) + * [Terminal](de/feature_terminal.md) + * [Thermal Printer](de/feature_thermal_printer.md) + * [Unicode](de/feature_unicode.md) + * [Userspace](de/feature_userspace.md) + * [Velocikey](de/feature_velocikey.md) + +* Für Maker und Modder + * [Hand Wiring Guide](de/hand_wire.md) + * [ISP Flashing Guide](de/isp_flashing_guide.md) + * [ARM Debugging Guide](de/arm_debugging.md) + * [I2C Driver](de/i2c_driver.md) + * [GPIO Controls](de/internals_gpio_control.md) + * [Proton C Conversion](de/proton_c_conversion.md) + +* Für ein tieferes Verständnis + * [Wie Tastaturen funktionieren](de/how_keyboards_work.md) + * [QMK verstehen](de/understanding_qmk.md) + +* Andere Themen + * [Eclipse mit QMK](de/other_eclipse.md) + * [VSCode mit QMK](de/other_vscode.md) + * [Support](de/support.md) + * [Übersetzungen](de/translating.md) + +* QMK Internals (de/In Progress) + * [Defines](de/internals_defines.md) + * [Input Callback Reg](de/internals_input_callback_reg.md) + * [Midi Device](de/internals_midi_device.md) + * [Midi Device Setup Process](de/internals_midi_device_setup_process.md) + * [Midi Util](de/internals_midi_util.md) + * [Send Functions](de/internals_send_functions.md) + * [Sysex Tools](de/internals_sysex_tools.md) diff --git a/docs/de/driver_installation_zadig.md b/docs/de/driver_installation_zadig.md new file mode 100644 index 000000000000..bd04e05430b4 --- /dev/null +++ b/docs/de/driver_installation_zadig.md @@ -0,0 +1,47 @@ +# Bootloader Treiber Installation mit Zadig + +QMK erscheint für den Host als normales HID Eingabegerät und benötigt deshalb keine zusätzlichen Treiber. Der Bootloader, den Du für das Flashen der Firmware benötigst, jedoch meistens schon. + +Hierzu gibt es zwei Ausnahmen: den Caterina Bootloader, meistens auf Pro Micros, sowie den HalfKay Bootloader auf PJRC Teensys. Diese erscheinen als serieller Port und als generisches HID Gerät und benötigen keine Treiber. + +Wir empfehlen deshalb [Zadig](https://zadig.akeo.ie/). Wenn Du die Entwicklungsumgebung mit MSYS2 oder WSL installiert hast, wird dich dass `qmk_install.sh` Skript gefragt haben, ob es die Treiber für dich installieren sollte. + +## Installation + +Versetze deine Tastatur in den Bootloader-Modus, entweder durch Betätigung des physischen `RESET` Schalters - meist auf der Unterseite der Platine - oder durch das Auslösen des Key-Codes `RESET` bzw. `KC_RESET` (sollte in der zur Tastatur gehörigen `keycode.c` zu entnehmen sein). Sollte deine Tastatur weder noch besitzen, versuche es damit die `Escape`-Taste oder `Leertaste + B` zu halten während Du die Tastatur mit dem PC verbindest (Siehe auch [Bootmagic](de/feature_bootmagic.md) für weitere Details). Ein paar Tastaturen benutzen das [Command](de/feature_command.md)-Feature an Stelle von Bootmagic; in diesem Fall kannst du mit den Tastenkombinationen `linkes Shift + rechtes Shift + B` oder `linkes Shift + rechtes Shift + Escape` zu jeder Zeit in den Bootloader wechseln solange die Tastatur verbunden ist. + +Eingie Tastaturen haben u.U. spezielle Anweisungen um in den Bootloader-Modus zu gelangen. Zum Beispiel kann die [Bootmagic-Lite](de/feature_bootmagic.md#bootmagic-lite)-Taste (default: Escape) auf eine andere Taste gemappt sein; oder die magische Kombination (default: linkes Shift+rechtes Shift) verwendet anstatt Shift die STRG-Tasten. Die zur Tastatur gehörige README sollte dir Aufschluss darüber geben wie der Bootloader-Modus ausgelöst werden kann wenn Du unsicher bist. + +Um ein Gerät mit USBaspLoader in den Bootloader-Modus zu versetzen, halte `BOOT` gedrückt während Du den `RESET`-Knopf drückst. +Alternativ, halte `BOOT` gedrückt während Du das USB-Kabel einsteckst. + +Zadig sollte das Bootloader-Gerät automatisch erkennen. Manchmal musst Du zusätzlich noch **Options → List All Devices** auswählen. + + - Tastaturen mit Atmel AVR MCUs sollten als `ATm32U4DFU` (oder ähnlich) angezeigt werden, mit der Vendor ID `03EB`. + - USBasp werden als `USBasp` angezeigt, mit VID/PID `16C0:05DC`. + - Tastaturen AVR controller und dem QMK-DFU Bootloader haben den namen ` Bootloader` und die VID `03EB`. + - Die meisten ARM Tastaturen werden als `STM32 BOOTLOADER` angezeigt, mit VID/PID `0483:DF11`. + +!> Sollte Zadig ein oder mehrere Geräte mit `HidUsb`-Treiber anzeigen, dann ist deine Tastatur wahrscheinlich nicht im Bootloader-Modus. Der Pfeil wird orange eingefärbt sein und Du wirst nach einer Bestätigung gefragt um Veränderungen am System vorzunehmen. In diesem Fall **fahre nicht fort**! + +Wenn der Pfeil grün angezeigt wird, wähle den Treiber aus und klicke auf **Treiber installieren**. Der `libusb-win32`-Treiber sollte gewöhnlich für AVR verwendet werden und `WinUSB` für ARM. Sollte es danach noch nicht möglich sein die Tastatur zu flashen, versuche es mit einem anderen Treiber. Für USBaspLoader Geräte, die über die Befehlszeile mit MSYS2 geflasht werden, wird der `libusbk`-Treiber empfohlen. Ansonsten sollte `libusb-win32` funktionieren wenn die QMK Toolbox verwendet wird. + +![Zadig mit Bootloader-Treiber korrekt installiert](https://i.imgur.com/b8VgXzx.png) + +Entferne nun deine Tastatur und verbinde sie erneut um sicherzugehen dass der neue Treiber erfolgreich installiert wurde. Wenn Du QMK Toolbox benutzt, starte die Anwendung zur Sicherheit einmal neu, da Veränderungen am Treiber manchmal nicht richtig erkannt werden. Wenn dies immer noch nicht erfolgreich war hilft es an dieser Stelle manchmal ein Neustart des Computers. + +## Wiederherstellung einer Installation für ein falsches Gerät + +Wenn Du feststellst dass Du anschließend auf deiner Tastatur nicht mehr tippen kannst, ist etwas bei der Installation schief gelaufen. Ein häufiger Fehler ist es dass die Tastatur nicht im Bootloader-Modus war und stattdessen der Treiber für das HID-Gerät ersetzt wurde. Dies kannst Du einfach mit Zadig überprüfen, eine funktionierende Tastatur verwendet als Treiber `HidUsb` auf allen Interfaces . + +![Eine funktionierende Tastatur aus Zadigs Sicht](https://i.imgur.com/Hx0E5kC.png) + +Öffne den Geräte-Manager und suche nach einem Gerät das wie deine Tastatur aussieht. + +![Die Tastatur mit dem falschen Treiber installiert, im Geräte-Manager](https://i.imgur.com/L3wvX8f.png) + +Rechtsklick und **Gerät deinstallieren** anklicken. Bitte gehe sicher dass in diesem Schritt auch **Treibersoftware für dieses Gerät löschen** markiert ist. + +![Der "Gerät deinstallieren"-Dialog, mit "Treibersoftware für dieses Gerät entfernen" markiert](https://i.imgur.com/aEs2RuA.png) + +Klick **Aktion → Suche nach veränderter Hardware**. Nun solltest Du wieder in der Lage sein normal zu tippen. Vergewissere dich mit Hilfe von Zadig dass die Tastatur nun `HidUsb` als Treiber verwendet. Wenn dies der Fall ist sollte wieder alles funktionieren. diff --git a/docs/de/newbs.md b/docs/de/newbs.md new file mode 100644 index 000000000000..61139a99e1b8 --- /dev/null +++ b/docs/de/newbs.md @@ -0,0 +1,22 @@ +# Anleitung für absolute Beginner +QMK ist eine mächtige Open Source Firmware für mechanische Tastaturen. Mit QMK kannst Du deine Tastatur sowohl sehr einfach als auch sehr umfangreich anpassen. Menschen unterschiedlichen Wissensstandes - vom kompletten Anfänger bis zum erfahrenen Programmierer - haben ihre Tastaturen mit QMK erfolgreich auf ihre persönlichen Bedürfnisse angepasst. Diese Anleitung soll Dir unabhängig von deinen Vorkenntnissen dabei helfen dies ebenfalls zu bewältigen. + +Bist Du unsicher ob deine Tastatur QMK unterstützt? Wenn es eine mechanische Tastatur ist, die Du selbst gebaut hast, stehen deine Chancen gut. Wir unterstützen eine [Vielzahl](https://qmk.fm/keyboards/) selbst gebauter Tastaturen, sodass selbst wenn deine jetzige Tastatur nicht unterstützt wird Du keine Probleme haben solltest eine für deine Anforderungen zu finden. + +## Übersicht + +Diese Anleitung ist in 7 Abschnitte unterteilt: + +* [Die ersten Schritte](newbs_getting_started.md) +* [Die erste Firmware auf der Kommandozeile erzeugen](newbs_building_firmware.md) +* [Die erste Firmware mit der Online GUI erzeugen](newbs_building_firmware_configurator.md) +* [Firmware flashen](newbs_flashing.md) +* [Testen und Debuggen](newbs_testing_debugging.md) +* [Git Leitfaden](newbs_best_practices.md) +* [Weitere hilfreiche Ressourcen für Anfänger](newbs_learn_more_resources.md) + +Diese Anleitung richtet sich an Personen, die vorher noch nie Software kompiliert haben. Die Entscheidungen und Empfehlungen basieren auf dieser Grundannahme. Es gibt unterschiedliche Herangehensweisen für viele der Prozeduren und wir unterstützen die meisten Alternativen. Wenn Du mal nicht weiter weißt oder Dir nicht sicher bist, wie Du an ein Problem herangehen sollst, kannst Du uns gerne [um Hilfe bitten](getting_started_getting_help.md). + +## Weitere Ressourcen + +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Ein äußerst hilfreicher Blog eines Community-Mitglieds, der einige Grundlagen der QMK-Firmware aus der Sicht des Benutzers erklärt (auf Englisch). diff --git a/docs/de/newbs_building_firmware.md b/docs/de/newbs_building_firmware.md new file mode 100644 index 000000000000..b6d48402499b --- /dev/null +++ b/docs/de/newbs_building_firmware.md @@ -0,0 +1,78 @@ +# Eine eigene Firmware erstellen + +Nachdem Du nun eine funktionierende Entwicklungsumgebung aufgesetzt hast, bist Du nun bereit, deine eigene Firmware zu erstellen. Dieses Sektion des Guides wird zwischen drei Programmen hin- und herwechseln: deinem Dateimanager, deinem Texteditor und der Befehlszeile. Lasse diese drei Fenster geöffnet, bis Du fertig und zufrieden mit deiner Tastatur-Firmware bist. + +Solltest Du die Befehlszeile zwischenzeitlich geschlossen haben, vergiss nicht wieder in das richtige Verzeichnis zu navigieren, benutze dazu den Befehl `cd qmk_firmware`. + +## Navigiere in deinen Keymap Ordner + +Beginne damit, in das `keymaps` Verzeichnis für deine Tastatur zu navigieren. + +Wenn Du macOS oder Windows benutzt, kannst Du einfach in das keymaps Verzeichnis wechseln. + +?> macOS:
+ open keyboards//keymaps + +?> Windows:
+ start .\\keyboards\\\\keymaps + +## Eine Kopie der `default` Tastaturbelegung erstellen + +Wenn Du den `keymaps` Ordner geöffnet hast, solltest Du zuerst eine Kopie des `default` Verzeichnisses erstellen. Wir empfehlen dafür deinen GitHub Benutzernamen zu verweden, aber Du kannst auch jeden anderen Namen verwenden solange er nur aus Kleinbuchstaben, Zahlen und Unterstrichen besteht. + +Um den Prozess zu automatisieren kannst Du dazu auch das Skript `new_keymap.sh` verwenden. + +Navigiere dazu in das `qmk_firmware/util` Verzeichnis und gib folgenden Befehl ein: + +``` +./new_keymap.sh +``` + +Um zum Beispiel den Benutzernamen John für die Tastaturbelegung eines 1up60hse zu verwenden, würdest Du Folgendes eingeben: + +``` +./new_keymap.sh 1upkeyboards/1up60hse john +``` + +## Öffne `keymap.c` in deinem bevorzugtem Text Editor + +Öffne deine `keymap.c`. In dieser Datei findest Du die Strukturen, die das Verhalten deiner Tastatur bestimmen. Oben in der `keymap.c` befinden sich Definitionen (defines) und Aufzählungen (enums), die die Tastaturbelegung leserlicher machen sollen. Weiter unten wirst Du eine Zeile finden, die wie folgt aussieht: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +Diese Zeile markiert den Anfang der Liste der Ebenen (Layers). Darunter befinden sich Zeilen die entweder `LAYOUT` oder `KEYMAP` enthalten, das deutet auf den Start einer Ebene hin. Danach folgt eine Liste von Tasten, die dieser Ebene zugewiesen sind. + +!> Beim Bearbeiten einer Tastaturbelegung solltest Du darauf achten, keine Kommata hinzuzufügen oder zu entfernen. Ansonsten kann dies dazu führen, dass deine Firmware nicht mehr kompiliert und es ist nicht immer einfach festzustellen, wo genau ein Komma zuviel oder zu wenig ist. Die letzte Zeile hat am Ende kein Komma, die Zeilen davor jedoch schon. + +## Personalisiere die Tastaturbelegung nach deinen Wünschen + +Wie Du diesen Schritt abschließt ist vollkommen Dir überlassen. Ändere die eine Sache die Dich stört oder verändere alles von Grund auf. Du kannst Ebenen entfernen die Du nicht brauchst oder Neue hinzufügen, bis zu 32 Stück. Die folgende Dokumentation verrät Dir was Du hier alles definieren kannst: + +* [Keycodes](de/keycodes.md) +* [Features](de/features.md) +* [FAQ](de/faq.md) + +?> Während Du langsam ein Gefühl dafür kriegst wie Keymaps funktionieren, solltest Du darauf achten nicht zuviel auf einmal zu verändern. Größere Änderungen machen es schwieriger, Probleme zu debuggen. + +## Deine Firmware erzeugen + +Wenn Du damit fertig bist, deine Tastaturbelegung anzupassen, musst Du noch die Firmware erzeugen. Öffne dazu wieder die Befehlszeile und führe folgenden Befehl aus: + + make : + +Wenn deine Tastaturbelegung z.B. "xyverz" heißt und Du die Belegung für ein rev5 planck erzeugen möchtest, lautet der Befehl: + + make planck/rev5:xyverz + +Während des Kompiliervorgangs wird viel Text auf dem Bildschirm ausgegeben. Es sollte am Ende mit etwas enden das ungefähr so aussieht: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Deine Firmware flashen +Bitte fahre mit [Firmware flashen](de/newbs_flashing.md) fort, um zu erfahren, wie Du deine neue Firmware auf deine Tastatur flashen kannst. diff --git a/docs/de/newbs_flashing.md b/docs/de/newbs_flashing.md new file mode 100644 index 000000000000..940438669e84 --- /dev/null +++ b/docs/de/newbs_flashing.md @@ -0,0 +1,369 @@ +# Deine Tastatur flashen + +Nachdem deine Firmware nun fertig ist musst Du Sie noch auf deine Tastatur flashen. + +## Flash-Vorgang mit QMK Toolbox + +Der einfachste Weg deine Tastatur zu flashen ist mit Hilfe der [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) + +Leider ist die QMK Toolbox derzeit nur für Windows und macOS verfügbar. Wenn Du Linux benutzt (oder es vorziehst die Firmware mit der Kommandozeile zu flashen) solltest Du die Methode benutzen die [hier](de/newbs_flashing.md#tastatur-mit-der-befehlszeile-flashen) beschrieben wird. + +### Lade die Datei in QMK Toolbox + +Beginne damit die Datei in der QMK Toolbox Anwendung zu laden. Versichere dich dass Du die Firmware-Datei im Finder oder Explorer findest. Deine Tastatur-Firmware sollte entweder vom Typ `.hex` oder `.bin` sein sein. QMK sollte die für deine Tastatur entsprechende Datei automatisch in das Root-Verzeichnis (normalerweise `qmk_firmware`) kopieren. + +?> Wenn Du Windows oder macOS benutzt kannst Du mit folgenden Befehlen ganz einfach das aktuelle Firmware-Verzeichnis im Explorer oder Finder öffnen. + +#### Windows: + +``` start . ``` + +#### macOS: + +``` open . ``` + +Die Firmware-Dateien folgen dabei immer folgendem Schema: + + _.{bin,hex} + +Zum Beispiel würde ein `planck/rev5` mit der `default` Tastaturbelegung folgenden Dateinamen haben: + + planck_rev5_default.hex + +Wenn Du die Firmware-Datei gefunden hast kannst Du sie in das "Local file" ("Lokale Datei") Feld in der QMK Toolbox ziehen, alternativ kannst Du auf "Öffnen" klicken und in das Verzeichnis navigieren indem sich die Firmware-Datei befindet. + +### Die Tastatur in den DFU (Bootloader) Modus versetzen + +Um deine angepasste Firmware auf deine Tastatur zu flashen musst Du diese erst in einen speziellen "flashing"-Modus versetzen. Während die Tastatur in diesem Modus ist kannst Du nicht auf ihr tippen oder sie wie gewohnt als Tastatur benutzen. Es ist wichtig dass der flashing-Prozesses nicht unterbrochen oder die Tastatur ausstöpselst wird, da der Vorgang ansonst wiederholt werden muss. + +Verschiedene Tastaturen verwenden unterschiedliche Methoden um in den Bootloader-Modus zu gelangen. Wenn dein PCB im Moment QMK oder TMK verwendet und Du keine spezifischen Anweisungen erhalten hast probiere die folgenden Methoden in dieser Reihenfolge: + +* Halte beide Shift-Tasten und drücke `Pause` +* Halte beide Shift-Tasten und drücke `B` +* Entferne deine Tastatur vom Computer, drücke gleichzeitig `Leertaste` und `B`, verbinde die Tastatur wieder mit dem Computer und warte eine Sekunde bevor Du die Tasten wieder loslässt. +* Drücke den physischen `RESET`-Knopf auf der Unterseite des PCBs +* Suche auf dem PCB den Pin mit dem Label `RESET`, verbinde diesen mit deinem GND-Pin +* Suche auf dem PCB den Pin mit dem Label `BOOT0`, verbinde diesen mit GND und schließe die Tastatur wieder an den PC an TODO: DIS IS DANGEROUS!! + +Wenn Du damit erfolgreich warst solltest Du in der QMK Toolbox eine Nachricht sehen die ungefähr so aussieht: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Tastatur flashen + +Klicke auf den `Flash`-Knopf in der QMK Toolbox. Die Ausgabe wird ungefähr so aussehen: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash qmk_firmware/clueboard_66_hotswap_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Tastatur mit der Befehlszeile flashen + +Zunächst solltest Du versuchen herauszufinden welchen Bootlader deine Tastatur benutzt. Diese vier Bootloader sind am Weitesten verbreitet: + +| MCU | Bootloader | +| --- | --- | +| Pro-Micro und Klone | CATERINA | +| Teensy | Halfkay | +| OLKB Boards | QMK-DFU | +| sonstige atmega32u4 | DFU | + +Auf der Seite [Flash Anleitung und Bootloader Informationen](de/flashing.md) kannst Du mehr über das Thema erfahren. + +Wenn Du weißt welchen Bootloader deine Tastaur verwendet, kannst Du diese Information bei der Kompilation hinzufügen um den Flash-Vorgang mit dem `make`-Befehl zu automatisieren. +```rules.mk +... +BOOTLOADER = caterina +... +``` + +### DFU + +Wenn Du den DFU-Bootloader verwendest und Du bereit bist deine Firmware zu kompilieren und zu flashen, öffne ein Befehlszeile und führe folgenden Befehl aus: + + make ::dfu + +Wenn deine Tastaturbelegung z.B den Namen "xzverz" trägt und Du ein rev5 planck flashen möchtest sähe der Befehl wie folgt aus: + + make planck/rev5:xyverz:dfu + + +Nachdem der Vorgang abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +Wenn dieser Punkt erreicht ist wird das Build-Skript alle 5 Sekunden nach einem DFU Bootloader suchen. Dieser Vorgang wird wiederholt bis er erfolgreich ist oder abgebrochen wird. + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Wenn diese Nachricht erscheint konnte das Build-Skript den Controller nicht eigenständig in den DFU Modus versetzen (z.B. weil der Modus in rules.mk falsch gesetzt wurde oder ein Problem mit der Hardware besteht), wenn dies eintritt musst Du die oben beschrieben Schritte benutzen um den Controller in den DFU Modus zu versetzen. Danach sollte die Ausgabe ungefähr so aussehen: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash qmk_firmware/clueboard_66_hotswap_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +?> Wenn Du mit diesem Schritt Probleme hast (z.B. `dfu-programmer: no device present`) hilft dir hoffentlich der Abschnitt [Häufig gestellte Fragen (Build/Kompilieren)](de/faq_build.md). + +#### DFU Befehle + +Es gibt verschiedene DFU Befehle um die Firmware auf ein DFU Gerät zu flashen: + +* `:dfu` - Dies ist die default Option. Es wird gecheckt ob ein DFU Gerät verfügbar ist, ist dies der Fall wird die Firmware geflasht. Dieser Check wird alle 5 Sekunden ausgeführt bis ein DFU Gerät erkannt wird. +* `:dfu-ee` - Der Flash-Vorgang benutzt eine `.eep` Datei anstatt einer `.hex` Datei. Dies ist eher unüblich. +* `:dfu-split-left` - Dies flasht die Firmware wie gewohnt (`:dfu`). Allerdings nur die "linke Seite" der EEPROM für geteilte Tastaturen. _Dies ist ideal für auf Elite C basierenden geteilten Tastaturen._ +* `:dfu-split-right` - Dies flasht die Firmware wie gewohnt (`:dfu`). Allerdings nur die "rechte Seite" der EEPROM für geteilte Tastaturen. _Dies ist ideal für auf Elite C basierenden geteilten Tastaturen._ + + +### Caterina +Für Arduinos und andere ProMicro Klone (z.B. SparkFun ProMicro), wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::avrdude + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein "rev2 Lets Split" erzeugen möchtest, lautet der Befehl dafür: + + make lets_split/rev2:xyverz:avrdude + +Nachdem die Kompilation abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +Nun wird die Tastatur automatisch zurückgesetzt und das Skript wird die Firmware flashen sobald es den Bootloader erkennt. Die Ausgabe sollte ungefähr so aussehen: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +Sollten dabei Probleme auftreten (z.B. "Zugriff verweigert" / "Permission denied") muss der Make-Befehl mit privilegierten Berechtigungen ausgeführt werden: + + sudo make ::avrdude + +Zusätzlich ist es möglich mehrere Tastaturen in einem Vorgang zu flashen: + + make ::avrdude-loop + +Du kannst den Loop mit STRG + C unterbrechen sobald der Vorgang abgeschlossen ist. Die korrekte Tastenkombination kann abweichen und hängt vom Betriebssystem ab. + + +### HalfKay + +Für Tastaturen mit PJRC Controllern (Teensy's), wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::teensy + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein Ergodox oder Ergodox EZ erzeugen möchtest, lautet der Befehl dafür: + + make ergodox_ez:xyverz:teensy + +Nachdem die Kompilation abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +An diesem Punkt solltest Du die Tastatur zurücksetzen um den Flash-Vorgang auszulösen. Wenn dies abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + + ``` +Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................. +................................................... +Booting +``` + +### BootloadHID + +Für auf Bootmapper Client(BMC)/bootloaderHID/ATmega32A basierende Tastaturen, wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::bootloaderHID + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein jj40 erzeugen möchtest, lautet der Befehl dafür: + + make jj40:xyverz:bootloaderHID + +Nachdem die Kompilation abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Linking: .build/jj40_default.elf [OK] +Creating load file for flashing: .build/jj40_default.hex [OK] +Copying jj40_default.hex to qmk_firmware folder [OK] +Checking file size of jj40_default.hex [OK] + * The firmware size is fine - 21920/28672 (6752 bytes free) +``` + +Wenn dieser Punkt erreicht ist wird das Build-Skript alle 5 Sekunden nach einem DFU Bootloader suchen. Dieser Vorgang wird wiederholt bis er erfolgreich ist oder abgebrochen wird. + +``` +Error opening HIDBoot device: The specified device was not found +Trying again in 5s. +``` + +An diesem Punkt solltest Du die Tastatur zurücksetzen um den Flash-Vorgang auszulösen. Wenn dies abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +``` +Page size = 128 (0x80) +Device size = 32768 (0x8000); 30720 bytes remaining +Uploading 22016 (0x5600) bytes starting at 0 (0x0) +0x05580 ... 0x05600 +``` + +### STM32 (ARM) + +Für die meisten ARM Tastaturen (inkl. Proton C, Planck Rev 6 und Preonic Rev 3), wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::dfu-util + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein Planck Revision 6 erzeugen möchtest, benutze dafür den folgenden Befehl und reboote die Tastatur in den Bootloader (kurz bevor der Kompiliervorgang abgeschlossen ist): + + make planck/rev6:xyverz:dfu-util + +Nachdem der Kompiliervorgang abgeschlossen ist sollte die Ausgabe ungefähr so aussehen: + +Für auf Bootmapper Client(BMC)/bootloaderHID/ATmega32A basierende Tastaturen, wenn Du bereit bist zu kompilieren und die Tastatur zu flashen, öffne ein Befehlszeilen-Fenster und führe den Build-Befehl aus: + + make ::bootloaderHID + +Wenn deine Tastaturbelegung zum Beispiel den Namen "xyverz" hat und Du eine Tastaturbelegung für ein jj40 erzeugen möchtest, lautet der Befehl dafür: +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +#### STM32 Befehle + +Für Tastaturen mit STM32 Controller sind die DFU Befehle wie folgt: + +* `:dfu-util` - The default command for flashing to STM32 devices. +* `:dfu-util` - Der Standard-Befehl für STM32 Geräte. +* `:dfu-util-wait` - Funktioniert wie der Standard-Befehl, aber mit einem 10 Sekunden Timeout bevor erneut versucht wird die Firmware zu flashen. Mit dem Parameter `TIME_DELAY=20` auf der Befehlszeile kann der Timeout beeinflusst werden. + * z.B.: `make ::dfu-util TIME_DELAY=5` +* `:dfu-util-split-left` - Gleiche Funktionsweise wie `dfu-util`, jedoch wird zusätzlich das EEPROM Setting "linke Seite" für geteilte Tastaturen gesetzt. +* `:dfu-util-split-right` - Gleiche Funktionsweise wie `dfu-util`, jedoch wird zusätzlich das EEPROM Setting "rechte Seite" für geteilte Tastaturen gesetzt. + +## Probier's aus! + +Herzlichen Glückwunsch! Deine individuell angepasst Firmware wurde auf deine Tastatur übertragen! + + Probiere deine neue Tastatur aus und gehe sicher dass alles wie gewünscht funktioniert. Wir haben einen weiteren Artikel zum Thema [Testen und Debuggen](de/newbs_testing_debugging.md) verfasst der sich mit Problembeseitigung beschäftigt um den Beginnger-Guide abzuschließen. diff --git a/docs/de/newbs_getting_started.md b/docs/de/newbs_getting_started.md new file mode 100644 index 000000000000..8240f2bafa0c --- /dev/null +++ b/docs/de/newbs_getting_started.md @@ -0,0 +1,101 @@ +# Einleitung +Genau wie in einem Computer befindet sich auch in einer Tastatur ein Prozessor. + +Dieser Prozessor führt Software aus, die registriert wenn Tasten gedrückt bzw. wieder losgelassen werden und leitet die entsprechenden Signale an den Computer weiter. + +QMK übernimmt die Rolle dieser Software und teilt dem Host-Computer den aktuellen Zustand der Tastatur mit. Wenn Du eine Tastaturbelegung definierst, ist dies äquivalent zu einem ausführbarem Programm, das auf deiner Tastatur läuft. + +QMK möchte seine BenutzerInnen in die Lage versetzen, simple Aufgaben möglichst einfach zu gestalten und gleichzeitig komplexe Dinge zu ermöglichen, die mit normalen Tastaturen ohne zusätzliche Software undenkbar wären. Du musst nicht programmieren können, um abgefahrene Tastaturbelegungen zu gestalten - es reicht wenn Du eine Idee hast und ein paar einfache syntaktische Regeln verstehen kannst. + +# Los geht's! +Bevor Du damit loslegen kannst, deine Tastaturbelegung zu erstellen, musst Du ein wenig Software installieren und Dir eine Entwicklungsumgebung aufsetzen. Die gute Nachricht ist, dass das nur einmal erledigt werden muss, egal für wie viele verschiedene Tastaturen Du hinterher Firmware entwickeln willst. + +Wenn Du es vorziehst mit einer grafischen Oberfläche zu entwickeln kannst Du auch dazu gerne direkt mit dem online [QMK Konfigurator](https://config.qmk.fm) loslegen. Siehe auch: [Firmware mit der Online GUI erzeugen](de/newbs_building_firmware_configurator.md) + +## Software herunterladen + +### Text Editor + +Du wirst ein Programm benötigen, mit dem Du **plain text** (= reiner Text) Dateien bearbeiten und speichern kannst. Wenn Du Windows benutzt, reicht dafür schon das normale `Notepad` und für Linux z.B. `gedit` oder `leafpad`. Beide sind sehr rudimentäre Editoren deren Funktionsumfang aber vollkommen ausreicht. Für macOS' standard `TextEdit` muss man ein bisschen vorsichtig sein und darauf achten, beim Speichern explizit unter _Format_ die Option _Reiner Text_ auszuwählen. + +Ansonsten ist es empfehlenswert, einen Editor herunterzuladen der für die Programmierung und das Bearbeiten von Code ausgelegt ist wie z.b [Notepad++](http://notepad-plus-plus.org/), [Sublime Text](https://www.sublimetext.com/) oder [VS Code](https://code.visualstudio.com/). + +?> Immer noch unsicher, welcher Text Editor der Richtige für Dich ist? Laurence Bradford hat eine hervorragende [Einleitung](https://learntocodewith.me/programming/basics/text-editors/) zu dem Thema geschrieben (auf Englisch). + +### QMK Toolbox + +QMK Toolbox ist ein optionales grafisches Programm für Windows und macOS, das es erleichtern soll, deine Tastatur zu programmieren und zu debuggen. Du wirst es höchstwahrscheinlich früher oder später als unverzichtbar ansehen, wenn es darum geht eine Tastatur einfach zu flashen oder zu debuggen, da es ermöglicht, sich debug-Nachrichten direkt anzeigen zu lassen. + +[Hier kannst Du die aktuelle Version herunterladen.](https://github.com/qmk/qmk_toolbox/releases/latest) + +* Für Windows: `qmk_toolbox.exe` (portable) oder `qmk_toolbox_install.exe` (installer) +* Für macOS: `QMK.Toolbox.app.zip` (portable) oder `QMK.Toolbox.pkg` (installer) + +## Die Entwicklungsumgebung aufsetzen + + +Wir haben versucht, die Installation der Entwicklungsumgebung für QMK so einfach wie möglich zu gestalten. Alles, was Du tun musst, ist eine Linux oder Unix Umgebung aufzusetzen, danach macht QMK den Rest. + +?> Wenn Du das erste Mal mit der Linux/Unix Befehlszeile arbeitest, schadet es nicht, sich mit ein paar Grundlagen und Befehlen vertraut zu machen. Diese Ressourcen sollten ausreichen, um sich das Nötigste anzueignen um mit QMK arbeiten zu können:
+[Erforderliche Linux Grundlagen](https://www.guru99.com/must-know-linux-commands.html)
+[Noch ein paar Linux Befehle](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +Du wirst MSYS2 (o.Ä.) und Git benötigen. + +* Befolge die Installationsanleitung auf der [MSYS2 Homepage](http://www.msys2.org) +* Schließe alle offenen MSYS2 Fenster und öffne ein neues MSYS2 MinGW 64-bit Terminal +* Installiere Git mit dem Kommando: `pacman -S git` + +### macOS + +Du wirst Homebrew benötigen. Folge dafür den Anweisungen auf der [Homebrew homepage](https://brew.sh). + +Nachdem Homebrew erfolgreich installiert ist, kannst Du mit _QMK aufsetzen_ fortfahren. + +### Linux + +Du benötigst Git, aber es ist ziemlich wahrscheinlich, dass es bereits installiert ist. Sollte dies nicht der Fall sein, kannst Du es mit dem folgenden Aufruf installieren: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch Linux: `pacman -S git` + +?> Docker ist ebenfalls eine Option für alle Plattformen. [Hier](de/getting_started_build_tools.md#docker) kannst Du dazu weitere Informationen finden. + +## QMK aufsetzen +Wenn Du damit fertig bist, deine Linux/Unix Umgebung zu installieren, kannst Du damit fortfahren QMK herunterzuladen. Dafür werden wir mit Git das QMK Repository "klonen". Öffne ein Terminal oder ein MSYS2 MinGW Fenster, dies wirst Du für den Rest der Anleitung benötigen. In diesem Fenster rufst Du nun die beiden folgenden Kommandos auf: + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` +?> Wenn Du bereits weißt, [wie man GitHub benutzt](de/getting_started_github.md), empfehlen wir, dass Du Dir ein eigenen Fork erstellst. Wenn Du nicht weißt, was das bedeuten soll, kannst Du diesen Ratschlag getrost ignorieren. + +QMK liefert ein Script mit, das helfen soll, Dir alles Weitere abzunehmen. Du kannst es mit dem folgenden Befehl aufrufen: + + util/qmk_install.sh + +## Die Build-Umgebung testen + +Nun sollte hoffentlich alles Nötige für eine funktionierende QMK Build-Umgebung installiert sein und Du solltest in der Lage sein, die QMK-Firmware zu kompilieren. Um dies mit einer `default` Tastaturbelegung zu testen, kannst Du den folgenden Befehl ausprobieren: + + make :default + +Der Befehl um z.B. die Firmware für ein _Clueboard 66%_ zu erzeugen lautet: + + make clueboard/66/rev3:default + +Wenn es fertig ist, sollte der Output ungefähr so ähnlich wie das Folgende aussehen: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# Eine eigene Tastaturbelegung erstellen +Du bist nun fertig mit dem Setup der Entwicklungsumgebung und solltest somit in der Lage sein, deine eigenen Tastaturbelegungen zu erstellen. Um fortzufahren, folge bitte der nächsten Anleitung unter [Die erste Firmware](de/newbs_building_firmware.md). diff --git a/docs/de/newbs_learn_more_resources.md b/docs/de/newbs_learn_more_resources.md new file mode 100644 index 000000000000..59b72152dd18 --- /dev/null +++ b/docs/de/newbs_learn_more_resources.md @@ -0,0 +1,14 @@ +# Lernmaterial + +Diese weiterführenden Ressourcen sind darauf ausgerichtet, Neulingen der QMK Commmunity mehr Informationen und ein besseres Verständnis zu einzelnen Themen zu bieten. + +Git Ressourcen: + +* [Gutes allgemeines Tutorial](https://www.codecademy.com/learn/learn-git) (auf Englisch) +* [Git spielerisch anhand von Beispielen lernen](https://learngitbranching.js.org/) (auf Englisch) +* [Mehr über den allgemeinen Umgang mit Github](getting_started_github.md) +* [Mehr über Git im Bezug zu QMK](contributing.md) + +Mehr über die Arbeit mit der Befehlszeile: + +* [Gutes allgemeines Tutorial über die Arbeit mit der Befehlszeile](https://www.codecademy.com/learn/learn-the-command-line) (auf Englisch) diff --git a/docs/de/newbs_testing_debugging.md b/docs/de/newbs_testing_debugging.md new file mode 100644 index 000000000000..acc067e10f96 --- /dev/null +++ b/docs/de/newbs_testing_debugging.md @@ -0,0 +1,100 @@ +# Testen und Debuggen + +Nachdem Du deine Tastatur mit deiner angepassten Firmware geflasht hast, ist es nun an der Zeit sie auszuprobieren. Mit ein bisschen Glück sollte alles ohne Probleme funktionieren, wenn dies nicht der Fall ist, soll dieses Dokument dir dabei helfen, herauszufinden wo das Problem liegt. + +## Testen + +Die Tastatur zu testen ist relativ selbsterklärend. Drücke jede der Tasten um dich zu versichern, dass der gesendete Keyode der ist, den du erwarten würdest. Dafür gibt es sogar ein paar Programme die helfen sollen, dass keine Taste ausgelassen wurde. + +Anmerkung: Diese Programme werden weder von QMK bereitgestellt oder gutgeheißen. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Nur für Windows) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Nur für Mac) +* [Keyboard Tester](http://www.keyboardtester.com) (Web basiert) +* [Keyboard Checker](http://keyboardchecker.com) (Web basiert) + +## Debuggen + +Deine Tastatur wird Debug Informationen liefern wenn Du `CONSOLE_ENABLE = yes` in deiner `rules.mk` gesetzt hast. Die default-Ausgabe ist sehr beschränkt und kann wenn nötig durch die Aktivierung des Debug-Modes erhöht werden. Benutze dafür entweder den `DEBUG` Keycode in deiner Tastaturbelegung, das [Command](de/feature_command.md)-Feature oder füge den folgenden Code zu deiner Tastaturbelegung hinzu. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Debuggen mit der QMK Toolbox + +Für kompatible Plattformen kann die [QMK Toolbox](https://github.com/qmk/qmk_toolbox) benutzt werden um Debug-Nachrichten deiner Tastatur anzuzeigen. + +### Debuggen mit hid_listen + +Bevorzugst Du es lieber auf der Befehlszeile zu debuggen? Dafür eignet sich das Programm [hid_listen](https://www.pjrc.com/teensy/hid_listen.html) von PJRC. Binaries sind für Windows, Linux und MacOS verfügbar. + + + +## Eigene Debug-Nachrichten senden + +Manchmal ist es hilfreich Debug-Nachrichten innerhalb deines eigenen [Custom Codes](de/custom_quantum_functions.md) zu drucken. Das ist ziemlich einfach. Beginne damit `print.h` am Anfang deiner Datei zu inkludieren: + + #include + +Danach stehen dir verschiedene Druck-Funktionen zur Verfügung: + +* `print("string")`: Druckt einen simplen String +* `uprintf("%s string", var)`: Druckt einen formatierten String +* `dprint("string")` Druckt einen simplen String, aber nur wenn der Debug-Mode aktiviert ist +* `dprintf("%s string", var)`: Druckt einen formatierten String, aber nur wenn der Debug-Mode aktiviert ist + +## Debug Beispiele + +Anbei findest Du eine Sammlung von hilfreichen Beispielen. Für weitere Informationen Informationen sei an dieser Stelle auf [Debugging/Troubleshooting QMK](de/faq_debug.md) verwiesen. + +### Which matrix position is this keypress? +### Welche Matrix Position hat dieser Tastenanschlag + +Beim Portieren, oder bei der Fehlerdiagnose von PCB Problemen, ist es nützlich sich anzeigen zu lassen ob ein Tastenanschlag richtig erkannt wurde. Um die Protokollierung für diesen Fall zu aktivieren, füge bitte folgenden Code zu deiner Tastaturbelegung `keymap.c` hinzu. + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Wenn 'console' aktiviert ist wird die Matrix-Position und der Status jedes Tastenanschlags ausgegeben +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Beispiel Ausgabe: +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### Wieviel Zeit wurde benötigt um einen Tastenanschlag zu detektieren? + +Wenn Performance-Probleme auftreten ist es hilfreich die Frequenz, mit der die Matrix gescannt wird, zu wissen. Um dies in diesem Fall zu aktiveren füge, den folgenden Code zu deiner Tastaturbelegung in `config.h` hinzu. + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Beispiel Ausgabe +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` From 8e8986b2506ca4cdd2339a441314a0838e3a4329 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 20 Nov 2019 12:17:52 -0800 Subject: [PATCH 030/226] Add auto-handling of stale PRs/Issues (#7197) * Add auto-handling of stale PRs/Issues This adds the configuration for probot-stale, so that PRs and Issues can be automatically pruned without intervention by collaborators. This marks PRs with `awaiting changes` label after 45 days, and then closes any PR with "Awaiting changes" after 30 days. Unless they have `awaiting review`, `breaking_changes`, `in progress` or `on hold` labels. This marks issues as `solved` after 90 days, and then closes them 30 days afterwards. Unless they have `bug`, `discussion, `to do`, `in progress` or `on hold` labels. * Cleanup the text some * Update .github/stale.yml Co-Authored-By: fauxpark --- .github/stale.yml | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 000000000000..b2c40591b7d8 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,52 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# General configuration + +# Pull request specific configuration +pulls: + staleLabel: awaiting changes + # Number of days of inactivity before an Issue or Pull Request becomes stale + daysUntilStale: 45 + # Number of days of inactivity before a stale Issue or Pull Request is closed. + # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. + daysUntilClose: 30 + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + Thank you for your contribution! + + This pull request has been automatically marked as stale because it has not had + activity in the last 45 days. It will be closed in 30 days if no further activity occurs. + Please feel free to give a status update now, or re-open when it's ready. + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Thank you for your contribution! + + This pull request has been automatically closed because it has not had activity in the last 30 days. + Please feel free to give a status update now, ping for review, or re-open when it's ready. + # Limit the number of actions per hour, from 1-30. Default is 30 + limitPerRun: 30 + exemptLabels: + - awaiting review + - breaking_change + - in progress + - on hold + +# Issue specific configuration +issues: + staleLabel: solved + limitPerRun: 10 + daysUntilStale: 90 + daysUntilClose: 30 + markComment: > + This issue has been automatically marked as resolved because it has not had activity in the + last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity + occurs. + closeComment: > + This issue has been automatically closed because it has not had activity in the last 30 days. + If this issue is still valid, re-open the issue and let us know. + exemptLabels: + - bug + - in progress + - on hold + - discussion + - to do From eb91c962886b1bb52c2d457a574cba09e2a8b0f0 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 20 Nov 2019 12:37:24 -0800 Subject: [PATCH 031/226] [Keymap] All about (ARM) RGB and OLEDs (drashna keymaps) (#7354) * Add Kyria Keymap * Enable all RGBLIGHT Animations for ARM and high capacity AVR * Reduce GNUC version for __has_include * Cleanup Ortho 4x12 Community layout * Update Collide 39 keymap * Cleanup Keymaps * Enable full 30 LEDs for Ergodox * Change EEPROM Load timing * Use RGB Matrix on Planck Rev6 * Use correct keymap swap * Enable everything for ARM * Only enable rgb sleep on avr until crash is fixed * Add additional Kyria keymap config * Overhaul Kyria OLED display * Improve kyria keymap based on usage * Minor tweaks to rules * Update OLED code to truncate properly * Fix RGB Light layer indication * Switch all of biton32 to get_highest_layer function * Fix OLED Keylogger display * Run qmk cformat over all of my user files * Slight tweak to kyria based on usage * Move around LALT_T config * Add comments about base wrappers to keymaps * Another cformat pass * Temp fix for VUSB boards and NKRO * Convert tabs to spaces in rules.mk files * Only enable RGBLight if it's enabled * Add Encoder Flip setting * Update OLED font file --- .../nano/keymaps/drashna/keymap.c | 10 +- keyboards/c39/keymaps/drashna/config.h | 9 +- keyboards/c39/keymaps/drashna/keymap.c | 132 +++++-- keyboards/c39/keymaps/drashna/rules.mk | 4 +- keyboards/crkbd/keymaps/drashna/glcdfont.c | 9 +- keyboards/crkbd/keymaps/drashna/keymap.c | 49 +-- keyboards/gergo/keymaps/drashna/keymap.c | 18 +- .../keebio/iris/keymaps/drashna/config.h | 3 +- .../keebio/iris/keymaps/drashna/keymap.c | 14 +- .../keebio/viterbi/keymaps/drashna/config.h | 31 +- .../keebio/viterbi/keymaps/drashna/keymap.c | 50 +-- keyboards/kyria/keymaps/drashna/config.h | 38 ++ keyboards/kyria/keymaps/drashna/keymap.c | 372 ++++++++++++++++++ keyboards/kyria/keymaps/drashna/rules.mk | 22 ++ keyboards/orthodox/keymaps/drashna/config.h | 45 ++- keyboards/orthodox/keymaps/drashna/keymap.c | 39 +- layouts/community/ergodox/drashna/config.h | 15 +- layouts/community/ergodox/drashna/keymap.c | 33 +- layouts/community/ergodox/drashna/rules.mk | 4 +- layouts/community/numpad_5x6/drashna/config.h | 20 +- layouts/community/numpad_5x6/drashna/keymap.c | 1 - layouts/community/ortho_4x12/drashna/config.h | 37 +- layouts/community/ortho_4x12/drashna/keymap.c | 81 ++-- layouts/community/ortho_4x12/drashna/rules.mk | 60 +-- layouts/community/ortho_5x12/drashna/keymap.c | 32 +- layouts/community/ortho_5x12/drashna/rules.mk | 18 +- users/drashna/config.h | 14 +- users/drashna/drashna.c | 60 ++- users/drashna/drashna.h | 5 +- users/drashna/font_gmk_bad.h | 241 ++++++++++++ users/drashna/hue_manitee_font.h | 241 ++++++++++++ users/drashna/process_records.c | 8 +- users/drashna/rgb_stuff.c | 194 ++++----- users/drashna/rgb_stuff.h | 6 +- users/drashna/rgblight_breathe_table.h | 8 +- users/drashna/rules.mk | 23 +- users/drashna/template.c | 130 +++--- users/drashna/template.h | 15 +- 38 files changed, 1499 insertions(+), 592 deletions(-) mode change 100755 => 100644 keyboards/c39/keymaps/drashna/config.h create mode 100644 keyboards/kyria/keymaps/drashna/config.h create mode 100644 keyboards/kyria/keymaps/drashna/keymap.c create mode 100644 keyboards/kyria/keymaps/drashna/rules.mk create mode 100644 users/drashna/font_gmk_bad.h create mode 100644 users/drashna/hue_manitee_font.h diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index 6c5b97457208..668178967b31 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -1,12 +1,11 @@ -#include QMK_KEYBOARD_H #include "drashna.h" #include "analog.c" #include "pointing_device.h" #include "pincontrol.h" - #define KC_X0 LT(_FN, KC_ESC) +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_VOLU, KC_MPLY, KC_MPRV, RESET, @@ -14,6 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// clang-format on // Joystick // Set Pins @@ -39,7 +39,7 @@ int16_t xOrigin, yOrigin; uint16_t lastCursor = 0; int16_t axisCoordinate(uint8_t pin, uint16_t origin) { - int8_t direction; + int8_t direction; int16_t distanceFromOrigin; int16_t range; @@ -57,8 +57,8 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) { direction = 1; } - float percent = (float)distanceFromOrigin / range; - int16_t coordinate = (int16_t)(percent * 100); + float percent = (float)distanceFromOrigin / range; + int16_t coordinate = (int16_t)(percent * 100); if (coordinate < 0) { return 0; } else if (coordinate > 100) { diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h old mode 100755 new mode 100644 index 361f68a78ea5..5d53fe54bb9d --- a/keyboards/c39/keymaps/drashna/config.h +++ b/keyboards/c39/keymaps/drashna/config.h @@ -2,6 +2,11 @@ // place overrides here #undef MATRIX_COL_PINS -#define MATRIX_COL_PINS { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } +#define MATRIX_COL_PINS \ + { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } #undef MATRIX_ROW_PINS -#define MATRIX_ROW_PINS { B7, B1, B0 } +#define MATRIX_ROW_PINS \ + { B7, B1, B0 } + +#define RGB_DI_PIN B10 +#define RGBLED_NUM 15 diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c index 9de75190d030..882938138fc8 100755 --- a/keyboards/c39/keymaps/drashna/keymap.c +++ b/keyboards/c39/keymaps/drashna/keymap.c @@ -1,45 +1,97 @@ -#include QMK_KEYBOARD_H +#include "drashna.h" -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _FN1 1 - -// Defines for task manager and such -#define CALTDEL LCTL(LALT(KC_DEL)) -#define TSKMGR LCTL(LSFT(KC_ESC)) +/* + * The `LAYOUT_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ +// clang-format off +#define LAYOUT_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \ + ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \ + ) +#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,----------------------------------------------------------------------------. ,-------------. - * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 | - * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| - * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 | - * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| - * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 | - * `----------------------------------------------------------------------------' `-------------' - */ -[_QWERTY] = LAYOUT( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2, - KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4, - KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6 -), - -/* FN1 - * ,----------------------------------------------------------------------------. ,-------------. - * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 | - * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| - * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 | - * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| - * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 | - * `----------------------------------------------------------------------------' `-------------' - */ -[_FN1] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2, - KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4, - KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6 -), + [_QWERTY] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______ + ), + + [_LOWER] = LAYOUT_wrapper( + KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, + KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______ + ), + + [_RAISE] = LAYOUT_wrapper( + KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC, + KC_DEL, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, MG_NKRO, _________________ADJUST_R2_________________, EEP_RST, + TG_MODS, _________________ADJUST_L3_________________, KC_RGB_T,_________________ADJUST_R3_________________, RGB_IDL + ) }; +// clang-format on diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index ae0cc9efee6e..d216f6abe6ec 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -15,4 +15,6 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 -RGBLIGHT_ENABLE = no # RGB Enable / Disable +RGBLIGHT_ENABLE = yes # RGB Enable / Disable + +RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index 998b5c408ae4..2bfc3fac6d44 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c @@ -1,17 +1,18 @@ #pragma once #ifdef __AVR__ - #include - #include +# include +# include #elif defined(ESP8266) - #include +# include #else - #define PROGMEM +# define PROGMEM #endif // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ +// clang-format off const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index cd84f0d91923..9a1beeb74b83 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -1,17 +1,17 @@ -#include QMK_KEYBOARD_H #include "drashna.h" -extern keymap_config_t keymap_config; -extern uint8_t is_master; +extern uint8_t is_master; #ifdef RGBLIGHT_ENABLE // Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; #endif #ifdef OLED_DRIVER_ENABLE -static uint32_t oled_timer = 0; -static char keylog_str[6] = {}; -static uint16_t log_timer = 0; +# define KEYLOGGER_LENGTH 5 +static uint32_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static uint16_t log_timer = 0; +// clang-format off static const char PROGMEM code_to_name[0xFF] = { // 0 1 2 3 4 5 6 7 8 9 A B c D E F ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x @@ -37,7 +37,14 @@ void add_keylog(uint16_t keycode); enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; -// clang-format off +/* + * The `LAYOUT_crkbd_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + #define LAYOUT_crkbd_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -155,7 +162,7 @@ void add_keylog(uint16_t keycode) { keycode = 0; } - for (uint8_t i = 4; i > 0; --i) { + for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { keylog_str[i] = keylog_str[i - 1]; } @@ -168,7 +175,7 @@ void add_keylog(uint16_t keycode) { void update_log(void) { if (timer_elapsed(log_timer) > 750) { - //add_keylog(0); + // add_keylog(0); } } @@ -179,7 +186,7 @@ void render_keylogger_status(void) { void render_default_layer_state(void) { oled_write_P(PSTR("Lyout"), false); - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: oled_write_P(PSTR(" QRTY"), false); break; @@ -268,7 +275,7 @@ void render_status_secondary(void) { /* Show Keyboard Layout */ render_default_layer_state(); render_layer_state(); - render_mod_status(get_mods()|get_oneshot_mods()); + render_mod_status(get_mods() | get_oneshot_mods()); render_keylogger_status(); } @@ -278,9 +285,11 @@ void oled_task_user(void) { oled_off(); return; } -#ifndef SPLIT_KEYBOARD - else { oled_on(); } -#endif +# ifndef SPLIT_KEYBOARD + else { + oled_on(); + } +# endif update_log(); if (is_master) { @@ -303,16 +312,12 @@ uint16_t get_tapping_term(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE -void suspend_power_down_keymap(void) { - rgb_matrix_set_suspend_state(true); -} +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } -void suspend_wakeup_init_keymap(void) { - rgb_matrix_set_suspend_state(false); -} +void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } void check_default_layer(uint8_t mode, uint8_t type) { - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); break; @@ -351,7 +356,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_config.enable # endif ) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); break; diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c index edc5a9e997a1..d1e622406090 100644 --- a/keyboards/gergo/keymaps/drashna/keymap.c +++ b/keyboards/gergo/keymaps/drashna/keymap.c @@ -1,14 +1,12 @@ -/* Good on you for modifying your layout! if you don't have - * time to read the QMK docs, a list of keycodes can be found at - * - * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md - * - * There's also a template for adding new layers at the bottom of this file! - */ - -#include QMK_KEYBOARD_H #include "drashna.h" +/* + * The `LAYOUT_gergo_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ // clang-format off #define LAYOUT_gergo_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -17,7 +15,7 @@ ) \ LAYOUT_gergo_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ - KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ ) diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index 6fff5d72c693..25678bd67d14 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h @@ -32,7 +32,8 @@ along with this program. If not, see . # undef RGBLED_NUM # define RGBLED_NUM 18 // Number of LEDs # undef RGBLED_SPLIT -# define RGBLED_SPLIT { 9, 9 } +# define RGBLED_SPLIT \ + { 9, 9 } # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index de19f7ca08c9..edfcd23e795a 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -1,7 +1,13 @@ - -#include QMK_KEYBOARD_H #include "drashna.h" +/* + * The `LAYOUT_iris_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + // clang-format off #define LAYOUT_iris_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -10,8 +16,8 @@ ) \ LAYOUT_wrapper( \ KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ - KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ - KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h index 201c02e4199b..40a5bbd0e8e8 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -21,27 +21,25 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 - -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // RGBLIGHT_ENABLE - - +# undef RGBLED_NUM +# define RGBLED_NUM 16 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad +#define PRODUCT Drashnas Viterbi Macro Pad #ifdef AUDIO_ENABLE -# define C6_AUDIO -# define NO_MUSIC_MODE +# define C6_AUDIO +# define NO_MUSIC_MODE #endif +// clang-format off #define LAYOUT_ortho_5x7( \ L00, L01, L02, L03, L04, L05, L06, \ L10, L11, L12, L13, L14, L15, L16, \ @@ -56,8 +54,9 @@ along with this program. If not, see . { L30, L31, L32, L33, L34, L35, L36 }, \ { L40, L41, L42, L43, L44, L45, L46 }, \ } +// clang-format on -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_ESC_OUTPUT F5 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW #define QMK_LED B0 #define QMK_SPEAKER C6 diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 9c17c5a5775f..3b213418d633 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -1,24 +1,15 @@ -#include QMK_KEYBOARD_H #include "drashna.h" -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. - - // Fillers to make layering more clear -#define DIABLO TG(_DIABLO) -#define GAMEPAD TG(_GAMEPAD) -#define MEDIA TT(_MEDIA) +#define DIABLO TG(_DIABLO) +#define GAMEPAD TG(_GAMEPAD) +#define MEDIA TT(_MEDIA) - -//enum more_custom_keycodes { +// enum more_custom_keycodes { // KC_P00 = NEW_SAFE_RANGE //}; +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = LAYOUT_ortho_5x7( @@ -55,32 +46,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - +// clang-format on bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - - //switch (keycode) { - //case KC_P00: - // if (!record->event.pressed) { - // tap(KC_KP_0); - // tap(KC_KP_0); - // } - // return false; - // break; - //} - return true; + // switch (keycode) { + // case KC_P00: + // if (!record->event.pressed) { + // tap(KC_KP_0); + // tap(KC_KP_0); + // } + // return false; + // break; + //} + return true; } - - - void matrix_init_keymap(void) { - #ifndef CONVERT_TO_PROTON_C +#ifndef CONVERT_TO_PROTON_C setPinOutput(D5); writePinHigh(D5); setPinOutput(B0); writePinHigh(B0); - #endif +#endif } diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h new file mode 100644 index 000000000000..83d6283f56d2 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/config.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define EE_HANDS + +#ifdef OLED_DRIVER_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_FONT_H "font_gmk_bad.h" +# define OLED_DISABLE_TIMEOUT +# define OLED_SCROLL_TIMEOUT_RIGHT 60000 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_SLEEP +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 1000 diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..bdb00e5967c8 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -0,0 +1,372 @@ +#include "drashna.h" + +uint8_t is_master; + +#ifdef OLED_DRIVER_ENABLE +# define KEYLOGGER_LENGTH 10 +static uint32_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static uint16_t log_timer = 0; +// clang-format off +static const char PROGMEM code_to_name[0xFF] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x + ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx + 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx +}; + +void add_keylog(uint16_t keycode); +#endif + +#ifndef UNICODE_ENABLE +# define UC(x) KC_NO +#endif + +/* + * The `LAYOUT_kyria_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +// clang-format off +#define LAYOUT_kyria_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ + ) +/* Re-pass though to allow templates to be used */ +#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kyria_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_kyria_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_kyria_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_kyria_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_kyria_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_kyria_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_kyria_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_kyria_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT, + _______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______ + ), + [_LOWER] = LAYOUT_wrapper( + KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_wrapper( + KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + _______, _________________ADJUST_L3_________________, HPT_TOG, HPT_FBK, MG_NKRO, UC_MOD, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, _______ + ), +// [_LAYERINDEX] = LAYOUT_wrapper( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; +// clang-format on + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + add_keylog(keycode); +#endif +#ifndef SPLIT_KEYBOARD + if (keycode == RESET && !is_master) { + return false; + } +#endif + } + return true; +} +void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); } + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +void add_keylog(uint16_t keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { + keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; + } + + for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { + keylog_str[i] = keylog_str[i - 1]; + } + + if (keycode < (sizeof(code_to_name) / sizeof(char))) { + keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); + } + + log_timer = timer_read(); +} + +void update_log(void) { + if (timer_elapsed(log_timer) > 750) { + // add_keylog(0); + } +} + +void render_keylogger_status(void) { + oled_write_P(PSTR("Keylogger: "), false); + oled_write(keylog_str, false); +} + +void render_default_layer_state(void) { + oled_write_P(PSTR("Layout: "), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Qwerty "), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemak"), false); + break; + case _DVORAK: + oled_write_ln_P(PSTR("Dvorak"), false); + break; + case _WORKMAN: + oled_write_ln_P(PSTR("Workman"), false); + break; + case _NORMAN: + oled_write_ln_P(PSTR("Norman"), false); + break; + case _MALTRON: + oled_write_ln_P(PSTR("Maltron"), false); + break; + case _EUCALYN: + oled_write_ln_P(PSTR("Eucalyn"), false); + break; + case _CARPLAX: + oled_write_ln_P(PSTR("Carplax"), false); + break; + } +} + +void render_layer_state(void) { + oled_write_ln_P(PSTR("Layer:"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("Mods"), layer_state_is(_MODS)); +} + +void render_keylock_status(uint8_t led_usb_state) { + oled_write_P(PSTR("Lock: "), false); + oled_write_P(PSTR("NUM"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("SCL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR("Mods: "), false); + oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT)); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); +} + +void render_bootmagic_status(void) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + oled_write_P(PSTR("Boot "), false); + oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("NKRO"), keymap_config.nkro); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui); + oled_write_P(PSTR("Magic "), false); + oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("CAPS"), keymap_config.swap_control_capslock); +} + +void render_user_status(void) { + oled_write_P(PSTR("USER: "), false); + oled_write_P(PSTR("Anim"), userspace_config.rgb_matrix_idle_anim); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Layr"), userspace_config.rgb_layer_change); + oled_write_P(PSTR(" "), false); + oled_write_ln_P(PSTR("Nuke"), userspace_config.nuke_switch); +} + +// clang-format off +void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +# ifndef SPLIT_TRANSPORT_MIRROR +void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} +# endif +// clang-format on + +void render_status_main(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_keylock_status(host_keyboard_leds()); + render_bootmagic_status(); + render_user_status(); + + render_keylogger_status(); +} + +void render_status_secondary(void) { + /* Show Keyboard Layout */ + render_logo(); + render_default_layer_state(); + render_layer_state(); + render_mod_status(get_mods() | get_oneshot_mods()); + + render_keylogger_status(); +} + +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 30000) { + oled_off(); + return; + } +# ifndef SPLIT_KEYBOARD + else { + oled_on(); + } +# endif + + update_log(); + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { +# ifdef SPLIT_TRANSPORT_MIRROR + render_status_secondary(); +# else + render_kyria_logo(); +# endif + } +} + +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..c1a37f5c597b --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -0,0 +1,22 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_STARTUP_ANIMATION = yes + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = yes # Unicode +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 + +BOOTLOADER = atmel-dfu + +SPLIT_TRANSPORT = mirror diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 4719c22696c2..585c916404f5 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -34,41 +34,40 @@ along with this program. If not, see . /* key combination for magic key command */ #undef IS_COMMAND -#define IS_COMMAND() ( \ - get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ -) +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT))) #ifdef RGBLIGHT_ENABLE -# define RGB_DI_PIN D3 -# define RGBLED_NUM 16 // Number of LEDs -# define RGBLED_SPLIT { 8, 8 } - -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // RGBLIGHT_ENABLE +# define RGB_DI_PIN D3 +# define RGBLED_NUM 16 // Number of LEDs +# define RGBLED_SPLIT \ + { 8, 8 } + +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE -# define C6_AUDIO -# ifdef RGBLIGHT_ENABLE -# define NO_MUSIC_MODE -# endif -#endif //AUDIO_ENABLE +# define C6_AUDIO +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif +#endif // AUDIO_ENABLE #undef PRODUCT #ifdef KEYBOARD_orthodox_rev1 -# define PRODUCT Drashna Hacked Orthodox Rev.1 +# define PRODUCT Drashna Hacked Orthodox Rev .1 #elif KEYBOARD_orthodox_rev3 -# define PRODUCT Drashna Hacked Orthodox Rev.3 +# define PRODUCT Drashna Hacked Orthodox Rev .3 #endif -#define QMK_ESC_OUTPUT D7 // usually COL +#define QMK_ESC_OUTPUT D7 // usually COL #ifdef KEYBOARD_orthodox_rev1 -# define QMK_ESC_INPUT D4 // usually ROW +# define QMK_ESC_INPUT D4 // usually ROW #else -# define QMK_ESC_INPUT D2 // usually ROW +# define QMK_ESC_INPUT D2 // usually ROW #endif #define QMK_LED B0 #define QMK_SPEAKER C6 diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index bf6b62b41ffc..2dbe18634334 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -1,35 +1,12 @@ -/* -This is the keymap for the keyboard - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H #include "drashna.h" -#ifdef INDICATOR_LIGHTS -extern userspace_config_t userspace_config; - -uint8_t last_mod; -uint8_t last_led; -uint8_t last_osm; -#endif - +/* + * The `LAYOUT_orthodox_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ // clang-format off #define LAYOUT_orthodox_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -38,7 +15,7 @@ uint8_t last_osm; ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ ) #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 4943832990e0..0091ebcde83e 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -1,18 +1,19 @@ #pragma once #ifdef RGBLIGHT_ENABLE -# undef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 12 - -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 -#endif // RGBLIGHT_ENABLE +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 +#endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine +#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE #define DEBOUNCE 30 #define TAPPING_TERM_PER_KEY + +#define ERGODOX_LED_30 diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 6ed4558e2737..8308bfdaa19a 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -1,20 +1,3 @@ -/* -This is the keymap for the keyboard -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2017 Art Ortenburger -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include QMK_KEYBOARD_H #include "drashna.h" #ifdef UNICODEMAP_ENABLE @@ -32,6 +15,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; // define layer change stuff for underglow indicator bool skip_leds = false; +/* + * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of + * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, + * etc), so that there is no need to set them up for each layout, and modify + * all of them if I want to change them. This helps to keep consistency and + * ease of use. K## is a placeholder to pass through the individual keycodes + */ // clang-format off #define LAYOUT_ergodox_pretty_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -40,8 +30,8 @@ bool skip_leds = false; ) \ LAYOUT_ergodox_pretty_wrapper( \ KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ - KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ - KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ @@ -402,7 +392,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_config.enable # endif ) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q @@ -432,7 +422,7 @@ void rgb_matrix_indicators_user(void) { break; default: { bool mods_enabled = IS_LAYER_ON(_MODS); - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; @@ -466,7 +456,6 @@ void rgb_matrix_indicators_user(void) { #endif // RGB_MATRIX_INIT - uint16_t get_tapping_term(uint16_t keycode) { if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f9f9ea2bab6c..3aee59df6cb2 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -3,8 +3,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration SPACE_CADET_ENABLE = no ifeq ($(strip $(KEYBOARD)), ergodox_ez) - RGBLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = no + RGBLIGHT_ENABLE = yes + RGB_MATRIX_ENABLE = no endif CONSOLE_ENABLE = no BOOTMAGIC_ENABLE = yes diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h index 2fc5ab658825..29045148e313 100644 --- a/layouts/community/numpad_5x6/drashna/config.h +++ b/layouts/community/numpad_5x6/drashna/config.h @@ -3,17 +3,17 @@ // #define B6_AUDIO #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -# define RGB_DI_PIN B1 -# define RGBLED_NUM 16 // Number of LEDs +# define RGB_DI_PIN B1 +# define RGBLED_NUM 16 // Number of LEDs -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#endif // RGBLIGHT_ENABLE +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE #if defined(KEYBOARD_primekb_prime_m) -# undef PRODUCT -# define PRODUCT Drashna Hacked Prime_M Macro Pad +# undef PRODUCT +# define PRODUCT Drashna Hacked Prime_M Macro Pad #endif diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c index 81710221d385..3d325a4c11db 100644 --- a/layouts/community/numpad_5x6/drashna/keymap.c +++ b/layouts/community/numpad_5x6/drashna/keymap.c @@ -1,4 +1,3 @@ -#include QMK_KEYBOARD_H #include "drashna.h" #define F2_MCRO LT(_GAMEPAD, KC_F2) diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index d8ac5e6d1156..663708afa608 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -1,9 +1,10 @@ #pragma once #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -# define RGB_DI_PIN A0 -# define RGBLED_NUM 13 // Number of LEDs -# define RGBLIGHT_ANIMATIONS +# if defined(KEYBOARD_planck_light) +# define RGB_DI_PIN A0 +# define RGBLED_NUM 13 // Number of LEDs +# endif # define RGBLIGHT_HUE_STEP 12 # define RGBLIGHT_SAT_STEP 12 # define RGBLIGHT_VAL_STEP 12 @@ -23,6 +24,9 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended # undef RGB_MATRIX_LED_PROCESS_LIMIT # undef RGB_MATRIX_LED_FLUSH_LIMIT +# ifdef KEYBOARD_planck_rev6 +# define DRIVER_LED_TOTAL RGBLED_NUM +# endif #endif #if defined(KEYBOARD_lets_split_rev2) @@ -34,7 +38,7 @@ #if !defined(KEYBOARD_planck_light) # ifdef RGBLIGHT_ENABLE # define NO_MUSIC_MODE -# endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE #else # undef QMK_ESC_OUTPUT # define QMK_ESC_OUTPUT E6 // usually COL @@ -45,7 +49,7 @@ # undef QMK_SPEAKER # define QMK_SPEAKER B5 # define SOLENOID_PIN A1 -#endif // KEYBOARD_planck_light +#endif // KEYBOARD_planck_light #if defined(KEYBOARD_planck) # undef PRODUCT @@ -58,6 +62,7 @@ # endif #endif +#define ENCODER_DIRECTION_FLIP /* * MIDI options */ @@ -82,26 +87,26 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 -#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ +#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ -#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ /* default 3V ERM vibration motor voltage and library*/ #if FB_ERM_LRA == 0 -#define RATED_VOLTAGE 3 -#define V_RMS 2.3 -#define V_PEAK 3.30 +# define RATED_VOLTAGE 3 +# define V_RMS 2.3 +# define V_PEAK 3.30 /* Library Selection */ -#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ +# define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ /* default 2V LRA voltage and library */ #elif FB_ERM_LRA == 1 -#define RATED_VOLTAGE 2 -#define V_RMS 2.0 -#define V_PEAK 2.85 -#define F_LRA 200 +# define RATED_VOLTAGE 2 +# define V_RMS 2.0 +# define V_PEAK 2.85 +# define F_LRA 200 /* Library Selection */ -#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ +# define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ #endif diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 1c894c7649c2..c3899cd036ca 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -1,20 +1,3 @@ -/* Copyright 2015-2017 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H #include "drashna.h" #ifdef RGBLIGHT_ENABLE @@ -46,6 +29,13 @@ enum planck_keycodes { # define PLNK_4 ET_RAIS #endif +/* + * The `LAYOUT_ortho_4x12_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ // clang-format off #define LAYOUT_ortho_4x12_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -54,7 +44,7 @@ enum planck_keycodes { ) \ LAYOUT_ortho_4x12_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) @@ -159,14 +149,14 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { #ifdef KEYBOARD_planck_ez case TH_LVL: if (record->event.pressed) { - keyboard_config.led_level++; - if (keyboard_config.led_level > 4) { + keyboard_config.led_level++; + if (keyboard_config.led_level > 4) { keyboard_config.led_level = 0; - } - planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); - planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); - eeconfig_update_kb(keyboard_config.raw); - layer_state_set_kb(layer_state); + } + planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4); + planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4); + eeconfig_update_kb(keyboard_config.raw); + layer_state_set_kb(layer_state); } break; #endif @@ -190,6 +180,31 @@ bool music_mask_user(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE +# ifdef KEYBOARD_planck_rev6 +// clang-format off +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, + { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, + { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED } + }, { + // LED Index to Physical Position + {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} + }, { + // LED Index to Flag + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL + } +}; +// clange-format on +# endif + // clang-format off void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); @@ -219,7 +234,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_config.enable # endif ) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; @@ -237,7 +252,7 @@ void rgb_matrix_indicators_user(void) { break; default: { bool mods_enabled = IS_LAYER_ON(_MODS); - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; @@ -268,7 +283,7 @@ void rgb_matrix_indicators_user(void) { } } - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY: rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); break; @@ -283,7 +298,9 @@ void rgb_matrix_indicators_user(void) { break; } if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { - if (!layer_state_cmp(layer_state, _ADJUST)) { rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); } + if (!layer_state_cmp(layer_state, _ADJUST)) { + rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); + } rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); } if ((this_mod | this_osm) & MOD_MASK_CTRL) { @@ -320,7 +337,7 @@ void matrix_init_keymap(void) { #ifdef ENCODER_ENABLE void encoder_update(bool clockwise) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _RAISE: clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); break; @@ -363,7 +380,7 @@ void dip_update(uint8_t index, bool active) { } break; case 2: - keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active; + keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = active; break; case 3: userspace_config.nuke_switch = active; @@ -376,7 +393,7 @@ void dip_update(uint8_t index, bool active) { layer_state_t layer_state_set_keymap(layer_state_t state) { planck_ez_left_led_off(); planck_ez_right_led_off(); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _LOWER: planck_ez_left_led_on(); break; diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index d4726b7a84da..38d0d4517670 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -1,36 +1,40 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -TAP_DANCE_ENABLE = no -AUDIO_ENABLE = yes +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +TAP_DANCE_ENABLE = no +AUDIO_ENABLE = yes SPACE_CADET_ENABLE = no +NKRO_ENABLE = yes ifneq ($(strip $(KEYBOARD)), planck/rev6) - RGBLIGHT_ENABLE = yes - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes + CONSOLE_ENABLE = no + COMMAND_ENABLE = no + ifeq ($(strip $(LAYOUT_HAS_RGB)), yes) + RGBLIGHT_ENABLE = yes + endif + INDICATOR_LIGHTS = yes + RGBLIGHT_TWINKLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes +else + CONSOLE_ENABLE = yes + COMMAND_ENABLE = yes + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = WS2812 endif ifeq ($(strip $(KEYBOARD)), planck/light) - RGB_MATRIX_ENABLE = yes - RGBLIGHT_ENABLE = no - RGBLIGHT_STARTUP_ANIMATION = no - HAPTIC_ENABLE += SOLENOID + RGB_MATRIX_ENABLE = yes + RGBLIGHT_ENABLE = no + RGBLIGHT_STARTUP_ANIMATION = no + # HAPTIC_ENABLE += SOLENOID endif ifeq ($(strip $(KEYBOARD)), planck/ez) - RGBLIGHT_ENABLE = no - # SERIAL_LINK_ENABLE = yes - ENCODER_ENABLE = yes - RGB_MATRIX_ENABLE = IS31FL3737 - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes -endif - -ifeq ($(strip $(PROTOCOL)), VUSB) - NKRO_ENABLE = no -else - NKRO_ENABLE = yes + RGBLIGHT_ENABLE = no + # SERIAL_LINK_ENABLE = yes + ENCODER_ENABLE = yes + RGB_MATRIX_ENABLE = IS31FL3737 + INDICATOR_LIGHTS = yes + RGBLIGHT_TWINKLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes + CONSOLE_ENABLE = yes + COMMAND_ENABLE = yes endif diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c index 86a78336c858..0ee9dfb10c6a 100644 --- a/layouts/community/ortho_5x12/drashna/keymap.c +++ b/layouts/community/ortho_5x12/drashna/keymap.c @@ -1,24 +1,12 @@ -/* Copyright 2015-2017 Jack Humbert - * Modified by KeyPCB for the Fractal keyboard - * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H #include "drashna.h" +/* + * The `LAYOUT_ortho_5x12_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ // clang-format off #define LAYOUT_ortho_5x12_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ @@ -27,9 +15,9 @@ K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ ) \ LAYOUT_ortho_5x12_wrapper( \ - KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ - KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ - KC_ESC, ALT_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ + KC_C1R3, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \ KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index 75affedd1209..cae4b27bab2f 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -5,16 +5,12 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no AUDIO_ENABLE = yes -ifeq ($(strip $(KEYBOARD)), fractal) - RGB_MATRIX_ENABLE = no - AUDIO_ENABLE = yes - RGBLIGHT_ENABLE = yes - RGBLIGHT_TWINKLE = yes - BOOTLOADER = qmk-dfu -endif - -ifeq ($(strip $(PROTOCOL)), VUSB) -NKRO_ENABLE = no -else NKRO_ENABLE = yes + +ifeq ($(strip $(KEYBOARD)), fractal) + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = yes + RGBLIGHT_ENABLE = yes + RGBLIGHT_TWINKLE = yes + BOOTLOADER = qmk-dfu endif diff --git a/users/drashna/config.h b/users/drashna/config.h index a0f92d8f389e..6fafff860446 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -7,7 +7,7 @@ #define USB_POLLING_INTERVAL_MS 1 #ifdef AUDIO_ENABLE -# if __GNUC__ > 7 +# if __GNUC__ > 5 # if __has_include("drashna_song_list.h") # include "drashna_song_list.h" # endif // if file exists @@ -29,11 +29,15 @@ #endif // !AUDIO_ENABLE #ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_SLEEP # undef RGBLIGHT_ANIMATIONS -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_KNIGHT +# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) +# define RGBLIGHT_SLEEP +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# else +# define RGBLIGHT_ANIMATIONS +# endif #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index b48d837d00d2..71779a6215f3 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -25,8 +25,6 @@ userspace_config_t userspace_config; # define DRASHNA_UNICODE_MODE 2 #endif - - bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { static uint16_t this_timer; if (pressed) { @@ -73,19 +71,22 @@ void bootmagic_lite(void) { } } +__attribute__((weak)) void keyboard_pre_init_keymap(void) {} + +void keyboard_pre_init_user(void) { + userspace_config.raw = eeconfig_read_user(); + keyboard_pre_init_keymap(); +} // Add reconfigurable functions here, for keymap customization // This allows for a global, userspace functions, and continued // customization of the keymap. Use _keymap instead of _user // functions in the keymaps -__attribute__((weak)) -void matrix_init_keymap(void) {} +__attribute__((weak)) void matrix_init_keymap(void) {} // Call user matrix init, set default RGB colors and then // call the keymap's init function void matrix_init_user(void) { - userspace_config.raw = eeconfig_read_user(); - -#ifdef BOOTLOADER_CATERINA +#if defined(BOOTLOADER_CATERINA) && defined(__AVR__) DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); @@ -100,8 +101,7 @@ void matrix_init_user(void) { matrix_init_keymap(); } -__attribute__((weak)) -void keyboard_post_init_keymap(void) {} +__attribute__((weak)) void keyboard_post_init_keymap(void) {} void keyboard_post_init_user(void) { #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) @@ -110,10 +110,9 @@ void keyboard_post_init_user(void) { keyboard_post_init_keymap(); } -__attribute__((weak)) -void shutdown_keymap(void) {} +__attribute__((weak)) void shutdown_keymap(void) {} - void rgb_matrix_update_pwm_buffers(void); +void rgb_matrix_update_pwm_buffers(void); void shutdown_user(void) { #ifdef RGBLIGHT_ENABLE @@ -122,29 +121,22 @@ void shutdown_user(void) { rgblight_setrgb_red(); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE - rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); + rgb_matrix_set_color_all(0xFF, 0x00, 0x00); rgb_matrix_update_pwm_buffers(); #endif // RGB_MATRIX_ENABLE shutdown_keymap(); } -__attribute__((weak)) -void suspend_power_down_keymap(void) {} +__attribute__((weak)) void suspend_power_down_keymap(void) {} -void suspend_power_down_user(void) { - suspend_power_down_keymap(); -} +void suspend_power_down_user(void) { suspend_power_down_keymap(); } -__attribute__((weak)) -void suspend_wakeup_init_keymap(void) {} +__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} -void suspend_wakeup_init_user(void) { - suspend_wakeup_init_keymap(); -} +void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } -__attribute__((weak)) -void matrix_scan_keymap(void) {} +__attribute__((weak)) void matrix_scan_keymap(void) {} // No global matrix scan code, so just run keymap's matrix // scan function @@ -166,8 +158,7 @@ void matrix_scan_user(void) { matrix_scan_keymap(); } -__attribute__((weak)) -layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } // on layer change, no matter where the change was initiated // Then runs keymap's layer change check @@ -179,32 +170,27 @@ layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } -__attribute__((weak)) -layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } +__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } // Runs state check and changes underglow color and animation layer_state_t default_layer_state_set_user(layer_state_t state) { state = default_layer_state_set_keymap(state); #if 0 -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = default_layer_state_set_rgb(state); # endif // RGBLIGHT_ENABLE #endif return state; } -__attribute__((weak)) -void led_set_keymap(uint8_t usb_led) {} +__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} // Any custom LED code goes here. // So far, I only have keyboard specific code, // So nothing goes here. -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} +void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } -__attribute__((weak)) -void eeconfig_init_keymap(void) {} +__attribute__((weak)) void eeconfig_init_keymap(void) {} void eeconfig_init_user(void) { userspace_config.raw = 0; diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0ccb7614fa1f..0ba18176040e 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -16,7 +16,8 @@ along with this program. If not, see . */ #pragma once -#include "quantum.h" +#include QMK_KEYBOARD_H + #include "version.h" #include "eeprom.h" #include "wrappers.h" @@ -62,6 +63,7 @@ void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); bool hasAllBitsInMask(uint8_t value, uint8_t mask); +// clang-format off typedef union { uint32_t raw; struct { @@ -73,6 +75,7 @@ typedef union { bool rgb_matrix_idle_anim :1; }; } userspace_config_t; +// clang-format on extern userspace_config_t userspace_config; diff --git a/users/drashna/font_gmk_bad.h b/users/drashna/font_gmk_bad.h new file mode 100644 index 000000000000..c1c5c390a95a --- /dev/null +++ b/users/drashna/font_gmk_bad.h @@ -0,0 +1,241 @@ +#pragma once + +#ifdef __AVR__ +# include +# include +#elif defined(ESP8266) +# include +#else +# define PROGMEM +#endif + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ + +// clang-format off +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, + 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, + 0xE0, 0xE0, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xF0, 0xF8, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x80, 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x00, + 0x80, 0xE0, 0xF0, 0xF8, 0x78, 0x38, + 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x38, + 0x38, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xFC, 0xFC, + 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, + 0xFF, 0xFF, 0xFF, 0xC1, 0x80, 0x00, + 0x00, 0x38, 0x38, 0xB8, 0xB8, 0xF9, + 0xF9, 0xF8, 0x38, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0xF8, 0xFF, 0xFF, 0x1F, + 0x01, 0x3F, 0xFF, 0xFF, 0xF0, 0xFE, + 0x7F, 0x0F, 0x03, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xFF, 0xFF, 0xFF, 0x3F, 0x1E, 0x7F, + 0xFF, 0xFF, 0xF3, 0xC1, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xFF, 0xFF, 0xFF, 0x3F, 0x1C, 0x1C, + 0x9C, 0xFF, 0xFF, 0xF3, 0xE1, 0x00, + 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFE, + 0xFF, 0x0F, 0x07, 0x07, 0x8E, 0xFF, + 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, + 0x00, 0xF0, 0xFC, 0xFE, 0xFF, 0x8F, + 0x07, 0x07, 0x8E, 0xFF, 0xFF, 0xFF, + 0x3F, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, + 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x07, 0x07, 0x07, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x07, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x07, 0x07, 0x07, 0x06, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, + 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, + 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, + 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, + 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/users/drashna/hue_manitee_font.h b/users/drashna/hue_manitee_font.h new file mode 100644 index 000000000000..72d50f7a6ab4 --- /dev/null +++ b/users/drashna/hue_manitee_font.h @@ -0,0 +1,241 @@ +#pragma once + +#ifdef __AVR__ +# include +# include +#elif defined(ESP8266) +# include +#else +# define PROGMEM +#endif + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ + +// clang-format off +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, + 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, + 0xC4, 0xA0, 0xE4, 0xB0, 0xDC, 0xE4, + 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, + 0xFC, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, + 0xFC, 0xF6, 0xF7, 0xEF, 0xFF, 0x87, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, + 0x1F, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, + 0xFF, 0x07, 0x1F, 0x1F, 0x19, 0x15, + 0xF7, 0x16, 0x1A, 0x1B, 0x16, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0C, 0x0C, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, 0xC0, 0xC0, + 0x00, 0x00, 0x03, 0x03, 0xFF, 0xFF, + 0x03, 0x03, 0x00, 0x00, 0xC0, 0xC0, + 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0xFC, + 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0x30, 0x30, 0xCC, 0xCC, + 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x03, 0x07, 0x07, 0x07, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, + 0x03, 0x00, 0x00, 0x02, 0x04, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 6eb21d2f2707..2f79ad11cc1a 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -2,11 +2,9 @@ uint16_t copy_paste_timer; -__attribute__((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } +__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } // Defines actions tor my global custom keycodes. Defined in drashna.h file // Then runs the _keymap's record handier if not processed here @@ -23,7 +21,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_QWERTY ... KC_WORKMAN: if (record->event.pressed) { - uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); + uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); if (!mods) { set_single_persistent_default_layer(keycode - KC_QWERTY); } else if (mods & MOD_MASK_SHIFT) { diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index a9af0566e366..52ec61c22dcf 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -12,9 +12,9 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight #if defined(RGB_MATRIX_ENABLE) static uint32_t hypno_timer; # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL # else -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN # endif #endif @@ -23,68 +23,68 @@ static uint32_t hypno_timer; * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. */ #ifdef RGBLIGHT_ENABLE -#ifdef INDICATOR_LIGHTS +# ifdef INDICATOR_LIGHTS void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { - if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { + if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { -# ifdef SHFT_LED1 +# ifdef SHFT_LED1 rgblight_sethsv_at(120, 255, 255, SHFT_LED1); -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 rgblight_sethsv_at(120, 255, 255, SHFT_LED2); -# endif // SHFT_LED2 +# endif // SHFT_LED2 } else { -# ifdef SHFT_LED1 +# ifdef SHFT_LED1 rgblight_sethsv_default_helper(SHFT_LED1); -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 rgblight_sethsv_default_helper(SHFT_LED2); -# endif // SHFT_LED2 +# endif // SHFT_LED2 } if ((this_mod | this_osm) & MOD_MASK_CTRL) { -# ifdef CTRL_LED1 +# ifdef CTRL_LED1 rgblight_sethsv_at(0, 255, 255, CTRL_LED1); -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 rgblight_sethsv_at(0, 255, 255, CTRL_LED2); -# endif // CTRL_LED2 +# endif // CTRL_LED2 } else { -# ifdef CTRL_LED1 +# ifdef CTRL_LED1 rgblight_sethsv_default_helper(CTRL_LED1); -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 rgblight_sethsv_default_helper(CTRL_LED2); -# endif // CTRL_LED2 +# endif // CTRL_LED2 } if ((this_mod | this_osm) & MOD_MASK_GUI) { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_at(51, 255, 255, GUI_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_at(51, 255, 255, GUI_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } else { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_default_helper(GUI_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_default_helper(GUI_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } if ((this_mod | this_osm) & MOD_MASK_ALT) { -# ifdef ALT_LED1 +# ifdef ALT_LED1 rgblight_sethsv_at(240, 255, 255, ALT_LED1); -# endif // ALT_LED1 -# ifdef GUI_LED2 +# endif // ALT_LED1 +# ifdef GUI_LED2 rgblight_sethsv_at(240, 255, 255, ALT_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } else { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_default_helper(ALT_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_default_helper(ALT_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } } } @@ -95,9 +95,9 @@ void matrix_scan_indicator(void) { set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); } } -#endif // INDICATOR_LIGHTS +# endif // INDICATOR_LIGHTS -#ifdef RGBLIGHT_TWINKLE +# ifdef RGBLIGHT_TWINKLE static rgblight_fadeout lights[RGBLED_NUM]; __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } @@ -105,40 +105,40 @@ __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ bool rgblight_twinkle_is_led_used(uint8_t index) { switch (index) { -# ifdef INDICATOR_LIGHTS -# ifdef SHFT_LED1 +# ifdef INDICATOR_LIGHTS +# ifdef SHFT_LED1 case SHFT_LED1: return true; -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 case SHFT_LED2: return true; -# endif // SHFT_LED2 -# ifdef CTRL_LED1 +# endif // SHFT_LED2 +# ifdef CTRL_LED1 case CTRL_LED1: return true; -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 case CTRL_LED2: return true; -# endif // CTRL_LED2 -# ifdef GUI_LED1 +# endif // CTRL_LED2 +# ifdef GUI_LED1 case GUI_LED1: return true; -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 case GUI_LED2: return true; -# endif // GUI_LED2 -# ifdef ALT_LED1 +# endif // GUI_LED2 +# ifdef ALT_LED1 case ALT_LED1: return true; -# endif // ALT_LED1 -# ifdef ALT_LED2 +# endif // ALT_LED1 +# ifdef ALT_LED2 case ALT_LED2: return true; -# endif // ALT_LED2 -# endif // INDICATOR_LIGHTS +# endif // ALT_LED2 +# endif // INDICATOR_LIGHTS default: return rgblight_twinkle_is_led_used_keymap(index); } @@ -154,19 +154,19 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg if (light->life) { light->life -= 1; - if (biton32(layer_state) == 0) { + if (get_highest_layer(layer_state) == 0) { sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); } light->timer = timer_read(); } else { - if (light->enabled && biton32(layer_state) == 0) { + if (light->enabled && get_highest_layer(layer_state) == 0) { rgblight_sethsv_default_helper(light_index); } litup = light->enabled = false; } } } - if (litup && biton32(layer_state) == 0) { + if (litup && get_highest_layer(layer_state) == 0) { rgblight_set(); } } @@ -211,8 +211,8 @@ void start_rgb_light(void) { rgblight_sethsv_at(light->hue, 255, light->life, light_index); } -#endif -#endif // RGBLIGHT_ENABLE +# endif +#endif // RGBLIGHT_ENABLE bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { uint16_t temp_keycode = keycode; @@ -259,7 +259,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { userspace_config.rgb_matrix_idle_anim ^= 1; dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } } #endif break; @@ -281,7 +283,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { is_eeprom_updated = true; } #endif - if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } + if (is_eeprom_updated) { + eeconfig_update_user(userspace_config.raw); + } } break; } @@ -290,7 +294,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { void keyboard_post_init_rgb(void) { #if defined(RGBLIGHT_ENABLE) -# if defined(RGBLIGHT_STARTUP_ANIMATION) +# if defined(RGBLIGHT_STARTUP_ANIMATION) bool is_enabled = rgblight_config.enable; if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); @@ -309,13 +313,13 @@ void keyboard_post_init_rgb(void) { rgblight_disable_noeeprom(); } -# endif +# endif layer_state_set_user(layer_state); #endif #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } #endif } @@ -337,67 +341,70 @@ void matrix_scan_rgb(void) { #endif } +#ifdef RGBLIGHT_ENABLE +void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { + rgblight_sethsv_noeeprom(hue, sat, val); + wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly + rgblight_mode_noeeprom(mode); +} +#endif + layer_state_t layer_state_set_rgb(layer_state_t state) { #ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _MACROS: - rgblight_sethsv_noeeprom_orange(); - userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3); + rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); break; case _MEDIA: - rgblight_sethsv_noeeprom_chartreuse(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1); + rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); break; case _GAMEPAD: - rgblight_sethsv_noeeprom_orange(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2); + rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2); break; case _DIABLO: - rgblight_sethsv_noeeprom_red(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3); break; case _RAISE: - rgblight_sethsv_noeeprom_yellow(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); break; case _LOWER: - rgblight_sethsv_noeeprom_green(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); break; case _ADJUST: - rgblight_sethsv_noeeprom_red(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); break; default: // for any other layers, or the default layer - switch (biton32(default_layer_state)) { + { + uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; + switch (get_highest_layer(default_layer_state)) { case _COLEMAK: - rgblight_sethsv_noeeprom_magenta(); + rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); break; case _DVORAK: - rgblight_sethsv_noeeprom_springgreen(); + rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); break; case _WORKMAN: - rgblight_sethsv_noeeprom_goldenrod(); + rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); break; case _NORMAN: - rgblight_sethsv_noeeprom_coral(); + rgblight_set_hsv_and_mode(HSV_CORAL, mode); break; case _MALTRON: - rgblight_sethsv_noeeprom_yellow(); + rgblight_set_hsv_and_mode(HSV_YELLOW, mode); break; case _EUCALYN: - rgblight_sethsv_noeeprom_pink(); + rgblight_set_hsv_and_mode(HSV_PINK, mode); break; case _CARPLAX: - rgblight_sethsv_noeeprom_blue(); + rgblight_set_hsv_and_mode(HSV_BLUE, mode); break; default: - rgblight_sethsv_noeeprom_cyan(); + rgblight_set_hsv_and_mode(HSV_CYAN, mode); break; } - biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it break; + } } } #endif // RGBLIGHT_ENABLE @@ -408,6 +415,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { #ifdef RGB_MATRIX_ENABLE # include "lib/lib8tion/lib8tion.h" extern led_config_t g_led_config; + void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { HSV hsv = {hue, sat, val}; if (hsv.v > rgb_matrix_config.hsv.v) { diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 7e34c93c114b..50b73c1c3cbe 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -20,13 +20,13 @@ layer_state_t layer_state_set_rgb(layer_state_t state); layer_state_t default_layer_state_set_rgb(layer_state_t state); #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) -void scan_rgblight_fadeout(void); +void scan_rgblight_fadeout(void); #endif #if defined(RGBLIGHT_ENABLE) -void rgblight_sethsv_default_helper(uint8_t index); +void rgblight_sethsv_default_helper(uint8_t index); #endif #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); #endif diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h index 05d347fcd3b4..4c6ae38faa4b 100644 --- a/users/drashna/rgblight_breathe_table.h +++ b/users/drashna/rgblight_breathe_table.h @@ -1,9 +1,10 @@ #ifndef RGBLIGHT_EFFECT_BREATHE_TABLE #define RGBLIGHT_EFFECT_BREATHE_TABLE +// clang-format off const uint8_t rgblight_effect_breathe_table[] PROGMEM = { - /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ - /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ +/* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ +/* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, @@ -110,7 +111,8 @@ const uint8_t rgblight_effect_breathe_table[] PROGMEM = { 0x4e, 0x48 #endif /* 64 bytes table */ }; +// clang-format on -static const int table_scale = 256/sizeof(rgblight_effect_breathe_table); +static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table); #endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 1b5a86385027..882857fc8681 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -1,16 +1,16 @@ SRC += drashna.c \ process_records.c -LINK_TIME_OPTIMIZATION_ENABLE = yes -SPACE_CADET_ENABLE = no +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no ifneq ($(strip $(NO_SECRETS)), yes) - ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c - endif - ifeq ($(strip $(NO_SECRETS)), lite) - OPT_DEFS += -DNO_SECRETS - endif + ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") + SRC += secrets.c + endif + ifeq ($(strip $(NO_SECRETS)), lite) + OPT_DEFS += -DNO_SECRETS + endif endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) @@ -52,3 +52,10 @@ endif ifeq ($(strip $(MAKE_BOOTLOADER)), yes) OPT_DEFS += -DMAKE_BOOTLOADER endif + +# At least until build.mk or the like drops, this is here to prevent +# VUSB boards from enabling NKRO, as they do not support it. Ideally +# this should be handled per keyboard, but until that happens ... +ifeq ($(strip $(PROTOCOL)), VUSB) + NKRO_ENABLE = no +endif \ No newline at end of file diff --git a/users/drashna/template.c b/users/drashna/template.c index d90e6bdecf24..833447daac4f 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c @@ -1,124 +1,82 @@ #include "template.h" - // Add reconfigurable functions here, for keymap customization // This allows for a global, userspace functions, and continued // customization of the keymap. Use _keymap instead of _user // functions in the keymaps -__attribute__ ((weak)) -void matrix_init_keymap(void) {} +__attribute__((weak)) void matrix_init_keymap(void) {} // Call user matrix init, then call the keymap's init function -void matrix_init_user(void) { - matrix_init_keymap(); -} +void matrix_init_user(void) { matrix_init_keymap(); } - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} +__attribute__((weak)) void matrix_scan_keymap(void) {} // No global matrix scan code, so just run keymap's matix // scan function -void matrix_scan_user(void) { - matrix_scan_keymap(); -} +void matrix_scan_user(void) { matrix_scan_keymap(); } - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } // Defines actions tor my global custom keycodes. Defined in drashna.h file // Then runs the _keymap's recod handier if not processed here, // And use "NEWPLACEHOLDER" for new safe range bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - switch (keycode) { - case KC_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" + switch (keycode) { + case KC_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP +#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) + ":dfu" #elif defined(BOOTLOADER_HALFKAY) - ":teensy" + ":teensy" #elif defined(BOOTLOADER_CATERINA) - ":avrdude" + ":avrdude" #endif - SS_TAP(X_ENTER)); + SS_TAP(X_ENTER)); + } + return false; + break; + + case VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; } - return false; - break; - - case VRSN: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - } - return process_record_keymap(keycode, record); -} - - -__attribute__ ((weak)) -layer_state_t layer_state_set_keymap (layer_state_t state) { - return state; -} - -layer_state_t layer_state_set_user (layer_state_t state) { - return layer_state_set_keymap (state); + return process_record_keymap(keycode, record); } +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } +layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} - +__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} +void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } -__attribute__ ((weak)) -void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) -{ - suspend_power_down_keymap(); -} - +__attribute__((weak)) void suspend_power_down_keymap(void) {} +void suspend_power_down_user(void) { suspend_power_down_keymap(); } -__attribute__ ((weak)) -void suspend_wakeup_init_keymap(void) {} +__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} -void suspend_wakeup_init_user(void) -{ - suspend_wakeup_init_keymap(); - #ifdef KEYBOARD_ergodox_ez - wait_ms(10); - #endif +void suspend_wakeup_init_user(void) { + suspend_wakeup_init_keymap(); +#ifdef KEYBOARD_ergodox_ez + wait_ms(10); +#endif } +__attribute__((weak)) void startup_keymap(void) {} - -__attribute__ ((weak)) -void startup_keymap(void) {} - -void startup_user (void) { - #ifdef RGBLIGHT_ENABLE +void startup_user(void) { +#ifdef RGBLIGHT_ENABLE matrix_init_rgb(); - #endif //RGBLIGHT_ENABLE - startup_keymap(); +#endif // RGBLIGHT_ENABLE + startup_keymap(); } +__attribute__((weak)) void shutdown_keymap(void) {} - -__attribute__ ((weak)) -void shutdown_keymap(void) {} - -void shutdown_user (void) { - shutdown_keymap(); -} +void shutdown_user(void) { shutdown_keymap(); } diff --git a/users/drashna/template.h b/users/drashna/template.h index dd1c487604ae..178f96e22011 100644 --- a/users/drashna/template.h +++ b/users/drashna/template.h @@ -1,7 +1,6 @@ -#ifndef USERSPACE -#define USERSPACE +#pragma once -#include "quantum.h" +#include QMK_KEYBOARD_H #include "version.h" #include "eeprom.h" @@ -9,10 +8,8 @@ #define BASE 0 enum custom_keycodes { - VRSN = SAFE_RANGE, // can always be here - KC_MAKE, - KC_RESET, - NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes + VRSN = SAFE_RANGE, // can always be here + KC_MAKE, + KC_RESET, + NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes }; - -#endif From 0a5125a535ff5ee33fdb01853d32adcfd6b0860c Mon Sep 17 00:00:00 2001 From: trinity1561 <47289299+trinity1561@users.noreply.github.com> Date: Wed, 20 Nov 2019 16:11:00 -0500 Subject: [PATCH 032/226] [Keyboard] Update e65.c to fix Caps Lock indicator (#7405) * Update e65.c Fixing Caps Lock LED indicator * Update e65.c Using new LED functions (led_update_kb) --- keyboards/exclusive/e65/e65.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/keyboards/exclusive/e65/e65.c b/keyboards/exclusive/e65/e65.c index e3dab383071d..e01a0614c529 100644 --- a/keyboards/exclusive/e65/e65.c +++ b/keyboards/exclusive/e65/e65.c @@ -17,16 +17,22 @@ #include "e65.h" void matrix_init_kb(void) { - setPinOutput(B6); + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B6); + writePinHigh(B6); } -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B6); - } else { - writePinLow(B6); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B6, !led_state.caps_lock); } - led_set_user(usb_led); + return true; } From 46606e1ea572aaa85f3063db8ff1f93eeb97d6ac Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Thu, 21 Nov 2019 06:16:38 +0900 Subject: [PATCH 033/226] [Keyboard] Add "thedogkeyboard" (#7401) * add the dog keyboard * set rgbled * fix info.json and readme.md * Update keyboards/thedogkeyboard/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/thedogkeyboard/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/thedogkeyboard/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/thedogkeyboard/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * update thedogkeyboard --- keyboards/thedogkeyboard/config.h | 246 +++++++++++++++ keyboards/thedogkeyboard/info.json | 12 + .../thedogkeyboard/keymaps/default/keymap.c | 28 ++ .../thedogkeyboard/keymaps/default/readme.md | 1 + .../thedogkeyboard/keymaps/kakunpc/keymap.c | 43 +++ .../thedogkeyboard/keymaps/kakunpc/readme.md | 1 + keyboards/thedogkeyboard/matrix.c | 287 ++++++++++++++++++ keyboards/thedogkeyboard/readme.md | 15 + keyboards/thedogkeyboard/rules.mk | 35 +++ keyboards/thedogkeyboard/thedogkeyboard.c | 16 + keyboards/thedogkeyboard/thedogkeyboard.h | 59 ++++ 11 files changed, 743 insertions(+) create mode 100644 keyboards/thedogkeyboard/config.h create mode 100644 keyboards/thedogkeyboard/info.json create mode 100644 keyboards/thedogkeyboard/keymaps/default/keymap.c create mode 100644 keyboards/thedogkeyboard/keymaps/default/readme.md create mode 100644 keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c create mode 100644 keyboards/thedogkeyboard/keymaps/kakunpc/readme.md create mode 100644 keyboards/thedogkeyboard/matrix.c create mode 100644 keyboards/thedogkeyboard/readme.md create mode 100644 keyboards/thedogkeyboard/rules.mk create mode 100644 keyboards/thedogkeyboard/thedogkeyboard.c create mode 100644 keyboards/thedogkeyboard/thedogkeyboard.h diff --git a/keyboards/thedogkeyboard/config.h b/keyboards/thedogkeyboard/config.h new file mode 100644 index 000000000000..1a67a3f172a9 --- /dev/null +++ b/keyboards/thedogkeyboard/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2019 kakunpc + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT thedogkeyboard +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 20 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 111 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 50 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/thedogkeyboard/info.json b/keyboards/thedogkeyboard/info.json new file mode 100644 index 000000000000..517aae221b7c --- /dev/null +++ b/keyboards/thedogkeyboard/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TheDogKeyboard", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"7", "x":2, "y":0}, {"label":"13", "x":3, "y":0}, {"label":"19", "x":4, "y":0}, {"label":"24", "x":5, "y":0}, {"label":"29", "x":6.5, "y":0}, {"label":"35", "x":7.5, "y":0}, {"label":"40", "x":8.5, "y":0}, {"label":"45", "x":9.5, "y":0}, {"label":"50", "x":11, "y":0}, {"label":"56", "x":12, "y":0}, {"label":"62", "x":13, "y":0}, {"label":"66", "x":14, "y":0}, {"label":"70", "x":15.25, "y":0}, {"label":"76", "x":16.25, "y":0}, {"label":"82", "x":17.25, "y":0}, {"label":"2", "x":0, "y":1.5}, {"label":"8", "x":1, "y":1.5}, {"label":"14", "x":2, "y":1.5}, {"label":"20", "x":3, "y":1.5}, {"label":"25", "x":4, "y":1.5}, {"label":"30", "x":5, "y":1.5}, {"label":"36", "x":6, "y":1.5}, {"label":"41", "x":7, "y":1.5}, {"label":"46", "x":8, "y":1.5}, {"label":"51", "x":9, "y":1.5}, {"label":"57", "x":10, "y":1.5}, {"label":"63", "x":11, "y":1.5}, {"label":"67", "x":12, "y":1.5}, {"label":"71", "x":13, "y":1.5, "w":2}, {"label":"77", "x":15.25, "y":1.5}, {"label":"84", "x":16.25, "y":1.5}, {"label":"83", "x":17.25, "y":1.5}, {"label":"88", "x":18.5, "y":1.5}, {"label":"93", "x":19.5, "y":1.5}, {"label":"97", "x":20.5, "y":1.5}, {"label":"102", "x":21.5, "y":1.5}, {"label":"3", "x":0, "y":2.5, "w":1.5}, {"label":"9", "x":1.5, "y":2.5}, {"label":"15", "x":2.5, "y":2.5}, {"label":"21", "x":3.5, "y":2.5}, {"label":"26", "x":4.5, "y":2.5}, {"label":"31", "x":5.5, "y":2.5}, {"label":"37", "x":6.5, "y":2.5}, {"label":"42", "x":7.5, "y":2.5}, {"label":"47", "x":8.5, "y":2.5}, {"label":"52", "x":9.5, "y":2.5}, {"label":"58", "x":10.5, "y":2.5}, {"label":"64", "x":11.5, "y":2.5}, {"label":"68", "x":12.5, "y":2.5}, {"label":"72", "x":13.5, "y":2.5, "w":1.5}, {"label":"78", "x":15.25, "y":2.5}, {"label":"86", "x":16.25, "y":2.5}, {"label":"85", "x":17.25, "y":2.5}, {"label":"89", "x":18.5, "y":2.5}, {"label":"94", "x":19.5, "y":2.5}, {"label":"98", "x":20.5, "y":2.5}, {"label":"103", "x":21.5, "y":2.5}, {"label":"4", "x":0, "y":3.5, "w":1.75}, {"label":"10", "x":1.75, "y":3.5}, {"label":"16", "x":2.75, "y":3.5}, {"label":"22", "x":3.75, "y":3.5}, {"label":"27", "x":4.75, "y":3.5}, {"label":"32", "x":5.75, "y":3.5}, {"label":"38", "x":6.75, "y":3.5}, {"label":"43", "x":7.75, "y":3.5}, {"label":"48", "x":8.75, "y":3.5}, {"label":"53", "x":9.75, "y":3.5}, {"label":"59", "x":10.75, "y":3.5}, {"label":"65", "x":11.75, "y":3.5}, {"label":"73", "x":12.75, "y":3.5, "w":2.25}, {"label":"90", "x":18.5, "y":3.5}, {"label":"95", "x":19.5, "y":3.5}, {"label":"99", "x":20.5, "y":3.5}, {"label":"110", "x":21.5, "y":3.5}, {"label":"5", "x":0, "y":4.5, "w":2.25}, {"label":"11", "x":2.25, "y":4.5}, {"label":"17", "x":3.25, "y":4.5}, {"label":"23", "x":4.25, "y":4.5}, {"label":"28", "x":5.25, "y":4.5}, {"label":"33", "x":6.25, "y":4.5}, {"label":"39", "x":7.25, "y":4.5}, {"label":"44", "x":8.25, "y":4.5}, {"label":"49", "x":9.25, "y":4.5}, {"label":"54", "x":10.25, "y":4.5}, {"label":"60", "x":11.25, "y":4.5}, {"label":"74", "x":12.25, "y":4.5, "w":2.75}, {"label":"87", "x":16.25, "y":4.5}, {"label":"91", "x":18.5, "y":4.5}, {"label":"96", "x":19.5, "y":4.5}, {"label":"100", "x":20.5, "y":4.5}, {"label":"104", "x":21.5, "y":4.5}, {"label":"6", "x":0, "y":5.5, "w":1.25}, {"label":"12", "x":1.25, "y":5.5, "w":1.25}, {"label":"18", "x":2.5, "y":5.5, "w":1.25}, {"label":"105", "x":3.75, "y":5.5, "w":1.25}, {"label":"106", "x":5, "y":5.5, "w":1.25}, {"label":"34", "x":6.25, "y":5.5, "w":1.25}, {"label":"107", "x":7.5, "y":5.5, "w":1.25}, {"label":"108", "x":8.75, "y":5.5, "w":1.25}, {"label":"55", "x":10, "y":5.5, "w":1.25}, {"label":"61", "x":11.25, "y":5.5, "w":1.25}, {"label":"69", "x":12.5, "y":5.5, "w":1.25}, {"label":"75", "x":13.75, "y":5.5, "w":1.25}, {"label":"79", "x":15.25, "y":5.5}, {"label":"80", "x":16.25, "y":5.5}, {"label":"81", "x":17.25, "y":5.5}, {"label":"92", "x":18.5, "y":5.5}, {"label":"109", "x":19.5, "y":5.5}, {"label":"101", "x":20.5, "y":5.5}, {"label":"111", "x":21.5, "y":5.5}] + } + } +} diff --git a/keyboards/thedogkeyboard/keymaps/default/keymap.c b/keyboards/thedogkeyboard/keymaps/default/keymap.c new file mode 100644 index 000000000000..7632f81b9307 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2019 kakunpc + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + 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_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, 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_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,KC_NO,KC_NO,KC_SPC,KC_NO,KC_NO,KC_RALT,KC_RGUI,KC_SPC,KC_RCTL, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO + ) +}; diff --git a/keyboards/thedogkeyboard/keymaps/default/readme.md b/keyboards/thedogkeyboard/keymaps/default/readme.md new file mode 100644 index 000000000000..045729a7a5b4 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for thedogkeyboard diff --git a/keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c b/keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c new file mode 100644 index 000000000000..cc3ba84d870c --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/kakunpc/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 kakunpc + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers +{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND LT(COMMAND, KC_F13) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_all( /* BASE */ + 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_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, 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_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,KC_COMMAND,KC_SPC,KC_SPC,KC_SPC,KC_F14,KC_RALT,KC_NO,KC_NO,KC_COMMAND, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO ), + [COMMAND] = LAYOUT_all( /* COMMAND */ + 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_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, 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_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,_______,KC_SPC,KC_SPC,KC_SPC,KC_F14,KC_RALT,KC_NO,KC_NO,_______, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO ), +}; diff --git a/keyboards/thedogkeyboard/keymaps/kakunpc/readme.md b/keyboards/thedogkeyboard/keymaps/kakunpc/readme.md new file mode 100644 index 000000000000..66eab07b94f8 --- /dev/null +++ b/keyboards/thedogkeyboard/keymaps/kakunpc/readme.md @@ -0,0 +1 @@ +# The kakunpc keymap for thedogkeyboard diff --git a/keyboards/thedogkeyboard/matrix.c b/keyboards/thedogkeyboard/matrix.c new file mode 100644 index 000000000000..e06fc15dc4fb --- /dev/null +++ b/keyboards/thedogkeyboard/matrix.c @@ -0,0 +1,287 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. + */ +#include "thedogkeyboard.h" diff --git a/keyboards/thedogkeyboard/thedogkeyboard.h b/keyboards/thedogkeyboard/thedogkeyboard.h new file mode 100644 index 000000000000..3f4b72c2be97 --- /dev/null +++ b/keyboards/thedogkeyboard/thedogkeyboard.h @@ -0,0 +1,59 @@ +/* Copyright 2019 kakunpc + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k01, k07,k13,k19,k24, k29,k35,k40,k45, k50,k56,k62,k66, k70,k76,k82,\ + \ + k02,k08,k14,k20,k25,k30,k36,k41,k46,k51,k57,k63,k67, k71, k77,k84,k83, k88,k93,k97,k102, \ + k03, k09,k15,k21,k26,k31,k37,k42,k47,k52,k58,k64,k68, k72, k78,k86,k85, k89,k94,k98,k103, \ + k04, k10,k16,k22,k27,k32,k38,k43,k48,k53,k59,k65, k73, k90,k95,k99,k110, \ + k05, k11,k17,k23,k28,k33,k39,k44,k49,k54,k60, k74, k87, k91,k96,k100,k104, \ + k06, k12, k18, k105, k106, k34, k107, k108, k55, k61, k69, k75, k79,k80,k81, k92,k109,k101,k111 \ + \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06 }, \ + { k07, k08, k09, k10, k11, k12 }, \ + { k13, k14, k15, k16, k17, k18 }, \ + { k19, k20, k21, k22, k23, k105 }, \ + { k24, k25, k26, k27, k28, k106 }, \ + { k29, k30, k31, k32, k33, k34 }, \ + { k35, k36, k37, k38, k39, k107 }, \ + { k40, k41, k42, k43, k44, k108 }, \ + { k45, k46, k47, k48, k49, KC_NO }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k56, k57, k58, k59, k60, k61 }, \ + { k62, k63, k64, k65, KC_NO, KC_NO }, \ + { k66, k67, k68, k69, KC_NO, KC_NO }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { k76, k77, k78, k79, k80, k81 }, \ + { k82, k83, k84, k85, k86, k87 }, \ + { k88, k89, k90, k91, k92, KC_NO }, \ + { k93, k94, k95, k96, k109, KC_NO }, \ + { k97, k98, k99, k100, k101, KC_NO }, \ + { k102, k103, k104, k110, k111, KC_NO } \ +} From e6b9980bd45c186f7360df68c24b6e05a80c10dc Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 20 Nov 2019 14:31:36 -0800 Subject: [PATCH 034/226] Remove keymap_config extern from default keymaps (#7399) * Remove keymap_config extern from default keymaps * Revert unicode Apparently VSCode does not like unicode, I didn't actually edit these lines, so it must have been automatic... :( Co-Authored-By: fauxpark --- keyboards/adkb96/keymaps/default/keymap.c | 1 - keyboards/cannonkeys/instant60/keymaps/default/keymap.c | 1 - keyboards/cannonkeys/ortho48/keymaps/default/keymap.c | 1 - keyboards/cannonkeys/ortho60/keymaps/default/keymap.c | 1 - keyboards/cannonkeys/practice60/keymaps/default/keymap.c | 1 - keyboards/cannonkeys/practice65/keymaps/default/keymap.c | 1 - keyboards/christmas_tree/keymaps/default/keymap.c | 1 - keyboards/ckeys/handwire_101/keymaps/default/keymap.c | 1 - keyboards/ckeys/obelus/keymaps/default/keymap.c | 1 - keyboards/claw44/keymaps/default/keymap.c | 1 - keyboards/contra/keymaps/default/keymap.c | 1 - keyboards/crkbd/keymaps/default/keymap.c | 1 - keyboards/daisy/keymaps/default/keymap.c | 1 - keyboards/deltasplit75/keymaps/default/keymap.c | 1 - keyboards/diverge3/keymaps/default/keymap.c | 1 - keyboards/divergetm2/keymaps/default/keymap.c | 1 - keyboards/eco/keymaps/default/keymap.c | 1 - keyboards/ergo42/keymaps/default/keymap.c | 2 -- keyboards/ergodash/mini/keymaps/default/keymap.c | 1 - keyboards/ergodash/rev1/keymaps/default/keymap.c | 1 - keyboards/ergotravel/keymaps/default/keymap.c | 1 - keyboards/fortitude60/keymaps/default/keymap.c | 1 - keyboards/hadron/ver2/keymaps/default/keymap.c | 1 - .../handwired/dactyl_manuform/4x5/keymaps/default/keymap.c | 1 - .../handwired/dactyl_manuform/4x6/keymaps/default/keymap.c | 2 -- .../handwired/dactyl_manuform/5x6/keymaps/default/keymap.c | 3 --- .../handwired/dactyl_manuform/5x7/keymaps/default/keymap.c | 1 - .../handwired/dactyl_manuform/6x6/keymaps/default/keymap.c | 2 -- .../dactyl_manuform/dmote/62key/keymaps/default/keymap.c | 1 - .../handwired/dactyl_promicro/keymaps/default/keymap.c | 1 - keyboards/handwired/jot50/keymaps/default/keymap.c | 2 -- keyboards/handwired/jotanck/keymaps/default/keymap.c | 2 -- keyboards/handwired/jotpad16/keymaps/default/keymap.c | 1 - keyboards/handwired/minorca/keymaps/default/keymap.c | 1 - keyboards/handwired/not_so_minidox/keymaps/default/keymap.c | 1 - keyboards/handwired/promethium/keymaps/default/keymap.c | 1 - keyboards/handwired/qc60/keymaps/default/keymap.c | 1 - keyboards/handwired/terminus_mini/keymaps/default/keymap.c | 1 - keyboards/handwired/xealous/keymaps/default/keymap.c | 1 - keyboards/helix/pico/keymaps/default/keymap.c | 1 - keyboards/helix/rev1/keymaps/default/keymap.c | 1 - keyboards/helix/rev2/keymaps/default/keymap.c | 1 - keyboards/ivy/keymaps/default/keymap.c | 1 - keyboards/keebio/dilly/keymaps/default/keymap.c | 1 - keyboards/keebio/iris/keymaps/default/keymap.c | 1 - keyboards/keebio/levinson/keymaps/default/keymap.c | 1 - keyboards/keebio/nyquist/keymaps/default/keymap.c | 1 - keyboards/keebio/quefrency/keymaps/default/keymap.c | 1 - keyboards/keebio/rorschach/keymaps/default/keymap.c | 1 - keyboards/keebio/viterbi/keymaps/default/keymap.c | 1 - keyboards/keebio/wavelet/keymaps/default/keymap.c | 1 - keyboards/launchpad/keymaps/default/keymap.c | 1 - keyboards/lily58/keymaps/default/keymap.c | 1 - keyboards/m10a/keymaps/default/keymap.c | 1 - keyboards/minidox/keymaps/default/keymap.c | 1 - keyboards/mint60/keymaps/default/keymap.c | 1 - keyboards/naked48/keymaps/default/keymap.c | 2 -- keyboards/naked60/keymaps/default/keymap.c | 1 - keyboards/newgame40/keymaps/default/keymap.c | 3 +-- keyboards/plaid/keymaps/default/keymap.c | 1 - keyboards/planck/keymaps/default/keymap.c | 1 - keyboards/projectkb/alice/keymaps/default/keymap.c | 2 -- keyboards/qwertyydox/keymaps/default/keymap.c | 1 - keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c | 1 - keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c | 1 - keyboards/runner3680/3x6/keymaps/default/keymap.c | 1 - keyboards/runner3680/3x7/keymaps/default/keymap.c | 1 - keyboards/runner3680/3x8/keymaps/default/keymap.c | 1 - keyboards/runner3680/4x6/keymaps/default/keymap.c | 1 - keyboards/runner3680/4x7/keymaps/default/keymap.c | 1 - keyboards/runner3680/4x8/keymaps/default/keymap.c | 1 - keyboards/runner3680/5x6/keymaps/default/keymap.c | 1 - keyboards/runner3680/5x7/keymaps/default/keymap.c | 1 - keyboards/runner3680/5x8/keymaps/default/keymap.c | 1 - keyboards/the_ruler/keymaps/default/keymap.c | 1 - keyboards/thevankeyboards/minivan/keymaps/default/keymap.c | 1 - keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c | 1 - keyboards/treadstone32/keymaps/default/keymap.c | 1 - keyboards/treadstone48/keymaps/default/keymap.c | 1 - keyboards/uzu42/keymaps/default/keymap.c | 1 - keyboards/vitamins_included/keymaps/default/keymap.c | 1 - keyboards/waldo/keymaps/default/keymap.c | 1 - keyboards/yosino58/keymaps/default/keymap.c | 6 ++---- keyboards/zinc/keymaps/default/keymap.c | 3 --- 84 files changed, 3 insertions(+), 99 deletions(-) diff --git a/keyboards/adkb96/keymaps/default/keymap.c b/keyboards/adkb96/keymaps/default/keymap.c index a374ffb5e6ce..dc1e9d7b531c 100644 --- a/keyboards/adkb96/keymaps/default/keymap.c +++ b/keyboards/adkb96/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c index 303f307301f9..f9c7995ae078 100644 --- a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c index 2c3bc80c5d49..ba26b9adb2c1 100644 --- a/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c index 56caa4dc84f4..8ae3da3d729f 100644 --- a/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/practice60/keymaps/default/keymap.c b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c index 66ebe0646d5d..b917cf3eeb8a 100644 --- a/keyboards/cannonkeys/practice60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/cannonkeys/practice65/keymaps/default/keymap.c b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c index fdc06e398579..9c0641fe3f9b 100644 --- a/keyboards/cannonkeys/practice65/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/christmas_tree/keymaps/default/keymap.c b/keyboards/christmas_tree/keymaps/default/keymap.c index 6621201996b2..6931b91a6136 100644 --- a/keyboards/christmas_tree/keymaps/default/keymap.c +++ b/keyboards/christmas_tree/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum layers { _BASE, diff --git a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c index 383b3355decb..8c65406ddb7f 100755 --- a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c +++ b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { CKEYS_ABOUT, }; -extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE (numpad) diff --git a/keyboards/ckeys/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c index f71ac562766d..870fdb10d334 100644 --- a/keyboards/ckeys/obelus/keymaps/default/keymap.c +++ b/keyboards/ckeys/obelus/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LAYERS diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c index c346571255f1..088087c77301 100644 --- a/keyboards/claw44/keymaps/default/keymap.c +++ b/keyboards/claw44/keymaps/default/keymap.c @@ -7,7 +7,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; extern uint8_t is_master; diff --git a/keyboards/contra/keymaps/default/keymap.c b/keyboards/contra/keymaps/default/keymap.c index c63bcc0945d6..31e90ed26765 100644 --- a/keyboards/contra/keymaps/default/keymap.c +++ b/keyboards/contra/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum planck_layers { _QWERTY, diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 02f7689570c5..446e3281e457 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/daisy/keymaps/default/keymap.c b/keyboards/daisy/keymaps/default/keymap.c index 9a520ba55d9f..adc3298d0604 100644 --- a/keyboards/daisy/keymaps/default/keymap.c +++ b/keyboards/daisy/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Layer shorthand #define _BL 0 diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c index fc34d1cec9bf..c13b0627c0a7 100644 --- a/keyboards/deltasplit75/keymaps/default/keymap.c +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/diverge3/keymaps/default/keymap.c b/keyboards/diverge3/keymaps/default/keymap.c index 29e5576fcde3..acf262696b2e 100644 --- a/keyboards/diverge3/keymaps/default/keymap.c +++ b/keyboards/diverge3/keymaps/default/keymap.c @@ -84,7 +84,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; // KEYMAP -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/divergetm2/keymaps/default/keymap.c b/keyboards/divergetm2/keymaps/default/keymap.c index 068705970ca2..f620cc237111 100644 --- a/keyboards/divergetm2/keymaps/default/keymap.c +++ b/keyboards/divergetm2/keymaps/default/keymap.c @@ -17,7 +17,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c index ede68d59da66..58951ce32a52 100644 --- a/keyboards/eco/keymaps/default/keymap.c +++ b/keyboards/eco/keymaps/default/keymap.c @@ -4,7 +4,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/ergo42/keymaps/default/keymap.c b/keyboards/ergo42/keymaps/default/keymap.c index 7886e307fd8f..afe748aa6461 100644 --- a/keyboards/ergo42/keymaps/default/keymap.c +++ b/keyboards/ergo42/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define BASE 0 #define META 1 @@ -64,4 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - diff --git a/keyboards/ergodash/mini/keymaps/default/keymap.c b/keyboards/ergodash/mini/keymaps/default/keymap.c index 35cbd87a36a8..18ba51984118 100644 --- a/keyboards/ergodash/mini/keymaps/default/keymap.c +++ b/keyboards/ergodash/mini/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/ergodash/rev1/keymaps/default/keymap.c b/keyboards/ergodash/rev1/keymaps/default/keymap.c index 61539987482b..0c9159497a26 100644 --- a/keyboards/ergodash/rev1/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c index 370ee2092f87..71971d391bb2 100644 --- a/keyboards/ergotravel/keymaps/default/keymap.c +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c index d20ca40fbbad..1c96424f6ef6 100644 --- a/keyboards/fortitude60/keymaps/default/keymap.c +++ b/keyboards/fortitude60/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index 41802d38c419..3b3dd58e2c0c 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -5,7 +5,6 @@ #ifdef SSD1306OLED #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 4836bb06947e..1a328f9d0a86 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _BASE 0 #define _RAISE 1 diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c index ad23beef5c28..52ddfad03850 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _BASE 0 #define _RAISE 1 @@ -84,4 +83,3 @@ void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); } - diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c index 0d1efde33bb3..0910faf899a1 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c @@ -2,7 +2,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 @@ -48,5 +47,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______, _______,_______ ), }; - - diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c index 1378f8723247..eb4deb6285f3 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c index b78a56008677..fd2e5f413df3 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 @@ -52,4 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c index 3012d40a1b5e..3770a6d68eb1 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include #include -extern keymap_config_t keymap_config; // Automatic Layer ID: enum layer_names { diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c index d396e4676289..394803aef5c9 100644 --- a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c index 4ec535c31df5..7342dcd22efd 100644 --- a/keyboards/handwired/jot50/keymaps/default/keymap.c +++ b/keyboards/handwired/jot50/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -81,4 +80,3 @@ uint32_t layer_state_set_user(uint32_t state) { void matrix_init_user(void) { } - diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 44f993db60cc..2467559a601b 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -119,4 +118,3 @@ void matrix_scan_user(void) { reset_keyboard(); } } - diff --git a/keyboards/handwired/jotpad16/keymaps/default/keymap.c b/keyboards/handwired/jotpad16/keymaps/default/keymap.c index fb5dc71e2344..a5d81ab3f480 100644 --- a/keyboards/handwired/jotpad16/keymaps/default/keymap.c +++ b/keyboards/handwired/jotpad16/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/minorca/keymaps/default/keymap.c b/keyboards/handwired/minorca/keymaps/default/keymap.c index 29ed7aa03f9d..f8f9061fecd5 100644 --- a/keyboards/handwired/minorca/keymaps/default/keymap.c +++ b/keyboards/handwired/minorca/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c index 9e89611631d4..296a7a281da5 100644 --- a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c +++ b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index b09e30457cce..207984407c9a 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -84,7 +84,6 @@ enum glow_modes { uint8_t glow_mode = GLOW_MIN; void turn_off_capslock(void); -extern keymap_config_t keymap_config; // layers, ordering is important! enum layers { diff --git a/keyboards/handwired/qc60/keymaps/default/keymap.c b/keyboards/handwired/qc60/keymaps/default/keymap.c index 88062d4ed491..a0f6250ffe31 100644 --- a/keyboards/handwired/qc60/keymaps/default/keymap.c +++ b/keyboards/handwired/qc60/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 276475873ae8..78578a33eeda 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/handwired/xealous/keymaps/default/keymap.c b/keyboards/handwired/xealous/keymaps/default/keymap.c index 4e691a0a76d3..ca82445a5521 100644 --- a/keyboards/handwired/xealous/keymaps/default/keymap.c +++ b/keyboards/handwired/xealous/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index c5ab84abe89c..8d1de894fc31 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -11,7 +11,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c index 299840e3dbc6..85391f8f6043 100644 --- a/keyboards/helix/rev1/keymaps/default/keymap.c +++ b/keyboards/helix/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index 2f4736add82f..4b8b26ecd883 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -11,7 +11,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/ivy/keymaps/default/keymap.c b/keyboards/ivy/keymaps/default/keymap.c index 9a95ba820e7a..c250fbdf8a1f 100644 --- a/keyboards/ivy/keymaps/default/keymap.c +++ b/keyboards/ivy/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/dilly/keymaps/default/keymap.c b/keyboards/keebio/dilly/keymaps/default/keymap.c index dc92afbd0da4..f81aa6d44632 100644 --- a/keyboards/keebio/dilly/keymaps/default/keymap.c +++ b/keyboards/keebio/dilly/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _BASE 0 #define _FN1 1 diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c index 942f96312239..3102dd2daefd 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/keebio/levinson/keymaps/default/keymap.c b/keyboards/keebio/levinson/keymaps/default/keymap.c index abf253380b2e..270a4ffb58e9 100644 --- a/keyboards/keebio/levinson/keymaps/default/keymap.c +++ b/keyboards/keebio/levinson/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/nyquist/keymaps/default/keymap.c b/keyboards/keebio/nyquist/keymaps/default/keymap.c index ecaad49bb2b6..db4b53962b3c 100644 --- a/keyboards/keebio/nyquist/keymaps/default/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/quefrency/keymaps/default/keymap.c b/keyboards/keebio/quefrency/keymaps/default/keymap.c index 744a8d32a4eb..8b30a1174c54 100644 --- a/keyboards/keebio/quefrency/keymaps/default/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/rorschach/keymaps/default/keymap.c b/keyboards/keebio/rorschach/keymaps/default/keymap.c index 736d4d353c61..431f7d3a91b4 100644 --- a/keyboards/keebio/rorschach/keymaps/default/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 diff --git a/keyboards/keebio/viterbi/keymaps/default/keymap.c b/keyboards/keebio/viterbi/keymaps/default/keymap.c index c4ae0a5987d6..78ae83a824bf 100644 --- a/keyboards/keebio/viterbi/keymaps/default/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/keebio/wavelet/keymaps/default/keymap.c b/keyboards/keebio/wavelet/keymaps/default/keymap.c index abf253380b2e..270a4ffb58e9 100644 --- a/keyboards/keebio/wavelet/keymaps/default/keymap.c +++ b/keyboards/keebio/wavelet/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c index c793349a5d7b..8ebc98159d3f 100644 --- a/keyboards/launchpad/keymaps/default/keymap.c +++ b/keyboards/launchpad/keymaps/default/keymap.c @@ -1,7 +1,6 @@ // Below layout is based upon /u/That-Canadian's planck layout #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index b8dda17d535d..f36248e12d33 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -9,7 +9,6 @@ #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c index 232239609986..570cf9183364 100644 --- a/keyboards/m10a/keymaps/default/keymap.c +++ b/keyboards/m10a/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c index 6cc78cce1d1c..03731082c9a1 100644 --- a/keyboards/minidox/keymaps/default/keymap.c +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/mint60/keymaps/default/keymap.c b/keyboards/mint60/keymaps/default/keymap.c index fde64d8defa4..0c65f73c7eea 100644 --- a/keyboards/mint60/keymaps/default/keymap.c +++ b/keyboards/mint60/keymaps/default/keymap.c @@ -19,7 +19,6 @@ #include "split_util.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/naked48/keymaps/default/keymap.c b/keyboards/naked48/keymaps/default/keymap.c index 686685e26328..616967f57b60 100644 --- a/keyboards/naked48/keymaps/default/keymap.c +++ b/keyboards/naked48/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -109,4 +108,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { } - diff --git a/keyboards/naked60/keymaps/default/keymap.c b/keyboards/naked60/keymaps/default/keymap.c index e669df61ed77..9b764482ece0 100644 --- a/keyboards/naked60/keymaps/default/keymap.c +++ b/keyboards/naked60/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; extern uint8_t is_master; diff --git a/keyboards/newgame40/keymaps/default/keymap.c b/keyboards/newgame40/keymaps/default/keymap.c index f3588751fa8e..41f16a7b76f6 100644 --- a/keyboards/newgame40/keymaps/default/keymap.c +++ b/keyboards/newgame40/keymaps/default/keymap.c @@ -16,8 +16,7 @@ #include QMK_KEYBOARD_H - extern keymap_config_t keymap_config; - + enum layers { _QWERTY, _COLEMAK, diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c index 35c22b498319..8982841915ad 100644 --- a/keyboards/plaid/keymaps/default/keymap.c +++ b/keyboards/plaid/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum plaid_layers { _QWERTY, diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 47394378c587..22ff24c92b67 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -17,7 +17,6 @@ #include QMK_KEYBOARD_H #include "muse.h" -extern keymap_config_t keymap_config; enum planck_layers { _QWERTY, diff --git a/keyboards/projectkb/alice/keymaps/default/keymap.c b/keyboards/projectkb/alice/keymaps/default/keymap.c index bad22f9ae445..a56f24f3ff6f 100644 --- a/keyboards/projectkb/alice/keymaps/default/keymap.c +++ b/keyboards/projectkb/alice/keymaps/default/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -42,4 +41,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, RESET ) }; - diff --git a/keyboards/qwertyydox/keymaps/default/keymap.c b/keyboards/qwertyydox/keymaps/default/keymap.c index 5c4dd00e8092..2884fcfbce4b 100644 --- a/keyboards/qwertyydox/keymaps/default/keymap.c +++ b/keyboards/qwertyydox/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum layer_names { _QWERTY, diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index 54462ec0ff13..9eee6431137e 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c index dba4a2ddd851..2f0138c8e073 100644 --- a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/runner3680/3x6/keymaps/default/keymap.c b/keyboards/runner3680/3x6/keymaps/default/keymap.c index 9ccb2ad23515..99ab7ff2d7e3 100644 --- a/keyboards/runner3680/3x6/keymaps/default/keymap.c +++ b/keyboards/runner3680/3x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/3x7/keymaps/default/keymap.c b/keyboards/runner3680/3x7/keymaps/default/keymap.c index e5de1efd0b70..795999cf5bac 100644 --- a/keyboards/runner3680/3x7/keymaps/default/keymap.c +++ b/keyboards/runner3680/3x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/3x8/keymaps/default/keymap.c b/keyboards/runner3680/3x8/keymaps/default/keymap.c index cad7e859a3f2..ae5d2ba650e8 100644 --- a/keyboards/runner3680/3x8/keymaps/default/keymap.c +++ b/keyboards/runner3680/3x8/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/4x6/keymaps/default/keymap.c b/keyboards/runner3680/4x6/keymaps/default/keymap.c index 9af15c703eba..d0c07ddd046a 100644 --- a/keyboards/runner3680/4x6/keymaps/default/keymap.c +++ b/keyboards/runner3680/4x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/4x7/keymaps/default/keymap.c b/keyboards/runner3680/4x7/keymaps/default/keymap.c index 091d44d81599..95e2a67ebe12 100644 --- a/keyboards/runner3680/4x7/keymaps/default/keymap.c +++ b/keyboards/runner3680/4x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/4x8/keymaps/default/keymap.c b/keyboards/runner3680/4x8/keymaps/default/keymap.c index 9b1f9d237bd3..5ff0c0d6914d 100644 --- a/keyboards/runner3680/4x8/keymaps/default/keymap.c +++ b/keyboards/runner3680/4x8/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/5x6/keymaps/default/keymap.c b/keyboards/runner3680/5x6/keymaps/default/keymap.c index d8f50e49e3d0..6d78e8a2e889 100644 --- a/keyboards/runner3680/5x6/keymaps/default/keymap.c +++ b/keyboards/runner3680/5x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/5x7/keymaps/default/keymap.c b/keyboards/runner3680/5x7/keymaps/default/keymap.c index 44c0b20bd2c0..e04e5fb5fbe7 100644 --- a/keyboards/runner3680/5x7/keymaps/default/keymap.c +++ b/keyboards/runner3680/5x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/runner3680/5x8/keymaps/default/keymap.c b/keyboards/runner3680/5x8/keymaps/default/keymap.c index 9f0084e896fd..b9efd44ef7e5 100644 --- a/keyboards/runner3680/5x8/keymaps/default/keymap.c +++ b/keyboards/runner3680/5x8/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c index 8b0f44b5edeb..e6740b05849c 100644 --- a/keyboards/the_ruler/keymaps/default/keymap.c +++ b/keyboards/the_ruler/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c index ac19f8ccd999..fec08cea3eab 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c index af1a94cc2ea9..9c045d745100 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c index a7b908c9de62..b49e55f27c56 100644 --- a/keyboards/treadstone32/keymaps/default/keymap.c +++ b/keyboards/treadstone32/keymaps/default/keymap.c @@ -1,7 +1,6 @@ #include QMK_KEYBOARD_H #include "keymap_jp.h" -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index 406f11292124..6143307528c1 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -2,7 +2,6 @@ #include "keymap_jp.h" #include "../common/oled_helper.h" -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c index bb439971dc55..393f7c3eae62 100644 --- a/keyboards/uzu42/keymaps/default/keymap.c +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -8,7 +8,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE #include diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c index 9ee0d1a353fc..52780d64686a 100644 --- a/keyboards/vitamins_included/keymaps/default/keymap.c +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/waldo/keymaps/default/keymap.c b/keyboards/waldo/keymaps/default/keymap.c index 2fcb3a1afbcf..f8041a3f85aa 100644 --- a/keyboards/waldo/keymaps/default/keymap.c +++ b/keyboards/waldo/keymaps/default/keymap.c @@ -16,7 +16,6 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; enum waldo_layers { _BASE, diff --git a/keyboards/yosino58/keymaps/default/keymap.c b/keyboards/yosino58/keymaps/default/keymap.c index 79b50756965a..2f55dc8e1b60 100644 --- a/keyboards/yosino58/keymaps/default/keymap.c +++ b/keyboards/yosino58/keymaps/default/keymap.c @@ -7,7 +7,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -85,9 +84,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | + * | F1 | F2 | F3 | F4 | F5 | F6 | | | ª | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F7 | F8 | F9 | F10 | F11 | F12 |-------.-------. ,---------------| | | | | | | + * | F7 | F8 | F9 | F10 | F11 | F12 |-------.-------. ,---------------| © | « | ¨ | | | | * `-----------------------------------------/ / / \ \ \----------------------------------------' * | | | /-------/ Space / \ Enter \-------\ | | | * | | |/ / / \ \ RAISE \ | | | @@ -334,4 +333,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/zinc/keymaps/default/keymap.c b/keyboards/zinc/keymaps/default/keymap.c index 7729914eccb5..0f08d21ee788 100644 --- a/keyboards/zinc/keymaps/default/keymap.c +++ b/keyboards/zinc/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -302,5 +301,3 @@ void matrix_init_user(void) { RGB_current_config = rgblight_config; #endif } - - From d2115f7d1c3a314e997ec6800b6741d83115d6be Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 20 Nov 2019 22:32:16 +0000 Subject: [PATCH 035/226] Allow 'make all:' to not build EVERYTHING (#7402) --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 1aa8b2305c5a..8f02eea04969 100644 --- a/Makefile +++ b/Makefile @@ -272,12 +272,14 @@ define PARSE_RULE # If the rule starts with all, then continue the parsing from # PARSE_ALL_KEYBOARDS ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true) + KEYBOARD_RULE=all $$(eval $$(call PARSE_ALL_KEYBOARDS)) else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true) $$(eval $$(call PARSE_TEST)) # If the rule starts with the name of a known keyboard, then continue # the parsing from PARSE_KEYBOARD else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) + KEYBOARD_RULE=$$(MATCHED_ITEM) $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) # Otherwise use the KEYBOARD variable, which is determined either by # the current directory you run make from, or passed in as an argument @@ -380,6 +382,9 @@ define PARSE_KEYBOARD # Otherwise try to match the keymap from the current folder, or arguments to the make command else ifneq ($$(KEYMAP),) $$(eval $$(call PARSE_KEYMAP,$$(KEYMAP))) + # Otherwise if we are running make all: just skip + else ifeq ($$(KEYBOARD_RULE),all) + # $$(info Skipping: No user keymap for $$(CURRENT_KB)) # Otherwise, make all keymaps, again this is consistent with how it works without # any arguments else From f7bdc54c697ff24bec1bd0781666ac05401bafb2 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Wed, 20 Nov 2019 14:54:18 -0800 Subject: [PATCH 036/226] Add flake8 to our test suite and fix all errors (#7379) * Add flake8 to our test suite and fix all errors * Add some documentation --- bin/qmk | 4 +- docs/cli_development.md | 32 ++++++++++ lib/python/kle2xy.py | 2 +- lib/python/qmk/cli/compile.py | 3 - lib/python/qmk/cli/config.py | 94 +++++++++++++++++----------- lib/python/qmk/cli/doctor.py | 2 - lib/python/qmk/cli/flash.py | 10 +-- lib/python/qmk/cli/json/keymap.py | 1 - lib/python/qmk/cli/kle2json.py | 4 +- lib/python/qmk/cli/list/keyboards.py | 26 ++++---- lib/python/qmk/cli/pytest.py | 16 ++--- lib/python/qmk/keymap.py | 4 -- lib/python/qmk/path.py | 1 - requirements.txt | 2 + setup.cfg | 9 +++ 15 files changed, 125 insertions(+), 85 deletions(-) diff --git a/bin/qmk b/bin/qmk index 5da8673ba0fe..4d5b3d884f66 100755 --- a/bin/qmk +++ b/bin/qmk @@ -41,7 +41,7 @@ else: os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty' # Setup the CLI -import milc +import milc # noqa milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}' @@ -61,7 +61,7 @@ def main(): os.chdir(qmk_dir) # Import the subcommands - import qmk.cli + import qmk.cli # noqa # Execute return_code = milc.cli() diff --git a/docs/cli_development.md b/docs/cli_development.md index f5c7ad139a42..cc8c59d067ee 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -173,3 +173,35 @@ You will only be able to access these arguments using `cli.args`. For example: ``` cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.output) ``` + +# Testing, and Linting, and Formatting (oh my!) + +We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `pyformat` subcommands to run these tests: + +### Testing and Linting + + qmk pytest + +### Formatting + + qmk pyformat + +## Formatting Details + +We use [yapf](https://github.com/google/yapf) to automatically format code. Our configuration is in the `[yapf]` section of `setup.cfg`. + +?> Tip- Many editors can use yapf as a plugin to automatically format code as you type. + +## Testing Details + +Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and integration tests in this directory. We hope you will write both unit and integration tests for your code, but if you do not please favor integration tests. + +If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help: + + # TODO(unassigned/): Write tests + +We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions. + +## Linting Details + +We use flake8 to lint our code. Your code should pass flake8 before you open a PR. This will be checked when you run `qmk pytest` and by CI when you submit a PR. diff --git a/lib/python/kle2xy.py b/lib/python/kle2xy.py index 92914431904f..bff1d025b768 100644 --- a/lib/python/kle2xy.py +++ b/lib/python/kle2xy.py @@ -46,7 +46,7 @@ def attrs(self, properties): if 'name' in properties: self.name = properties['name'] - def parse_layout(self, layout): + def parse_layout(self, layout): # noqa FIXME(skullydazed): flake8 says this has a complexity of 25, it should be refactored. # Wrap this in a dictionary so hjson will parse KLE raw data layout = '{"layout": [' + layout + ']}' layout = hjson.loads(layout)['layout'] diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 5c29800096e6..234ffb12ca9a 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -2,9 +2,6 @@ You can compile a keymap already in the repo or using a QMK Configurator export. """ -import json -import os -import sys import subprocess from argparse import FileType diff --git a/lib/python/qmk/cli/config.py b/lib/python/qmk/cli/config.py index c4ee20cba5bd..e17d8bb9ba0e 100644 --- a/lib/python/qmk/cli/config.py +++ b/lib/python/qmk/cli/config.py @@ -1,8 +1,5 @@ """Read and write configuration settings """ -import os -import subprocess - from milc import cli @@ -12,6 +9,54 @@ def print_config(section, key): cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key]) +def show_config(): + """Print the current configuration to stdout. + """ + for section in cli.config: + for key in cli.config[section]: + print_config(section, key) + + +def parse_config_token(config_token): + """Split a user-supplied configuration-token into its components. + """ + section = option = value = None + + if '=' in config_token and '.' not in config_token: + cli.log.error('Invalid configuration token, the key must be of the form
.