From 2758158a4bb15b0f5ec30de92760133248afe1f8 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sun, 12 Aug 2018 17:23:58 +1000 Subject: [PATCH 001/445] Added xeal60 via clone of lets split --- keyboards/handwired/xeal60/config.h | 24 + keyboards/handwired/xeal60/i2c.c | 162 ++++++ keyboards/handwired/xeal60/i2c.h | 49 ++ keyboards/handwired/xeal60/info.json | 12 + .../xeal60/keymaps/DE_simple/config.h | 37 ++ .../xeal60/keymaps/DE_simple/keymap.c | 155 ++++++ .../xeal60/keymaps/DE_simple/readme.md | 59 +++ .../xeal60/keymaps/DE_simple/rules.mk | 0 .../xeal60/keymaps/OLED_sample/config.h | 60 +++ .../xeal60/keymaps/OLED_sample/keymap.c | 441 ++++++++++++++++ .../xeal60/keymaps/OLED_sample/readme.md | 25 + .../xeal60/keymaps/OLED_sample/rules.mk | 25 + .../handwired/xeal60/keymaps/adam/config.h | 50 ++ .../handwired/xeal60/keymaps/adam/keymap.c | 78 +++ .../xeal60/keymaps/bbaserdem/README.md | 27 + .../xeal60/keymaps/bbaserdem/config.h | 27 + .../xeal60/keymaps/bbaserdem/keymap.c | 36 ++ .../xeal60/keymaps/bbaserdem/rules.mk | 11 + .../xeal60/keymaps/bbaserdem_right/README.md | 5 + .../xeal60/keymaps/bbaserdem_right/config.h | 9 + .../xeal60/keymaps/bbaserdem_right/keymap.c | 31 ++ .../xeal60/keymaps/bbaserdem_right/rules.mk | 26 + .../xeal60/keymaps/cpeters1982/config.h | 54 ++ .../xeal60/keymaps/cpeters1982/keymap.c | 221 ++++++++ .../xeal60/keymaps/cpeters1982/rules.mk | 8 + .../handwired/xeal60/keymaps/default/config.h | 37 ++ .../handwired/xeal60/keymaps/default/keymap.c | 211 ++++++++ .../handwired/xeal60/keymaps/default/rules.mk | 3 + .../handwired/xeal60/keymaps/dlaroe/config.h | 37 ++ .../handwired/xeal60/keymaps/dlaroe/keymap.c | 255 ++++++++++ .../handwired/xeal60/keymaps/dlaroe/rules.mk | 0 .../handwired/xeal60/keymaps/drashna/config.h | 80 +++ .../handwired/xeal60/keymaps/drashna/keymap.c | 98 ++++ .../handwired/xeal60/keymaps/drashna/rules.mk | 25 + .../xeal60/keymaps/drashna_old/config.h | 86 ++++ .../xeal60/keymaps/drashna_old/keymap.c | 1 + .../xeal60/keymaps/drashna_old/rules.mk | 28 ++ .../xeal60/keymaps/dwallace/config.h | 43 ++ .../xeal60/keymaps/dwallace/keymap.c | 224 +++++++++ .../xeal60/keymaps/dwallace/rules.mk | 1 + .../handwired/xeal60/keymaps/fabian/config.h | 34 ++ .../handwired/xeal60/keymaps/fabian/keymap.c | 271 ++++++++++ .../handwired/xeal60/keymaps/fabian/rules.mk | 9 + .../handwired/xeal60/keymaps/fido/config.h | 45 ++ .../handwired/xeal60/keymaps/fido/keymap.c | 74 +++ .../handwired/xeal60/keymaps/fido/rules.mk | 1 + .../xeal60/keymaps/heartrobotninja/config.h | 58 +++ .../xeal60/keymaps/heartrobotninja/keymap.c | 180 +++++++ .../xeal60/keymaps/heartrobotninja/rules.mk | 26 + .../xeal60/keymaps/henxing/Readme.md | 51 ++ .../handwired/xeal60/keymaps/henxing/config.h | 37 ++ .../handwired/xeal60/keymaps/henxing/keymap.c | 113 +++++ .../xeal60/keymaps/hexwire/README.md | 116 +++++ .../handwired/xeal60/keymaps/hexwire/config.h | 43 ++ .../handwired/xeal60/keymaps/hexwire/keymap.c | 218 ++++++++ .../handwired/xeal60/keymaps/hexwire/rules.mk | 1 + .../handwired/xeal60/keymaps/khord/config.h | 44 ++ .../handwired/xeal60/keymaps/khord/keymap.c | 170 +++++++ .../handwired/xeal60/keymaps/khord/rules.mk | 7 + .../handwired/xeal60/keymaps/kris/keymap.c | 213 ++++++++ .../handwired/xeal60/keymaps/krusli/keymap.c | 238 +++++++++ .../handwired/xeal60/keymaps/krusli/readme.md | 2 + .../xeal60/keymaps/mbsurfer/config.h | 43 ++ .../xeal60/keymaps/mbsurfer/keymap.c | 274 ++++++++++ .../xeal60/keymaps/mbsurfer/rules.mk | 7 + .../handwired/xeal60/keymaps/mike808/config.h | 43 ++ .../handwired/xeal60/keymaps/mike808/keymap.c | 158 ++++++ .../handwired/xeal60/keymaps/mike808/rules.mk | 1 + .../handwired/xeal60/keymaps/mjt/config.h | 38 ++ .../handwired/xeal60/keymaps/mjt/keymap.c | 213 ++++++++ .../handwired/xeal60/keymaps/mjt/rules.mk | 25 + .../handwired/xeal60/keymaps/mtdjr/config.h | 43 ++ .../handwired/xeal60/keymaps/mtdjr/keymap.c | 55 ++ .../handwired/xeal60/keymaps/mtdjr/rules.mk | 5 + .../xeal60/keymaps/normacos/config.h | 37 ++ .../xeal60/keymaps/normacos/keymap.c | 213 ++++++++ .../xeal60/keymaps/normacos/readme.md | 86 ++++ .../handwired/xeal60/keymaps/piemod/README.md | 31 ++ .../handwired/xeal60/keymaps/piemod/config.h | 49 ++ .../handwired/xeal60/keymaps/piemod/keymap.c | 99 ++++ .../handwired/xeal60/keymaps/piemod/rules.mk | 13 + .../handwired/xeal60/keymaps/pitty/README.md | 91 ++++ .../handwired/xeal60/keymaps/pitty/config.h | 26 + .../handwired/xeal60/keymaps/pitty/keymap.c | 169 +++++++ .../handwired/xeal60/keymaps/pitty/rules.mk | 6 + .../handwired/xeal60/keymaps/poker/config.h | 37 ++ .../handwired/xeal60/keymaps/poker/keymap.c | 240 +++++++++ .../handwired/xeal60/keymaps/poker/rules.mk | 3 + .../handwired/xeal60/keymaps/smt/config.h | 37 ++ .../handwired/xeal60/keymaps/smt/keymap.c | 218 ++++++++ .../handwired/xeal60/keymaps/smt/readme.md | 88 ++++ .../xeal60/keymaps/that_canadian/config.h | 32 ++ .../xeal60/keymaps/that_canadian/keymap.c | 163 ++++++ .../handwired/xeal60/keymaps/waples/README.md | 58 +++ .../handwired/xeal60/keymaps/waples/config.h | 17 + .../handwired/xeal60/keymaps/waples/keymap.c | 131 +++++ .../handwired/xeal60/keymaps/waples/rules.mk | 3 + .../handwired/xeal60/keymaps/xk/config.h | 44 ++ .../handwired/xeal60/keymaps/xk/keymap.c | 370 ++++++++++++++ .../handwired/xeal60/keymaps/xk/rules.mk | 19 + .../handwired/xeal60/keymaps/zer09/config.h | 59 +++ .../handwired/xeal60/keymaps/zer09/keymap.c | 38 ++ .../handwired/xeal60/keymaps/zer09/keymap.h | 32 ++ .../handwired/xeal60/keymaps/zer09/rules.mk | 6 + keyboards/handwired/xeal60/lets_split.c | 16 + keyboards/handwired/xeal60/lets_split.h | 31 ++ keyboards/handwired/xeal60/matrix.c | 470 ++++++++++++++++++ keyboards/handwired/xeal60/readme.md | 187 +++++++ keyboards/handwired/xeal60/rev1/config.h | 86 ++++ keyboards/handwired/xeal60/rev1/rev1.c | 15 + keyboards/handwired/xeal60/rev1/rev1.h | 30 ++ keyboards/handwired/xeal60/rev1/rules.mk | 1 + keyboards/handwired/xeal60/rules.mk | 77 +++ keyboards/handwired/xeal60/serial.c | 228 +++++++++ keyboards/handwired/xeal60/serial.h | 26 + keyboards/handwired/xeal60/split_util.c | 86 ++++ keyboards/handwired/xeal60/split_util.h | 20 + 117 files changed, 9305 insertions(+) create mode 100644 keyboards/handwired/xeal60/config.h create mode 100644 keyboards/handwired/xeal60/i2c.c create mode 100644 keyboards/handwired/xeal60/i2c.h create mode 100644 keyboards/handwired/xeal60/info.json create mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/readme.md create mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/readme.md create mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/adam/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/adam/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/README.md create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/cpeters1982/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/default/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/default/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/dlaroe/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/drashna/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/drashna/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/drashna/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/drashna_old/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/dwallace/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/dwallace/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/dwallace/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/fabian/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/fabian/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/fabian/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/fido/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/fido/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/fido/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/henxing/Readme.md create mode 100644 keyboards/handwired/xeal60/keymaps/henxing/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/henxing/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/README.md create mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/khord/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/khord/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/khord/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/kris/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/krusli/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/krusli/readme.md create mode 100644 keyboards/handwired/xeal60/keymaps/mbsurfer/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/mike808/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/mike808/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/mike808/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/mjt/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/mjt/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/mjt/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/mtdjr/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/normacos/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/normacos/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/normacos/readme.md create mode 100644 keyboards/handwired/xeal60/keymaps/piemod/README.md create mode 100644 keyboards/handwired/xeal60/keymaps/piemod/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/piemod/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/piemod/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/pitty/README.md create mode 100644 keyboards/handwired/xeal60/keymaps/pitty/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/pitty/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/pitty/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/poker/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/poker/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/poker/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/smt/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/smt/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/smt/readme.md create mode 100644 keyboards/handwired/xeal60/keymaps/that_canadian/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/waples/README.md create mode 100644 keyboards/handwired/xeal60/keymaps/waples/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/waples/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/waples/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/xk/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/xk/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/xk/rules.mk create mode 100644 keyboards/handwired/xeal60/keymaps/zer09/config.h create mode 100644 keyboards/handwired/xeal60/keymaps/zer09/keymap.c create mode 100644 keyboards/handwired/xeal60/keymaps/zer09/keymap.h create mode 100644 keyboards/handwired/xeal60/keymaps/zer09/rules.mk create mode 100644 keyboards/handwired/xeal60/lets_split.c create mode 100644 keyboards/handwired/xeal60/lets_split.h create mode 100644 keyboards/handwired/xeal60/matrix.c create mode 100644 keyboards/handwired/xeal60/readme.md create mode 100644 keyboards/handwired/xeal60/rev1/config.h create mode 100644 keyboards/handwired/xeal60/rev1/rev1.c create mode 100644 keyboards/handwired/xeal60/rev1/rev1.h create mode 100644 keyboards/handwired/xeal60/rev1/rules.mk create mode 100644 keyboards/handwired/xeal60/rules.mk create mode 100644 keyboards/handwired/xeal60/serial.c create mode 100644 keyboards/handwired/xeal60/serial.h create mode 100644 keyboards/handwired/xeal60/split_util.c create mode 100644 keyboards/handwired/xeal60/split_util.h diff --git a/keyboards/handwired/xeal60/config.h b/keyboards/handwired/xeal60/config.h new file mode 100644 index 000000000000..c910d8f24f0c --- /dev/null +++ b/keyboards/handwired/xeal60/config.h @@ -0,0 +1,24 @@ +/* +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_H +#define CONFIG_H + +#include "config_common.h" + +#endif diff --git a/keyboards/handwired/xeal60/i2c.c b/keyboards/handwired/xeal60/i2c.c new file mode 100644 index 000000000000..084c890c405f --- /dev/null +++ b/keyboards/handwired/xeal60/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 +#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/handwired/xeal60/info.json b/keyboards/handwired/xeal60/info.json new file mode 100644 index 000000000000..aa1c3b8efc8b --- /dev/null +++ b/keyboards/handwired/xeal60/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Let's Split", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}] + } + } +} diff --git a/keyboards/handwired/xeal60/keymaps/DE_simple/config.h b/keyboards/handwired/xeal60/keymaps/DE_simple/config.h new file mode 100644 index 000000000000..5a6261c4f7cf --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/DE_simple/config.h @@ -0,0 +1,37 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c b/keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c new file mode 100644 index 000000000000..d329bea4c045 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c @@ -0,0 +1,155 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTZ 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTZ = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwertz + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | + | # | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTZ] = LAYOUT( \ + 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 \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | € | ü | ? | ´ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + DE_CIRC, DE_EXLM, DE_DQOT, DE_PARA, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QST, DE_QUOT, \ + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DE_PIPE , KC_SCLN, KC_QUOT, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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 | { | [ | ] | } | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_LCBR, DE_LBRC, DE_RBRC, DE_RCBR , DE_BSLS, \ + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTZ, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwertz[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTZ: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwertz); + #endif + persistent_default_layer_set(1UL<<_QWERTZ); + } + 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/handwired/xeal60/keymaps/DE_simple/readme.md b/keyboards/handwired/xeal60/keymaps/DE_simple/readme.md new file mode 100644 index 000000000000..972cd6c398fe --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/DE_simple/readme.md @@ -0,0 +1,59 @@ +De_Simple Keymap +====== + +Features +-------- + +Changed Keymap to reasamble German Layout. + +Layout +-------- + + Qwertz + ,-----------------------------------------------------------------------------------. + | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Tab | A | S | D | F | G | H | J | K | L | + | # | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + `-----------------------------------------------------------------------------------' + + + Qwerty + ,-----------------------------------------------------------------------------------. + | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Tab | A | S | D | F | G | H | J | K | L | + | # | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + `-----------------------------------------------------------------------------------' + + + Raise + ,-----------------------------------------------------------------------------------. + | ° | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | { | [ | ] | } | \ | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' + + + Adjust (Lower + Raise) + ,-----------------------------------------------------------------------------------. + | | Reset| | | | | | | | | | Del | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | + `-----------------------------------------------------------------------------------' + + diff --git a/keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk b/keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/xeal60/keymaps/OLED_sample/config.h b/keyboards/handwired/xeal60/keymaps/OLED_sample/config.h new file mode 100644 index 000000000000..e8632fe61df8 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/OLED_sample/config.h @@ -0,0 +1,60 @@ +/* +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, not both */ + +#define USE_I2C +//#define USE_SERIAL + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS +#define FLIP_HALF + +#define SSD1306OLED +//#define OLED_ROTATE180 + + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c b/keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c new file mode 100644 index 000000000000..5eccbcf1ac3b --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c @@ -0,0 +1,441 @@ +#include QMK_KEYBOARD_H +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; + + +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_ESC, 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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 , \ + ADJUST, 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 | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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 / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// 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)) { + rgblight_mode(RGB_current_mode); + 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) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_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; + rgblight_mode(16); + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + 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; + rgblight_mode(15); + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + 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: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + RGB_current_mode = rgblight_config.mode; +} + +//SSD1306 OLED init and update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED +void matrix_master_OLED_init (void) { + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display +} + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} +#endif + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); +} + +void shutdown_user() +{ + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + +/* + * Macro definition + */ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + switch (id) { + case KC_SAMPLEMACRO: + if (record->event.pressed){ + return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); + } + + } + + return MACRO_NONE; +} + + +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_LOWER 8 +#define L_RAISE 16 +#define L_FNLAYER 64 +#define L_NUMLAY 128 +#define L_NLOWER 136 +#define L_NFNLAYER 192 +#define L_MOUSECURSOR 256 +#define L_ADJUST 65560 + +void iota_gfx_task_user(void) { +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("USB: ")); +#ifdef PROTOCOL_LUFA + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + matrix_write_P(&matrix, PSTR("Unattached")); + break; + case DEVICE_STATE_Suspended: + matrix_write_P(&matrix, PSTR("Suspended")); + break; + case DEVICE_STATE_Configured: + matrix_write_P(&matrix, PSTR("Connected")); + break; + case DEVICE_STATE_Powered: + matrix_write_P(&matrix, PSTR("Powered")); + break; + case DEVICE_STATE_Default: + matrix_write_P(&matrix, PSTR("Default")); + break; + case DEVICE_STATE_Addressed: + matrix_write_P(&matrix, PSTR("Addressed")); + break; + default: + matrix_write_P(&matrix, PSTR("Invalid")); + } +#endif + +// 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("\n\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(&matrix, PSTR("Default")); + break; + case L_RAISE: + matrix_write_P(&matrix, PSTR("Raise")); + break; + case L_LOWER: + matrix_write_P(&matrix, PSTR("Lower")); + break; + case L_ADJUST: + matrix_write_P(&matrix, PSTR("ADJUST")); + 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< +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#ifdef SUBPROJECT_rev2 + /* RGB Underglow */ + #undef RGBLED_NUM + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 8 +#endif + +#undef TAPPING_TERM +#define TAPPING_TERM 200 //At 500 some bad logic takes hold +#define PREVENT_STUCK_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/adam/keymap.c b/keyboards/handwired/xeal60/keymaps/adam/keymap.c new file mode 100644 index 000000000000..b986ab780bd7 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/adam/keymap.c @@ -0,0 +1,78 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 BASE 0 // default layer +#define FLOCK 1 // symbols arrows and F keys on F held down +#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[BASE] = LAYOUT ( \ + TD(1), KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), F(FLOCK), GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), F(JLOCK), CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOTE +), +[FLOCK] = LAYOUT ( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, \ + S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, S(KC_RBRC), \ + KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLASH \ +), +[JLOCK] = LAYOUT ( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, \ + S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, _______, KC_UP, KC_RIGHT, S(KC_RBRC), \ + KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLASH \ +) +}; + +const uint16_t PROGMEM fn_actions[] = { + [FLOCK] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F), + [JLOCK] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J) +}; +#ifdef TAP_DANCE_ENABLE +void tap_1(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + register_code (KC_1); + unregister_code (KC_1); + break; + case 2: + register_code (KC_ESC); + unregister_code (KC_ESC); + break; + case 3: + register_code (KC_LSFT); + register_code (KC_1); + unregister_code (KC_1); + unregister_code (KC_LSFT); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [0] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_ESC), + [1] = ACTION_TAP_DANCE_FN(tap_1) +}; +#endif diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/README.md b/keyboards/handwired/xeal60/keymaps/bbaserdem/README.md new file mode 100644 index 000000000000..4b37d735552b --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem/README.md @@ -0,0 +1,27 @@ +# Lets Split Layout + +Check out [user readme](../../../../users/bbaserdem/README.md) for more info. + +# Usage + +**These commands depend on there being no other arduino connected!** +Also udev rules can be set instead of using sudo. +Please unplug all other usb devices. + +To make the hex files; +``` +make lets_split/rev2:bbaserdem +make lets_split/rev2:bbaserdem_right +``` + +For the left half, after plugging in and resetting; (from repo main directory) +``` +sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:.build/lets_split_rev2_bbaserdem.hex +sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-lefthand.eep +``` + +For the right half; +``` +sudo avrdude -p atmgea34u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:.build/lets_split_rev2_bbaserdem_right.hex +sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-righhand.eep +``` diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/config.h b/keyboards/handwired/xeal60/keymaps/bbaserdem/config.h new file mode 100644 index 000000000000..6a90e1c356dd --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem/config.h @@ -0,0 +1,27 @@ +#ifndef CONFIG_KEYMAP_H +#define CONFIG_KEYMAP_H + +#include "../../config.h" + +#define USE_SERIAL +#define EE_HANDS + +// LED strip stuff +#ifdef RGBLIGHT_ENABLE + +// Who thought it was a good idea to predefine these in the rev2/config.h ??? +#ifdef RGBLED_NUM +#undef RGBLED_NUM +#endif +#define RGBLED_NUM 12 + +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 20 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 6 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 2000 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#endif + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c b/keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c new file mode 100644 index 000000000000..623117530dcc --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c @@ -0,0 +1,36 @@ +/* + * Let's Split - Dvorak turkish + * Keymap by @bbaserdem + * Dvorak layout with multiple features + * Most of the code is in the "user" directory. + * Check qmk_firmware/users/bbaserdem for the main part of the code + */ +#define KEYMAP(...) LAYOUT_ortho_4x12(__VA_ARGS__) + +#include "lets_split.h" +#include "bbaserdem.h" + + +void matrix_init_keymap (void) { +} + +uint32_t layer_state_set_keymap(uint32_t state) { + return state; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main Dvorak layer + [_DV] = LAYOUT_letssplit_wrapper(DVORAK), + // Turkish and special character overlay + [_AL] = LAYOUT_letssplit_wrapper(ALTCHAR), + // Gaming layer + [_GA] = LAYOUT_letssplit_wrapper(GAME), + // Numbers layer + [_NU] = LAYOUT_letssplit_wrapper(NUMBERS), + // Settings layer + [_SE] = LAYOUT_letssplit_wrapper(SETTINGS), + // Mouse emulation layer + [_MO] = LAYOUT_letssplit_wrapper(MOUSE), + // Music layer + [_MU] = LAYOUT_letssplit_wrapper(MUSIC), +}; diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk b/keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk new file mode 100644 index 000000000000..4159db3fee57 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk @@ -0,0 +1,11 @@ +# Build options + +BACKLIGHT_ENABLE = no # Switch LEDs +MOUSEKEY_ENABLE = yes # Emulates mouse key using keypresses +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/handwired/xeal60/keymaps/bbaserdem_right/README.md b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md new file mode 100644 index 000000000000..8608f23f79b0 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md @@ -0,0 +1,5 @@ +# Lets Split - Right Half + +Keymap for my right half, to be used as a numpad. +Check [main readme](../bbaserdem/README.md) for flashing info. + diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h new file mode 100644 index 000000000000..47545a059beb --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_KEYMAP_H +#define CONFIG_KEYMAP_H + +#include "../../config.h" + +#define USE_SERIAL +#define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c new file mode 100644 index 000000000000..2dcae0dca5a1 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c @@ -0,0 +1,31 @@ +/* + * Let's Split - Dvorak turkish + * Keymap by @bbaserdem + * Dvorak layout with multiple features + * Most of the code is in the "user" directory. + * Check qmk_firmware/users/bbaserdem for the main part of the code + */ + +#include "lets_split.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Navigation All Supered) Numpad + * ,-----------------------. ,-----------------------. + * | F4| ` | Q |Alt| L | > | | ) | - | + | = |Ent|Bkp| + * |---+---+---+---+---+---| |---+---+---+---+---+---| + * | F3| M |Ent|Ctl| K | ^ | | ( | * | 9 | 6 | 3 | . | + * |---+---+---+---+---+---| |---+---+---+---+---+---| + * | F2| T |Spc|Shf| J | v | | % | / | 8 | 5 | 2 | , | + * |---+---+---+---+---+---| |---+---+---+---+---+---| + * | F1| F | P |Tab| H | < | |Nlc|Tab| 7 | 4 | 1 | 0 | + * `-----------------------' `-----------------------' + */ + // Main Dvorak layer + [0] = LAYOUT_ortho_4x12( + LCTL(LALT(KC_DEL)), LGUI(KC_GRV), LGUI(KC_Q), LGUI(KC_LALT), LGUI(KC_L), LGUI(KC_RGHT), KC_RPRN, KC_PMNS, KC_PPLS, KC_PEQL, KC_PENT, KC_BSPC, \ + LGUI(KC_F3), LGUI(KC_M), LGUI(KC_ENT), LGUI(KC_LCTL), LGUI(KC_K), LGUI(KC_UP), KC_LPRN, KC_PAST, KC_P9, KC_P6, KC_P3, KC_PDOT, \ + LGUI(KC_F2), LGUI(KC_T), LGUI(KC_SPC), LGUI(KC_LSFT), LGUI(KC_J), LGUI(KC_DOWN), KC_PERC, KC_PSLS, KC_P8, KC_P5, KC_P2, KC_PCMM, \ + LGUI(KC_F1), LGUI(KC_F), LGUI(KC_P), LGUI(KC_TAB), LGUI(KC_H), LGUI(KC_LEFT), KC_NLCK, KC_TAB, KC_P7, KC_P4, KC_P1, KC_P0 \ + ) +}; diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk new file mode 100644 index 000000000000..36b4b8fc2552 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk @@ -0,0 +1,26 @@ +# Build options + +USER_NAME := bbaserdem-without-userspace + +BACKLIGHT_ENABLE = no # Switch LEDs +MOUSEKEY_ENABLE = no # Emulates mouse key using keypresses +RGBLIGHT_ENABLE = no # LED strips +TAP_DANCE_ENABLE = no # Use multi-tap features +AUDIO_ENABLE = no # Audio stuff +BLUETOOTH_ENABLE = no # No bluetooth +COMMAND_ENABLE = no # Some bootmagic thing +BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed +CONSOLE_ENABLE = no # Allows console output with a command +SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. +NKRO_ENABLE = no # Default is 6KRO which is plenty +MIDI_ENABLE = no # Untested feature +FAUXCLICKY_ENABLE = no # Emulates clicks using speaker +KEY_LOCK_ENABLE = no # Allows locking any key. Not used +API_SYSEX_ENABLE = no # Allows OS to send signals. +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/handwired/xeal60/keymaps/cpeters1982/config.h b/keyboards/handwired/xeal60/keymaps/cpeters1982/config.h new file mode 100644 index 000000000000..3639b9c3f229 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/cpeters1982/config.h @@ -0,0 +1,54 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +// Define Tap Dance interval +//#define TAPPING_TERM 175 + +// // Enable LED strip +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 + +// Space Cadet +#define LSPO_KEY KC_9 +#define RSPC_KEY KC_0 +#define DISABLE_SPACE_CADET_ROLLOVER + +// Auto Shift settings +#define AUTO_SHIFT_TIMEOUT 165 +// #define NO_AUTO_SHIFT_SPECIAL + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c b/keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c new file mode 100644 index 000000000000..9c3eb9475217 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c @@ -0,0 +1,221 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +// #define _DVORAK 2 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + // COLEMAK, + // DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +/* +// Tap dance declerations +enum { + TD_GRV_TILD = 0, +}; + +// Tap dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), +}; +*/ + + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` ~ | Q | W | E | R | T | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Rshift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Lalt | GUI | Esc |Lower |KC_SPC |Enter |Raise | [cmd|] alt |= Hypr| - | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + KC_GRV, 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTRL,KC_LALT, KC_LGUI, KC_ESC, TG(_LOWER), LT(_ADJUST, KC_SPC), KC_ENT, TG(_RAISE), MT(MOD_RGUI, KC_LBRC), MT(MOD_RALT, KC_RBRC), MT(MOD_HYPR, KC_EQL), KC_MINS \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ESC | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bspc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + KC_ESC, 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,_______,_______,_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_MFFD, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | up | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | left | down |right | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | % | ` | ~ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |AShftD|AShftU|REPORT| | | | [ | ] | - | = | \ | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, KC_LEFT, KC_DOWN, KC_RGHT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PERC, KC_GRV, KC_TILD, \ + KC_ASDN, KC_ASUP, KC_ASRP, _______, _______, _______, _______, KC_RBRC, KC_LBRC, KC_MINS, KC_EQL, KC_BSLASH \ +) + + +}; + +/* #ifdef AUDIO_ENABLE +* float tone_qwerty[][2] = SONG(QWERTY_SOUND); +* float tone_dvorak[][2] = SONG(DVORAK_SOUND); +* float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif */ + + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_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; +}; + +#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF); +#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF); +#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF); +#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF); +#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); +#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); +#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF); +#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); +#define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); + +uint32_t layer_state_set_user(uint32_t state) { +#ifdef RGBLIGHT_ENABLE + uint8_t default_layer = eeconfig_read_default_layer(); + if (rgb_layer_change) { + switch (biton32(state)) { + case _RAISE: + rgblight_set_orange; + rgblight_mode(5); + break; + case _LOWER: + rgblight_set_teal; + rgblight_mode(5); + break; + case _ADJUST: + rgblight_set_purple; + rgblight_mode(23); + break; + default: + if (default_layer & (1UL << _COLEMAK)) { + rgblight_set_magenta; + } + else if (default_layer & (1UL << _DVORAK)) { + rgblight_set_green; + } + else { + rgblight_set_blue; + } + rgblight_mode(1); + break; + } + } +#endif + return state; +} diff --git a/keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk b/keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk new file mode 100644 index 000000000000..f2fde785d4e6 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk @@ -0,0 +1,8 @@ + + + +ifndef QUANTUM_DIR + include ../../../../Makefile + AUTO_SHIFT_ENABLE = yes + RGBLIGHT_ENABLE = yes +endif diff --git a/keyboards/handwired/xeal60/keymaps/default/config.h b/keyboards/handwired/xeal60/keymaps/default/config.h new file mode 100644 index 000000000000..5a6261c4f7cf --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/default/config.h @@ -0,0 +1,37 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/default/keymap.c b/keyboards/handwired/xeal60/keymaps/default/keymap.c new file mode 100644 index 000000000000..f782781843df --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/default/keymap.c @@ -0,0 +1,211 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower | 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_ESC, 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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |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_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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |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_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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_DEL, \ + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 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_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/handwired/xeal60/keymaps/default/rules.mk b/keyboards/handwired/xeal60/keymaps/default/rules.mk new file mode 100644 index 000000000000..457a3d01d4a4 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/dlaroe/config.h b/keyboards/handwired/xeal60/keymaps/dlaroe/config.h new file mode 100644 index 000000000000..6b31e8d14ee1 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/dlaroe/config.h @@ -0,0 +1,37 @@ +/* +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_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c b/keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c new file mode 100644 index 000000000000..b2282e0fe8c1 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c @@ -0,0 +1,255 @@ +// Can't Remember Sh*t Keymap for Let's Split +// Trying to fit as many characters as possible on the default layer +// as its easier for me to remember logical functions than characters +// Also, I like me some numpad + + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _ARROW 1 +#define _GAME 2 +#define _LOWER 3 +#define _RAISE 4 +#define _PLOVER 5 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ARROW, + GAME, + LOWER, + RAISE, + BACKLIT, + PLOVER, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | \ | Alt | Lower|SpcRse| Space|Raise | [ | - | = | ] | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + 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, SFT_T(KC_ENT), \ + KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, LT(4, KC_SPC), KC_SPC, RAISE, LT(3, KC_LBRC), KC_MINS, KC_EQL, CTL_T(KC_RBRC) \ +), + +/* Arrow + * ,-----------------------------------------------------------------------------------. + * | 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | \ | Alt | Lower|SpcRse| Space|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_ARROW] = LAYOUT( \ + 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, SFT_T(KC_ENT), \ + KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +/* Game + * ,-----------------------------------------------------------------------------------. + * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Shift | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT( \ + KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ , \ + KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + + +/* Lower (switched to # because KP# were weird in terminal emulators) + * ,-----------------------------------------------------------------------------------. + * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | | | | | 0 | | | | KP_+ | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + KC_DEL, 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, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______, \ + KC_ESC, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, KC_PLUS, _______ \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Wh Dn| M-L | M-Dn | M-R | | - | = | [ | ] | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | App | | | | | Ins | | Home | PGDN | PGUP | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( \ + 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_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV, \ + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______, \ + _______, KC_APP, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* 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 ( \ + 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) + * ,-----------------------------------------------------------------------------------. + * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| Prev | Next | Mute | VolDn| VolUp| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | Play/Pause | | BL_T |BL_DEC|BL_INC|BL_ST | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), \ + _______, _______, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ + BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP \ +) + + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. +{ + switch(id) { + case 0: // this would trigger when you hit a key mapped as M(0) + if (record->event.pressed) { + return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes + } + break; + } + return MACRO_NONE; +}; + + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case GAME: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(music_scale); + #endif + persistant_default_layer_set(1UL<<_GAME); + } + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + +} diff --git a/keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk b/keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/xeal60/keymaps/drashna/config.h b/keyboards/handwired/xeal60/keymaps/drashna/config.h new file mode 100644 index 000000000000..5bc5598ee053 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/drashna/config.h @@ -0,0 +1,80 @@ +/* +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 + +#ifdef RGBLIGHT_ENABLE +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#endif // RGBLIGHT_ENABLE + + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#ifndef NO_PRINT +#define NO_PRINT +#endif // !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 + +#undef PRODUCT +#define PRODUCT Drashnas Viterbi Macro Pad + +#define USE_I2C + +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#define NO_MUSIC_MODE +#endif + +#define LAYOUT_ortho_5x7( \ + 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, \ + L40, L41, L42, L43, L44, L45, L46 \ + ) \ + LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ + ) + +#define QMK_ESC_OUTPUT F5 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_LED B0 +#define QMK_SPEAKER C6 diff --git a/keyboards/handwired/xeal60/keymaps/drashna/keymap.c b/keyboards/handwired/xeal60/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..68ca593db891 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/drashna/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H +#include "drashna.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define LMACRO TG(_MACROS) +#define DIABLO TG(_DIABLO) +#define GAMEPAD TG(_GAMEPAD) +#define MEDIA TT(_MEDIA) + + +//enum more_custom_keycodes { +// KC_P00 = NEW_SAFE_RANGE +//}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_NUMLOCK] = LAYOUT_ortho_5x7( + LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, + MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, + KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT + ), + + [_DIABLO] = LAYOUT_ortho_5x7( + KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, + KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, + KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR, + KC_LALT, KC_F4, KC_F5, KC_F8, KC_F9, KC_F10, SFT_T(KC_SPACE) + ), + + [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch + LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, + MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V + ), + + [_MACROS] = LAYOUT_ortho_5x7( + LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT + ), + + + [_MEDIA] = LAYOUT_ortho_5x7( + KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, + MEDIA, EPRM, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, + RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD, + KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI, + KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI + ) + + +}; + + + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + + //switch (keycode) { + //case KC_P00: + // if (!record->event.pressed) { + // tap(KC_KP_0); + // tap(KC_KP_0); + // } + // return false; + // break; + //} + return true; +} + + + +void matrix_init_keymap(void) { + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +} + + diff --git a/keyboards/handwired/xeal60/keymaps/drashna/rules.mk b/keyboards/handwired/xeal60/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..ec3befc0b73d --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/drashna/rules.mk @@ -0,0 +1,25 @@ +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 +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = yes +NKRO_ENABLE = yes + +NO_SECRETS = yes +MACROS_ENABLED = yes +INDICATOR_LIGHTS = no +RGBLIGHT_TWINKLE = no + +LAYOUTS = ortho_5x7 + +# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) +# SRC := $(filter-out serial.c,$(SRC)) +# SRC := $(filter-out matrix.c,$(SRC)) +# SRC := $(filter-out i2c.c,$(SRC)) +# SRC := $(filter-out split_util.c,$(SRC)) +# SRC += quantum/matrix.c + +BOOTLOADER = qmk-dfu diff --git a/keyboards/handwired/xeal60/keymaps/drashna_old/config.h b/keyboards/handwired/xeal60/keymaps/drashna_old/config.h new file mode 100644 index 000000000000..ddf9d1a40f43 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/drashna_old/config.h @@ -0,0 +1,86 @@ +/* +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + + +#ifdef RGBLIGHT_ENABLE +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#endif // RGBLIGHT_ENABLE + + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#ifndef NO_PRINT +#define NO_PRINT +#endif // !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 + +#undef PRODUCT +#define PRODUCT Drashnas Viterbi Macro Pad + +#define USE_I2C + +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#define NO_MUSIC_MODE +#endif + +#define LAYOUT_ortho_5x7( \ + 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, \ + L40, L41, L42, L43, L44, L45, L46 \ + ) \ + LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ + ) + +#endif + +#define QMK_ESC_OUTPUT F5 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_LED B0 +#define QMK_SPEAKER C6 diff --git a/keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c b/keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c new file mode 100644 index 000000000000..2d361da9a34c --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c @@ -0,0 +1 @@ +//placeholder \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk b/keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk new file mode 100644 index 000000000000..14ac6a6b3c0b --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk @@ -0,0 +1,28 @@ +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 +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = yes +NKRO_ENABLE = yes + +NO_SECRETS = yes +MACROS_ENABLED = yes +INDICATOR_LIGHTS = no +RGBLIGHT_TWINKLE = no + +LAYOUTS = ortho_5x7 + +# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) +# SRC := $(filter-out serial.c,$(SRC)) +# SRC := $(filter-out matrix.c,$(SRC)) +# SRC := $(filter-out i2c.c,$(SRC)) +# SRC := $(filter-out split_util.c,$(SRC)) +# SRC += quantum/matrix.c + +USER_NAME := drashna +SRC += ../drashna/keymap.c + +BOOTLOADER = qmk-dfu diff --git a/keyboards/handwired/xeal60/keymaps/dwallace/config.h b/keyboards/handwired/xeal60/keymaps/dwallace/config.h new file mode 100644 index 000000000000..585b41dbcf2e --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/dwallace/config.h @@ -0,0 +1,43 @@ +/* +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/dwallace/keymap.c b/keyboards/handwired/xeal60/keymaps/dwallace/keymap.c new file mode 100644 index 000000000000..24102448287f --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/dwallace/keymap.c @@ -0,0 +1,224 @@ +#include "viterbi.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _FN 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + STK_SHIFT, + STK_CTRL, + STK_ALT, + STK_GUI, + STK_META, + STK_CLEAR, + RGB_LEVEL_UP, + RGB_LEVEL_DOWN, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_SWIN LGUI(KC_TILD) // Switch between windows +#define KC_SAPP LGUI(KC_TAB) // Switch between applications +#define KC_FN1 MO(_FN) +#define KC_LCAG LCAG(KC_NO) +#define KC_RTOG RGB_TOG +#define KC_RGUP RGB_LEVEL_UP +#define KC_RGDN RGB_LEVEL_DOWN +#define KC_RST RESET +#define KC_SSFT STK_SHIFT +#define KC_SCTL STK_CTRL +#define KC_SALT STK_ALT +#define KC_SGUI STK_GUI +#define KC_SMTA STK_META +#define KC_SCLR STK_CLEAR + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , E , R , T ,LBRC, Y , U , I , O , P ,BSLS,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ESC , A , S , D , F , G ,RBRC, H , J , K , L ,SCLN,QUOT,ENT , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + SSFT, Z , X , C , V , B ,SWIN, N , M ,COMM,DOT , UP ,SLSH,RSFT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + SCTL,SMTA,SALT,SGUI,SPC ,SCLR,SAPP, FN1 ,SPC ,RGUI,LEFT,DOWN,RGHT,PGDN + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,RST , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , RTOG, ,RGDN,RGUP, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , ,MUTE,VOLD,VOLU, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool modifier_already_applied = false; +uint8_t physically_held_modifiers = 0; +uint8_t last_mods = 0xFF; +uint8_t rgb_dimming = 0; +#define SET_LED_RGB(val, led_num) setrgb(((val >> 16) & 0xFF) >> rgb_dimming, ((val >> 8) & 0xFF) >> rgb_dimming, (val & 0xFF) >> rgb_dimming, (LED_TYPE *)&led[led_num]) + +void update_underglow_level(void) { + if (get_mods() == last_mods) + return; + + last_mods = get_mods(); + + if (get_mods() == 0) { + uint8_t level = 0x10 >> rgb_dimming; + rgblight_setrgb(level, level, level); + return; + } + + uint32_t mod_colors[4] = {0}; + uint8_t mod_count = 0; + rgblight_setrgb(0x00, 0x00, 0x00); + + if (get_mods() & MOD_BIT(KC_LSFT)) + mod_colors[mod_count++] = 0xFF0000; + if (get_mods() & MOD_BIT(KC_LCTL)) + mod_colors[mod_count++] = 0x00FF00; + if (get_mods() & MOD_BIT(KC_LALT)) + mod_colors[mod_count++] = 0x0000FF; + if (get_mods() & MOD_BIT(KC_LGUI)) + mod_colors[mod_count++] = 0xFFFF00; + + uint8_t led_num = 0; + for (int m = 0; m < mod_count; m++) { + for (; led_num < RGBLED_NUM*(m+1)/mod_count; led_num++) { + SET_LED_RGB(mod_colors[m], led_num); + } + } + rgblight_set(); +} + +void add_sticky_modifier(uint16_t keycode) { + add_mods(MOD_BIT(keycode)); + register_code(keycode); + modifier_already_applied = false; +} + +void clear_sticky_modifiers(void) { + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + unregister_code(KC_LALT); + unregister_code(KC_LGUI); + update_underglow_level(); +} + +void handle_sticky_modifier_event(uint16_t keycode, bool pressed) { + if (pressed) { + add_sticky_modifier(keycode); + physically_held_modifiers |= MOD_BIT(keycode); + } else { + del_mods(MOD_BIT(keycode)); + physically_held_modifiers &= ~MOD_BIT(keycode); + if (modifier_already_applied) { + clear_sticky_modifiers(); + } else { + add_sticky_modifier(keycode); + } + } + update_underglow_level(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case STK_SHIFT: + handle_sticky_modifier_event(KC_LSFT, record->event.pressed); + return false; + break; + case STK_CTRL: + handle_sticky_modifier_event(KC_LCTL, record->event.pressed); + return false; + break; + case STK_ALT: + handle_sticky_modifier_event(KC_LALT, record->event.pressed); + return false; + break; + case STK_GUI: + handle_sticky_modifier_event(KC_LGUI, record->event.pressed); + return false; + break; + case STK_META: + handle_sticky_modifier_event(KC_LCTL, record->event.pressed); + handle_sticky_modifier_event(KC_LALT, record->event.pressed); + handle_sticky_modifier_event(KC_LGUI, record->event.pressed); + return false; + break; + case STK_CLEAR: + if (record->event.pressed) { + clear_sticky_modifiers(); + } + return false; + break; + case RGB_LEVEL_DOWN: + if (record->event.pressed && rgb_dimming < 8) { + rgb_dimming++; + } + return false; + break; + case RGB_LEVEL_UP: + if (record->event.pressed && rgb_dimming > 0) { + rgb_dimming--; + } + return false; + break; + } + if (!record->event.pressed && IS_KEY(keycode)) { + modifier_already_applied = true; + if (physically_held_modifiers == 0) + clear_sticky_modifiers(); + } + return true; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + #endif //RGBLIGHT_ENABLE +} + +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + update_underglow_level(); + #endif //RGBLIGHT_ENABLE +} diff --git a/keyboards/handwired/xeal60/keymaps/dwallace/rules.mk b/keyboards/handwired/xeal60/keymaps/dwallace/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/dwallace/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/fabian/config.h b/keyboards/handwired/xeal60/keymaps/fabian/config.h new file mode 100644 index 000000000000..6ae40cc2ba2f --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/fabian/config.h @@ -0,0 +1,34 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif diff --git a/keyboards/handwired/xeal60/keymaps/fabian/keymap.c b/keyboards/handwired/xeal60/keymaps/fabian/keymap.c new file mode 100644 index 000000000000..37053a8e4bfe --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/fabian/keymap.c @@ -0,0 +1,271 @@ +/* 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 + + +extern keymap_config_t keymap_config; + +enum custom_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, +}; + +#define XXXXXXX KC_NO +#define _______ KC_TRNS + +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_SPC SFT_T(KC_SPC) // Tap for Space, hold for Shift +#define UMLAUT RALT(KC_U) // Combine Alt and U + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Meh | Alt | GUI |Lower |Space | Tab |Raise | GUI |AltGr | Umlt | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LOWER, KC_SPC, HPR_TAB, RAISE, KC_RGUI, KC_RALT, UMLAUT, KC_RCTL \ +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Meh | Alt | GUI |Lower |Space | Tab |Raise | GUI |AltGr | Umlt | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LOWER, KC_SPC, HPR_TAB, RAISE, KC_RGUI, KC_RALT, UMLAUT, KC_RCTL \ +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Meh | Alt | GUI |Lower |Space | Tab |Raise | GUI |AltGr | Umlt | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ + KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LOWER, KC_SPC, HPR_TAB, RAISE, KC_RGUI, KC_RALT, UMLAUT, KC_RCTL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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( \ + 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| | | | | | | | | Reset| Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, 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, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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) { + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + 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; +} diff --git a/keyboards/handwired/xeal60/keymaps/fabian/rules.mk b/keyboards/handwired/xeal60/keymaps/fabian/rules.mk new file mode 100644 index 000000000000..b8c82cb99d34 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/fabian/rules.mk @@ -0,0 +1,9 @@ +# 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 +# +# UNICODE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/fido/config.h b/keyboards/handwired/xeal60/keymaps/fido/config.h new file mode 100644 index 000000000000..5cb10836521b --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/fido/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2018 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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +#ifndef MASTER_LEFT + #define MASTER_RIGHT +#endif +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/fido/keymap.c b/keyboards/handwired/xeal60/keymaps/fido/keymap.c new file mode 100644 index 000000000000..b8ef4600824c --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/fido/keymap.c @@ -0,0 +1,74 @@ +#include "viterbi.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _FN 1 + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_FN1 MO(_FN) +#define KC_WD_L LCTL(KC_LEFT) +#define KC_WD_R LCTL(KC_RGHT) +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD +#define KC_RST RESET +#define KC_CTLZ LCTL(KC_Z) +#define KC_CTLX LCTL(KC_X) +#define KC_CTLC LCTL(KC_C) +#define KC_CTLV LCTL(KC_V) +#define KC_ATAB LALT(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + 1 , 2 , 3 , 4 , 5 , 6 ,ESC , DEL , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + RBRC, Q , W , E , R , T ,TAB , BSPC, Y , U , I , O , P ,LBRC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + GRV , A , S , D , F , G ,LALT, CAPS, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + BSLS, Z , X , C , V , B ,LSFT, RSFT, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + INS ,PSCR,MENU,LGUI,LCTL,SPC ,FN1 , FN1 ,SPC ,RCTL,RALT, , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + F1 , F2 , F3 , F4 , F5 , F6 , , , F7 , F8 , F9 ,F10 ,F11 ,F12 , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,PGUP,WD_L, UP ,WD_R, ,ATAB, ,RMOD,RHUI,RSAI,RVAI, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,HOME,LEFT,DOWN,RGHT, , , , ,RHUD,RSAD,RVAD, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,CTLZ,CTLX,CTLC,CTLV, , , ,MUTE,VOLD,VOLU, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ) + +}; + +void led_set_user(uint8_t usb_led) { + #ifdef RGBLIGHT_ENABLE + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + rgblight_enable(); + } else { + rgblight_disable(); + } + #endif //RGBLIGHT_ENABLE +} diff --git a/keyboards/handwired/xeal60/keymaps/fido/rules.mk b/keyboards/handwired/xeal60/keymaps/fido/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/fido/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h b/keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h new file mode 100644 index 000000000000..bb3556e57492 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h @@ -0,0 +1,58 @@ +/* +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, not both */ + +#define USE_SERIAL + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 1000 + +#undef LEADER_TIMEOUT +#define LEADER_TIMEOUT 1000 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 + +#ifdef SUBPROJECT_rev1 +#include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 +#include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf +#include "../../rev2fliphalf/config.h" +#endif + +#endif \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c b/keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c new file mode 100644 index 000000000000..3a7ef9db3958 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c @@ -0,0 +1,180 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLE 0 +#define _LOWER 1 +#define _RAISE 2 +#define _AUX 16 + +/* Layers */ +enum +{ + COLE = 0, + LOWER, // right hand 10 key. + RAISE, // left hand Fn, right hand symbols. + AUX, +}; + +/* Tap Dancery */ +enum +{ + TD_BTK, + TD_TDE, + TD_LPRN, + TD_RPRN, + TD_MIN, + TD_USC, +}; + +bool time_travel = false; + +// Fillers to make layering more clear +#define ____ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | ' " `| 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 | ? | | | ^ | _ . >| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Lower |Raise | Ctrl | Alt | Bksp | Spc |Enter |LShft | ESC | < | v | > | + * `-----------------------------------------------------------------------------------' + */ + [_COLE] = LAYOUT( + TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE), + TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN), + TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC), + LOWER, RAISE, OSM(MOD_LCTL), OSM(MOD_LALT), KC_SPC, KC_BSPC, KC_ENT, OSM(MOD_LSFT), KC_ESC, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | 7 | 8 | 9 | * | / | ^ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ---- | ---- | ---- | ---- | ---- | ---- | 4 | 5 | 6 | + | - | ---- | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ---- | ---- | ---- | ---- | ---- | ---- | 1 | 2 | 3 | = | ---- | ---- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | 0 | . | ---- | ---- | ---- | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + ____, ____, ____, ____, ____, ____, KC_7, KC_8, KC_9, KC_PAST, KC_PSLS, KC_CIRC, + ____, ____, ____, ____, ____, ____, KC_4, KC_5, KC_6, KC_PPLS, KC_PMNS, ____, + ____, ____, ____, ____, ____, ____, KC_1, KC_2, KC_3, KC_PEQL, ____, ____, + ____, ____, ____, ____, ____, ____, ____, KC_0, KC_MNXT, ____, ____, ____), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | ! | @ | # | $ | % | ` ~ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 | ^ | & | * | ( | ) | - _ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | [ { | ] } | \ | | ; : | ' " | = + | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | , < | . > | / ? | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL, + ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_COMM, KC_DOT, KC_SLSH), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset| ____ | ____ | ____ | ____ | ____ | ____ | LOCK | ____ | ____ | ____ | VUP | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ____ | ____ | RUN | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | VDWN | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | PGUP | MUTE | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | HOME | PGDN | END | + * `-----------------------------------------------------------------------------------' + */ + [_AUX] = LAYOUT( + RESET, ____, ____, ____, ____, ____, ____, LGUI(KC_L), ____, ____, ____, KC_VOLU, + ____, ____, LGUI(KC_R), ____, ____, ____, ____, ____, ____, ____, ____, KC_VOLD, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_MUTE, + ____, ____, ____, ____, KC_TAB, KC_DEL, ____, ____, ____, KC_HOME, KC_PGDOWN, KC_END) + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV), + [TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD), + [TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN), + [TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN), + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS), + [TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS)}; + +void persistent_default_layer_set(uint16_t default_layer) +{ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +void matrix_scan_user(void){}; + +void matrix_init_user(void){}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { + case COLE: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << _COLE); + } + return false; + break; + case LOWER: + if (record->event.pressed) + { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + else + { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + return false; + break; + case RAISE: + if (record->event.pressed) + { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + else + { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _AUX); + } + return false; + break; + case AUX: + if (record->event.pressed) + { + layer_on(_AUX); + } + else + { + layer_off(_AUX); + } + return false; + break; + } + return true; +} diff --git a/keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk b/keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk new file mode 100644 index 000000000000..2261a848aa69 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk @@ -0,0 +1,26 @@ +# 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 +TAP_DANCE_ENABLE = yes +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 = 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 + +# 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/handwired/xeal60/keymaps/henxing/Readme.md b/keyboards/handwired/xeal60/keymaps/henxing/Readme.md new file mode 100644 index 000000000000..231aa6adf397 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/henxing/Readme.md @@ -0,0 +1,51 @@ +# Let's Split the Atreus + +This keymap is a port of the Atreus keymap to the Let's Split keyboard, using a +similar method of handling layer switches as the `default` keymap. + + +# Layers + +The following tables are the layers as implemented. + +### Underscores in Layer + +Any underscore represents a key that is mapped to `KC_NO`, or no keypress. The +2x3 block in the middle is like this because the Atreus does not have any keys +there. It has been left blank for the user to add her own special keypresses or +macros that she finds useful to have on that particular layer. + + +## `_QWERTY` + +```c +/* + * 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 , . / + * esc tab gui shift bksp ctrl alt space fn - ' enter + */ + ``` + + +## `_LOWER` + +```c +/* + * ! @ up { } _ _ pgup 7 8 9 * + * # left down right $ _ _ pgdn 4 5 6 + + * [ ] ( ) & _ _ ` 1 2 3 \ + * lower insert gui shift bksp ctrl alt space fn . 0 = + */ + ``` + +## `_RAISE` + +```c +/* + * insert home up end pgup _ _ up F7 F8 F9 F10 + * del left down right pgdn _ _ down F4 F5 F6 F11 + * _ volup _ _ reset _ _ F1 F2 F3 F12 + * _ voldn super shift bksp ctrl alt space L0 prtsc scroll pause + */ + ``` diff --git a/keyboards/handwired/xeal60/keymaps/henxing/config.h b/keyboards/handwired/xeal60/keymaps/henxing/config.h new file mode 100644 index 000000000000..5a6261c4f7cf --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/henxing/config.h @@ -0,0 +1,37 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/henxing/keymap.c b/keyboards/handwired/xeal60/keymaps/henxing/keymap.c new file mode 100644 index 000000000000..aab75dc543a8 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/henxing/keymap.c @@ -0,0 +1,113 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 1 +#define _RAISE 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * q w e r t _ _ y u i o p + * a s d f g _ _ h j k l ; + * z x c v b _ _ n m , . / + * esc tab gui shift bksp ctrl alt space fn - ' enter + */ + [_QWERTY] = LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ + ), + + /* + * ! @ up { } _ _ pgup 7 8 9 * + * # left down right $ _ _ pgdn 4 5 6 + + * [ ] ( ) & _ _ ` 1 2 3 \ + * lower insert gui shift bksp ctrl alt space fn . 0 = + */ + [_LOWER] = LAYOUT( \ + KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_NO, KC_NO, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ + RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ + ), + + /* + * insert home up end pgup _ _ up F7 F8 F9 F10 + * del left down right pgdn _ _ down F4 F5 F6 F11 + * _ volup _ _ reset _ _ F1 F2 F3 F12 + * _ voldn super shift bksp ctrl alt space L0 prtsc scroll pause + */ + [_RAISE] = LAYOUT( \ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_NO, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ + KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_NO, KC_NO, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + // The value to return + bool return_value = false; + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); +#endif + persistent_default_layer_set(1UL<<_QWERTY); + } + break; + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + break; + + case RAISE: + persistent_default_layer_set(1UL<<_RAISE); + break; + default: + + // If the keycode is not handled by any of the other cases, we + // should return true + return_value = true; + break; + } + + return return_value; +} diff --git a/keyboards/handwired/xeal60/keymaps/hexwire/README.md b/keyboards/handwired/xeal60/keymaps/hexwire/README.md new file mode 100644 index 000000000000..3ce3f6af330a --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/hexwire/README.md @@ -0,0 +1,116 @@ +Hexwire's Nyquist Layout +============================ + +### Changes from default layout + +- Main layer + - The right space bar key has been changed to backspace, as I only hit space with my left thumb + - Backtick is at the lower right and also serves goes to the 3rd function layer when held + - Enter key acts as shift when held + - Escape key acts as control when held + - Minus key at upper right +- Lower layer + - Numbers are on the lower layer, to make it easier to use a numpad on the right hand + - Arrow keys + - Straight and curly brackets in the middle two columns + - Screenshot keys for MacOS +- Upper layer + - Symbols are on the upper layer + - Media keys + - Page Up/Down, Home/End +- 3rd function layer + - Function keys + +## Layouts + +### QWERTY + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. +|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Colemak +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. +|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Dvorak +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. +|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X0 , A , O , E , U , I , D , H , T , N , S ,SLSH| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Lower +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. +|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , | +|----+----+----+----+----+----| |----+----+----+----+----+----| +|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , DEL , , P0 ,PDOT, , | +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### Raise +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. +|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, | +|----+----+----+----+----+----| |----+----+----+----+----+----| +|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` + +### 3rd function layer + +``` +,----+----+----+----+----+----. ,----+----+----+----+----+----. +|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | +`----+----+----+----+----+----' `----+----+----+----+----+----' +``` diff --git a/keyboards/handwired/xeal60/keymaps/hexwire/config.h b/keyboards/handwired/xeal60/keymaps/hexwire/config.h new file mode 100644 index 000000000000..7acf84510e64 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/hexwire/config.h @@ -0,0 +1,43 @@ +/* +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/hexwire/keymap.c b/keyboards/handwired/xeal60/keymaps/hexwire/keymap.c new file mode 100644 index 000000000000..2050c037933f --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/hexwire/keymap.c @@ -0,0 +1,218 @@ +#include "viterbi.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _FN3 5 +#define _FN4 6 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + FN3, + FN4, + ADJUST, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen +#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen +#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen +#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen +#define KC_X0 MT(MOD_LCTL, KC_ESC) +#define KC_X1 LOWER +#define KC_X2 RAISE +#define KC_X3 LT(_FN3, KC_GRV) +#define KC_X4 MT(MOD_LSFT, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , E , R , T , , Y , U , I , O , P ,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + X0 , A , S , D , F , G , , H , J , K , L ,SCLN,QUOT, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , , N , M ,COMM,DOT ,SLSH, X4 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT, + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_COLEMAK] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , F , P , G , , J , L , U , Y ,SCLN,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + X0 , A , R , S , T , D , , H , N , E , I , O ,QUOT, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , , K , M ,COMM,DOT ,SLSH, X4 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT, + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_DVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB ,QUOT,COMM,DOT , P , Y , , F , G , C , R , L ,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + X0 , A , O , E , U , I , , D , H , T , N , S ,SLSH, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , , B , M , W , V , Z , X4 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT, + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + DEL ,CAPP,LEFT,RGHT, UP ,LBRC, , RBRC, P4 , P5 , P6 ,PLUS,PIPE, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,CPYP, , ,DOWN,LCBR, , RCBR, P1 , P2 , P3 ,MINS, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , DEL , , P0 ,PDOT, , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , EQL ,HOME, , , ,BSLS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , PLUS,END , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN3] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , , F6 , F7 , F8 , F9 ,F10 ,F11 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, 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, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/handwired/xeal60/keymaps/hexwire/rules.mk b/keyboards/handwired/xeal60/keymaps/hexwire/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/hexwire/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/khord/config.h b/keyboards/handwired/xeal60/keymaps/khord/config.h new file mode 100644 index 000000000000..4ebdbad76919 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/khord/config.h @@ -0,0 +1,44 @@ +/* +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" + +#define TAPPING_TERM 150 + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define RGBLIGHT_ANIMATIONS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/khord/keymap.c b/keyboards/handwired/xeal60/keymaps/khord/keymap.c new file mode 100644 index 000000000000..41042065d639 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/khord/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + ADMIN, + SMSPC1 +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Tap Dance Declarations +enum { + SFT_CAP = 0 +}; + +// Dylan's additions +#define C_A_DEL LALT(LCTL(KC_DEL)) +#define C_A_INS LALT(LCTL(KC_INS)) +//#define MAC_LOK S(LCTL(KC_PWR)) +#define MAC_LOK LCTL(LGUI(KC_Q)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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, \ + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + ADJUST, 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 | | | END | HOME |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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, MAC_LOK, _______, KC_END, KC_HOME, _______, \ + LCTL(KC_UP), KC_BTN3, KC_BTN2, KC_BTN1, _______, _______, _______, _______, 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 | | |PG DN |PG UP |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | MB1 | MB2 | MB3 | MB4 | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4 \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | |AGnorm|AGswap| | | |string|string| Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |RGBMOD|HUE-UP|SAT-UP|BRI-UP| |PLAIN |BREATH|RANBOW| SWIRL| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |RGBTOG|HUE-DN|SAT-DN|BRI-DN| |GRDNT | XMAS |KNIGHT| SNAKE| | CAIns| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | CADel| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, ADMIN, SMSPC1, KC_DEL, \ + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, _______, _______, \ + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, RGB_M_G, RGB_M_X, RGB_M_K, RGB_M_SN, _______, C_A_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_DEL \ +) + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_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; + case ADMIN: + if (record->event.pressed) { + SEND_STRING("Administrator"); + } + return false; + break; + case SMSPC1: + if (record->event.pressed) { + SEND_STRING("Simspace1!"); + } + return false; + break; + } + return true; +} diff --git a/keyboards/handwired/xeal60/keymaps/khord/rules.mk b/keyboards/handwired/xeal60/keymaps/khord/rules.mk new file mode 100644 index 000000000000..c90523e5d647 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/khord/rules.mk @@ -0,0 +1,7 @@ +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes +USE_I2C = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/kris/keymap.c b/keyboards/handwired/xeal60/keymaps/kris/keymap.c new file mode 100644 index 000000000000..34d2e86da03c --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/kris/keymap.c @@ -0,0 +1,213 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +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 | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift|| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Alt | Gui |Caps |Lower |Space |Space |Raise | [ | ] | - |Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT , \ + ADJUST, KC_LALT, KC_LGUI, KC_CAPS, LOWER, KC_SPC, KC_SPC, RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_RCTRL \ +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 , \ + ADJUST, KC_LALT, KC_LGUI, KC_CAPS, LOWER, KC_SPC, KC_SPC, RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_RCTRL \ +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/handwired/xeal60/keymaps/krusli/keymap.c b/keyboards/handwired/xeal60/keymaps/krusli/keymap.c new file mode 100644 index 000000000000..9b49bab3b41d --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/krusli/keymap.c @@ -0,0 +1,238 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _NUMPAD 5 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + NUMPAD +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Numpad| Ctrl | Alt | GUI |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_ESC, 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 , \ + NUMPAD, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |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_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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |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_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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_DEL, \ + 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_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 | Home | End | PgUp | PgDn |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | Esc | 7 | 8 | 9 | * | / | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | <-- | 4 | 5 | 6 | + | - | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 1 | 2 | 3 |Enter |Enter | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Qwerty| 0 | . | . |Enter |Enter | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \ + KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \ + _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \ + QWERTY, KC_P0, KC_PDOT, KC_PDOT, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______ \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case NUMPAD: + if (record->event.pressed) + persistent_default_layer_set(1UL<<_NUMPAD); + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/handwired/xeal60/keymaps/krusli/readme.md b/keyboards/handwired/xeal60/keymaps/krusli/readme.md new file mode 100644 index 000000000000..175ef3c11a53 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/krusli/readme.md @@ -0,0 +1,2 @@ +# krusli +Let's Split keymap based off the default Planck layout with a numpad layer. diff --git a/keyboards/handwired/xeal60/keymaps/mbsurfer/config.h b/keyboards/handwired/xeal60/keymaps/mbsurfer/config.h new file mode 100644 index 000000000000..6469b4846dbd --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mbsurfer/config.h @@ -0,0 +1,43 @@ +/* +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" + +#define TAPPING_TERM 100 + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c b/keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c new file mode 100644 index 000000000000..5f6589337f8a --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c @@ -0,0 +1,274 @@ +#include QMK_KEYBOARD_H + + +extern rgblight_config_t rgblight_config; +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Tap Dance Declarations +enum { + SFT_CAP = 0, + LFT_HOM, + DWN_PDN, + UPP_PUP, + RGT_END +}; + +// Task Manager +#define C_S_ESC LSFT(LCTL(KC_ESC)) +#define C_A_DEL LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------------------------------------------ ------------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| +* |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `------------------------------------------ ------------------------------------------' + */ +[_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, \ + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, TD(LFT_HOM), TD(DWN_PDN), TD(UPP_PUP), TD(RGT_END) \ +), + +/* 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 | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `------------------------------------------ ------------------------------------------' + */ +[_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_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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `------------------------------------------ ------------------------------------------' + */ +[_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_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 , \ + ADJUST, 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 | | END | HOME |Enter | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_END, KC_HOME, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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 DN |PG UP |Enter | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_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_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_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,------------------------------------------ ------------------------------------------. + * | Reset| | Plain|Breath|Rainbw| Swirl| | Snake|Knight| Xmas |Grdent| | Del | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | |Toggle| Mode | Hue- | Hue+ | Sat- | | Sat+ | Val- | Val+ | | | | (RGB) + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | | | | | | |TskMng|CAltDe| + * `------------------------------------------ ------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + RESET, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_S_ESC, C_A_DEL \ +) + + +}; + +int RGB_current_mode; +int RGB_current_hue; + +qk_tap_dance_action_t tap_dance_actions[] = { + [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), + [LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME), + [DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN), + [UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP), + [RGT_END] = ACTION_TAP_DANCE_DOUBLE(KC_RGHT, KC_END) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + + if (IS_LAYER_OFF(_RAISE) && IS_LAYER_OFF(_ADJUST)) { + // Save current RGB info + RGB_current_mode = rgblight_config.mode; + RGB_current_hue = rgblight_config.hue; + + // Set RGB to Blue + rgblight_mode(1); + rgblight_setrgb(0, 0, 255); + } + + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + + if (IS_LAYER_ON(_ADJUST)){ + // Set RGB to cyan + rgblight_setrgb(0, 255, 255); + } + } else { + + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + + if (IS_LAYER_OFF(_RAISE) && IS_LAYER_OFF(_ADJUST)) { + // Reset RGB + rgblight_mode(RGB_current_mode); + rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val); + } else if (IS_LAYER_ON(_RAISE)){ + // Set RGB to Red + rgblight_setrgb(0, 255, 0); + } + } + return false; + break; + case RAISE: + if (record->event.pressed) { + + if (IS_LAYER_OFF(_LOWER) && IS_LAYER_OFF(_ADJUST)) { + // Save current RGB info + RGB_current_mode = rgblight_config.mode; + RGB_current_hue = rgblight_config.hue; + + // Set RGB to Green + rgblight_mode(1); + rgblight_setrgb(0, 255, 0); + } + + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + + if (IS_LAYER_ON(_ADJUST)){ + // Set RGB to cyan + rgblight_setrgb(0, 255, 255); + } + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + + if (IS_LAYER_OFF(_LOWER) && IS_LAYER_OFF(_ADJUST)) { + // Reset RGB + rgblight_mode(RGB_current_mode); + rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val); + } else if (IS_LAYER_ON(_LOWER)){ + // Set RGB to Blue + rgblight_setrgb(0, 0, 255); + } + } + 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/handwired/xeal60/keymaps/mbsurfer/rules.mk b/keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk new file mode 100644 index 000000000000..c90523e5d647 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk @@ -0,0 +1,7 @@ +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes +USE_I2C = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/mike808/config.h b/keyboards/handwired/xeal60/keymaps/mike808/config.h new file mode 100644 index 000000000000..bfca915f24d8 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mike808/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2018 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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/mike808/keymap.c b/keyboards/handwired/xeal60/keymaps/mike808/keymap.c new file mode 100644 index 000000000000..c7e48b135c50 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mike808/keymap.c @@ -0,0 +1,158 @@ +#include QMK_KEYBOARD_H + +#define _DVORAK 0 +#define _QWERTY 1 +#define _FN1 2 +#define _MOUSE 3 + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_DVOR DVORAK +#define KC_QWER QWERTY +#define KC_FN1 MO(_FN1) + +// Tap-Hold keys (QWERTY) +#define KC_S_C MT(MOD_LCTL, KC_S) +#define KC_D_A MT(MOD_LALT, KC_D) +#define KC_F_G MT(MOD_LGUI, KC_F) +#define KC_J_G MT(MOD_RGUI, KC_J) +#define KC_K_A MT(MOD_RALT, KC_K) +#define KC_L_C MT(MOD_RCTL, KC_L) + +// Tap-Hold keys (Dvorak) +#define KC_O_C MT(MOD_LCTL, KC_O) +#define KC_E_A MT(MOD_LALT, KC_E) +#define KC_U_G MT(MOD_LGUI, KC_U) +#define KC_H_G MT(MOD_RGUI, KC_H) +#define KC_T_A MT(MOD_RALT, KC_T) +#define KC_N_C MT(MOD_RCTL, KC_N) + +#define KC_G_A LGUI(KC_A) +#define KC_G_C LGUI(KC_C) +#define KC_G_V LGUI(KC_V) +#define KC_G_X LGUI(KC_X) +#define KC_G_Z LGUI(KC_Z) +#define KC_G_BL LGUI(KC_BSLS) +#define KC_G_TB LGUI(KC_TAB) +#define KC_G_SP LGUI(KC_SPC) + +#define KC_ENTM LT(_MOUSE, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + DVOR,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_A ,TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,PGDN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_X ,CAPS, A ,S_C ,D_A ,F_G , G , H ,J_G ,K_A ,L_C ,SCLN,QUOT, UP , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_C ,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,DOWN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,EQL ,LEFT,RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_DVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + QWER,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,EQL ,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_A ,TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,PGDN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_X ,CAPS, A ,O_C ,E_A ,U_G , I , D ,H_G ,T_A ,N_C , S ,MINS, UP , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_C ,LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,RSFT,DOWN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,BSLS,LEFT,RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,EXLM, AT ,LCBR,RCBR,PIPE, , P7 , P8 , P9 ,ASTR,F12 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,HASH,DLR ,LPRN,RPRN,GRV , , P4 , P5 , P6 ,PLUS,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , ,PDOT, P0 ,EQL , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_MOUSE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,MS_U, , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , ,MS_L,MS_D,MS_R, , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,BTN1,BTN2, , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ) +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +#endif + +void update_rgblight(uint16_t layer) { + if (layer & (1UL << _DVORAK)) { + rgblight_sethsv_green(); + } else if (layer & (1UL << _QWERTY)) { + rgblight_sethsv_goldenrod(); + } +} + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); + #ifdef RGBLIGHT_ENABLE + update_rgblight(default_layer); + #endif // RGBLIGHT_ENABLE +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL << _QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL << _DVORAK); + } + return false; + break; + } + return true; +} + + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + uint8_t default_layer = eeconfig_read_default_layer(); + update_rgblight(default_layer); + #endif +} diff --git a/keyboards/handwired/xeal60/keymaps/mike808/rules.mk b/keyboards/handwired/xeal60/keymaps/mike808/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mike808/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/mjt/config.h b/keyboards/handwired/xeal60/keymaps/mjt/config.h new file mode 100644 index 000000000000..735a58b11aad --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mjt/config.h @@ -0,0 +1,38 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 diff --git a/keyboards/handwired/xeal60/keymaps/mjt/keymap.c b/keyboards/handwired/xeal60/keymaps/mjt/keymap.c new file mode 100644 index 000000000000..2c61cce3bc2c --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mjt/keymap.c @@ -0,0 +1,213 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_ESC, 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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 , \ + ADJUST, 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 | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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 / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/handwired/xeal60/keymaps/mjt/rules.mk b/keyboards/handwired/xeal60/keymaps/mjt/rules.mk new file mode 100644 index 000000000000..874d09eab540 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mjt/rules.mk @@ -0,0 +1,25 @@ + +# 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 = 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 +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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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/xeal60/keymaps/mtdjr/config.h b/keyboards/handwired/xeal60/keymaps/mtdjr/config.h new file mode 100644 index 000000000000..afbf73569587 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mtdjr/config.h @@ -0,0 +1,43 @@ +/* +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" + +#define SOLENOID_ENABLE +#define SOLENOID_PIN F4 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C +/* Select hand configuration */ + + #define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c b/keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c new file mode 100644 index 000000000000..47972fcd3511 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H +#include "mtdjr.h" + +extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( +// ,-----------------------------. .-----------------------------. + TAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + EXC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM, DOT,SLSH, ENT, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + LOWR,LCTL,LALT,LGUI,LOWR, SPC, SPC,RASE,LEFT,DOWN, UP ,RGHT +// '-----------------------------' '-----------------------------' + ), + + [_LOWER] = LAYOUT_kc( +// ,-----------------------------. .-----------------------------. + TILD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,LBRC,RBRC,BSLS, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + ,UNDO, CUT,XCPY,XINS,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx, , +// |----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , +// '-----------------------------' '-----------------------------' + ), + + [_RAISE] = LAYOUT_kc( +// ,-----------------------------. .-----------------------------. + GRV,EXLM, AT ,HASH, DLR,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , +// |----+----+----+----+----+----| |----+----+----+----+----+----| + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, MINS, EQL,xxxx,LCBR,RCBR,PIPE, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + ,xxxx,xxxx,xxxx,xxxx,xxxx, UNDS,PLUS,xxxx,xxxx,xxxx, , +// |----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , ,MNXT,VOLD,VOLU,MPLY +// '-----------------------------' '-----------------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ +// ,-----------------------------. .-----------------------------. + xxxx,ROOT,PPLY,PSEF,xxxx,xxxx, RST,STOG,xxxx,xxxx,xxxx, DEL, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + RGB,RHUI,RSAI,RVAI, MOD,xxxx, F1 , F2 , F3 , F4 , F5 , F6 , +// |----+----+----+----+----+----| |----+----+----+----+----+----| + RBTH,RHUD,RSAD,RVAD,RMOD,xxxx, F7 , F8 , F9 , F10, F11, F12, +// |----+----+----+----+----+----| |----+----+----+----+----+----| + ,xxxx,xxxx,xxxx, ,xxxx, xxxx, ,xxxx,xxxx,xxxx,xxxx +// '-----------------------------' '-----------------------------' + ) +}; diff --git a/keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk b/keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk new file mode 100644 index 000000000000..75e9c6503e8e --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk @@ -0,0 +1,5 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/normacos/config.h b/keyboards/handwired/xeal60/keymaps/normacos/config.h new file mode 100644 index 000000000000..9f95a869df9c --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/normacos/config.h @@ -0,0 +1,37 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define _MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/normacos/keymap.c b/keyboards/handwired/xeal60/keymaps/normacos/keymap.c new file mode 100644 index 000000000000..8902b7b56f5a --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/normacos/keymap.c @@ -0,0 +1,213 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _NORMAN 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +// To be used in process_record_user +enum custom_keycodes { + NORMAN = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + SH_LOG, + SH_GOUP, + SH_TERM, + SPOT, + SLACK, + OUTLOOK, + CHROME +}; + +// Fillers (to make layering more clear) +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Mod taps +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control + +// Custom macros +#define SCN_SHT LSFT(LGUI(KC_4)) // Take a screenshot (MacOS) +#define SCN_LCK LCTL(LGUI(KC_Q)) // Lock screen (MacOS) +#define SH_HOME LCTL(KC_A) // Go to start of line +#define SH_END LCTL(KC_E) // Go to end of line +#define SH_RSCH LCTL(KC_R) // Search command history +#define SH_CLRH LCTL(KC_U) // Erase to beginning of line +#define SH_CLRE LCTL(KC_K) // Erase to end of line + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Norman + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | D | F | K | | J | U | R | L | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |CtlEsc| A | S | E | T | G | | Y | N | I | O | H | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | P | M | , | . | / |SftEnt| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ +[_NORMAN] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + SCN_LCK, KC_HOME, KC_END, KC_LALT, LOWER, KC_LGUI, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | F1 | F2 | F3 | F4 | | |NumLck| 7 | 8 | 9 | = | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |CtlEsc| F5 | F6 | F7 | F8 | | | * | 4 | 5 | 6 | + | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | - |SftEnt| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| | + * `-----------------------------------------' `-----------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PEQL, _______, \ + _______, KC_F5, KC_F6, KC_F8, KC_F9, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_DEL, \ + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, \ + _______, _______, _______, _______, _______, _______, KC_PDOT, _______, KC_P0, SPOT, CHROME, XXXXXXX +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, SH_LOG, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \ + _______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | Reset| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | AudOn|AudOff| | |Norman| | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | Lower| | | | Raise| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, XXXXXXX, NORMAN, 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 +float tone_norman[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case NORMAN: + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_norman); + #endif + persistent_default_layer_set(1UL<<_NORMAN); + return false; + case LOWER: + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + case RAISE: + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + case ADJUST: + layer_on(_ADJUST); + return false; + case SH_LOG: // Open Jira log work window + SEND_STRING(SS_TAP(X_DOT)); + _delay_ms(100); + SEND_STRING("log work"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + case SH_GOUP: // Go up a directory + SEND_STRING("cd .."SS_TAP(X_ENTER)); + return false; + case SH_TERM: // Open Terminal + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("terminal"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + case SPOT: // Open Spotify + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("spotify app"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + case SLACK: // Open Slack + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("slack"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + case OUTLOOK: // Open MS Outlook + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("outlook"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + case CHROME: // Open Chrome + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("chrome"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + } + } else { + switch(keycode) { + case LOWER: + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + case RAISE: + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + case ADJUST: + layer_off(_ADJUST); + return false; + } + } + return true; +} diff --git a/keyboards/handwired/xeal60/keymaps/normacos/readme.md b/keyboards/handwired/xeal60/keymaps/normacos/readme.md new file mode 100644 index 000000000000..3b7a20632b0e --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/normacos/readme.md @@ -0,0 +1,86 @@ +# normacos +This keymap was designed specifically to be used on a MacOS High Sierra system with constant use of the Terminal, as it includes a multitude of macros for both the terminal as well as Spotlight Search. + +Norman keyboard layout [info page.](https://normanlayout.info/) + +Some Norman layout keys were placed on different layers and different positions based on available space and preference. + + +Macros: +- CtlEsc sends Escape when tapped, and Control when held. +- SftEnt sends Enter when tapped, and Shift when held. +- Lock locks the computer +- Slack opens Slack through Spotlight Search +- Term opens Terminal through Spotlight Search +- Spot opens Spotify through Spotlight Search +- Chrome opens Chrome through Spotlight Search +- OutLk opens Microsoft Outlook through Spotlight Search +- ScnSht allows the user to take a screenshot of a selected portion of the screen +- ClrHom clears Terminal line from beginning of line up to cursor +- ClrEnd clears Terminal line from cursor up to end of line +- ShHome moves Terminal cursor to beginning of line +- ShEnd moves Terminal cursor to end of line +- Search activates Terminal Reverse Search Command History +- Log opens the 'Log Work' modal on Atlassian's Jira web client +- UpDir moves working directory to its parent + +All macros that make use of the SEND_STRING command have a 100 millisecond wait before and after "writing" to let the computer/OS/app catch up. +Any and all empty keys shown below are will be set in the future, and do nothing as of the time of this writing. + + + +## Default (Norman) +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | D | F | K | | J | U | R | L | ; | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +|CtlEsc| A | S | E | T | G | | Y | N | I | O | H | ' | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | P | M | , | . | / |SftEnt| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| +`-----------------------------------------' `-----------------------------------------' +``` + + +## Lower +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | F1 | F2 | F3 | F4 | | |NumLck| 7 | 8 | 9 | = | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +|CtlEsc| F5 | F6 | F7 | F8 | | | * | 4 | 5 | 6 | + | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | - |SftEnt| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| | +`-----------------------------------------' `-----------------------------------------' +``` + + +## Raise + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +|CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| +`-----------------------------------------' `-----------------------------------------' +``` + +## Adjust (Lower + Raise) + +``` +,-----------------------------------------. ,-----------------------------------------. +| | | | | | | | | | | | Reset| | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | AudOn|AudOff| | |Norman| | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | Lower| | | | Raise| | | | | +`-----------------------------------------' `-----------------------------------------' +``` diff --git a/keyboards/handwired/xeal60/keymaps/piemod/README.md b/keyboards/handwired/xeal60/keymaps/piemod/README.md new file mode 100644 index 000000000000..f2a051da14ec --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/handwired/xeal60/keymaps/piemod/config.h b/keyboards/handwired/xeal60/keymaps/piemod/config.h new file mode 100644 index 000000000000..001b62e41bbc --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/piemod/config.h @@ -0,0 +1,49 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// RGB Options +#undef RGBLED_NUM +#define RGBLED_NUM 10 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 1 + +// Typing Options +#define PREVENT_STUCK_MODIFIERS +#define QMK_KEYS_PER_SCAN 4 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/piemod/keymap.c b/keyboards/handwired/xeal60/keymaps/piemod/keymap.c new file mode 100644 index 000000000000..d789b7a8be8e --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/piemod/keymap.c @@ -0,0 +1,99 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +#define _DVORAK 0 +#define _ARROW 1 //F(1) +#define _SYMBOL 2 // F(2) +#define _NUMBER 3 // F(3) +#define _FUNCTION 4 // F(4) +#define _EMACS 5 // F(5) +#define _COMBOS 6 // F(6) +#define _MOUSE 7 // F(7) + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + ARROW, + SYMBOL, + NUMBER, + FUNCTION, + EMACS, + COMBOS, + MOUSE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = LAYOUT( \ + KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ + KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ + KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ + F(1), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +[_ARROW] = LAYOUT( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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 \ +), + +[_SYMBOL] = LAYOUT( \ + KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(2), \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_NUMBER] = LAYOUT( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_FUNCTION] = LAYOUT( \ + KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ + RESET, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +[_EMACS] = LAYOUT( \ + 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, 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_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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_COMBOS] = LAYOUT( \ + 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MOUSE] = LAYOUT( \ + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ +) +}; + +enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, +}; + +int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + // Special Keys + [1] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + // Symbols + [2] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + }; diff --git a/keyboards/handwired/xeal60/keymaps/piemod/rules.mk b/keyboards/handwired/xeal60/keymaps/piemod/rules.mk new file mode 100644 index 000000000000..027ea977e714 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/piemod/rules.mk @@ -0,0 +1,13 @@ +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 = no # 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +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. +SUBPROJECT_rev1 = no diff --git a/keyboards/handwired/xeal60/keymaps/pitty/README.md b/keyboards/handwired/xeal60/keymaps/pitty/README.md new file mode 100644 index 000000000000..1662fce7abe3 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/pitty/README.md @@ -0,0 +1,91 @@ +# Pittyolo's Let's Split Layout + +This is my Let's Split layout, modified for my ISO Hungarian taste :) + +Added some layer feedback in the underglow, but it's still a WIP. + +I wrote the keys that will appear when using Hungarian layout in Windows and the respective English keys in brackets. + + + ### Qwerty +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | +|------+------+------+------+------+------|------+------+------+------+------+------| +|Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del | +`-----------------------------------------------------------------------------------' +``` + + Tap left shift writes the missing ISO key, hold is Shift. + + + ### Gaming mode (Toggle layer) +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | |Lower | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | F | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| | | | | | | | | | |QWERTY| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | Left | Down | Up | Right| +`-----------------------------------------------------------------------------------' +``` + +Disabled some of the functions in the main layer to help with better gaming experience. + + + ### Lower (Hold down right Space) +``` +,-----------------------------------------------------------------------------------. +| 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) | +|------+------+------+------+------+------+------+------+------+------+------+------| +| F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | | Ins | Home | PgUp | Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | Del | End | PgDn | AltGr| +`-----------------------------------------------------------------------------------' +``` + + Function layer with everything that is missing from the main layer. + + + ### NAV (double tap toggles the layer, and hold for momentary switch) +``` +,-----------------------------------------------------------------------------------. +| | | Up | | F2 | | | 7 | 8 | 9 | / | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | Left | Down | Right| | | | 4 | 5 | 6 | * | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| | | | | | | 1 | 2 | 3 | - | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | 0 | . | = | + | | +`-----------------------------------------------------------------------------------' +``` + + Navigation layer with a numpad on the right side. + + + + ### Vim Movement (Hold down F) +``` +,-----------------------------------------------------------------------------------. +|RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű | +|------+------+------+------+------+------+------+------+------+------+------+------| +|DM_stp| | | LCTRL| | | Left | Down | Up | Right| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +|DM_REC| | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | LShft| | | | | | | RESET| +`-----------------------------------------------------------------------------------' +``` + + Turns hjkl into vim movement. I moved accented Hungarian letters here. + + + diff --git a/keyboards/handwired/xeal60/keymaps/pitty/config.h b/keyboards/handwired/xeal60/keymaps/pitty/config.h new file mode 100644 index 000000000000..3798f9a64704 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/pitty/config.h @@ -0,0 +1,26 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TOGGLE 2 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/pitty/keymap.c b/keyboards/handwired/xeal60/keymaps/pitty/keymap.c new file mode 100644 index 000000000000..0fd4c1384f1c --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/pitty/keymap.c @@ -0,0 +1,169 @@ +#include QMK_KEYBOARD_H + + +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _GAME 1 +#define _LOWER 2 +#define _NAV 3 +#define _VIM 4 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + NAV, + VIM, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del | + * `-----------------------------------------------------------------------------------' + */ +[_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_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + MT(MOD_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_LCTL, KC_LGUI, KC_LALT, TT(_NAV), KC_SPC, LT(_LOWER, KC_SPC), KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), KC_DEL \ +), + +/* Gaming mode + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | |Lower | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | F | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | | | | | | | | |QWERTY| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSL(_LOWER), \ + _______, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | Ins | Home | PgUp | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Del | End | PgDn | AltGr| + * `-----------------------------------------------------------------------------------' + */ +[_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_MINUS, \ + KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_RSFT, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_RALT \ +), + + +/* NAV + * ,-----------------------------------------------------------------------------------. + * | | | Up | | F2 | | | 7 | 8 | 9 | / | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Left | Down | Right| | | | 4 | 5 | 6 | * | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| | | | | | | 1 | 2 | 3 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | = | + | | + * `-----------------------------------------------------------------------------------' + */ +[_NAV] = LAYOUT( \ + _______, _______, KC_UP, _______, KC_F2, _______, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______, \ + KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_KP_DOT, KC_KP_EQUAL, KC_KP_PLUS, _______ \ +), + +/* Vim Movement (Hold down F) + * ,-----------------------------------------------------------------------------------. + * |RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |DM_stp| | | LCTRL| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |DM_REC| | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | LShft| | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = LAYOUT( \ + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , KC_LBRC, KC_NUHS, \ + _______, _______, _______, KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, RESET \ +) + + +}; + +// define variables for reactive RGB +bool RGB_INIT = false; +bool TOG_STATUS = false; +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + switch (layer) { + case _NAV: + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(29); + } + break; + case _LOWER: + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(29); + } + break; + case _QWERTY: + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + TOG_STATUS = false; + break; + } + }; diff --git a/keyboards/handwired/xeal60/keymaps/pitty/rules.mk b/keyboards/handwired/xeal60/keymaps/pitty/rules.mk new file mode 100644 index 000000000000..8ebc85a44b4a --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/pitty/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +NKRO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/poker/config.h b/keyboards/handwired/xeal60/keymaps/poker/config.h new file mode 100644 index 000000000000..5a6261c4f7cf --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/poker/config.h @@ -0,0 +1,37 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/poker/keymap.c b/keyboards/handwired/xeal60/keymaps/poker/keymap.c new file mode 100644 index 000000000000..cce0ca47411f --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/poker/keymap.c @@ -0,0 +1,240 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _FN 5 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + FN, + ADJUST +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Esc | Alt |Lower | Esc |Space |Raise | Left | Up | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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, \ + FN , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), \ + KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_ESC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Esc | Alt |Lower | Esc |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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, \ + FN , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), \ + KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_ESC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Esc | Alt |Lower | Esc |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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, \ + FN , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_T(KC_ESC) , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_RSFT, KC_ENT), \ + KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_ESC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Home |Pg Up |Pg Dn | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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_HOME, KC_PGUP, KC_PGDN, KC_END \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Home |Pg Up |Pg Dn | End | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_HOME, KC_PGUP, KC_PGDN, KC_END \ +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | Esc | | Prev | Play | Next | | |Pg Up | Up |Pg Dn |Prt Sc| Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol- | Mute | Vol+ | | Home | Left | Down |Right | End | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Esc | | | Esc | Home |Pg Up |Pg Dn | End | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT( \ + KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL, \ + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_ESC , _______, _______, KC_ESC , KC_HOME, KC_PGUP, KC_PGDN, KC_END \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | Caps | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_CAPS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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 FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + 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/handwired/xeal60/keymaps/poker/rules.mk b/keyboards/handwired/xeal60/keymaps/poker/rules.mk new file mode 100644 index 000000000000..457a3d01d4a4 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/poker/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/smt/config.h b/keyboards/handwired/xeal60/keymaps/smt/config.h new file mode 100644 index 000000000000..5a6261c4f7cf --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/smt/config.h @@ -0,0 +1,37 @@ +/* +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, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/smt/keymap.c b/keyboards/handwired/xeal60/keymaps/smt/keymap.c new file mode 100644 index 000000000000..090cf78b7cb6 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/smt/keymap.c @@ -0,0 +1,218 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + MEH_GRV, 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 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ +[_COLEMAK] = LAYOUT( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ + MEH_GRV, 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 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ +[_DVORAK] = LAYOUT( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + 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_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ +[_LOWER] = LAYOUT( \ + ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' + */ +[_RAISE] = LAYOUT( \ + ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Reset| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/handwired/xeal60/keymaps/smt/readme.md b/keyboards/handwired/xeal60/keymaps/smt/readme.md new file mode 100644 index 000000000000..20bc662f0a59 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/smt/readme.md @@ -0,0 +1,88 @@ +# smt's Let's Split keymap + +This keymap is ported from my Planck keymap. + + +## Qwerty + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | S | D | F | G | | H | J | K | L | ; | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## 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 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## 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 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Lower + +``` +,-----------------------------------------. ,-----------------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------' `-----------------------------------------' +``` + +## Raise + +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | _ | ? | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | - | / | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Home |PageDn|PageUp| End | +`-----------------------------------------' `-----------------------------------------' +``` + +## Adjust (Lower + Raise) + +``` +,-----------------------------------------. ,-----------------------------------------. +| | Reset| | | | | | | | | | | Reset| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +`-----------------------------------------' `-----------------------------------------' +``` diff --git a/keyboards/handwired/xeal60/keymaps/that_canadian/config.h b/keyboards/handwired/xeal60/keymaps/that_canadian/config.h new file mode 100644 index 000000000000..586b6e8c8750 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/that_canadian/config.h @@ -0,0 +1,32 @@ +/* +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" + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c b/keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c new file mode 100644 index 000000000000..239a8d3beee2 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c @@ -0,0 +1,163 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 + +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | RESET| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Backlt| Ctrl | GUI | Alt |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + RESET, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + RGB_TOG, 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_LGUI, KC_LALT, 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 | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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 / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + 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; +} \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/waples/README.md b/keyboards/handwired/xeal60/keymaps/waples/README.md new file mode 100644 index 000000000000..6e171d964f74 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/waples/README.md @@ -0,0 +1,58 @@ +# Waples Let's Split keymap +[Waples](https://www.github.com/Waples) + +## My (forever) Work-In-Progress keymap for my Let's Split keyboard. +My keymap is much like the default, I just personally like to have my Enter and Escape key to be on my home row. The Escape key doubles as a Control key when held down, my Enter key functions as (right)Shift when held down. +Everything you see below here is constantly *under construction*, so there may be some dumb things in this, which are already gotten taken out, or are still in there :P. + +### Layers +I currently have the following layers in my keymap: +* Qwerty (as default) +* Dvorak (still learning this type of layout, so not really used much) +* Gaming (WIP! I tried some I found, but didn't like them, so I'm in the progress of making my own) +* Lefty (lower) +* Righty (raise) +* Dual (adjust) + +#### QWERTY + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bsp | + |C_Esc| A | S | D | F | G | | H | J | K | L | ; |S_Ent| + | Sft | Z | X | C | V | B | | N | M | , | . | / | " | + |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | | Spc | ^R^ | Lft | Dwn | Up! | Rgt | + + +#### DVORAK + | Tab | " | , | . | P | Y | | F | G | C | R | L | Bsp | + |C_Esc| A | O | E | U | I | | D | H | T | N | S |S_Ent| + | Sft | ; | Q | J | K | X | | B | M | W | V | Z | / | + |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | | Spc | ^R^ | Lft | Dwn | Up! | Rgt | + + +#### GAMING + | Tab | Q | W | E | R | T | | | | | | |QWERT| + | Esc | A | S | D | F | G | | | | | | | | + | Sft | Z | X | C | V | B | | | | | | | | + | Ctl | 1 | 2 | 3 | ^L^ | Spc | | Bsp | ^R^ | Lft | Dwn | Up | Rgt | + + +#### LEFTY (lower) + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bsp | + | Del | | | | | | | | ( | ) | [ | ] | | + | | | | | | | | | | | | | | + | | | | | | | | Ins | | Hme | PgD | PgU | End | + + +#### RIGHTY (raise) + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bsp | + | Del | F1 | F2 | F3 | F4 | | | = | - | \ | / | | | + | | F5 | F6 | F7 | F8 | | | | | | | | | + | | F9 | F10 | F11 | | | | | | | | | | + + +#### DUAL + |Reset| | | | |QWERT| | GAME| | | | |Reset| + | | Prv | Stp | Tog | Nxt | Nrm | | Swp | | | | | | + | | | Mte | Vol-| Vol+| | | NKRO| | | | | | + | | | | | | | |DVORK| | | | | | + + diff --git a/keyboards/handwired/xeal60/keymaps/waples/config.h b/keyboards/handwired/xeal60/keymaps/waples/config.h new file mode 100644 index 000000000000..98ebeff45580 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/waples/config.h @@ -0,0 +1,17 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS // We like to have choices I guess + +#define PREVENT_STUCK_MODIFIERS // When switching layers, this will release all mods + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/waples/keymap.c b/keyboards/handwired/xeal60/keymaps/waples/keymap.c new file mode 100644 index 000000000000..7b25bc51f545 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/waples/keymap.c @@ -0,0 +1,131 @@ +// Waples layout for Let's Split (rev2) +// Made changes from the default + +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _DVORAK 1 +#define _GAME 2 +#define _LEFTY 3 +#define _RIGHTY 4 +#define _DUAL 5 + +enum letssplit_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + GAME, + LEFTY, + RIGHTY, + DUAL, +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO +#define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc +#define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_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, \ + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ + KC_PSCR, KC_BSPC, KC_LALT, KC_CAPS, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_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, \ + CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, \ + KC_PSCR, KC_LGUI, KC_LALT, KC_CAPS, LEFTY, KC_BSPC, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_GAME] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, _______, _______, QWERTY, \ + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, KC_1, KC_2, KC_3, LEFTY, KC_SPC, KC_BSPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +[_LEFTY] = LAYOUT( \ + 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_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +[_RIGHTY] = LAYOUT( \ + 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_EQL, KC_MINS, KC_BSLS, KC_SLSH, _______, _______, \ + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +[_DUAL] = LAYOUT( \ + RESET, _______, _______, _______, _______, QWERTY, GAME, _______, _______, _______, _______, RESET, \ + _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, DVORAK, _______, _______, _______, _______, _______ \ +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case GAME: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_GAME); + } + return false; + break; + case LEFTY: + if (record->event.pressed) { + layer_on(_LEFTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } else { + layer_off(_LEFTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } + return false; + break; + case RIGHTY: + if (record->event.pressed) { + layer_on(_RIGHTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } else { + layer_off(_RIGHTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } + return false; + break; + case DUAL: + if (record->event.pressed) { + layer_on(_DUAL); + } else { + layer_off(_DUAL); + } + return false; + break; + } + return true; +} diff --git a/keyboards/handwired/xeal60/keymaps/waples/rules.mk b/keyboards/handwired/xeal60/keymaps/waples/rules.mk new file mode 100644 index 000000000000..457a3d01d4a4 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/waples/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/xk/config.h b/keyboards/handwired/xeal60/keymaps/xk/config.h new file mode 100644 index 000000000000..c75ed12cc806 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/xk/config.h @@ -0,0 +1,44 @@ +/* +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. +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 300 +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_LAYER_TOGGLE 2 +#define ONESHOT_TIMEOUT 800 + +#define USE_I2C + +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#define MOUSEKEY_WHEEL_DELAY 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + + +#define PREVENT_STUCK_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#endif diff --git a/keyboards/handwired/xeal60/keymaps/xk/keymap.c b/keyboards/handwired/xeal60/keymaps/xk/keymap.c new file mode 100644 index 000000000000..c032b865aac3 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/xk/keymap.c @@ -0,0 +1,370 @@ +#include QMK_KEYBOARD_H + + +extern keymap_config_t keymap_config; + +#define _COLEMAK 0 +#define _KAMELOC 1 +#define _IKAPILA 2 +#define _IKASHFT 3 +#define _ARROWKY 4 +#define _FNCTION 5 +#define _NINEKEY 6 +#define _NAVIGAT 7 +#define _QWERTY 8 +#define _MLAYER 9 +#define _GRVTABL 15 + +enum custom_keycodes { + COLEMAK = SAFE_RANGE, + KAMELOC, + IKAPILA, + IKASHFT, + ARROWKY, + FNCTION, + NINEKEY, + NAVIGAT, + QWERTY, + MLAYER, + GRVTABL, +}; + +//TD Declarations +enum { +VOM = 0, +PRN, +EGT, +HRD, +XRD, +DSH, +ESC, +EQE, +PGN, +HND, +COD, +UND, +F11, +F12, +F13, +F14, +F15, +F16, +F17, +F18, +F19, +F20, +//unicode_inputctl +LINUX, +WIN, +WINSH, +OSX, +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// action-TAP for key/mod behavior LT(layer, KC) +#define XK_TAB LT(_FNCTION, KC_TAB) +#define XK_BSP LT(_KAMELOC, KC_BSPC) +#define XK_APO LT(_KAMELOC, KC_QUOT) + +#define XK_SPC LT(_IKAPILA, KC_SPC) +#define XK_ENT LT(_IKAPILA, KC_ENT) +#define XK_PGDN LT(_IKASHFT, KC_PGDN) +#define XK_PGUP LT(_IKASHFT, KC_PGUP) +#define PIPBOY LT(_FNCTION, KC_BSLS) +#define XK_DEL LT(_IKASHFT, KC_DEL) +#define XK_GRV LT(_GRVTABL, KC_GRV) + +// mod-TAP for mod/key behavior MT(modkey, KC) +#define ALT_IT MT(MOD_RALT, KC_SCLN) +#define CTL_IT MT(MOD_RCTL, KC_DOT) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) + +//sticky modifiers +#define KYCTL OSM(MOD_LCTL) +#define KYSFT OSM(MOD_LSFT) +#define CAKY OSM(MOD_LCTL | MOD_LALT) + +//shortcuts +#define CADEL LALT(LCTL(KC_DEL)) +#define CAINS LALT(LCTL(KC_INS)) +#define TGNKRO MAGIC_TOGGLE_NKRO + +#define NAVCH LCTL(KC_HOME) +#define NAVCPD LCTL(KC_PGDN) +#define NAVCPU LCTL(KC_PGUP) +#define NAVCE LCTL(KC_END) +#define NAVCU LCTL(KC_UP) +#define NAVCD LCTL(KC_DOWN) +#define NAVCL LCTL(KC_LEFT) +#define NAVCR LCTL(KC_RGHT) +#define NAVGU LGUI(KC_UP) +#define NAVGD LGUI(KC_DOWN) +#define NAVGL LGUI(KC_LEFT) +#define NAVGR LGUI(KC_RGHT) + +#define KC_NDSH LCTL(KC_PMNS) +#define KC_MDSH LALT(LCTL(KC_PMNS)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + TAP + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │TAB │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │DEL │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │BKSP│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSFT│ X │ C │ D │ V │ Z │ │ K │ H │ , │ │ . │ / │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OCTL│GUI │ESC │ALT │PGUP│SPC │ │ENT │PGDN│ () │ {} │ \ │ ` │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + HOLD + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │L FN│ │ │ │ │ │ │ │ │ │ │ALT │L!@#│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │L OH│ │ │ │ │ │ │ │ │ │ │ │L OH│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SFT │ │ │ │ │ │ │ │ │ │ │CTL │SFT │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │CTL │GUI │ESC │ALT │L!@#│L123│ │L123│L!@#│L M│ │L FN│LGRV│ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + DOUBLETAP + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSML│ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSML│OSML│!F4 │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + Switch type + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │Br │mxC │Z │Z │Z │Z │ │Z │Z │Z │Z │Br │G │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │G │Z │Z │Z │Z │Z │ │Z │Z │Z │Z │Z │Z │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Y │Z │Z │Z │Z │Z │ │Z │Z │Z │B │B │Y │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Y │Y │mxC │Z │BLK │BLK │ │BLK │BLK │Z │Z │B │G │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + with DCS keycaps + Top Row R1 (reversed?) + M Row1 R3 (with reversed pointer finger) + M Row2 R4 + B Row R2 (reversed) +*/ + +// Colemak PB&J (Mod-DH) +[_COLEMAK] = LAYOUT( \ + XK_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, XK_DEL, \ + XK_BSP, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, XK_APO, \ + KYSFT, KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, TD(COD), KC_DOT, CTL_IT, SFT_T(KC_SLSH), \ + KYCTL, KC_LGUI, TD(ESC), KC_LALT, XK_PGUP, XK_SPC, XK_ENT, XK_PGDN, MO(_MLAYER), TT(_NAVIGAT), PIPBOY, XK_GRV \ +), + +// useful for one-handed typing +[_KAMELOC] = LAYOUT( \ + XK_DEL, KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, XK_TAB, \ + _______, KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, _______, \ + KYSFT, KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, TD(UND), KC_V, KC_D, KC_C, KC_X, KYSFT, \ + XK_GRV, PIPBOY, M(1), KC_BTN1, KC_HOME, KC_ENT, KC_ENT, KC_END, KC_LGUI, TD(ESC), KC_LALT, KYCTL \ +), + +/* + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│INS │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ - │ = │TGL │ │ │ │HOME│END │HOME│ │ \ │ ~ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ +[_IKAPILA] = LAYOUT( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), KC_INS, \ + _______, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, LCTL(KC_Z), KC_HOME, TD(HND), KC_HOME, XXXXXXX, KC_BSLS, KC_TILD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │BSPC│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │DEL │ │ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│PSCR│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ _ │ + │END │HOME│END │ │ │ │ │ [ │ ] │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ + +[_IKASHFT] = LAYOUT( \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, TD(PGN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MNXT, KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, KC_PSCR, \ + _______, KC_UNDS, KC_PLUS, KC_END, KC_HOME, KC_END, M(1), M(0), M(2), KC_LBRC, KC_RBRC, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ → │ ↑ │ ← │ ↓ │ → │ │ → │ ↓ │ ← │ ↑ │ ↑ │ │ just in case someone hacks my IP with a 10MeG pipe, you know? + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ ← │ ↓ │ → │ ↑ │ ← │ │ ↑ │ ← │ ↓ │ → │ ← │ │ hacker_evasion layer + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ >>init network SEQUENCE + │ │ ↑ │ ← │ ↓ │ → │ ↑ │ │ ↓ │ ← │ ↑ │ → │ ← │ │ sleep 11; echo "DONE\n" + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ throttle INPUT 11001001 OUTPUT 010011001 ? FULL )); \ + │ │ │ │ → │ ← │ ↓ │ │ → │ ↑ │ ← │ ↓ │ ↑ │ │ <event.pressed) { + switch(id) { + case 0: + return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); + case 1: + return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); + case 2: + return MACRO( T(LBRC), T(RBRC), T(LEFT), END); + case 3: + clear_keyboard(); + case 4: + return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); + case WINSH: + set_unicode_input_mode(UC_WIN); + return false; + break; + case WIN: + set_unicode_input_mode(UC_WINC); + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); + return false; + break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/handwired/xeal60/keymaps/xk/rules.mk b/keyboards/handwired/xeal60/keymaps/xk/rules.mk new file mode 100644 index 000000000000..84bf8e1f595a --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/xk/rules.mk @@ -0,0 +1,19 @@ +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +USE_I2C = yes +TAP_DANCE_ENABLE = yes + +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # 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. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/keymaps/zer09/config.h b/keyboards/handwired/xeal60/keymaps/zer09/config.h new file mode 100644 index 000000000000..73438d8a9391 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/zer09/config.h @@ -0,0 +1,59 @@ +/* +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" + +/* key matrix size */ +/* Rows are doubled-up */ +#undef MATRIX_ROWS +#undef MATRIX_COLS +#define MATRIX_ROWS 10 +#define MATRIX_COLS 5 + +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } + +#define CATERINA_BOOTLOADER +#define USB_MAX_POWER_CONSUMPTION 50 + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +/* #define MASTER_LEFT */ +// #define MASTER_RIGHT +#define EE_HANDS + +/* ws2812 RGB LED */ +#undef RGBLED_NUM +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 50 +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#endif diff --git a/keyboards/handwired/xeal60/keymaps/zer09/keymap.c b/keyboards/handwired/xeal60/keymaps/zer09/keymap.c new file mode 100644 index 000000000000..8d0eaf141163 --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/zer09/keymap.c @@ -0,0 +1,38 @@ +#include "keymap.h" + +extern keymap_config_t keymap_config; + +#define _baseLayer LAYOUT( \ + KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, /**/KC_F, KC_G, KC_C, KC_R, KC_L, \ + CTL_T(KC_A), SFT_T(KC_O), ALT_T(KC_E), KC_U, KC_I, /**/KC_D, KC_H, ALT_T(KC_T), SFT_T(KC_N), CTL_T(KC_S), \ + KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, /**/KC_B, KC_M, KC_W, KC_V, KC_Z, \ + TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \ + TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY)) + +#define _upLayer LAYOUT( \ + KC_4, KC_5, KC_6, _______, _______,/**/ _______, KC_RBRC, _______, _______, _______, \ + LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \ + KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \ + _______, _______, _______, _______, _______,/**/ _______, _______, _______, _______, _______) + +#define _downLayer LAYOUT( \ + KC_F4, KC_F5, KC_F6, KC_F12, _______,/**/ _______, KC_RPRN, _______, _______, _______, \ + LCTL_T(KC_F1), LSFT_T(KC_F2), LALT_T(KC_F3), KC_F11, _______,/**/ KC_LPRN, KC_EQUAL, KC_LEFT, KC_UP, KC_RIGHT, \ + KC_F7, KC_F8, KC_F9, KC_F10, _______,/**/ KC_MINUS, _______, _______, KC_DOWN, _______, \ + _______, _______, _______, _______, _______,/**/ KC_PSCR, KC_SLCK, KC_PAUSE, _______, _______, \ + _______, _______, _______, _______, _______,/**/ _______, _______, _______, _______, _______) + +#define _astdLayer LAYOUT( \ + KC_MPRV, KC_MUTE, _______, _______, _______,/**/KC_PSCR, KC_SLCK, KC_PAUSE, _______, KC_RGUP, \ + KC_MPLY, KC_VOLD, _______, _______, _______,/**/_______, _______, _______, _______, KC_RGDWN, \ + KC_MNXT, KC_VOLU, RESET, _______, _______,/**/_______, _______, RESET, _______, _______, \ + _______, _______, _______, _______, _______,/**/_______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,/**/_______, _______, _______, _______, _______) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = _baseLayer, + [_UL] = _upLayer, + [_DL] = _downLayer, + [_VL] = _upLayer, + [_AL] = _astdLayer}; diff --git a/keyboards/handwired/xeal60/keymaps/zer09/keymap.h b/keyboards/handwired/xeal60/keymaps/zer09/keymap.h new file mode 100644 index 000000000000..03f8f480afec --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/zer09/keymap.h @@ -0,0 +1,32 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "tap_dance.h" +#include "zer09.h" + +#ifdef LAYOUT_ortho_4x12 +#undef LAYOUT_ortho_4x12 +#endif + +#ifdef LAYOUT +#undef LAYOUT +#define LAYOUT( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { L40, L41, L42, L43, L44 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32, R33, R34 }, \ + { R40, R41, R42, R43, R44 } \ + } +#endif diff --git a/keyboards/handwired/xeal60/keymaps/zer09/rules.mk b/keyboards/handwired/xeal60/keymaps/zer09/rules.mk new file mode 100644 index 000000000000..d8adc708826d --- /dev/null +++ b/keyboards/handwired/xeal60/keymaps/zer09/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/xeal60/lets_split.c b/keyboards/handwired/xeal60/lets_split.c new file mode 100644 index 000000000000..c400ab7bb8e7 --- /dev/null +++ b/keyboards/handwired/xeal60/lets_split.c @@ -0,0 +1,16 @@ +#include "lets_split.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}}, +}; +#endif diff --git a/keyboards/handwired/xeal60/lets_split.h b/keyboards/handwired/xeal60/lets_split.h new file mode 100644 index 000000000000..bce0ecb19927 --- /dev/null +++ b/keyboards/handwired/xeal60/lets_split.h @@ -0,0 +1,31 @@ +#ifndef LETS_SPLIT_H +#define LETS_SPLIT_H + +#include "quantum.h" + +#ifdef KEYBOARD_lets_split_rev1 + #include "rev1.h" +#elif KEYBOARD_lets_split_rev2 + #include "rev2.h" +#elif KEYBOARD_lets_split_sockets + #include "sockets.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, R30, R31, R32, R33, R34, R35 \ + ) \ + 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_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + ) + +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc + +#endif diff --git a/keyboards/handwired/xeal60/matrix.c b/keyboards/handwired/xeal60/matrix.c new file mode 100644 index 000000000000..f753d234a19b --- /dev/null +++ b/keyboards/handwired/xeal60/matrix.c @@ -0,0 +1,470 @@ +/* +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 "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" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#define ERROR_DISCONNECT_COUNT 5 + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +static uint8_t error_count = 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]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif + +__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) { +} + +__attribute__ ((weak)) +void matrix_slave_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) +{ +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + debouncing = false; + } +# endif + + return 1; +} + +#ifdef USE_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(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#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_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif + matrix_slave_scan_user(); +} + +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(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // 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); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[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 +} + +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 +} + +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 + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +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 + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + 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) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +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 +} + +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 +} + +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 + } +} + +#endif diff --git a/keyboards/handwired/xeal60/readme.md b/keyboards/handwired/xeal60/readme.md new file mode 100644 index 000000000000..80fe08b93c90 --- /dev/null +++ b/keyboards/handwired/xeal60/readme.md @@ -0,0 +1,187 @@ +Let's Split +====== + +This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ + +Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 +based boards. + +**Hardware files for the Let's Split are now stored at http://qmk.fm/lets_split/** +**Hardware files for the sockets version can be found at https://github.com/dumle29/let-s-Split-v2/tree/socket-reverseable** + +## Build Guide + +A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) + +There is additional information there about flashing and adding RGB underglow. + +A build guide for putting together the sockets version can be found here: *Guide will be made and linked here when the PCBs have been received and tested* + +## First Time Setup + +Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: + +``` +$ make lets_split/rev2:default +``` + +You will see a lot of output and if everything worked correctly you will see the built hex file: + +``` +lets_split_rev2_default.hex +``` + +If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: + + +``` +$ make lets_split/rev2:YOUR_KEYMAP_NAME +``` + +If everything worked correctly you will see a file: + +``` +lets_split_rev2_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. + +### Let's split 1.0 +If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead. + +Features +-------- + +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + +Some features supported by the firmware: + +* Either half can connect to the computer via USB, or both halves can be used + independently. +* You only need 3 wires to connect the two halves. Two for VCC and GND and one + for serial communication. +* Optional support for I2C connection between the two halves if for some + reason you require a faster connection between the two halves. Note this + requires an extra wire between halves and pull-up resistors on the data lines. + +Required Hardware +----------------- + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +Optional Hardware +----------------- + +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +Wiring +------ + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +Notes on Software Configuration +------------------------------- + +Configuring the firmware is similar to any other QMK project. One thing +to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between +the two halves, i.e. if your split keyboard has 4 rows in each half, then use +`MATRIX_ROWS=8`. + +Also, the current implementation assumes a maximum of 8 columns, but it would +not be very difficult to adapt it to support more if required. + +Flashing +------- +From the top level `qmk_firmware` directory run `make KEYBOARD:KEYMAP:avrdude` for automatic serial port resolution and flashing. +Example: `make lets_split/rev2:default:avrdude` + + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/handwired/xeal60/rev1/config.h b/keyboards/handwired/xeal60/rev1/config.h new file mode 100644 index 000000000000..73f90e715dfe --- /dev/null +++ b/keyboards/handwired/xeal60/rev1/config.h @@ -0,0 +1,86 @@ +/* +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 REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split v1 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 16 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * 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 + +#endif diff --git a/keyboards/handwired/xeal60/rev1/rev1.c b/keyboards/handwired/xeal60/rev1/rev1.c new file mode 100644 index 000000000000..c243f71bc4a8 --- /dev/null +++ b/keyboards/handwired/xeal60/rev1/rev1.c @@ -0,0 +1,15 @@ +#include "lets_split.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(); +}; + diff --git a/keyboards/handwired/xeal60/rev1/rev1.h b/keyboards/handwired/xeal60/rev1/rev1.h new file mode 100644 index 000000000000..073d83ef347e --- /dev/null +++ b/keyboards/handwired/xeal60/rev1/rev1.h @@ -0,0 +1,30 @@ +#ifndef REV1_H +#define REV1_H + +#include "lets_split.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#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 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } + +#define LAYOUT_ortho_4x12 LAYOUT + +#endif diff --git a/keyboards/handwired/xeal60/rev1/rules.mk b/keyboards/handwired/xeal60/rev1/rules.mk new file mode 100644 index 000000000000..f845616741c2 --- /dev/null +++ b/keyboards/handwired/xeal60/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/handwired/xeal60/rules.mk b/keyboards/handwired/xeal60/rules.mk new file mode 100644 index 000000000000..951723edc5bb --- /dev/null +++ b/keyboards/handwired/xeal60/rules.mk @@ -0,0 +1,77 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c \ + ssd1306.c + +# MCU name +#MCU = at90usb1287 +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) + +# 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 +# +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 = no # Console for debug(+400) +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. +SUBPROJECT_rev1 = yes +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 + +CUSTOM_MATRIX = yes + +LAYOUTS = ortho_4x12 + +DEFAULT_FOLDER = lets_split/rev2 diff --git a/keyboards/handwired/xeal60/serial.c b/keyboards/handwired/xeal60/serial.c new file mode 100644 index 000000000000..74bcbb6bf6e2 --- /dev/null +++ b/keyboards/handwired/xeal60/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifndef USE_I2C + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/handwired/xeal60/serial.h b/keyboards/handwired/xeal60/serial.h new file mode 100644 index 000000000000..15fe4db7b4c6 --- /dev/null +++ b/keyboards/handwired/xeal60/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/handwired/xeal60/split_util.c b/keyboards/handwired/xeal60/split_util.c new file mode 100644 index 000000000000..346cbc908949 --- /dev/null +++ b/keyboards/handwired/xeal60/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.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_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_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 keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif From c796944354a76f3bd0a8387b9a4016864550ba91 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sun, 12 Aug 2018 18:25:50 +1000 Subject: [PATCH 002/445] Delete removed other keymaps --- .../xeal60/keymaps/DE_simple/config.h | 37 -- .../xeal60/keymaps/DE_simple/keymap.c | 155 ------ .../xeal60/keymaps/DE_simple/readme.md | 59 --- .../xeal60/keymaps/DE_simple/rules.mk | 0 .../xeal60/keymaps/OLED_sample/config.h | 60 --- .../xeal60/keymaps/OLED_sample/keymap.c | 441 ------------------ .../xeal60/keymaps/OLED_sample/readme.md | 25 - .../xeal60/keymaps/OLED_sample/rules.mk | 25 - .../handwired/xeal60/keymaps/adam/config.h | 50 -- .../handwired/xeal60/keymaps/adam/keymap.c | 78 ---- .../xeal60/keymaps/bbaserdem/README.md | 27 -- .../xeal60/keymaps/bbaserdem/config.h | 27 -- .../xeal60/keymaps/bbaserdem/keymap.c | 36 -- .../xeal60/keymaps/bbaserdem/rules.mk | 11 - .../xeal60/keymaps/bbaserdem_right/README.md | 5 - .../xeal60/keymaps/bbaserdem_right/config.h | 9 - .../xeal60/keymaps/bbaserdem_right/keymap.c | 31 -- .../xeal60/keymaps/bbaserdem_right/rules.mk | 26 -- .../xeal60/keymaps/cpeters1982/config.h | 54 --- .../xeal60/keymaps/cpeters1982/keymap.c | 221 --------- .../xeal60/keymaps/cpeters1982/rules.mk | 8 - .../handwired/xeal60/keymaps/dlaroe/config.h | 37 -- .../handwired/xeal60/keymaps/dlaroe/keymap.c | 255 ---------- .../handwired/xeal60/keymaps/dlaroe/rules.mk | 0 .../handwired/xeal60/keymaps/drashna/config.h | 80 ---- .../handwired/xeal60/keymaps/drashna/keymap.c | 98 ---- .../handwired/xeal60/keymaps/drashna/rules.mk | 25 - .../xeal60/keymaps/drashna_old/config.h | 86 ---- .../xeal60/keymaps/drashna_old/keymap.c | 1 - .../xeal60/keymaps/drashna_old/rules.mk | 28 -- .../xeal60/keymaps/dwallace/config.h | 43 -- .../xeal60/keymaps/dwallace/keymap.c | 224 --------- .../xeal60/keymaps/dwallace/rules.mk | 1 - .../handwired/xeal60/keymaps/fabian/config.h | 34 -- .../handwired/xeal60/keymaps/fabian/keymap.c | 271 ----------- .../handwired/xeal60/keymaps/fabian/rules.mk | 9 - .../handwired/xeal60/keymaps/fido/config.h | 45 -- .../handwired/xeal60/keymaps/fido/keymap.c | 74 --- .../handwired/xeal60/keymaps/fido/rules.mk | 1 - .../xeal60/keymaps/heartrobotninja/config.h | 58 --- .../xeal60/keymaps/heartrobotninja/keymap.c | 180 ------- .../xeal60/keymaps/heartrobotninja/rules.mk | 26 -- .../xeal60/keymaps/henxing/Readme.md | 51 -- .../handwired/xeal60/keymaps/henxing/config.h | 37 -- .../handwired/xeal60/keymaps/henxing/keymap.c | 113 ----- .../xeal60/keymaps/hexwire/README.md | 116 ----- .../handwired/xeal60/keymaps/hexwire/config.h | 43 -- .../handwired/xeal60/keymaps/hexwire/keymap.c | 218 --------- .../handwired/xeal60/keymaps/hexwire/rules.mk | 1 - .../handwired/xeal60/keymaps/khord/config.h | 44 -- .../handwired/xeal60/keymaps/khord/keymap.c | 170 ------- .../handwired/xeal60/keymaps/khord/rules.mk | 7 - .../handwired/xeal60/keymaps/kris/keymap.c | 213 --------- .../handwired/xeal60/keymaps/krusli/keymap.c | 238 ---------- .../handwired/xeal60/keymaps/krusli/readme.md | 2 - .../xeal60/keymaps/mbsurfer/config.h | 43 -- .../xeal60/keymaps/mbsurfer/keymap.c | 274 ----------- .../xeal60/keymaps/mbsurfer/rules.mk | 7 - .../handwired/xeal60/keymaps/mike808/config.h | 43 -- .../handwired/xeal60/keymaps/mike808/keymap.c | 158 ------- .../handwired/xeal60/keymaps/mike808/rules.mk | 1 - .../handwired/xeal60/keymaps/mjt/config.h | 38 -- .../handwired/xeal60/keymaps/mjt/keymap.c | 213 --------- .../handwired/xeal60/keymaps/mjt/rules.mk | 25 - .../handwired/xeal60/keymaps/mtdjr/config.h | 43 -- .../handwired/xeal60/keymaps/mtdjr/keymap.c | 55 --- .../handwired/xeal60/keymaps/mtdjr/rules.mk | 5 - .../xeal60/keymaps/normacos/config.h | 37 -- .../xeal60/keymaps/normacos/keymap.c | 213 --------- .../xeal60/keymaps/normacos/readme.md | 86 ---- .../handwired/xeal60/keymaps/piemod/README.md | 31 -- .../handwired/xeal60/keymaps/piemod/config.h | 49 -- .../handwired/xeal60/keymaps/piemod/keymap.c | 99 ---- .../handwired/xeal60/keymaps/piemod/rules.mk | 13 - .../handwired/xeal60/keymaps/pitty/README.md | 91 ---- .../handwired/xeal60/keymaps/pitty/config.h | 26 -- .../handwired/xeal60/keymaps/pitty/keymap.c | 169 ------- .../handwired/xeal60/keymaps/pitty/rules.mk | 6 - .../handwired/xeal60/keymaps/poker/config.h | 37 -- .../handwired/xeal60/keymaps/poker/keymap.c | 240 ---------- .../handwired/xeal60/keymaps/poker/rules.mk | 3 - .../handwired/xeal60/keymaps/smt/config.h | 37 -- .../handwired/xeal60/keymaps/smt/keymap.c | 218 --------- .../handwired/xeal60/keymaps/smt/readme.md | 88 ---- .../xeal60/keymaps/that_canadian/config.h | 32 -- .../xeal60/keymaps/that_canadian/keymap.c | 163 ------- .../handwired/xeal60/keymaps/waples/README.md | 58 --- .../handwired/xeal60/keymaps/waples/config.h | 17 - .../handwired/xeal60/keymaps/waples/keymap.c | 131 ------ .../handwired/xeal60/keymaps/waples/rules.mk | 3 - .../handwired/xeal60/keymaps/xk/config.h | 44 -- .../handwired/xeal60/keymaps/xk/keymap.c | 370 --------------- .../handwired/xeal60/keymaps/xk/rules.mk | 19 - .../handwired/xeal60/keymaps/zer09/config.h | 59 --- .../handwired/xeal60/keymaps/zer09/keymap.c | 38 -- .../handwired/xeal60/keymaps/zer09/keymap.h | 32 -- .../handwired/xeal60/keymaps/zer09/rules.mk | 6 - 97 files changed, 7534 deletions(-) delete mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/readme.md delete mode 100644 keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/readme.md delete mode 100644 keyboards/handwired/xeal60/keymaps/OLED_sample/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/adam/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/adam/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/README.md delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/cpeters1982/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/dlaroe/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/drashna/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/drashna/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/drashna/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/drashna_old/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/dwallace/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/dwallace/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/dwallace/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/fabian/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/fabian/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/fabian/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/fido/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/fido/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/fido/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/henxing/Readme.md delete mode 100644 keyboards/handwired/xeal60/keymaps/henxing/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/henxing/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/README.md delete mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/hexwire/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/khord/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/khord/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/khord/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/kris/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/krusli/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/krusli/readme.md delete mode 100644 keyboards/handwired/xeal60/keymaps/mbsurfer/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/mike808/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/mike808/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/mike808/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/mjt/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/mjt/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/mjt/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/mtdjr/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/normacos/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/normacos/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/normacos/readme.md delete mode 100644 keyboards/handwired/xeal60/keymaps/piemod/README.md delete mode 100644 keyboards/handwired/xeal60/keymaps/piemod/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/piemod/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/piemod/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/pitty/README.md delete mode 100644 keyboards/handwired/xeal60/keymaps/pitty/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/pitty/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/pitty/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/poker/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/poker/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/poker/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/smt/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/smt/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/smt/readme.md delete mode 100644 keyboards/handwired/xeal60/keymaps/that_canadian/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/waples/README.md delete mode 100644 keyboards/handwired/xeal60/keymaps/waples/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/waples/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/waples/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/xk/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/xk/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/xk/rules.mk delete mode 100644 keyboards/handwired/xeal60/keymaps/zer09/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/zer09/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/zer09/keymap.h delete mode 100644 keyboards/handwired/xeal60/keymaps/zer09/rules.mk diff --git a/keyboards/handwired/xeal60/keymaps/DE_simple/config.h b/keyboards/handwired/xeal60/keymaps/DE_simple/config.h deleted file mode 100644 index 5a6261c4f7cf..000000000000 --- a/keyboards/handwired/xeal60/keymaps/DE_simple/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c b/keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c deleted file mode 100644 index d329bea4c045..000000000000 --- a/keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c +++ /dev/null @@ -1,155 +0,0 @@ -#include QMK_KEYBOARD_H -#include "keymap_german.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTZ 0 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTZ = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwertz - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | + | # | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTZ] = LAYOUT( \ - 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 \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | € | ü | ? | ´ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - DE_CIRC, DE_EXLM, DE_DQOT, DE_PARA, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QST, DE_QUOT, \ - KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DE_PIPE , KC_SCLN, KC_QUOT, _______, KC_ENT, \ - _______, _______, _______, _______, _______, _______, _______, _______, 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 | { | [ | ] | } | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_LCBR, DE_LBRC, DE_RBRC, DE_RCBR , DE_BSLS, \ - KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_ENT, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTZ, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -#ifdef AUDIO_ENABLE -float tone_qwertz[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTZ: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwertz); - #endif - persistent_default_layer_set(1UL<<_QWERTZ); - } - 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/handwired/xeal60/keymaps/DE_simple/readme.md b/keyboards/handwired/xeal60/keymaps/DE_simple/readme.md deleted file mode 100644 index 972cd6c398fe..000000000000 --- a/keyboards/handwired/xeal60/keymaps/DE_simple/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -De_Simple Keymap -====== - -Features --------- - -Changed Keymap to reasamble German Layout. - -Layout --------- - - Qwertz - ,-----------------------------------------------------------------------------------. - | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | - |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | A | S | D | F | G | H | J | K | L | + | # | - |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | - |------+------+------+------+------+------+------+------+------+------+------+------| - | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - `-----------------------------------------------------------------------------------' - - - Qwerty - ,-----------------------------------------------------------------------------------. - | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | - |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | A | S | D | F | G | H | J | K | L | + | # | - |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | - |------+------+------+------+------+------+------+------+------+------+------+------| - | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - `-----------------------------------------------------------------------------------' - - - Raise - ,-----------------------------------------------------------------------------------. - | ° | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - |------+------+------+------+------+-------------+------+------+------+------+------| - | Del | F1 | F2 | F3 | F4 | F5 | F6 | { | [ | ] | } | \ | - |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | - |------+------+------+------+------+------+------+------+------+------+------+------| - | | | | | | | | Next | Vol- | Vol+ | Play | - `-----------------------------------------------------------------------------------' - - - Adjust (Lower + Raise) - ,-----------------------------------------------------------------------------------. - | | Reset| | | | | | | | | | Del | - |------+------+------+------+------+-------------+------+------+------+------+------| - | | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | | - |------+------+------+------+------+------|------+------+------+------+------+------| - | | | | | | | | | | | | | - |------+------+------+------+------+------+------+------+------+------+------+------| - | | | | | | | | | | | | - `-----------------------------------------------------------------------------------' - - diff --git a/keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk b/keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/handwired/xeal60/keymaps/OLED_sample/config.h b/keyboards/handwired/xeal60/keymaps/OLED_sample/config.h deleted file mode 100644 index e8632fe61df8..000000000000 --- a/keyboards/handwired/xeal60/keymaps/OLED_sample/config.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -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, not both */ - -#define USE_I2C -//#define USE_SERIAL - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS -#define FLIP_HALF - -#define SSD1306OLED -//#define OLED_ROTATE180 - - -#define PREVENT_STUCK_MODIFIERS -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 - -#ifdef SUBPROJECT_rev1 - #include "../../rev1/config.h" -#endif -#ifdef SUBPROJECT_rev2 - #include "../../rev2/config.h" -#endif - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 6 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c b/keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c deleted file mode 100644 index 5eccbcf1ac3b..000000000000 --- a/keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c +++ /dev/null @@ -1,441 +0,0 @@ -#include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - -extern keymap_config_t keymap_config; - -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; - - -// 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, - BACKLIT, - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO -//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 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_ESC, 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 , \ - ADJUST, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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 , \ - ADJUST, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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 , \ - ADJUST, 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 | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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_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 / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -// 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)) { - rgblight_mode(RGB_current_mode); - 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) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_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; - rgblight_mode(16); - } - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - 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; - rgblight_mode(15); - } - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - layer_off(_RAISE); - TOG_STATUS = false; - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - 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: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - return false; - break; - } - return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif - RGB_current_mode = rgblight_config.mode; -} - -//SSD1306 OLED init and update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED -void matrix_master_OLED_init (void) { - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display -} - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} -#endif - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{ - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_SAMPLEMACRO: - if (record->event.pressed){ - return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - - } - - return MACRO_NONE; -} - - -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_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65560 - -void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } -#endif - -// 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("\n\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case L_RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case L_LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case L_ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - 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< -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS - -#ifdef SUBPROJECT_rev2 - /* RGB Underglow */ - #undef RGBLED_NUM - #define RGBLIGHT_ANIMATIONS - #define RGBLED_NUM 8 -#endif - -#undef TAPPING_TERM -#define TAPPING_TERM 200 //At 500 some bad logic takes hold -#define PREVENT_STUCK_MODIFIERS -#define IGNORE_MOD_TAP_INTERRUPT -#define PERMISSIVE_HOLD - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/adam/keymap.c b/keyboards/handwired/xeal60/keymaps/adam/keymap.c deleted file mode 100644 index b986ab780bd7..000000000000 --- a/keyboards/handwired/xeal60/keymaps/adam/keymap.c +++ /dev/null @@ -1,78 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 BASE 0 // default layer -#define FLOCK 1 // symbols arrows and F keys on F held down -#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[BASE] = LAYOUT ( \ - TD(1), KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), F(FLOCK), GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), F(JLOCK), CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOTE -), -[FLOCK] = LAYOUT ( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, \ - S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, S(KC_RBRC), \ - KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLASH \ -), -[JLOCK] = LAYOUT ( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, \ - S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, _______, KC_UP, KC_RIGHT, S(KC_RBRC), \ - KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLASH \ -) -}; - -const uint16_t PROGMEM fn_actions[] = { - [FLOCK] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F), - [JLOCK] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J) -}; -#ifdef TAP_DANCE_ENABLE -void tap_1(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - register_code (KC_1); - unregister_code (KC_1); - break; - case 2: - register_code (KC_ESC); - unregister_code (KC_ESC); - break; - case 3: - register_code (KC_LSFT); - register_code (KC_1); - unregister_code (KC_1); - unregister_code (KC_LSFT); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [0] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_ESC), - [1] = ACTION_TAP_DANCE_FN(tap_1) -}; -#endif diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/README.md b/keyboards/handwired/xeal60/keymaps/bbaserdem/README.md deleted file mode 100644 index 4b37d735552b..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Lets Split Layout - -Check out [user readme](../../../../users/bbaserdem/README.md) for more info. - -# Usage - -**These commands depend on there being no other arduino connected!** -Also udev rules can be set instead of using sudo. -Please unplug all other usb devices. - -To make the hex files; -``` -make lets_split/rev2:bbaserdem -make lets_split/rev2:bbaserdem_right -``` - -For the left half, after plugging in and resetting; (from repo main directory) -``` -sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:.build/lets_split_rev2_bbaserdem.hex -sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-lefthand.eep -``` - -For the right half; -``` -sudo avrdude -p atmgea34u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:.build/lets_split_rev2_bbaserdem_right.hex -sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-righhand.eep -``` diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/config.h b/keyboards/handwired/xeal60/keymaps/bbaserdem/config.h deleted file mode 100644 index 6a90e1c356dd..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem/config.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CONFIG_KEYMAP_H -#define CONFIG_KEYMAP_H - -#include "../../config.h" - -#define USE_SERIAL -#define EE_HANDS - -// LED strip stuff -#ifdef RGBLIGHT_ENABLE - -// Who thought it was a good idea to predefine these in the rev2/config.h ??? -#ifdef RGBLED_NUM -#undef RGBLED_NUM -#endif -#define RGBLED_NUM 12 - -#define RGBLIGHT_HUE_STEP 6 -#define RGBLIGHT_SAT_STEP 12 -#define RGBLIGHT_VAL_STEP 20 -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 6 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 2000 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#endif - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c b/keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c deleted file mode 100644 index 623117530dcc..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Let's Split - Dvorak turkish - * Keymap by @bbaserdem - * Dvorak layout with multiple features - * Most of the code is in the "user" directory. - * Check qmk_firmware/users/bbaserdem for the main part of the code - */ -#define KEYMAP(...) LAYOUT_ortho_4x12(__VA_ARGS__) - -#include "lets_split.h" -#include "bbaserdem.h" - - -void matrix_init_keymap (void) { -} - -uint32_t layer_state_set_keymap(uint32_t state) { - return state; -} - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // Main Dvorak layer - [_DV] = LAYOUT_letssplit_wrapper(DVORAK), - // Turkish and special character overlay - [_AL] = LAYOUT_letssplit_wrapper(ALTCHAR), - // Gaming layer - [_GA] = LAYOUT_letssplit_wrapper(GAME), - // Numbers layer - [_NU] = LAYOUT_letssplit_wrapper(NUMBERS), - // Settings layer - [_SE] = LAYOUT_letssplit_wrapper(SETTINGS), - // Mouse emulation layer - [_MO] = LAYOUT_letssplit_wrapper(MOUSE), - // Music layer - [_MU] = LAYOUT_letssplit_wrapper(MUSIC), -}; diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk b/keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk deleted file mode 100644 index 4159db3fee57..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk +++ /dev/null @@ -1,11 +0,0 @@ -# Build options - -BACKLIGHT_ENABLE = no # Switch LEDs -MOUSEKEY_ENABLE = yes # Emulates mouse key using keypresses -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/handwired/xeal60/keymaps/bbaserdem_right/README.md b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md deleted file mode 100644 index 8608f23f79b0..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Lets Split - Right Half - -Keymap for my right half, to be used as a numpad. -Check [main readme](../bbaserdem/README.md) for flashing info. - diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h deleted file mode 100644 index 47545a059beb..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef CONFIG_KEYMAP_H -#define CONFIG_KEYMAP_H - -#include "../../config.h" - -#define USE_SERIAL -#define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c deleted file mode 100644 index 2dcae0dca5a1..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Let's Split - Dvorak turkish - * Keymap by @bbaserdem - * Dvorak layout with multiple features - * Most of the code is in the "user" directory. - * Check qmk_firmware/users/bbaserdem for the main part of the code - */ - -#include "lets_split.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Navigation All Supered) Numpad - * ,-----------------------. ,-----------------------. - * | F4| ` | Q |Alt| L | > | | ) | - | + | = |Ent|Bkp| - * |---+---+---+---+---+---| |---+---+---+---+---+---| - * | F3| M |Ent|Ctl| K | ^ | | ( | * | 9 | 6 | 3 | . | - * |---+---+---+---+---+---| |---+---+---+---+---+---| - * | F2| T |Spc|Shf| J | v | | % | / | 8 | 5 | 2 | , | - * |---+---+---+---+---+---| |---+---+---+---+---+---| - * | F1| F | P |Tab| H | < | |Nlc|Tab| 7 | 4 | 1 | 0 | - * `-----------------------' `-----------------------' - */ - // Main Dvorak layer - [0] = LAYOUT_ortho_4x12( - LCTL(LALT(KC_DEL)), LGUI(KC_GRV), LGUI(KC_Q), LGUI(KC_LALT), LGUI(KC_L), LGUI(KC_RGHT), KC_RPRN, KC_PMNS, KC_PPLS, KC_PEQL, KC_PENT, KC_BSPC, \ - LGUI(KC_F3), LGUI(KC_M), LGUI(KC_ENT), LGUI(KC_LCTL), LGUI(KC_K), LGUI(KC_UP), KC_LPRN, KC_PAST, KC_P9, KC_P6, KC_P3, KC_PDOT, \ - LGUI(KC_F2), LGUI(KC_T), LGUI(KC_SPC), LGUI(KC_LSFT), LGUI(KC_J), LGUI(KC_DOWN), KC_PERC, KC_PSLS, KC_P8, KC_P5, KC_P2, KC_PCMM, \ - LGUI(KC_F1), LGUI(KC_F), LGUI(KC_P), LGUI(KC_TAB), LGUI(KC_H), LGUI(KC_LEFT), KC_NLCK, KC_TAB, KC_P7, KC_P4, KC_P1, KC_P0 \ - ) -}; diff --git a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk b/keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk deleted file mode 100644 index 36b4b8fc2552..000000000000 --- a/keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# Build options - -USER_NAME := bbaserdem-without-userspace - -BACKLIGHT_ENABLE = no # Switch LEDs -MOUSEKEY_ENABLE = no # Emulates mouse key using keypresses -RGBLIGHT_ENABLE = no # LED strips -TAP_DANCE_ENABLE = no # Use multi-tap features -AUDIO_ENABLE = no # Audio stuff -BLUETOOTH_ENABLE = no # No bluetooth -COMMAND_ENABLE = no # Some bootmagic thing -BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed -CONSOLE_ENABLE = no # Allows console output with a command -SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. -NKRO_ENABLE = no # Default is 6KRO which is plenty -MIDI_ENABLE = no # Untested feature -FAUXCLICKY_ENABLE = no # Emulates clicks using speaker -KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. -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/handwired/xeal60/keymaps/cpeters1982/config.h b/keyboards/handwired/xeal60/keymaps/cpeters1982/config.h deleted file mode 100644 index 3639b9c3f229..000000000000 --- a/keyboards/handwired/xeal60/keymaps/cpeters1982/config.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -// #define MASTER_LEFT -#define MASTER_RIGHT -// #define EE_HANDS - -// Define Tap Dance interval -//#define TAPPING_TERM 175 - -// // Enable LED strip -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 10 - -// Space Cadet -#define LSPO_KEY KC_9 -#define RSPC_KEY KC_0 -#define DISABLE_SPACE_CADET_ROLLOVER - -// Auto Shift settings -#define AUTO_SHIFT_TIMEOUT 165 -// #define NO_AUTO_SHIFT_SPECIAL - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c b/keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c deleted file mode 100644 index 9c3eb9475217..000000000000 --- a/keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c +++ /dev/null @@ -1,221 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLEMAK 1 -// #define _DVORAK 2 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 - - - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - // COLEMAK, - // DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -/* -// Tap dance declerations -enum { - TD_GRV_TILD = 0, -}; - -// Tap dance definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), -}; -*/ - - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` ~ | Q | W | E | R | T | Y | U | I | O | P | Bspc | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Rshift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Lalt | GUI | Esc |Lower |KC_SPC |Enter |Raise | [cmd|] alt |= Hypr| - | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( \ - KC_GRV, 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ - KC_LCTRL,KC_LALT, KC_LGUI, KC_ESC, TG(_LOWER), LT(_ADJUST, KC_SPC), KC_ENT, TG(_RAISE), MT(MOD_RGUI, KC_LBRC), MT(MOD_RALT, KC_RBRC), MT(MOD_HYPR, KC_EQL), KC_MINS \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ESC | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bspc | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - KC_ESC, 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,_______,_______,_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_MFFD, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | up | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | left | down |right | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | % | ` | ~ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |AShftD|AShftU|REPORT| | | | [ | ] | - | = | \ | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, KC_LEFT, KC_DOWN, KC_RGHT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PERC, KC_GRV, KC_TILD, \ - KC_ASDN, KC_ASUP, KC_ASRP, _______, _______, _______, _______, KC_RBRC, KC_LBRC, KC_MINS, KC_EQL, KC_BSLASH \ -) - - -}; - -/* #ifdef AUDIO_ENABLE -* float tone_qwerty[][2] = SONG(QWERTY_SOUND); -* float tone_dvorak[][2] = SONG(DVORAK_SOUND); -* float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif */ - - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_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; -}; - -#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF); -#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF); -#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF); -#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF); -#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); -#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); -#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF); -#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); -#define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); - -uint32_t layer_state_set_user(uint32_t state) { -#ifdef RGBLIGHT_ENABLE - uint8_t default_layer = eeconfig_read_default_layer(); - if (rgb_layer_change) { - switch (biton32(state)) { - case _RAISE: - rgblight_set_orange; - rgblight_mode(5); - break; - case _LOWER: - rgblight_set_teal; - rgblight_mode(5); - break; - case _ADJUST: - rgblight_set_purple; - rgblight_mode(23); - break; - default: - if (default_layer & (1UL << _COLEMAK)) { - rgblight_set_magenta; - } - else if (default_layer & (1UL << _DVORAK)) { - rgblight_set_green; - } - else { - rgblight_set_blue; - } - rgblight_mode(1); - break; - } - } -#endif - return state; -} diff --git a/keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk b/keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk deleted file mode 100644 index f2fde785d4e6..000000000000 --- a/keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ - - - -ifndef QUANTUM_DIR - include ../../../../Makefile - AUTO_SHIFT_ENABLE = yes - RGBLIGHT_ENABLE = yes -endif diff --git a/keyboards/handwired/xeal60/keymaps/dlaroe/config.h b/keyboards/handwired/xeal60/keymaps/dlaroe/config.h deleted file mode 100644 index 6b31e8d14ee1..000000000000 --- a/keyboards/handwired/xeal60/keymaps/dlaroe/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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_common.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c b/keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c deleted file mode 100644 index b2282e0fe8c1..000000000000 --- a/keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c +++ /dev/null @@ -1,255 +0,0 @@ -// Can't Remember Sh*t Keymap for Let's Split -// Trying to fit as many characters as possible on the default layer -// as its easier for me to remember logical functions than characters -// Also, I like me some numpad - - -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _ARROW 1 -#define _GAME 2 -#define _LOWER 3 -#define _RAISE 4 -#define _PLOVER 5 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - ARROW, - GAME, - LOWER, - RAISE, - BACKLIT, - PLOVER, - EXT_PLV -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | \ | Alt | Lower|SpcRse| Space|Raise | [ | - | = | ] | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( \ - 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, SFT_T(KC_ENT), \ - KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, LT(4, KC_SPC), KC_SPC, RAISE, LT(3, KC_LBRC), KC_MINS, KC_EQL, CTL_T(KC_RBRC) \ -), - -/* Arrow - * ,-----------------------------------------------------------------------------------. - * | 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | \ | Alt | Lower|SpcRse| Space|Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_ARROW] = LAYOUT( \ - 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, SFT_T(KC_ENT), \ - KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -), - -/* Game - * ,-----------------------------------------------------------------------------------. - * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |Shift | A | S | D | F | G | H | J | K | L | ; | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right| - * `-----------------------------------------------------------------------------------' - */ -[_GAME] = LAYOUT( \ - KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ , \ - KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -), - - -/* Lower (switched to # because KP# were weird in terminal emulators) - * ,-----------------------------------------------------------------------------------. - * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Esc | | | | | | 0 | | | | KP_+ | | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - KC_DEL, 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, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______, \ - KC_ESC, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, KC_PLUS, _______ \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Wh Dn| M-L | M-Dn | M-R | | - | = | [ | ] | \ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | App | | | | | Ins | | Home | PGDN | PGUP | End | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT( \ - 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_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV, \ - _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______, \ - _______, KC_APP, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ -), - -/* 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 ( \ - 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) - * ,-----------------------------------------------------------------------------------. - * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff| Prev | Next | Mute | VolDn| VolUp| | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | | | | Play/Pause | | BL_T |BL_DEC|BL_INC|BL_ST | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), \ - _______, _______, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, _______, _______, _______, _______, \ - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ - BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP \ -) - - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: // this would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes - } - break; - } - return MACRO_NONE; -}; - - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif - - -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case GAME: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(music_scale); - #endif - persistant_default_layer_set(1UL<<_GAME); - } - 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 BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - } - return true; -} - -void matrix_init_user(void) { - -} diff --git a/keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk b/keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/handwired/xeal60/keymaps/drashna/config.h b/keyboards/handwired/xeal60/keymaps/drashna/config.h deleted file mode 100644 index 5bc5598ee053..000000000000 --- a/keyboards/handwired/xeal60/keymaps/drashna/config.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -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 - -#ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#endif // RGBLIGHT_ENABLE - - -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#ifndef NO_PRINT -#define NO_PRINT -#endif // !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 - -#undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad - -#define USE_I2C - -#ifdef AUDIO_ENABLE -#define C6_AUDIO -#define NO_MUSIC_MODE -#endif - -#define LAYOUT_ortho_5x7( \ - 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, \ - L40, L41, L42, L43, L44, L45, L46 \ - ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) - -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW -#define QMK_LED B0 -#define QMK_SPEAKER C6 diff --git a/keyboards/handwired/xeal60/keymaps/drashna/keymap.c b/keyboards/handwired/xeal60/keymaps/drashna/keymap.c deleted file mode 100644 index 68ca593db891..000000000000 --- a/keyboards/handwired/xeal60/keymaps/drashna/keymap.c +++ /dev/null @@ -1,98 +0,0 @@ -#include QMK_KEYBOARD_H -#include "drashna.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -#define LMACRO TG(_MACROS) -#define DIABLO TG(_DIABLO) -#define GAMEPAD TG(_GAMEPAD) -#define MEDIA TT(_MEDIA) - - -//enum more_custom_keycodes { -// KC_P00 = NEW_SAFE_RANGE -//}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_NUMLOCK] = LAYOUT_ortho_5x7( - LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, - MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, - KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, - KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT - ), - - [_DIABLO] = LAYOUT_ortho_5x7( - KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, - KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, - KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, - KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR, - KC_LALT, KC_F4, KC_F5, KC_F8, KC_F9, KC_F10, SFT_T(KC_SPACE) - ), - - [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch - LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, - MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V - ), - - [_MACROS] = LAYOUT_ortho_5x7( - LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT - ), - - - [_MEDIA] = LAYOUT_ortho_5x7( - KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, - MEDIA, EPRM, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, - RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD, - KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI, - KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI - ) - - -}; - - - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - - //switch (keycode) { - //case KC_P00: - // if (!record->event.pressed) { - // tap(KC_KP_0); - // tap(KC_KP_0); - // } - // return false; - // break; - //} - return true; -} - - - -void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); -} - - diff --git a/keyboards/handwired/xeal60/keymaps/drashna/rules.mk b/keyboards/handwired/xeal60/keymaps/drashna/rules.mk deleted file mode 100644 index ec3befc0b73d..000000000000 --- a/keyboards/handwired/xeal60/keymaps/drashna/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ -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 -RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes -NKRO_ENABLE = yes - -NO_SECRETS = yes -MACROS_ENABLED = yes -INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no - -LAYOUTS = ortho_5x7 - -# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) -# SRC := $(filter-out serial.c,$(SRC)) -# SRC := $(filter-out matrix.c,$(SRC)) -# SRC := $(filter-out i2c.c,$(SRC)) -# SRC := $(filter-out split_util.c,$(SRC)) -# SRC += quantum/matrix.c - -BOOTLOADER = qmk-dfu diff --git a/keyboards/handwired/xeal60/keymaps/drashna_old/config.h b/keyboards/handwired/xeal60/keymaps/drashna_old/config.h deleted file mode 100644 index ddf9d1a40f43..000000000000 --- a/keyboards/handwired/xeal60/keymaps/drashna_old/config.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - - -#ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#endif // RGBLIGHT_ENABLE - - -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#ifndef NO_PRINT -#define NO_PRINT -#endif // !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 - -#undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad - -#define USE_I2C - -#ifdef AUDIO_ENABLE -#define C6_AUDIO -#define NO_MUSIC_MODE -#endif - -#define LAYOUT_ortho_5x7( \ - 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, \ - L40, L41, L42, L43, L44, L45, L46 \ - ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) - -#endif - -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW -#define QMK_LED B0 -#define QMK_SPEAKER C6 diff --git a/keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c b/keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c deleted file mode 100644 index 2d361da9a34c..000000000000 --- a/keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c +++ /dev/null @@ -1 +0,0 @@ -//placeholder \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk b/keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk deleted file mode 100644 index 14ac6a6b3c0b..000000000000 --- a/keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -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 -RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes -NKRO_ENABLE = yes - -NO_SECRETS = yes -MACROS_ENABLED = yes -INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no - -LAYOUTS = ortho_5x7 - -# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) -# SRC := $(filter-out serial.c,$(SRC)) -# SRC := $(filter-out matrix.c,$(SRC)) -# SRC := $(filter-out i2c.c,$(SRC)) -# SRC := $(filter-out split_util.c,$(SRC)) -# SRC += quantum/matrix.c - -USER_NAME := drashna -SRC += ../drashna/keymap.c - -BOOTLOADER = qmk-dfu diff --git a/keyboards/handwired/xeal60/keymaps/dwallace/config.h b/keyboards/handwired/xeal60/keymaps/dwallace/config.h deleted file mode 100644 index 585b41dbcf2e..000000000000 --- a/keyboards/handwired/xeal60/keymaps/dwallace/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define TAPPING_TERM 150 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 14 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/dwallace/keymap.c b/keyboards/handwired/xeal60/keymaps/dwallace/keymap.c deleted file mode 100644 index 24102448287f..000000000000 --- a/keyboards/handwired/xeal60/keymaps/dwallace/keymap.c +++ /dev/null @@ -1,224 +0,0 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _FN 1 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - STK_SHIFT, - STK_CTRL, - STK_ALT, - STK_GUI, - STK_META, - STK_CLEAR, - RGB_LEVEL_UP, - RGB_LEVEL_DOWN, -}; - -#define KC_ KC_TRNS -#define _______ KC_TRNS - -#define KC_SWIN LGUI(KC_TILD) // Switch between windows -#define KC_SAPP LGUI(KC_TAB) // Switch between applications -#define KC_FN1 MO(_FN) -#define KC_LCAG LCAG(KC_NO) -#define KC_RTOG RGB_TOG -#define KC_RGUP RGB_LEVEL_UP -#define KC_RGDN RGB_LEVEL_DOWN -#define KC_RST RESET -#define KC_SSFT STK_SHIFT -#define KC_SCTL STK_CTRL -#define KC_SALT STK_ALT -#define KC_SGUI STK_GUI -#define KC_SMTA STK_META -#define KC_SCLR STK_CLEAR - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,BSPC, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - TAB , Q , W , E , R , T ,LBRC, Y , U , I , O , P ,BSLS,PGUP, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ESC , A , S , D , F , G ,RBRC, H , J , K , L ,SCLN,QUOT,ENT , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - SSFT, Z , X , C , V , B ,SWIN, N , M ,COMM,DOT , UP ,SLSH,RSFT, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - SCTL,SMTA,SALT,SGUI,SPC ,SCLR,SAPP, FN1 ,SPC ,RGUI,LEFT,DOWN,RGHT,PGDN - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_FN] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , ,RST , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , RTOG, ,RGDN,RGUP, , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , ,MUTE,VOLD,VOLU, , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ) - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool modifier_already_applied = false; -uint8_t physically_held_modifiers = 0; -uint8_t last_mods = 0xFF; -uint8_t rgb_dimming = 0; -#define SET_LED_RGB(val, led_num) setrgb(((val >> 16) & 0xFF) >> rgb_dimming, ((val >> 8) & 0xFF) >> rgb_dimming, (val & 0xFF) >> rgb_dimming, (LED_TYPE *)&led[led_num]) - -void update_underglow_level(void) { - if (get_mods() == last_mods) - return; - - last_mods = get_mods(); - - if (get_mods() == 0) { - uint8_t level = 0x10 >> rgb_dimming; - rgblight_setrgb(level, level, level); - return; - } - - uint32_t mod_colors[4] = {0}; - uint8_t mod_count = 0; - rgblight_setrgb(0x00, 0x00, 0x00); - - if (get_mods() & MOD_BIT(KC_LSFT)) - mod_colors[mod_count++] = 0xFF0000; - if (get_mods() & MOD_BIT(KC_LCTL)) - mod_colors[mod_count++] = 0x00FF00; - if (get_mods() & MOD_BIT(KC_LALT)) - mod_colors[mod_count++] = 0x0000FF; - if (get_mods() & MOD_BIT(KC_LGUI)) - mod_colors[mod_count++] = 0xFFFF00; - - uint8_t led_num = 0; - for (int m = 0; m < mod_count; m++) { - for (; led_num < RGBLED_NUM*(m+1)/mod_count; led_num++) { - SET_LED_RGB(mod_colors[m], led_num); - } - } - rgblight_set(); -} - -void add_sticky_modifier(uint16_t keycode) { - add_mods(MOD_BIT(keycode)); - register_code(keycode); - modifier_already_applied = false; -} - -void clear_sticky_modifiers(void) { - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - unregister_code(KC_LALT); - unregister_code(KC_LGUI); - update_underglow_level(); -} - -void handle_sticky_modifier_event(uint16_t keycode, bool pressed) { - if (pressed) { - add_sticky_modifier(keycode); - physically_held_modifiers |= MOD_BIT(keycode); - } else { - del_mods(MOD_BIT(keycode)); - physically_held_modifiers &= ~MOD_BIT(keycode); - if (modifier_already_applied) { - clear_sticky_modifiers(); - } else { - add_sticky_modifier(keycode); - } - } - update_underglow_level(); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case STK_SHIFT: - handle_sticky_modifier_event(KC_LSFT, record->event.pressed); - return false; - break; - case STK_CTRL: - handle_sticky_modifier_event(KC_LCTL, record->event.pressed); - return false; - break; - case STK_ALT: - handle_sticky_modifier_event(KC_LALT, record->event.pressed); - return false; - break; - case STK_GUI: - handle_sticky_modifier_event(KC_LGUI, record->event.pressed); - return false; - break; - case STK_META: - handle_sticky_modifier_event(KC_LCTL, record->event.pressed); - handle_sticky_modifier_event(KC_LALT, record->event.pressed); - handle_sticky_modifier_event(KC_LGUI, record->event.pressed); - return false; - break; - case STK_CLEAR: - if (record->event.pressed) { - clear_sticky_modifiers(); - } - return false; - break; - case RGB_LEVEL_DOWN: - if (record->event.pressed && rgb_dimming < 8) { - rgb_dimming++; - } - return false; - break; - case RGB_LEVEL_UP: - if (record->event.pressed && rgb_dimming > 0) { - rgb_dimming--; - } - return false; - break; - } - if (!record->event.pressed && IS_KEY(keycode)) { - modifier_already_applied = true; - if (physically_held_modifiers == 0) - clear_sticky_modifiers(); - } - return true; -} - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - #endif //RGBLIGHT_ENABLE -} - -void matrix_scan_user(void) { - #ifdef RGBLIGHT_ENABLE - update_underglow_level(); - #endif //RGBLIGHT_ENABLE -} diff --git a/keyboards/handwired/xeal60/keymaps/dwallace/rules.mk b/keyboards/handwired/xeal60/keymaps/dwallace/rules.mk deleted file mode 100644 index 1e3cebb14515..000000000000 --- a/keyboards/handwired/xeal60/keymaps/dwallace/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/fabian/config.h b/keyboards/handwired/xeal60/keymaps/fabian/config.h deleted file mode 100644 index 6ae40cc2ba2f..000000000000 --- a/keyboards/handwired/xeal60/keymaps/fabian/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -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 . -*/ - - -#define USE_SERIAL - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - - -#ifdef SUBPROJECT_rev1 - #include "../../rev1/config.h" -#endif -#ifdef SUBPROJECT_rev2 - #include "../../rev2/config.h" -#endif -#ifdef SUBPROJECT_rev2fliphalf - #include "../../rev2fliphalf/config.h" -#endif diff --git a/keyboards/handwired/xeal60/keymaps/fabian/keymap.c b/keyboards/handwired/xeal60/keymaps/fabian/keymap.c deleted file mode 100644 index 37053a8e4bfe..000000000000 --- a/keyboards/handwired/xeal60/keymaps/fabian/keymap.c +++ /dev/null @@ -1,271 +0,0 @@ -/* 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 - - -extern keymap_config_t keymap_config; - -enum custom_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _PLOVER, - _ADJUST -}; - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV, -}; - -#define XXXXXXX KC_NO -#define _______ KC_TRNS - -#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) -#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) -#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define SFT_SPC SFT_T(KC_SPC) // Tap for Space, hold for Shift -#define UMLAUT RALT(KC_U) // Combine Alt and U - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Meh | Alt | GUI |Lower |Space | Tab |Raise | GUI |AltGr | Umlt | Ctrl | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( \ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ - KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LOWER, KC_SPC, HPR_TAB, RAISE, KC_RGUI, KC_RALT, UMLAUT, KC_RCTL \ -), - -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Meh | Alt | GUI |Lower |Space | Tab |Raise | GUI |AltGr | Umlt | Ctrl | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT( \ - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ - KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LOWER, KC_SPC, HPR_TAB, RAISE, KC_RGUI, KC_RALT, UMLAUT, KC_RCTL \ -), - -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Meh | Alt | GUI |Lower |Space | Tab |Raise | GUI |AltGr | Umlt | Ctrl | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT( \ - HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ - KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LOWER, KC_SPC, HPR_TAB, RAISE, KC_RGUI, KC_RALT, UMLAUT, KC_RCTL \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ - _______, _______, _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ - _______, _______, _______, _______, _______, _______, _______, _______, 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( \ - 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| | | | | | | | | Reset| Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, 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, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - -}; - -#ifdef AUDIO_ENABLE - float plover_song[][2] = SONG(PLOVER_SOUND); - float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); -#endif - -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) { - 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 BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - 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; -} diff --git a/keyboards/handwired/xeal60/keymaps/fabian/rules.mk b/keyboards/handwired/xeal60/keymaps/fabian/rules.mk deleted file mode 100644 index b8c82cb99d34..000000000000 --- a/keyboards/handwired/xeal60/keymaps/fabian/rules.mk +++ /dev/null @@ -1,9 +0,0 @@ -# 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 -# -# UNICODE_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/fido/config.h b/keyboards/handwired/xeal60/keymaps/fido/config.h deleted file mode 100644 index 5cb10836521b..000000000000 --- a/keyboards/handwired/xeal60/keymaps/fido/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2018 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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -#ifndef MASTER_LEFT - #define MASTER_RIGHT -#endif -// #define EE_HANDS - -#define TAPPING_TERM 150 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/fido/keymap.c b/keyboards/handwired/xeal60/keymaps/fido/keymap.c deleted file mode 100644 index b8ef4600824c..000000000000 --- a/keyboards/handwired/xeal60/keymaps/fido/keymap.c +++ /dev/null @@ -1,74 +0,0 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _FN 1 - -#define KC_ KC_TRNS -#define _______ KC_TRNS - -#define KC_FN1 MO(_FN) -#define KC_WD_L LCTL(KC_LEFT) -#define KC_WD_R LCTL(KC_RGHT) -#define KC_RTOG RGB_TOG -#define KC_RMOD RGB_MOD -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD -#define KC_RSAI RGB_SAI -#define KC_RSAD RGB_SAD -#define KC_RVAI RGB_VAI -#define KC_RVAD RGB_VAD -#define KC_RST RESET -#define KC_CTLZ LCTL(KC_Z) -#define KC_CTLX LCTL(KC_X) -#define KC_CTLC LCTL(KC_C) -#define KC_CTLV LCTL(KC_V) -#define KC_ATAB LALT(KC_TAB) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - 1 , 2 , 3 , 4 , 5 , 6 ,ESC , DEL , 7 , 8 , 9 , 0 ,MINS,EQL , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - RBRC, Q , W , E , R , T ,TAB , BSPC, Y , U , I , O , P ,LBRC, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - GRV , A , S , D , F , G ,LALT, CAPS, H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - BSLS, Z , X , C , V , B ,LSFT, RSFT, N , M ,COMM,DOT ,SLSH,ENT , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - INS ,PSCR,MENU,LGUI,LCTL,SPC ,FN1 , FN1 ,SPC ,RCTL,RALT, , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_FN] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - F1 , F2 , F3 , F4 , F5 , F6 , , , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ,PGUP,WD_L, UP ,WD_R, ,ATAB, ,RMOD,RHUI,RSAI,RVAI, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ,HOME,LEFT,DOWN,RGHT, , , , ,RHUD,RSAD,RVAD, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ,CTLZ,CTLX,CTLC,CTLV, , , ,MUTE,VOLD,VOLU, , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ) - -}; - -void led_set_user(uint8_t usb_led) { - #ifdef RGBLIGHT_ENABLE - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - rgblight_enable(); - } else { - rgblight_disable(); - } - #endif //RGBLIGHT_ENABLE -} diff --git a/keyboards/handwired/xeal60/keymaps/fido/rules.mk b/keyboards/handwired/xeal60/keymaps/fido/rules.mk deleted file mode 100644 index 1e3cebb14515..000000000000 --- a/keyboards/handwired/xeal60/keymaps/fido/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h b/keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h deleted file mode 100644 index bb3556e57492..000000000000 --- a/keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL - -/* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS - -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 1000 - -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 1000 - -#undef TAPPING_TERM -#define TAPPING_TERM 200 - -#undef TAPPING_TOGGLE -#define TAPPING_TOGGLE 2 - -#ifdef SUBPROJECT_rev1 -#include "../../rev1/config.h" -#endif -#ifdef SUBPROJECT_rev2 -#include "../../rev2/config.h" -#endif -#ifdef SUBPROJECT_rev2fliphalf -#include "../../rev2fliphalf/config.h" -#endif - -#endif \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c b/keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c deleted file mode 100644 index 3a7ef9db3958..000000000000 --- a/keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c +++ /dev/null @@ -1,180 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLE 0 -#define _LOWER 1 -#define _RAISE 2 -#define _AUX 16 - -/* Layers */ -enum -{ - COLE = 0, - LOWER, // right hand 10 key. - RAISE, // left hand Fn, right hand symbols. - AUX, -}; - -/* Tap Dancery */ -enum -{ - TD_BTK, - TD_TDE, - TD_LPRN, - TD_RPRN, - TD_MIN, - TD_USC, -}; - -bool time_travel = false; - -// Fillers to make layering more clear -#define ____ KC_TRNS - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Colemak - * ,-----------------------------------------------------------------------------------. - * | ' " `| 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 | ? | | | ^ | _ . >| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower |Raise | Ctrl | Alt | Bksp | Spc |Enter |LShft | ESC | < | v | > | - * `-----------------------------------------------------------------------------------' - */ - [_COLE] = LAYOUT( - TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE), - TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN), - TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC), - LOWER, RAISE, OSM(MOD_LCTL), OSM(MOD_LALT), KC_SPC, KC_BSPC, KC_ENT, OSM(MOD_LSFT), KC_ESC, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Lower - * ,-----------------------------------------------------------------------------------. - * | ---- | ---- | ---- | ---- | ---- | ---- | 7 | 8 | 9 | * | / | ^ | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ---- | ---- | ---- | ---- | ---- | ---- | 4 | 5 | 6 | + | - | ---- | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ---- | ---- | ---- | ---- | ---- | ---- | 1 | 2 | 3 | = | ---- | ---- | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ---- | ---- | ---- | ---- | ---- | ---- | ---- | 0 | . | ---- | ---- | ---- | - * `-----------------------------------------------------------------------------------' - */ - [_LOWER] = LAYOUT( - ____, ____, ____, ____, ____, ____, KC_7, KC_8, KC_9, KC_PAST, KC_PSLS, KC_CIRC, - ____, ____, ____, ____, ____, ____, KC_4, KC_5, KC_6, KC_PPLS, KC_PMNS, ____, - ____, ____, ____, ____, ____, ____, KC_1, KC_2, KC_3, KC_PEQL, ____, ____, - ____, ____, ____, ____, ____, ____, ____, KC_0, KC_MNXT, ____, ____, ____), - - /* Raise - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | ! | @ | # | $ | % | ` ~ | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | F7 | F8 | F9 | F10 | F11 | F12 | ^ | & | * | ( | ) | - _ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ____ | ____ | ____ | ____ | ____ | ____ | [ { | ] } | \ | | ; : | ' " | = + | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | , < | . > | / ? | - * `-----------------------------------------------------------------------------------' - */ - [_RAISE] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL, - ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_COMM, KC_DOT, KC_SLSH), - - /* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | Reset| ____ | ____ | ____ | ____ | ____ | ____ | LOCK | ____ | ____ | ____ | VUP | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ____ | ____ | RUN | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | VDWN | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | PGUP | MUTE | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | HOME | PGDN | END | - * `-----------------------------------------------------------------------------------' - */ - [_AUX] = LAYOUT( - RESET, ____, ____, ____, ____, ____, ____, LGUI(KC_L), ____, ____, ____, KC_VOLU, - ____, ____, LGUI(KC_R), ____, ____, ____, ____, ____, ____, ____, ____, KC_VOLD, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_MUTE, - ____, ____, ____, ____, KC_TAB, KC_DEL, ____, ____, ____, KC_HOME, KC_PGDOWN, KC_END) - -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV), - [TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD), - [TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN), - [TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN), - [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS), - [TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS)}; - -void persistent_default_layer_set(uint16_t default_layer) -{ - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -}; - -void matrix_scan_user(void){}; - -void matrix_init_user(void){}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - switch (keycode) - { - case COLE: - if (record->event.pressed) - { - persistent_default_layer_set(1UL << _COLE); - } - return false; - break; - case LOWER: - if (record->event.pressed) - { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _AUX); - } - else - { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _AUX); - } - return false; - break; - case RAISE: - if (record->event.pressed) - { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _AUX); - } - else - { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _AUX); - } - return false; - break; - case AUX: - if (record->event.pressed) - { - layer_on(_AUX); - } - else - { - layer_off(_AUX); - } - return false; - break; - } - return true; -} diff --git a/keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk b/keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk deleted file mode 100644 index 2261a848aa69..000000000000 --- a/keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# 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 -TAP_DANCE_ENABLE = yes -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 = 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 - -# 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/handwired/xeal60/keymaps/henxing/Readme.md b/keyboards/handwired/xeal60/keymaps/henxing/Readme.md deleted file mode 100644 index 231aa6adf397..000000000000 --- a/keyboards/handwired/xeal60/keymaps/henxing/Readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# Let's Split the Atreus - -This keymap is a port of the Atreus keymap to the Let's Split keyboard, using a -similar method of handling layer switches as the `default` keymap. - - -# Layers - -The following tables are the layers as implemented. - -### Underscores in Layer - -Any underscore represents a key that is mapped to `KC_NO`, or no keypress. The -2x3 block in the middle is like this because the Atreus does not have any keys -there. It has been left blank for the user to add her own special keypresses or -macros that she finds useful to have on that particular layer. - - -## `_QWERTY` - -```c -/* - * 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 , . / - * esc tab gui shift bksp ctrl alt space fn - ' enter - */ - ``` - - -## `_LOWER` - -```c -/* - * ! @ up { } _ _ pgup 7 8 9 * - * # left down right $ _ _ pgdn 4 5 6 + - * [ ] ( ) & _ _ ` 1 2 3 \ - * lower insert gui shift bksp ctrl alt space fn . 0 = - */ - ``` - -## `_RAISE` - -```c -/* - * insert home up end pgup _ _ up F7 F8 F9 F10 - * del left down right pgdn _ _ down F4 F5 F6 F11 - * _ volup _ _ reset _ _ F1 F2 F3 F12 - * _ voldn super shift bksp ctrl alt space L0 prtsc scroll pause - */ - ``` diff --git a/keyboards/handwired/xeal60/keymaps/henxing/config.h b/keyboards/handwired/xeal60/keymaps/henxing/config.h deleted file mode 100644 index 5a6261c4f7cf..000000000000 --- a/keyboards/handwired/xeal60/keymaps/henxing/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/henxing/keymap.c b/keyboards/handwired/xeal60/keymaps/henxing/keymap.c deleted file mode 100644 index aab75dc543a8..000000000000 --- a/keyboards/handwired/xeal60/keymaps/henxing/keymap.c +++ /dev/null @@ -1,113 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 1 -#define _RAISE 2 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * q w e r t _ _ y u i o p - * a s d f g _ _ h j k l ; - * z x c v b _ _ n m , . / - * esc tab gui shift bksp ctrl alt space fn - ' enter - */ - [_QWERTY] = LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ - ), - - /* - * ! @ up { } _ _ pgup 7 8 9 * - * # left down right $ _ _ pgdn 4 5 6 + - * [ ] ( ) & _ _ ` 1 2 3 \ - * lower insert gui shift bksp ctrl alt space fn . 0 = - */ - [_LOWER] = LAYOUT( \ - KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ - KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_NO, KC_NO, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ - RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ - ), - - /* - * insert home up end pgup _ _ up F7 F8 F9 F10 - * del left down right pgdn _ _ down F4 F5 F6 F11 - * _ volup _ _ reset _ _ F1 F2 F3 F12 - * _ voldn super shift bksp ctrl alt space L0 prtsc scroll pause - */ - [_RAISE] = LAYOUT( \ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_NO, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ - KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_NO, KC_NO, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ - KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ - ) - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - // The value to return - bool return_value = false; - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); -#endif - persistent_default_layer_set(1UL<<_QWERTY); - } - break; - - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - } else { - layer_off(_LOWER); - } - break; - - case RAISE: - persistent_default_layer_set(1UL<<_RAISE); - break; - default: - - // If the keycode is not handled by any of the other cases, we - // should return true - return_value = true; - break; - } - - return return_value; -} diff --git a/keyboards/handwired/xeal60/keymaps/hexwire/README.md b/keyboards/handwired/xeal60/keymaps/hexwire/README.md deleted file mode 100644 index 3ce3f6af330a..000000000000 --- a/keyboards/handwired/xeal60/keymaps/hexwire/README.md +++ /dev/null @@ -1,116 +0,0 @@ -Hexwire's Nyquist Layout -============================ - -### Changes from default layout - -- Main layer - - The right space bar key has been changed to backspace, as I only hit space with my left thumb - - Backtick is at the lower right and also serves goes to the 3rd function layer when held - - Enter key acts as shift when held - - Escape key acts as control when held - - Minus key at upper right -- Lower layer - - Numbers are on the lower layer, to make it easier to use a numpad on the right hand - - Arrow keys - - Straight and curly brackets in the middle two columns - - Screenshot keys for MacOS -- Upper layer - - Symbols are on the upper layer - - Media keys - - Page Up/Down, Home/End -- 3rd function layer - - Function keys - -## Layouts - -### QWERTY - -``` -,----+----+----+----+----+----. ,----+----+----+----+----+----. -|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS| -|----+----+----+----+----+----| |----+----+----+----+----+----| -| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| -`----+----+----+----+----+----' `----+----+----+----+----+----' -``` - -### Colemak -``` -,----+----+----+----+----+----. ,----+----+----+----+----+----. -|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS| -|----+----+----+----+----+----| |----+----+----+----+----+----| -| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| -`----+----+----+----+----+----' `----+----+----+----+----+----' -``` - -### Dvorak -``` -,----+----+----+----+----+----. ,----+----+----+----+----+----. -|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS| -|----+----+----+----+----+----| |----+----+----+----+----+----| -| X0 , A , O , E , U , I , D , H , T , N , S ,SLSH| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| -`----+----+----+----+----+----' `----+----+----+----+----+----' -``` - -### Lower -``` -,----+----+----+----+----+----. ,----+----+----+----+----+----. -|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC| -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , | -|----+----+----+----+----+----| |----+----+----+----+----+----| -|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE| -|----+----+----+----+----+----| |----+----+----+----+----+----| -| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , , , , , , DEL , , P0 ,PDOT, , | -`----+----+----+----+----+----' `----+----+----+----+----+----' -``` - -### Raise -``` -,----+----+----+----+----+----. ,----+----+----+----+----+----. -|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC| -|----+----+----+----+----+----| |----+----+----+----+----+----| -| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, | -|----+----+----+----+----+----| |----+----+----+----+----+----| -|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS| -|----+----+----+----+----+----| |----+----+----+----+----+----| -|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , , , , , , , , , , , | -`----+----+----+----+----+----' `----+----+----+----+----+----' -``` - -### 3rd function layer - -``` -,----+----+----+----+----+----. ,----+----+----+----+----+----. -|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , , , , , , , , , , , | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , , , , , , , , , , , | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , , , , , , , , , , , | -|----+----+----+----+----+----| |----+----+----+----+----+----| -| , , , , , , , , , , , | -`----+----+----+----+----+----' `----+----+----+----+----+----' -``` diff --git a/keyboards/handwired/xeal60/keymaps/hexwire/config.h b/keyboards/handwired/xeal60/keymaps/hexwire/config.h deleted file mode 100644 index 7acf84510e64..000000000000 --- a/keyboards/handwired/xeal60/keymaps/hexwire/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define TAPPING_TERM 150 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/hexwire/keymap.c b/keyboards/handwired/xeal60/keymaps/hexwire/keymap.c deleted file mode 100644 index 2050c037933f..000000000000 --- a/keyboards/handwired/xeal60/keymaps/hexwire/keymap.c +++ /dev/null @@ -1,218 +0,0 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _FN3 5 -#define _FN4 6 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - FN3, - FN4, - ADJUST, -}; - -#define KC_ KC_TRNS -#define _______ KC_TRNS - -#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen -#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen -#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen -#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen -#define KC_X0 MT(MOD_LCTL, KC_ESC) -#define KC_X1 LOWER -#define KC_X2 RAISE -#define KC_X3 LT(_FN3, KC_GRV) -#define KC_X4 MT(MOD_LSFT, KC_ENT) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - TAB , Q , W , E , R , T , , Y , U , I , O , P ,MINS, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - X0 , A , S , D , F , G , , H , J , K , L ,SCLN,QUOT, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LSFT, Z , X , C , V , B , , N , M ,COMM,DOT ,SLSH, X4 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT, - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_COLEMAK] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - TAB , Q , W , F , P , G , , J , L , U , Y ,SCLN,MINS, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - X0 , A , R , S , T , D , , H , N , E , I , O ,QUOT, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LSFT, Z , X , C , V , B , , K , M ,COMM,DOT ,SLSH, X4 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT, - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_DVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - TAB ,QUOT,COMM,DOT , P , Y , , F , G , C , R , L ,MINS, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - X0 , A , O , E , U , I , , D , H , T , N , S ,SLSH, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LSFT,SCLN, Q , J , K , X , , B , M , W , V , Z , X4 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT, - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - DEL ,CAPP,LEFT,RGHT, UP ,LBRC, , RBRC, P4 , P5 , P6 ,PLUS,PIPE, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ,CPYP, , ,DOWN,LCBR, , RCBR, P1 , P2 , P3 ,MINS, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , DEL , , P0 ,PDOT, , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , EQL ,HOME, , , ,BSLS, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , PLUS,END , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_FN3] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - F12 , F1 , F2 , F3 , F4 , F5 , , F6 , F7 , F8 , F9 ,F10 ,F11 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - [_ADJUST] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, 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, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ) - - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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/handwired/xeal60/keymaps/hexwire/rules.mk b/keyboards/handwired/xeal60/keymaps/hexwire/rules.mk deleted file mode 100644 index 1e3cebb14515..000000000000 --- a/keyboards/handwired/xeal60/keymaps/hexwire/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/khord/config.h b/keyboards/handwired/xeal60/keymaps/khord/config.h deleted file mode 100644 index 4ebdbad76919..000000000000 --- a/keyboards/handwired/xeal60/keymaps/khord/config.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -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" - -#define TAPPING_TERM 150 - -/* prevent stuck modifiers */ -#define PREVENT_STUCK_MODIFIERS - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -//#define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS - -#define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/khord/keymap.c b/keyboards/handwired/xeal60/keymaps/khord/keymap.c deleted file mode 100644 index 41042065d639..000000000000 --- a/keyboards/handwired/xeal60/keymaps/khord/keymap.c +++ /dev/null @@ -1,170 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - ADMIN, - SMSPC1 -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// Tap Dance Declarations -enum { - SFT_CAP = 0 -}; - -// Dylan's additions -#define C_A_DEL LALT(LCTL(KC_DEL)) -#define C_A_INS LALT(LCTL(KC_INS)) -//#define MAC_LOK S(LCTL(KC_PWR)) -#define MAC_LOK LCTL(LGUI(KC_Q)) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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, \ - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ - ADJUST, 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 | | | END | HOME |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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, MAC_LOK, _______, KC_END, KC_HOME, _______, \ - LCTL(KC_UP), KC_BTN3, KC_BTN2, KC_BTN1, _______, _______, _______, _______, 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 | | |PG DN |PG UP |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | MB1 | MB2 | MB3 | MB4 | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4 \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | |AGnorm|AGswap| | | |string|string| Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |RGBMOD|HUE-UP|SAT-UP|BRI-UP| |PLAIN |BREATH|RANBOW| SWIRL| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |RGBTOG|HUE-DN|SAT-DN|BRI-DN| |GRDNT | XMAS |KNIGHT| SNAKE| | CAIns| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | CADel| - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, ADMIN, SMSPC1, KC_DEL, \ - _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, _______, _______, \ - _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, RGB_M_G, RGB_M_X, RGB_M_K, RGB_M_SN, _______, C_A_INS, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_DEL \ -) - -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_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; - case ADMIN: - if (record->event.pressed) { - SEND_STRING("Administrator"); - } - return false; - break; - case SMSPC1: - if (record->event.pressed) { - SEND_STRING("Simspace1!"); - } - return false; - break; - } - return true; -} diff --git a/keyboards/handwired/xeal60/keymaps/khord/rules.mk b/keyboards/handwired/xeal60/keymaps/khord/rules.mk deleted file mode 100644 index c90523e5d647..000000000000 --- a/keyboards/handwired/xeal60/keymaps/khord/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -TAP_DANCE_ENABLE = yes -RGBLIGHT_ENABLE = yes -USE_I2C = no - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/kris/keymap.c b/keyboards/handwired/xeal60/keymaps/kris/keymap.c deleted file mode 100644 index 34d2e86da03c..000000000000 --- a/keyboards/handwired/xeal60/keymaps/kris/keymap.c +++ /dev/null @@ -1,213 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -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 | ; |Enter | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift|| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Alt | Gui |Caps |Lower |Space |Space |Raise | [ | ] | - |Ctrl | - * `-----------------------------------------------------------------------------------' - */ -[_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT , \ - ADJUST, KC_LALT, KC_LGUI, KC_CAPS, LOWER, KC_SPC, KC_SPC, RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_RCTRL \ -), - -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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 , \ - ADJUST, KC_LALT, KC_LGUI, KC_CAPS, LOWER, KC_SPC, KC_SPC, RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_RCTRL \ -), - -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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 , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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/handwired/xeal60/keymaps/krusli/keymap.c b/keyboards/handwired/xeal60/keymaps/krusli/keymap.c deleted file mode 100644 index 9b49bab3b41d..000000000000 --- a/keyboards/handwired/xeal60/keymaps/krusli/keymap.c +++ /dev/null @@ -1,238 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _NUMPAD 5 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, - NUMPAD -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Numpad| Ctrl | Alt | GUI |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_ESC, 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 , \ - NUMPAD, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |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_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 , \ - ADJUST, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |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_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 , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 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_DEL, \ - 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_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 | Home | End | PgUp | PgDn |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 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_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_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Numpad - * ,-----------------------------------------------------------------------------------. - * | Esc | 7 | 8 | 9 | * | / | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | <-- | 4 | 5 | 6 | + | - | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | 1 | 2 | 3 |Enter |Enter | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Qwerty| 0 | . | . |Enter |Enter | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_NUMPAD] = LAYOUT_ortho_4x12( \ - KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \ - KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \ - _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \ - QWERTY, KC_P0, KC_PDOT, KC_PDOT, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______ \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case NUMPAD: - if (record->event.pressed) - persistent_default_layer_set(1UL<<_NUMPAD); - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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/handwired/xeal60/keymaps/krusli/readme.md b/keyboards/handwired/xeal60/keymaps/krusli/readme.md deleted file mode 100644 index 175ef3c11a53..000000000000 --- a/keyboards/handwired/xeal60/keymaps/krusli/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# krusli -Let's Split keymap based off the default Planck layout with a numpad layer. diff --git a/keyboards/handwired/xeal60/keymaps/mbsurfer/config.h b/keyboards/handwired/xeal60/keymaps/mbsurfer/config.h deleted file mode 100644 index 6469b4846dbd..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mbsurfer/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -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" - -#define TAPPING_TERM 100 - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -//#define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c b/keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c deleted file mode 100644 index 5f6589337f8a..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c +++ /dev/null @@ -1,274 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern rgblight_config_t rgblight_config; -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// Tap Dance Declarations -enum { - SFT_CAP = 0, - LFT_HOM, - DWN_PDN, - UPP_PUP, - RGT_END -}; - -// Task Manager -#define C_S_ESC LSFT(LCTL(KC_ESC)) -#define C_A_DEL LALT(LCTL(KC_DEL)) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,------------------------------------------ ------------------------------------------. - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------- -------+------+------+------+------+------| - * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | - * |------+------+------+------+------+------- -------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+ +------+------+------+------+------+------| -* |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `------------------------------------------ ------------------------------------------' - */ -[_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, \ - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, TD(LFT_HOM), TD(DWN_PDN), TD(UPP_PUP), TD(RGT_END) \ -), - -/* 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 | - * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `------------------------------------------ ------------------------------------------' - */ -[_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_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 , \ - ADJUST, 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 | - * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `------------------------------------------ ------------------------------------------' - */ -[_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_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 , \ - ADJUST, 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 | | END | HOME |Enter | - * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `------------------------------------------ ------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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_END, KC_HOME, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, 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 DN |PG UP |Enter | - * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `------------------------------------------ ------------------------------------------' - */ -[_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_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_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,------------------------------------------ ------------------------------------------. - * | Reset| | Plain|Breath|Rainbw| Swirl| | Snake|Knight| Xmas |Grdent| | Del | - * |------+------+------+------+------+------- -------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------- -------+------+------+------+------+------| - * | |Toggle| Mode | Hue- | Hue+ | Sat- | | Sat+ | Val- | Val+ | | | | (RGB) - * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | | | | | | | | | |TskMng|CAltDe| - * `------------------------------------------ ------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - RESET, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_S_ESC, C_A_DEL \ -) - - -}; - -int RGB_current_mode; -int RGB_current_hue; - -qk_tap_dance_action_t tap_dance_actions[] = { - [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), - [LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME), - [DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN), - [UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP), - [RGT_END] = ACTION_TAP_DANCE_DOUBLE(KC_RGHT, KC_END) -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - - if (IS_LAYER_OFF(_RAISE) && IS_LAYER_OFF(_ADJUST)) { - // Save current RGB info - RGB_current_mode = rgblight_config.mode; - RGB_current_hue = rgblight_config.hue; - - // Set RGB to Blue - rgblight_mode(1); - rgblight_setrgb(0, 0, 255); - } - - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - - if (IS_LAYER_ON(_ADJUST)){ - // Set RGB to cyan - rgblight_setrgb(0, 255, 255); - } - } else { - - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - - if (IS_LAYER_OFF(_RAISE) && IS_LAYER_OFF(_ADJUST)) { - // Reset RGB - rgblight_mode(RGB_current_mode); - rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val); - } else if (IS_LAYER_ON(_RAISE)){ - // Set RGB to Red - rgblight_setrgb(0, 255, 0); - } - } - return false; - break; - case RAISE: - if (record->event.pressed) { - - if (IS_LAYER_OFF(_LOWER) && IS_LAYER_OFF(_ADJUST)) { - // Save current RGB info - RGB_current_mode = rgblight_config.mode; - RGB_current_hue = rgblight_config.hue; - - // Set RGB to Green - rgblight_mode(1); - rgblight_setrgb(0, 255, 0); - } - - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - - if (IS_LAYER_ON(_ADJUST)){ - // Set RGB to cyan - rgblight_setrgb(0, 255, 255); - } - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - - if (IS_LAYER_OFF(_LOWER) && IS_LAYER_OFF(_ADJUST)) { - // Reset RGB - rgblight_mode(RGB_current_mode); - rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val); - } else if (IS_LAYER_ON(_LOWER)){ - // Set RGB to Blue - rgblight_setrgb(0, 0, 255); - } - } - 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/handwired/xeal60/keymaps/mbsurfer/rules.mk b/keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk deleted file mode 100644 index c90523e5d647..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -TAP_DANCE_ENABLE = yes -RGBLIGHT_ENABLE = yes -USE_I2C = no - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/mike808/config.h b/keyboards/handwired/xeal60/keymaps/mike808/config.h deleted file mode 100644 index bfca915f24d8..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mike808/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2018 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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define TAPPING_TERM 150 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/mike808/keymap.c b/keyboards/handwired/xeal60/keymaps/mike808/keymap.c deleted file mode 100644 index c7e48b135c50..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mike808/keymap.c +++ /dev/null @@ -1,158 +0,0 @@ -#include QMK_KEYBOARD_H - -#define _DVORAK 0 -#define _QWERTY 1 -#define _FN1 2 -#define _MOUSE 3 - -enum custom_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, -}; - -#define KC_ KC_TRNS -#define _______ KC_TRNS - -#define KC_DVOR DVORAK -#define KC_QWER QWERTY -#define KC_FN1 MO(_FN1) - -// Tap-Hold keys (QWERTY) -#define KC_S_C MT(MOD_LCTL, KC_S) -#define KC_D_A MT(MOD_LALT, KC_D) -#define KC_F_G MT(MOD_LGUI, KC_F) -#define KC_J_G MT(MOD_RGUI, KC_J) -#define KC_K_A MT(MOD_RALT, KC_K) -#define KC_L_C MT(MOD_RCTL, KC_L) - -// Tap-Hold keys (Dvorak) -#define KC_O_C MT(MOD_LCTL, KC_O) -#define KC_E_A MT(MOD_LALT, KC_E) -#define KC_U_G MT(MOD_LGUI, KC_U) -#define KC_H_G MT(MOD_RGUI, KC_H) -#define KC_T_A MT(MOD_RALT, KC_T) -#define KC_N_C MT(MOD_RCTL, KC_N) - -#define KC_G_A LGUI(KC_A) -#define KC_G_C LGUI(KC_C) -#define KC_G_V LGUI(KC_V) -#define KC_G_X LGUI(KC_X) -#define KC_G_Z LGUI(KC_Z) -#define KC_G_BL LGUI(KC_BSLS) -#define KC_G_TB LGUI(KC_TAB) -#define KC_G_SP LGUI(KC_SPC) - -#define KC_ENTM LT(_MOUSE, KC_ENT) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - DVOR,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,PGUP, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_A ,TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,PGDN, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_X ,CAPS, A ,S_C ,D_A ,F_G , G , H ,J_G ,K_A ,L_C ,SCLN,QUOT, UP , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_C ,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,DOWN, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,EQL ,LEFT,RGHT - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_DVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - QWER,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,EQL ,PGUP, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_A ,TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,PGDN, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_X ,CAPS, A ,O_C ,E_A ,U_G , I , D ,H_G ,T_A ,N_C , S ,MINS, UP , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_C ,LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,RSFT,DOWN, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,BSLS,LEFT,RGHT - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_FN1] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - , , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , ,EXLM, AT ,LCBR,RCBR,PIPE, , P7 , P8 , P9 ,ASTR,F12 , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , ,HASH,DLR ,LPRN,RPRN,GRV , , P4 , P5 , P6 ,PLUS,MINS, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,PDOT, P0 ,EQL , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ), - - [_MOUSE] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , ,MS_U, , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , ,MS_L,MS_D,MS_R, , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , ,BTN1,BTN2, , , , , , , , - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' - ) -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -#endif - -void update_rgblight(uint16_t layer) { - if (layer & (1UL << _DVORAK)) { - rgblight_sethsv_green(); - } else if (layer & (1UL << _QWERTY)) { - rgblight_sethsv_goldenrod(); - } -} - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); - #ifdef RGBLIGHT_ENABLE - update_rgblight(default_layer); - #endif // RGBLIGHT_ENABLE -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL << _QWERTY); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL << _DVORAK); - } - return false; - break; - } - return true; -} - - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - uint8_t default_layer = eeconfig_read_default_layer(); - update_rgblight(default_layer); - #endif -} diff --git a/keyboards/handwired/xeal60/keymaps/mike808/rules.mk b/keyboards/handwired/xeal60/keymaps/mike808/rules.mk deleted file mode 100644 index 1e3cebb14515..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mike808/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/mjt/config.h b/keyboards/handwired/xeal60/keymaps/mjt/config.h deleted file mode 100644 index 735a58b11aad..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mjt/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -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 . -*/ - - -#define USE_SERIAL - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - - -#ifdef SUBPROJECT_rev1 - #include "../../rev1/config.h" -#endif -#ifdef SUBPROJECT_rev2 - #include "../../rev2/config.h" -#endif -#ifdef SUBPROJECT_rev2fliphalf - #include "../../rev2fliphalf/config.h" -#endif - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 10 diff --git a/keyboards/handwired/xeal60/keymaps/mjt/keymap.c b/keyboards/handwired/xeal60/keymaps/mjt/keymap.c deleted file mode 100644 index 2c61cce3bc2c..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mjt/keymap.c +++ /dev/null @@ -1,213 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_ESC, 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 , \ - ADJUST, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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 , \ - ADJUST, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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 , \ - ADJUST, 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 | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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_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 / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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/handwired/xeal60/keymaps/mjt/rules.mk b/keyboards/handwired/xeal60/keymaps/mjt/rules.mk deleted file mode 100644 index 874d09eab540..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mjt/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ - -# 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 = 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 -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 = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -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/xeal60/keymaps/mtdjr/config.h b/keyboards/handwired/xeal60/keymaps/mtdjr/config.h deleted file mode 100644 index afbf73569587..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mtdjr/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -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" - -#define SOLENOID_ENABLE -#define SOLENOID_PIN F4 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C -/* Select hand configuration */ - - #define MASTER_LEFT -// #define _MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c b/keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c deleted file mode 100644 index 47972fcd3511..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c +++ /dev/null @@ -1,55 +0,0 @@ -#include QMK_KEYBOARD_H -#include "mtdjr.h" - -extern keymap_config_t keymap_config; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kc( -// ,-----------------------------. .-----------------------------. - TAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - EXC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, Z , X , C , V , B , N , M ,COMM, DOT,SLSH, ENT, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - LOWR,LCTL,LALT,LGUI,LOWR, SPC, SPC,RASE,LEFT,DOWN, UP ,RGHT -// '-----------------------------' '-----------------------------' - ), - - [_LOWER] = LAYOUT_kc( -// ,-----------------------------. .-----------------------------. - TILD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,LBRC,RBRC,BSLS, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - ,UNDO, CUT,XCPY,XINS,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx, , -// |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , -// '-----------------------------' '-----------------------------' - ), - - [_RAISE] = LAYOUT_kc( -// ,-----------------------------. .-----------------------------. - GRV,EXLM, AT ,HASH, DLR,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , -// |----+----+----+----+----+----| |----+----+----+----+----+----| - xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, MINS, EQL,xxxx,LCBR,RCBR,PIPE, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - ,xxxx,xxxx,xxxx,xxxx,xxxx, UNDS,PLUS,xxxx,xxxx,xxxx, , -// |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , ,MNXT,VOLD,VOLU,MPLY -// '-----------------------------' '-----------------------------' - ), - - [_ADJUST] = LAYOUT_kc( \ -// ,-----------------------------. .-----------------------------. - xxxx,ROOT,PPLY,PSEF,xxxx,xxxx, RST,STOG,xxxx,xxxx,xxxx, DEL, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - RGB,RHUI,RSAI,RVAI, MOD,xxxx, F1 , F2 , F3 , F4 , F5 , F6 , -// |----+----+----+----+----+----| |----+----+----+----+----+----| - RBTH,RHUD,RSAD,RVAD,RMOD,xxxx, F7 , F8 , F9 , F10, F11, F12, -// |----+----+----+----+----+----| |----+----+----+----+----+----| - ,xxxx,xxxx,xxxx, ,xxxx, xxxx, ,xxxx,xxxx,xxxx,xxxx -// '-----------------------------' '-----------------------------' - ) -}; diff --git a/keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk b/keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk deleted file mode 100644 index 75e9c6503e8e..000000000000 --- a/keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - -RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/xeal60/keymaps/normacos/config.h b/keyboards/handwired/xeal60/keymaps/normacos/config.h deleted file mode 100644 index 9f95a869df9c..000000000000 --- a/keyboards/handwired/xeal60/keymaps/normacos/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -// #define MASTER_LEFT -// #define _MASTER_RIGHT -#define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/normacos/keymap.c b/keyboards/handwired/xeal60/keymaps/normacos/keymap.c deleted file mode 100644 index 8902b7b56f5a..000000000000 --- a/keyboards/handwired/xeal60/keymaps/normacos/keymap.c +++ /dev/null @@ -1,213 +0,0 @@ -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _NORMAN 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - -// To be used in process_record_user -enum custom_keycodes { - NORMAN = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - SH_LOG, - SH_GOUP, - SH_TERM, - SPOT, - SLACK, - OUTLOOK, - CHROME -}; - -// Fillers (to make layering more clear) -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// Mod taps -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control - -// Custom macros -#define SCN_SHT LSFT(LGUI(KC_4)) // Take a screenshot (MacOS) -#define SCN_LCK LCTL(LGUI(KC_Q)) // Lock screen (MacOS) -#define SH_HOME LCTL(KC_A) // Go to start of line -#define SH_END LCTL(KC_E) // Go to end of line -#define SH_RSCH LCTL(KC_R) // Search command history -#define SH_CLRH LCTL(KC_U) // Erase to beginning of line -#define SH_CLRE LCTL(KC_K) // Erase to end of line - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Norman - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | Q | W | D | F | K | | J | U | R | L | ; | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |CtlEsc| A | S | E | T | G | | Y | N | I | O | H | ' | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | P | M | , | . | / |SftEnt| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| - * `-----------------------------------------' `-----------------------------------------' - */ -[_NORMAN] = LAYOUT_ortho_4x12( \ - KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSPC, \ - CTL_ESC, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - SCN_LCK, KC_HOME, KC_END, KC_LALT, LOWER, KC_LGUI, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | F1 | F2 | F3 | F4 | | |NumLck| 7 | 8 | 9 | = | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |CtlEsc| F5 | F6 | F7 | F8 | | | * | 4 | 5 | 6 | + | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | - |SftEnt| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| | - * `-----------------------------------------' `-----------------------------------------' - */ -[_LOWER] = LAYOUT_ortho_4x12( \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PEQL, _______, \ - _______, KC_F5, KC_F6, KC_F8, KC_F9, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_DEL, \ - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, \ - _______, _______, _______, _______, _______, _______, KC_PDOT, _______, KC_P0, SPOT, CHROME, XXXXXXX -), - -/* Raise - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| - * `-----------------------------------------' `-----------------------------------------' - */ -[_RAISE] = LAYOUT_ortho_4x12( \ - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, SH_LOG, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \ - _______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | Reset| | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | AudOn|AudOff| | |Norman| | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | Lower| | | | Raise| | | | | - * `-----------------------------------------' `-----------------------------------------' - */ -[_ADJUST] = LAYOUT_ortho_4x12( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, XXXXXXX, NORMAN, 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 -float tone_norman[][2] = SONG(QWERTY_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case NORMAN: - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_norman); - #endif - persistent_default_layer_set(1UL<<_NORMAN); - return false; - case LOWER: - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - return false; - case RAISE: - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - return false; - case ADJUST: - layer_on(_ADJUST); - return false; - case SH_LOG: // Open Jira log work window - SEND_STRING(SS_TAP(X_DOT)); - _delay_ms(100); - SEND_STRING("log work"); - _delay_ms(100); - SEND_STRING(SS_TAP(X_ENTER)); - return false; - case SH_GOUP: // Go up a directory - SEND_STRING("cd .."SS_TAP(X_ENTER)); - return false; - case SH_TERM: // Open Terminal - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); - _delay_ms(100); - SEND_STRING("terminal"); - _delay_ms(100); - SEND_STRING(SS_TAP(X_ENTER)); - return false; - case SPOT: // Open Spotify - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); - _delay_ms(100); - SEND_STRING("spotify app"); - _delay_ms(100); - SEND_STRING(SS_TAP(X_ENTER)); - return false; - case SLACK: // Open Slack - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); - _delay_ms(100); - SEND_STRING("slack"); - _delay_ms(100); - SEND_STRING(SS_TAP(X_ENTER)); - return false; - case OUTLOOK: // Open MS Outlook - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); - _delay_ms(100); - SEND_STRING("outlook"); - _delay_ms(100); - SEND_STRING(SS_TAP(X_ENTER)); - return false; - case CHROME: // Open Chrome - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); - _delay_ms(100); - SEND_STRING("chrome"); - _delay_ms(100); - SEND_STRING(SS_TAP(X_ENTER)); - return false; - } - } else { - switch(keycode) { - case LOWER: - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - return false; - case RAISE: - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - return false; - case ADJUST: - layer_off(_ADJUST); - return false; - } - } - return true; -} diff --git a/keyboards/handwired/xeal60/keymaps/normacos/readme.md b/keyboards/handwired/xeal60/keymaps/normacos/readme.md deleted file mode 100644 index 3b7a20632b0e..000000000000 --- a/keyboards/handwired/xeal60/keymaps/normacos/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# normacos -This keymap was designed specifically to be used on a MacOS High Sierra system with constant use of the Terminal, as it includes a multitude of macros for both the terminal as well as Spotlight Search. - -Norman keyboard layout [info page.](https://normanlayout.info/) - -Some Norman layout keys were placed on different layers and different positions based on available space and preference. - - -Macros: -- CtlEsc sends Escape when tapped, and Control when held. -- SftEnt sends Enter when tapped, and Shift when held. -- Lock locks the computer -- Slack opens Slack through Spotlight Search -- Term opens Terminal through Spotlight Search -- Spot opens Spotify through Spotlight Search -- Chrome opens Chrome through Spotlight Search -- OutLk opens Microsoft Outlook through Spotlight Search -- ScnSht allows the user to take a screenshot of a selected portion of the screen -- ClrHom clears Terminal line from beginning of line up to cursor -- ClrEnd clears Terminal line from cursor up to end of line -- ShHome moves Terminal cursor to beginning of line -- ShEnd moves Terminal cursor to end of line -- Search activates Terminal Reverse Search Command History -- Log opens the 'Log Work' modal on Atlassian's Jira web client -- UpDir moves working directory to its parent - -All macros that make use of the SEND_STRING command have a 100 millisecond wait before and after "writing" to let the computer/OS/app catch up. -Any and all empty keys shown below are will be set in the future, and do nothing as of the time of this writing. - - - -## Default (Norman) -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | Q | W | D | F | K | | J | U | R | L | ; | Bksp | -|------+------+------+------+------+------| |------+------+------+------+------+------| -|CtlEsc| A | S | E | T | G | | Y | N | I | O | H | ' | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift| Z | X | C | V | B | | P | M | , | . | / |SftEnt| -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| -`-----------------------------------------' `-----------------------------------------' -``` - - -## Lower -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | F1 | F2 | F3 | F4 | | |NumLck| 7 | 8 | 9 | = | Bksp | -|------+------+------+------+------+------| |------+------+------+------+------+------| -|CtlEsc| F5 | F6 | F7 | F8 | | | * | 4 | 5 | 6 | + | Del | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift| F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | - |SftEnt| -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| | -`-----------------------------------------' `-----------------------------------------' -``` - - -## Raise - -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+------| |------+------+------+------+------+------| -|CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt| -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| -`-----------------------------------------' `-----------------------------------------' -``` - -## Adjust (Lower + Raise) - -``` -,-----------------------------------------. ,-----------------------------------------. -| | | | | | | | | | | | Reset| | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | AudOn|AudOff| | |Norman| | | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | | | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | Lower| | | | Raise| | | | | -`-----------------------------------------' `-----------------------------------------' -``` diff --git a/keyboards/handwired/xeal60/keymaps/piemod/README.md b/keyboards/handwired/xeal60/keymaps/piemod/README.md deleted file mode 100644 index f2a051da14ec..000000000000 --- a/keyboards/handwired/xeal60/keymaps/piemod/README.md +++ /dev/null @@ -1,31 +0,0 @@ -PieMod -====== - -A keymap for users that need: - -- *P*: Programming symbols. - -- *I*: i3wm. - -- *E*: Emacs. - -- *M*: Macros. - -- *O*: Ortholinear. - -- *D*: Dvorak. - -Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. - -### Keymap - -![PieMod Keymap](./keymap.png) - -### TODO - -- [ ] Add Emacs layer. -- [ ] Add Macro layer. -- [ ] Add system control keys (rotation, brightness). -- [ ] Switch " and ' quotes (or function to toggle default). -- [ ] Add capslock. -. diff --git a/keyboards/handwired/xeal60/keymaps/piemod/config.h b/keyboards/handwired/xeal60/keymaps/piemod/config.h deleted file mode 100644 index 001b62e41bbc..000000000000 --- a/keyboards/handwired/xeal60/keymaps/piemod/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -// RGB Options -#undef RGBLED_NUM -#define RGBLED_NUM 10 -#define RGBLIGHT_SLEEP -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 1 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 1 - -// Typing Options -#define PREVENT_STUCK_MODIFIERS -#define QMK_KEYS_PER_SCAN 4 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/piemod/keymap.c b/keyboards/handwired/xeal60/keymaps/piemod/keymap.c deleted file mode 100644 index d789b7a8be8e..000000000000 --- a/keyboards/handwired/xeal60/keymaps/piemod/keymap.c +++ /dev/null @@ -1,99 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -#define _DVORAK 0 -#define _ARROW 1 //F(1) -#define _SYMBOL 2 // F(2) -#define _NUMBER 3 // F(3) -#define _FUNCTION 4 // F(4) -#define _EMACS 5 // F(5) -#define _COMBOS 6 // F(6) -#define _MOUSE 7 // F(7) - -enum custom_keycodes { - DVORAK = SAFE_RANGE, - ARROW, - SYMBOL, - NUMBER, - FUNCTION, - EMACS, - COMBOS, - MOUSE, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_DVORAK] = LAYOUT( \ - KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ - KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ - KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ - F(1), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -), - -[_ARROW] = LAYOUT( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, \ - KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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 \ -), - -[_SYMBOL] = LAYOUT( \ - KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(2), \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ -), - -[_NUMBER] = LAYOUT( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ -), - -[_FUNCTION] = LAYOUT( \ - KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ - KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ - RESET, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ -), - -[_EMACS] = LAYOUT( \ - 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, 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_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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ -), - -[_COMBOS] = LAYOUT( \ - 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ -), - -[_MOUSE] = LAYOUT( \ - KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ -) -}; - -enum function_id { - TEENSY_KEY, - CUSTOM_KEY, - L_CTRL_ALT_ENT, - R_CTRL_ALT_ENT, -}; - -int CAPSLOCKED = 0; - - const uint16_t PROGMEM fn_actions[] = { - // Special Keys - [1] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. - // Symbols - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. - }; diff --git a/keyboards/handwired/xeal60/keymaps/piemod/rules.mk b/keyboards/handwired/xeal60/keymaps/piemod/rules.mk deleted file mode 100644 index 027ea977e714..000000000000 --- a/keyboards/handwired/xeal60/keymaps/piemod/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -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 = no # 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 = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = yes # Unicode -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. -SUBPROJECT_rev1 = no diff --git a/keyboards/handwired/xeal60/keymaps/pitty/README.md b/keyboards/handwired/xeal60/keymaps/pitty/README.md deleted file mode 100644 index 1662fce7abe3..000000000000 --- a/keyboards/handwired/xeal60/keymaps/pitty/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# Pittyolo's Let's Split Layout - -This is my Let's Split layout, modified for my ISO Hungarian taste :) - -Added some layer feedback in the underglow, but it's still a WIP. - -I wrote the keys that will appear when using Hungarian layout in Windows and the respective English keys in brackets. - - - ### Qwerty -``` -,-----------------------------------------------------------------------------------. -| Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp | -|------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | -|------+------+------+------+------+------|------+------+------+------+------+------| -|Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del | -`-----------------------------------------------------------------------------------' -``` - - Tap left shift writes the missing ISO key, hold is Shift. - - - ### Gaming mode (Toggle layer) -``` -,-----------------------------------------------------------------------------------. -| | | | | | | | | | | |Lower | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | F | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Shift| | | | | | | | | | |QWERTY| -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | Left | Down | Up | Right| -`-----------------------------------------------------------------------------------' -``` - -Disabled some of the functions in the main layer to help with better gaming experience. - - - ### Lower (Hold down right Space) -``` -,-----------------------------------------------------------------------------------. -| 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) | -|------+------+------+------+------+------+------+------+------+------+------+------| -| F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 | -|------+------+------+------+------+-------------+------+------+------+------+------| -| | | | | | | | | Ins | Home | PgUp | Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | Del | End | PgDn | AltGr| -`-----------------------------------------------------------------------------------' -``` - - Function layer with everything that is missing from the main layer. - - - ### NAV (double tap toggles the layer, and hold for momentary switch) -``` -,-----------------------------------------------------------------------------------. -| | | Up | | F2 | | | 7 | 8 | 9 | / | | -|------+------+------+------+------+------|------+------+------+------+------+------| -| | Left | Down | Right| | | | 4 | 5 | 6 | * | | -|------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| | | | | | | 1 | 2 | 3 | - | | -|------+------+------+------+------+------|------+------+------+------+------+------| -| | | | | | | | 0 | . | = | + | | -`-----------------------------------------------------------------------------------' -``` - - Navigation layer with a numpad on the right side. - - - - ### Vim Movement (Hold down F) -``` -,-----------------------------------------------------------------------------------. -|RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű | -|------+------+------+------+------+------+------+------+------+------+------+------| -|DM_stp| | | LCTRL| | | Left | Down | Up | Right| | | -|------+------+------+------+------+------+------+------+------+------+------+------| -|DM_REC| | | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | LShft| | | | | | | RESET| -`-----------------------------------------------------------------------------------' -``` - - Turns hjkl into vim movement. I moved accented Hungarian letters here. - - - diff --git a/keyboards/handwired/xeal60/keymaps/pitty/config.h b/keyboards/handwired/xeal60/keymaps/pitty/config.h deleted file mode 100644 index 3798f9a64704..000000000000 --- a/keyboards/handwired/xeal60/keymaps/pitty/config.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define TAPPING_TOGGLE 2 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/pitty/keymap.c b/keyboards/handwired/xeal60/keymaps/pitty/keymap.c deleted file mode 100644 index 0fd4c1384f1c..000000000000 --- a/keyboards/handwired/xeal60/keymaps/pitty/keymap.c +++ /dev/null @@ -1,169 +0,0 @@ -#include QMK_KEYBOARD_H - - -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _GAME 1 -#define _LOWER 2 -#define _NAV 3 -#define _VIM 4 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - GAME, - LOWER, - NAV, - VIM, -}; - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del | - * `-----------------------------------------------------------------------------------' - */ -[_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_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - MT(MOD_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_LCTL, KC_LGUI, KC_LALT, TT(_NAV), KC_SPC, LT(_LOWER, KC_SPC), KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), KC_DEL \ -), - -/* Gaming mode - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | |Lower | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | F | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| | | | | | | | | | |QWERTY| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Left | Down | Up | Right| - * `-----------------------------------------------------------------------------------' - */ -[_GAME] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSL(_LOWER), \ - _______, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | Ins | Home | PgUp | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Del | End | PgDn | AltGr| - * `-----------------------------------------------------------------------------------' - */ -[_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_MINUS, \ - KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_RSFT, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_RALT \ -), - - -/* NAV - * ,-----------------------------------------------------------------------------------. - * | | | Up | | F2 | | | 7 | 8 | 9 | / | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Left | Down | Right| | | | 4 | 5 | 6 | * | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| | | | | | | 1 | 2 | 3 | - | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | 0 | . | = | + | | - * `-----------------------------------------------------------------------------------' - */ -[_NAV] = LAYOUT( \ - _______, _______, KC_UP, _______, KC_F2, _______, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______, \ - KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_KP_DOT, KC_KP_EQUAL, KC_KP_PLUS, _______ \ -), - -/* Vim Movement (Hold down F) - * ,-----------------------------------------------------------------------------------. - * |RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |DM_stp| | | LCTRL| | | Left | Down | Up | Right| | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |DM_REC| | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | LShft| | | | | | | RESET| - * `-----------------------------------------------------------------------------------' - */ -[_VIM] = LAYOUT( \ - RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , KC_LBRC, KC_NUHS, \ - _______, _______, _______, KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, RESET \ -) - - -}; - -// define variables for reactive RGB -bool RGB_INIT = false; -bool TOG_STATUS = false; -int RGB_current_mode; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - - -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - switch (layer) { - case _NAV: - if (RGB_INIT) {} else { - RGB_current_mode = rgblight_config.mode; - RGB_INIT = true; - } - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false - } else { - TOG_STATUS = !TOG_STATUS; - rgblight_mode(29); - } - break; - case _LOWER: - if (RGB_INIT) {} else { - RGB_current_mode = rgblight_config.mode; - RGB_INIT = true; - } - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false - } else { - TOG_STATUS = !TOG_STATUS; - rgblight_mode(29); - } - break; - case _QWERTY: - if (RGB_INIT) {} else { - RGB_current_mode = rgblight_config.mode; - RGB_INIT = true; - } - rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - TOG_STATUS = false; - break; - } - }; diff --git a/keyboards/handwired/xeal60/keymaps/pitty/rules.mk b/keyboards/handwired/xeal60/keymaps/pitty/rules.mk deleted file mode 100644 index 8ebc85a44b4a..000000000000 --- a/keyboards/handwired/xeal60/keymaps/pitty/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes -NKRO_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/poker/config.h b/keyboards/handwired/xeal60/keymaps/poker/config.h deleted file mode 100644 index 5a6261c4f7cf..000000000000 --- a/keyboards/handwired/xeal60/keymaps/poker/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/poker/keymap.c b/keyboards/handwired/xeal60/keymaps/poker/keymap.c deleted file mode 100644 index cce0ca47411f..000000000000 --- a/keyboards/handwired/xeal60/keymaps/poker/keymap.c +++ /dev/null @@ -1,240 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _FN 5 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - FN, - ADJUST -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Func | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Esc | Alt |Lower | Esc |Space |Raise | Left | Up | Down |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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, \ - FN , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), \ - KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_ESC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Func | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Esc | Alt |Lower | Esc |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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, \ - FN , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), \ - KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_ESC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Func | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Esc | Alt |Lower | Esc |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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, \ - FN , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - SFT_T(KC_ESC) , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_RSFT, KC_ENT), \ - KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_ESC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Home |Pg Up |Pg Dn | End | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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_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_HOME, KC_PGUP, KC_PGDN, KC_END \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Home |Pg Up |Pg Dn | End | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_HOME, KC_PGUP, KC_PGDN, KC_END \ -), - -/* Function - * ,-----------------------------------------------------------------------------------. - * | Esc | | Prev | Play | Next | | |Pg Up | Up |Pg Dn |Prt Sc| Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Vol- | Mute | Vol+ | | Home | Left | Down |Right | End | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | Esc | | | Esc | Home |Pg Up |Pg Dn | End | - * `-----------------------------------------------------------------------------------' - */ -[_FN] = LAYOUT( \ - KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL, \ - _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_ESC , _______, _______, KC_ESC , KC_HOME, KC_PGUP, KC_PGDN, KC_END \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Caps |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | Caps | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - [_ADJUST] = LAYOUT( \ - _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , \ - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_CAPS, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ) - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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 FN: - if (record->event.pressed) { - layer_on(_FN); - } else { - layer_off(_FN); - } - 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/handwired/xeal60/keymaps/poker/rules.mk b/keyboards/handwired/xeal60/keymaps/poker/rules.mk deleted file mode 100644 index 457a3d01d4a4..000000000000 --- a/keyboards/handwired/xeal60/keymaps/poker/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/smt/config.h b/keyboards/handwired/xeal60/keymaps/smt/config.h deleted file mode 100644 index 5a6261c4f7cf..000000000000 --- a/keyboards/handwired/xeal60/keymaps/smt/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/smt/keymap.c b/keyboards/handwired/xeal60/keymaps/smt/keymap.c deleted file mode 100644 index 090cf78b7cb6..000000000000 --- a/keyboards/handwired/xeal60/keymaps/smt/keymap.c +++ /dev/null @@ -1,218 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) -#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------' `-----------------------------------------' - */ -[_QWERTY] = LAYOUT( \ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - MEH_GRV, 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 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------' `-----------------------------------------' - */ -[_COLEMAK] = LAYOUT( \ - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - MEH_GRV, 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 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------' `-----------------------------------------' - */ -[_DVORAK] = LAYOUT( \ - HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - 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_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------. ,-----------------------------------------. - * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------' `-----------------------------------------' - */ -[_LOWER] = LAYOUT( \ - ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Raise - * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | _ | ? | + | { | } | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | - | / | = | [ | ] | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Home |PageDn|PageUp| End | - * `-----------------------------------------' `-----------------------------------------' - */ -[_RAISE] = LAYOUT( \ - ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------. ,-----------------------------------------. - * | | Reset| | | | | | | | | | | Reset| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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/handwired/xeal60/keymaps/smt/readme.md b/keyboards/handwired/xeal60/keymaps/smt/readme.md deleted file mode 100644 index 20bc662f0a59..000000000000 --- a/keyboards/handwired/xeal60/keymaps/smt/readme.md +++ /dev/null @@ -1,88 +0,0 @@ -# smt's Let's Split keymap - -This keymap is ported from my Planck keymap. - - -## Qwerty - -``` -,-----------------------------------------. ,-----------------------------------------. -| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Esc | A | S | D | F | G | | H | J | K | L | ; | " | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | -`-----------------------------------------' `-----------------------------------------' -``` - -## 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 | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | -`-----------------------------------------' `-----------------------------------------' -``` - -## 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 | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | -`-----------------------------------------' `-----------------------------------------' -``` - -## Lower - -``` -,-----------------------------------------. ,-----------------------------------------. -| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | Next | Vol- | Vol+ | Play | -`-----------------------------------------' `-----------------------------------------' -``` - -## Raise - -``` -,-----------------------------------------. ,-----------------------------------------. -| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | _ | ? | + | { | } | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | - | / | = | [ | ] | \ | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | Home |PageDn|PageUp| End | -`-----------------------------------------' `-----------------------------------------' -``` - -## Adjust (Lower + Raise) - -``` -,-----------------------------------------. ,-----------------------------------------. -| | Reset| | | | | | | | | | | Reset| -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | | | | | -|------+------+------+------+------+------| |------+------+------+------+------+------| -| | | | | | | | | | | | | | -`-----------------------------------------' `-----------------------------------------' -``` diff --git a/keyboards/handwired/xeal60/keymaps/that_canadian/config.h b/keyboards/handwired/xeal60/keymaps/that_canadian/config.h deleted file mode 100644 index 586b6e8c8750..000000000000 --- a/keyboards/handwired/xeal60/keymaps/that_canadian/config.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -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" - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define _MASTER_RIGHT -// #define EE_HANDS - -#endif \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c b/keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c deleted file mode 100644 index 239a8d3beee2..000000000000 --- a/keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c +++ /dev/null @@ -1,163 +0,0 @@ -#include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 - -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - BACKLIT -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | RESET| Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Backlt| Ctrl | GUI | Alt |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( \ - RESET, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - RGB_TOG, 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_LGUI, KC_LALT, 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 | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - 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_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 / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - 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; -} \ No newline at end of file diff --git a/keyboards/handwired/xeal60/keymaps/waples/README.md b/keyboards/handwired/xeal60/keymaps/waples/README.md deleted file mode 100644 index 6e171d964f74..000000000000 --- a/keyboards/handwired/xeal60/keymaps/waples/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Waples Let's Split keymap -[Waples](https://www.github.com/Waples) - -## My (forever) Work-In-Progress keymap for my Let's Split keyboard. -My keymap is much like the default, I just personally like to have my Enter and Escape key to be on my home row. The Escape key doubles as a Control key when held down, my Enter key functions as (right)Shift when held down. -Everything you see below here is constantly *under construction*, so there may be some dumb things in this, which are already gotten taken out, or are still in there :P. - -### Layers -I currently have the following layers in my keymap: -* Qwerty (as default) -* Dvorak (still learning this type of layout, so not really used much) -* Gaming (WIP! I tried some I found, but didn't like them, so I'm in the progress of making my own) -* Lefty (lower) -* Righty (raise) -* Dual (adjust) - -#### QWERTY - | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bsp | - |C_Esc| A | S | D | F | G | | H | J | K | L | ; |S_Ent| - | Sft | Z | X | C | V | B | | N | M | , | . | / | " | - |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | | Spc | ^R^ | Lft | Dwn | Up! | Rgt | - - -#### DVORAK - | Tab | " | , | . | P | Y | | F | G | C | R | L | Bsp | - |C_Esc| A | O | E | U | I | | D | H | T | N | S |S_Ent| - | Sft | ; | Q | J | K | X | | B | M | W | V | Z | / | - |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | | Spc | ^R^ | Lft | Dwn | Up! | Rgt | - - -#### GAMING - | Tab | Q | W | E | R | T | | | | | | |QWERT| - | Esc | A | S | D | F | G | | | | | | | | - | Sft | Z | X | C | V | B | | | | | | | | - | Ctl | 1 | 2 | 3 | ^L^ | Spc | | Bsp | ^R^ | Lft | Dwn | Up | Rgt | - - -#### LEFTY (lower) - | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bsp | - | Del | | | | | | | | ( | ) | [ | ] | | - | | | | | | | | | | | | | | - | | | | | | | | Ins | | Hme | PgD | PgU | End | - - -#### RIGHTY (raise) - | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bsp | - | Del | F1 | F2 | F3 | F4 | | | = | - | \ | / | | | - | | F5 | F6 | F7 | F8 | | | | | | | | | - | | F9 | F10 | F11 | | | | | | | | | | - - -#### DUAL - |Reset| | | | |QWERT| | GAME| | | | |Reset| - | | Prv | Stp | Tog | Nxt | Nrm | | Swp | | | | | | - | | | Mte | Vol-| Vol+| | | NKRO| | | | | | - | | | | | | | |DVORK| | | | | | - - diff --git a/keyboards/handwired/xeal60/keymaps/waples/config.h b/keyboards/handwired/xeal60/keymaps/waples/config.h deleted file mode 100644 index 98ebeff45580..000000000000 --- a/keyboards/handwired/xeal60/keymaps/waples/config.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ -// #define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS // We like to have choices I guess - -#define PREVENT_STUCK_MODIFIERS // When switching layers, this will release all mods - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/waples/keymap.c b/keyboards/handwired/xeal60/keymaps/waples/keymap.c deleted file mode 100644 index 7b25bc51f545..000000000000 --- a/keyboards/handwired/xeal60/keymaps/waples/keymap.c +++ /dev/null @@ -1,131 +0,0 @@ -// Waples layout for Let's Split (rev2) -// Made changes from the default - -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _DVORAK 1 -#define _GAME 2 -#define _LEFTY 3 -#define _RIGHTY 4 -#define _DUAL 5 - -enum letssplit_keycodes { - QWERTY = SAFE_RANGE, - DVORAK, - GAME, - LEFTY, - RIGHTY, - DUAL, -}; - -#define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO -#define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc -#define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_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, \ - CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ - KC_PSCR, KC_BSPC, KC_LALT, KC_CAPS, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -[_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, \ - CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, \ - KC_PSCR, KC_LGUI, KC_LALT, KC_CAPS, LEFTY, KC_BSPC, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -[_GAME] = LAYOUT( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, _______, _______, QWERTY, \ - CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, \ - KC_LCTL, KC_1, KC_2, KC_3, LEFTY, KC_SPC, KC_BSPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -), - -[_LEFTY] = LAYOUT( \ - 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_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ -), - -[_RIGHTY] = LAYOUT( \ - 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_EQL, KC_MINS, KC_BSLS, KC_SLSH, _______, _______, \ - _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, - _______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -[_DUAL] = LAYOUT( \ - RESET, _______, _______, _______, _______, QWERTY, GAME, _______, _______, _______, _______, RESET, \ - _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, DVORAK, _______, _______, _______, _______, _______ \ -) -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case GAME: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_GAME); - } - return false; - break; - case LEFTY: - if (record->event.pressed) { - layer_on(_LEFTY); - update_tri_layer(_LEFTY, _RIGHTY, _DUAL); - } else { - layer_off(_LEFTY); - update_tri_layer(_LEFTY, _RIGHTY, _DUAL); - } - return false; - break; - case RIGHTY: - if (record->event.pressed) { - layer_on(_RIGHTY); - update_tri_layer(_LEFTY, _RIGHTY, _DUAL); - } else { - layer_off(_RIGHTY); - update_tri_layer(_LEFTY, _RIGHTY, _DUAL); - } - return false; - break; - case DUAL: - if (record->event.pressed) { - layer_on(_DUAL); - } else { - layer_off(_DUAL); - } - return false; - break; - } - return true; -} diff --git a/keyboards/handwired/xeal60/keymaps/waples/rules.mk b/keyboards/handwired/xeal60/keymaps/waples/rules.mk deleted file mode 100644 index 457a3d01d4a4..000000000000 --- a/keyboards/handwired/xeal60/keymaps/waples/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/xk/config.h b/keyboards/handwired/xeal60/keymaps/xk/config.h deleted file mode 100644 index c75ed12cc806..000000000000 --- a/keyboards/handwired/xeal60/keymaps/xk/config.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -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. -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#define TAPPING_TOGGLE 1 -#define TAPPING_TERM 300 -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_LAYER_TOGGLE 2 -#define ONESHOT_TIMEOUT 800 - -#define USE_I2C - -#define MOUSEKEY_INTERVAL 50 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 - -#define MOUSEKEY_WHEEL_DELAY 0 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 - -// #define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS - - -#define PREVENT_STUCK_MODIFIERS -#define IGNORE_MOD_TAP_INTERRUPT -#define PERMISSIVE_HOLD - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/xk/keymap.c b/keyboards/handwired/xeal60/keymaps/xk/keymap.c deleted file mode 100644 index c032b865aac3..000000000000 --- a/keyboards/handwired/xeal60/keymaps/xk/keymap.c +++ /dev/null @@ -1,370 +0,0 @@ -#include QMK_KEYBOARD_H - - -extern keymap_config_t keymap_config; - -#define _COLEMAK 0 -#define _KAMELOC 1 -#define _IKAPILA 2 -#define _IKASHFT 3 -#define _ARROWKY 4 -#define _FNCTION 5 -#define _NINEKEY 6 -#define _NAVIGAT 7 -#define _QWERTY 8 -#define _MLAYER 9 -#define _GRVTABL 15 - -enum custom_keycodes { - COLEMAK = SAFE_RANGE, - KAMELOC, - IKAPILA, - IKASHFT, - ARROWKY, - FNCTION, - NINEKEY, - NAVIGAT, - QWERTY, - MLAYER, - GRVTABL, -}; - -//TD Declarations -enum { -VOM = 0, -PRN, -EGT, -HRD, -XRD, -DSH, -ESC, -EQE, -PGN, -HND, -COD, -UND, -F11, -F12, -F13, -F14, -F15, -F16, -F17, -F18, -F19, -F20, -//unicode_inputctl -LINUX, -WIN, -WINSH, -OSX, -}; - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// action-TAP for key/mod behavior LT(layer, KC) -#define XK_TAB LT(_FNCTION, KC_TAB) -#define XK_BSP LT(_KAMELOC, KC_BSPC) -#define XK_APO LT(_KAMELOC, KC_QUOT) - -#define XK_SPC LT(_IKAPILA, KC_SPC) -#define XK_ENT LT(_IKAPILA, KC_ENT) -#define XK_PGDN LT(_IKASHFT, KC_PGDN) -#define XK_PGUP LT(_IKASHFT, KC_PGUP) -#define PIPBOY LT(_FNCTION, KC_BSLS) -#define XK_DEL LT(_IKASHFT, KC_DEL) -#define XK_GRV LT(_GRVTABL, KC_GRV) - -// mod-TAP for mod/key behavior MT(modkey, KC) -#define ALT_IT MT(MOD_RALT, KC_SCLN) -#define CTL_IT MT(MOD_RCTL, KC_DOT) -#define SFT_ENT MT(MOD_RSFT, KC_ENT) - -//sticky modifiers -#define KYCTL OSM(MOD_LCTL) -#define KYSFT OSM(MOD_LSFT) -#define CAKY OSM(MOD_LCTL | MOD_LALT) - -//shortcuts -#define CADEL LALT(LCTL(KC_DEL)) -#define CAINS LALT(LCTL(KC_INS)) -#define TGNKRO MAGIC_TOGGLE_NKRO - -#define NAVCH LCTL(KC_HOME) -#define NAVCPD LCTL(KC_PGDN) -#define NAVCPU LCTL(KC_PGUP) -#define NAVCE LCTL(KC_END) -#define NAVCU LCTL(KC_UP) -#define NAVCD LCTL(KC_DOWN) -#define NAVCL LCTL(KC_LEFT) -#define NAVCR LCTL(KC_RGHT) -#define NAVGU LGUI(KC_UP) -#define NAVGD LGUI(KC_DOWN) -#define NAVGL LGUI(KC_LEFT) -#define NAVGR LGUI(KC_RGHT) - -#define KC_NDSH LCTL(KC_PMNS) -#define KC_MDSH LALT(LCTL(KC_PMNS)) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* - TAP - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │TAB │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │DEL │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │BKSP│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │OSFT│ X │ C │ D │ V │ Z │ │ K │ H │ , │ │ . │ / │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │OCTL│GUI │ESC │ALT │PGUP│SPC │ │ENT │PGDN│ () │ {} │ \ │ ` │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ - HOLD - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │L FN│ │ │ │ │ │ │ │ │ │ │ALT │L!@#│ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │L OH│ │ │ │ │ │ │ │ │ │ │ │L OH│ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │SFT │ │ │ │ │ │ │ │ │ │ │CTL │SFT │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │CTL │GUI │ESC │ALT │L!@#│L123│ │L123│L!@#│L M│ │L FN│LGRV│ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ - DOUBLETAP - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │OSML│ │ │ │ │ │ │ │ │ │ │ │ │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │OSML│OSML│!F4 │ │ │ │ │ │ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ - Switch type - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │Br │mxC │Z │Z │Z │Z │ │Z │Z │Z │Z │Br │G │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │G │Z │Z │Z │Z │Z │ │Z │Z │Z │Z │Z │Z │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │Y │Z │Z │Z │Z │Z │ │Z │Z │Z │B │B │Y │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │Y │Y │mxC │Z │BLK │BLK │ │BLK │BLK │Z │Z │B │G │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ - with DCS keycaps - Top Row R1 (reversed?) - M Row1 R3 (with reversed pointer finger) - M Row2 R4 - B Row R2 (reversed) -*/ - -// Colemak PB&J (Mod-DH) -[_COLEMAK] = LAYOUT( \ - XK_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, XK_DEL, \ - XK_BSP, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, XK_APO, \ - KYSFT, KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, TD(COD), KC_DOT, CTL_IT, SFT_T(KC_SLSH), \ - KYCTL, KC_LGUI, TD(ESC), KC_LALT, XK_PGUP, XK_SPC, XK_ENT, XK_PGDN, MO(_MLAYER), TT(_NAVIGAT), PIPBOY, XK_GRV \ -), - -// useful for one-handed typing -[_KAMELOC] = LAYOUT( \ - XK_DEL, KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, XK_TAB, \ - _______, KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, _______, \ - KYSFT, KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, TD(UND), KC_V, KC_D, KC_C, KC_X, KYSFT, \ - XK_GRV, PIPBOY, M(1), KC_BTN1, KC_HOME, KC_ENT, KC_ENT, KC_END, KC_LGUI, TD(ESC), KC_LALT, KYCTL \ -), - -/* - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │ │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│INS │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ - │ = │TGL │ │ │ │HOME│END │HOME│ │ \ │ ~ │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ -[_IKAPILA] = LAYOUT( \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), KC_INS, \ - _______, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, LCTL(KC_Z), KC_HOME, TD(HND), KC_HOME, XXXXXXX, KC_BSLS, KC_TILD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │ │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │BSPC│ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │DEL │ │ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│PSCR│ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ _ │ + │END │HOME│END │ │ │ │ │ [ │ ] │ │ - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ - -[_IKASHFT] = LAYOUT( \ - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ - KC_DEL, TD(PGN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MNXT, KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, KC_PSCR, \ - _______, KC_UNDS, KC_PLUS, KC_END, KC_HOME, KC_END, M(1), M(0), M(2), KC_LBRC, KC_RBRC, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* - ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - │ │ → │ ↑ │ ← │ ↓ │ → │ │ → │ ↓ │ ← │ ↑ │ ↑ │ │ just in case someone hacks my IP with a 10MeG pipe, you know? - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - │ │ ← │ ↓ │ → │ ↑ │ ← │ │ ↑ │ ← │ ↓ │ → │ ← │ │ hacker_evasion layer - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ >>init network SEQUENCE - │ │ ↑ │ ← │ ↓ │ → │ ↑ │ │ ↓ │ ← │ ↑ │ → │ ← │ │ sleep 11; echo "DONE\n" - ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ throttle INPUT 11001001 OUTPUT 010011001 ? FULL )); \ - │ │ │ │ → │ ← │ ↓ │ │ → │ ↑ │ ← │ ↓ │ ↑ │ │ <event.pressed) { - switch(id) { - case 0: - return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); - case 1: - return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); - case 2: - return MACRO( T(LBRC), T(RBRC), T(LEFT), END); - case 3: - clear_keyboard(); - case 4: - return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); - case WINSH: - set_unicode_input_mode(UC_WIN); - return false; - break; - case WIN: - set_unicode_input_mode(UC_WINC); - return false; - break; - case OSX: - set_unicode_input_mode(UC_OSX); - return false; - break; - } - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/xeal60/keymaps/xk/rules.mk b/keyboards/handwired/xeal60/keymaps/xk/rules.mk deleted file mode 100644 index 84bf8e1f595a..000000000000 --- a/keyboards/handwired/xeal60/keymaps/xk/rules.mk +++ /dev/null @@ -1,19 +0,0 @@ -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -USE_I2C = yes -TAP_DANCE_ENABLE = yes - -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = yes # 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. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/keymaps/zer09/config.h b/keyboards/handwired/xeal60/keymaps/zer09/config.h deleted file mode 100644 index 73438d8a9391..000000000000 --- a/keyboards/handwired/xeal60/keymaps/zer09/config.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -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" - -/* key matrix size */ -/* Rows are doubled-up */ -#undef MATRIX_ROWS -#undef MATRIX_COLS -#define MATRIX_ROWS 10 -#define MATRIX_COLS 5 - -#undef MATRIX_ROW_PINS -#undef MATRIX_COL_PINS -#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } - -#define CATERINA_BOOTLOADER -#define USB_MAX_POWER_CONSUMPTION 50 - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -/* #define MASTER_LEFT */ -// #define MASTER_RIGHT -#define EE_HANDS - -/* ws2812 RGB LED */ -#undef RGBLED_NUM -#define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 50 -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD -#endif diff --git a/keyboards/handwired/xeal60/keymaps/zer09/keymap.c b/keyboards/handwired/xeal60/keymaps/zer09/keymap.c deleted file mode 100644 index 8d0eaf141163..000000000000 --- a/keyboards/handwired/xeal60/keymaps/zer09/keymap.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "keymap.h" - -extern keymap_config_t keymap_config; - -#define _baseLayer LAYOUT( \ - KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, /**/KC_F, KC_G, KC_C, KC_R, KC_L, \ - CTL_T(KC_A), SFT_T(KC_O), ALT_T(KC_E), KC_U, KC_I, /**/KC_D, KC_H, ALT_T(KC_T), SFT_T(KC_N), CTL_T(KC_S), \ - KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, /**/KC_B, KC_M, KC_W, KC_V, KC_Z, \ - TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \ - TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY)) - -#define _upLayer LAYOUT( \ - KC_4, KC_5, KC_6, _______, _______,/**/ _______, KC_RBRC, _______, _______, _______, \ - LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \ - KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \ - _______, _______, _______, _______, _______,/**/ _______, _______, _______, _______, _______) - -#define _downLayer LAYOUT( \ - KC_F4, KC_F5, KC_F6, KC_F12, _______,/**/ _______, KC_RPRN, _______, _______, _______, \ - LCTL_T(KC_F1), LSFT_T(KC_F2), LALT_T(KC_F3), KC_F11, _______,/**/ KC_LPRN, KC_EQUAL, KC_LEFT, KC_UP, KC_RIGHT, \ - KC_F7, KC_F8, KC_F9, KC_F10, _______,/**/ KC_MINUS, _______, _______, KC_DOWN, _______, \ - _______, _______, _______, _______, _______,/**/ KC_PSCR, KC_SLCK, KC_PAUSE, _______, _______, \ - _______, _______, _______, _______, _______,/**/ _______, _______, _______, _______, _______) - -#define _astdLayer LAYOUT( \ - KC_MPRV, KC_MUTE, _______, _______, _______,/**/KC_PSCR, KC_SLCK, KC_PAUSE, _______, KC_RGUP, \ - KC_MPLY, KC_VOLD, _______, _______, _______,/**/_______, _______, _______, _______, KC_RGDWN, \ - KC_MNXT, KC_VOLU, RESET, _______, _______,/**/_______, _______, RESET, _______, _______, \ - _______, _______, _______, _______, _______,/**/_______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______,/**/_______, _______, _______, _______, _______) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = _baseLayer, - [_UL] = _upLayer, - [_DL] = _downLayer, - [_VL] = _upLayer, - [_AL] = _astdLayer}; diff --git a/keyboards/handwired/xeal60/keymaps/zer09/keymap.h b/keyboards/handwired/xeal60/keymaps/zer09/keymap.h deleted file mode 100644 index 03f8f480afec..000000000000 --- a/keyboards/handwired/xeal60/keymaps/zer09/keymap.h +++ /dev/null @@ -1,32 +0,0 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "tap_dance.h" -#include "zer09.h" - -#ifdef LAYOUT_ortho_4x12 -#undef LAYOUT_ortho_4x12 -#endif - -#ifdef LAYOUT -#undef LAYOUT -#define LAYOUT( \ - L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ - L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ - L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ - L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ -) \ - { \ - { L00, L01, L02, L03, L04 }, \ - { L10, L11, L12, L13, L14 }, \ - { L20, L21, L22, L23, L24 }, \ - { L30, L31, L32, L33, L34 }, \ - { L40, L41, L42, L43, L44 }, \ - { R00, R01, R02, R03, R04 }, \ - { R10, R11, R12, R13, R14 }, \ - { R20, R21, R22, R23, R24 }, \ - { R30, R31, R32, R33, R34 }, \ - { R40, R41, R42, R43, R44 } \ - } -#endif diff --git a/keyboards/handwired/xeal60/keymaps/zer09/rules.mk b/keyboards/handwired/xeal60/keymaps/zer09/rules.mk deleted file mode 100644 index d8adc708826d..000000000000 --- a/keyboards/handwired/xeal60/keymaps/zer09/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -RGBLIGHT_ENABLE = yes -TAP_DANCE_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif From 714e0da960c2251298234bcf2159f67dd060710a Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sun, 12 Aug 2018 21:27:51 +1000 Subject: [PATCH 003/445] Basic keymap (no FN). Compiles. --- keyboards/handwired/xeal60/i2c.c | 162 ------------- keyboards/handwired/xeal60/i2c.h | 49 ---- .../handwired/xeal60/keymaps/default/keymap.c | 226 ++++++------------ keyboards/handwired/xeal60/lets_split.c | 15 -- keyboards/handwired/xeal60/lets_split.h | 23 +- keyboards/handwired/xeal60/rev1/config.h | 41 ++-- keyboards/handwired/xeal60/rev1/rev1.h | 29 ++- keyboards/handwired/xeal60/rules.mk | 14 +- 8 files changed, 130 insertions(+), 429 deletions(-) delete mode 100644 keyboards/handwired/xeal60/i2c.c delete mode 100644 keyboards/handwired/xeal60/i2c.h diff --git a/keyboards/handwired/xeal60/i2c.c b/keyboards/handwired/xeal60/i2c.c deleted file mode 100644 index 084c890c405f..000000000000 --- a/keyboards/handwired/xeal60/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#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 -#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/handwired/xeal60/keymaps/default/keymap.c b/keyboards/handwired/xeal60/keymaps/default/keymap.c index f782781843df..84f84eaf22ea 100644 --- a/keyboards/handwired/xeal60/keymaps/default/keymap.c +++ b/keyboards/handwired/xeal60/keymaps/default/keymap.c @@ -7,148 +7,97 @@ extern keymap_config_t keymap_config; // 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 +#define _NUMPAD 1 #define _RAISE 4 -#define _ADJUST 16 enum custom_keycodes { QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, + NUMPAD, + RAISE }; // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO +#define NP_STAR KC_KP_ASTERISK +#define NP_SLSH KC_KP_SLASH const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | 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_ESC, 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 , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), +/* + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |FN | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | NUM | Space | Space |Alt |FN |Menu |Ctrl | + * `-----------------------------------------------------------' + */ + /* Layer 0: Qwerty */ + [_QWERTY] = LAYOUT_split60( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + RAISE, 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, \ + KC_LCTL, KC_LGUI, KC_LALT, NUMPAD, KC_SPC, KC_SPC, KC_RALT, RAISE, KC_MENU, KC_RCTL \ + ), -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |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_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 , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), +/* + * ,-----------------------------------------------------------. + * | | | | | | | | | /| *| -| | | | + * |-----------------------------------------------------------| + * | | | | | | | | 7| 8| 9| +| | | | + * |-----------------------------------------------------------| + * | | | | | | | | 4| 5| 6|Bspc| |Return | + * |-----------------------------------------------------------| + * | | | | | | | | 1| 2| 3| .| | + * |-----------------------------------------------------------| + * | | | | QWE | | 0 | . | | | | + * `-----------------------------------------------------------' + */ -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |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_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 , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), + /* Layer 1: Numpad */ + [_NUMPAD] = LAYOUT_split60( \ + _______, _______, _______, _______, _______, _______, _______, _______, NP_SLSH, NP_STAR, KC_MINUS, _______, _______, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PLUS, _______, _______, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_BSPC, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DOT, _______, \ + _______, _______, _______, QWERTY, KC_SPC, KC_0, KC_DOT, RAISE, _______, _______ \ + ), -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 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_DEL, \ - 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 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_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) +/* + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | ^ | | | | |pUp| ^ |pDn| | | | | + * |-----------------------------------------------------------| + * | | < | v | > | | |Hom| < | v | > | | | | + * |-----------------------------------------------------------| + * | | | | | | |End| | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | + * `-----------------------------------------------------------' + */ + /* Layer 2: RAISE */ + [_RAISE] = LAYOUT_split60( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) }; #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 tone_numpad[][2] = SONG(DVORAK_SOUND); #endif -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -156,53 +105,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_qwerty); #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + default_layer_set(1UL<<_QWERTY); } return false; break; - case DVORAK: + case NUMPAD: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); + PLAY_SONG(tone_numpad); #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - 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); + default_layer_set(1UL<<_NUMPAD); } 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; diff --git a/keyboards/handwired/xeal60/lets_split.c b/keyboards/handwired/xeal60/lets_split.c index c400ab7bb8e7..3caa114c221d 100644 --- a/keyboards/handwired/xeal60/lets_split.c +++ b/keyboards/handwired/xeal60/lets_split.c @@ -1,16 +1 @@ #include "lets_split.h" - -#ifdef SWAP_HANDS_ENABLE -__attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - - {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, - {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, - {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}}, - {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}}, - {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}}, - {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}, - {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}}, - {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}}, -}; -#endif diff --git a/keyboards/handwired/xeal60/lets_split.h b/keyboards/handwired/xeal60/lets_split.h index bce0ecb19927..0442982fae8a 100644 --- a/keyboards/handwired/xeal60/lets_split.h +++ b/keyboards/handwired/xeal60/lets_split.h @@ -5,27 +5,24 @@ #ifdef KEYBOARD_lets_split_rev1 #include "rev1.h" -#elif KEYBOARD_lets_split_rev2 - #include "rev2.h" -#elif KEYBOARD_lets_split_sockets - #include "sockets.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, R30, R31, R32, R33, R34, R35 \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \ + L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \ + L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47 \ ) \ 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_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, KC_##R07,\ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, KC_##R17,\ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, KC_##R27,\ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, KC_##R37 \ ) -#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define LAYOUT_XEAL LAYOUT_kc #endif diff --git a/keyboards/handwired/xeal60/rev1/config.h b/keyboards/handwired/xeal60/rev1/config.h index 73f90e715dfe..504b3fe8c66a 100644 --- a/keyboards/handwired/xeal60/rev1/config.h +++ b/keyboards/handwired/xeal60/rev1/config.h @@ -22,22 +22,36 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 +#define VENDOR_ID 0x4131 +#define PRODUCT_ID 0x5141 #define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split v1 -#define DESCRIPTION A split keyboard for the cheap makers +#define MANUFACTURER XeaLouS +#define PRODUCT XeaL60 +#define DESCRIPTION A split keyboard /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 // wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +//ascii art of pro micro +// PORT +//PD3 TX0 RAW +//PD2 RX1 GND +// GND RESET +// GND VCC +//PD1 2 A3 PF4 +//PD0 3 A2 PF5 +//PD4 4 A1 PF6 +//PC6 5 A0 PF7 +//PD7 6 15 PB1 +//PE6 7 14 PB3 +//PB4 8 13 PB2 +//PB5 9 10 PB6 + +#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -58,13 +72,6 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 16 // Number of LEDs -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/xeal60/rev1/rev1.h b/keyboards/handwired/xeal60/rev1/rev1.h index 073d83ef347e..8f25d7d2f2ed 100644 --- a/keyboards/handwired/xeal60/rev1/rev1.h +++ b/keyboards/handwired/xeal60/rev1/rev1.h @@ -9,22 +9,25 @@ //void promicro_bootloader_jmp(bool program); #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 \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, R42, R43, R44, R45, R46 \ ) \ { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 } \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44 }, \ + { R00, R01, R02, R03, R04, R05, R06}, \ + { R11, R12, R13, R14, R15, R16 }, \ + { R21, R22, R23, R24, R25, R26 }, \ + { R31, R32, R33, R34, R35, R36 }, \ + { R42, R43, R44, R45, R46 } \ } -#define LAYOUT_ortho_4x12 LAYOUT +#define LAYOUT_split60 LAYOUT #endif diff --git a/keyboards/handwired/xeal60/rules.mk b/keyboards/handwired/xeal60/rules.mk index 951723edc5bb..6dde257ece9f 100644 --- a/keyboards/handwired/xeal60/rules.mk +++ b/keyboards/handwired/xeal60/rules.mk @@ -1,5 +1,4 @@ SRC += matrix.c \ - i2c.c \ split_util.c \ serial.c \ ssd1306.c @@ -53,20 +52,21 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # 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 = yes # Mouse keys(+4700) +BOOTMAGIC_ENABLE = yes # 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 = 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 +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 = 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. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SUBPROJECT_rev1 = yes -USE_I2C = yes +USE_I2C = no + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From ac9b88e8ccbbf38762871504cd827ff0d941c426 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sun, 12 Aug 2018 21:39:55 +1000 Subject: [PATCH 004/445] Removed NP_STAR and NP_SLSH. --- keyboards/handwired/xeal60/keymaps/default/keymap.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/keyboards/handwired/xeal60/keymaps/default/keymap.c b/keyboards/handwired/xeal60/keymaps/default/keymap.c index 84f84eaf22ea..d770d0c6a8e1 100644 --- a/keyboards/handwired/xeal60/keymaps/default/keymap.c +++ b/keyboards/handwired/xeal60/keymaps/default/keymap.c @@ -19,8 +19,6 @@ enum custom_keycodes { // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO -#define NP_STAR KC_KP_ASTERISK -#define NP_SLSH KC_KP_SLASH const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -61,11 +59,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 1: Numpad */ [_NUMPAD] = LAYOUT_split60( \ - _______, _______, _______, _______, _______, _______, _______, _______, NP_SLSH, NP_STAR, KC_MINUS, _______, _______, KC_BSPC, \ - _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PLUS, _______, _______, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_BSPC, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DOT, _______, \ - _______, _______, _______, QWERTY, KC_SPC, KC_0, KC_DOT, RAISE, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_MINUS, _______, _______, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PLUS, _______, _______, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_BSPC, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DOT, _______, \ + _______, _______, _______, QWERTY, KC_SPC, KC_0, KC_DOT, RAISE, _______, _______ \ ), /* From 3cf7f7322c24e3cab21d402f1a859b60df857603 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Wed, 29 Aug 2018 10:19:36 +1000 Subject: [PATCH 005/445] Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes. --- quantum/matrix.c | 79 +----------- tmk_core/common.mk | 17 ++- tmk_core/common/debounce.c | 22 ++++ tmk_core/common/debounce.h | 21 ++++ tmk_core/common/debounce/debounce_eager_pk.c | 124 +++++++++++++++++++ tmk_core/common/debounce/debounce_sym_g.c | 59 +++++++++ tmk_core/common/debounce/readme.md | 28 +++++ tmk_core/common/keyboard.c | 22 +--- 8 files changed, 279 insertions(+), 93 deletions(-) create mode 100644 tmk_core/common/debounce.c create mode 100644 tmk_core/common/debounce.h create mode 100644 tmk_core/common/debounce/debounce_eager_pk.c create mode 100644 tmk_core/common/debounce/debounce_sym_g.c create mode 100644 tmk_core/common/debounce/readme.md diff --git a/quantum/matrix.c b/quantum/matrix.c index 3600d4e7b54c..bc7eb6b585d1 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -27,17 +27,6 @@ along with this program. If not, see . #include "timer.h" -/* Set 0 if debouncing isn't needed */ - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -#if (DEBOUNCING_DELAY > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - #if (MATRIX_COLS <= 8) # define print_matrix_header() print("\nr/c 01234567\n") # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) @@ -67,8 +56,6 @@ 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]; - #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void); @@ -122,30 +109,6 @@ uint8_t matrix_cols(void) { return MATRIX_COLS; } -// void matrix_power_up(void) { -// #if (DIODE_DIRECTION == COL2ROW) -// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { -// /* DDRxn */ -// _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); -// toggle_row(r); -// } -// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { -// /* PORTxn */ -// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); -// } -// #elif (DIODE_DIRECTION == ROW2COL) -// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { -// /* DDRxn */ -// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); -// toggle_col(c); -// } -// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { -// /* PORTxn */ -// _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF); -// } -// #endif -// } - void matrix_init(void) { // initialize row and col @@ -160,7 +123,6 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; - matrix_debouncing[i] = 0; } matrix_init_quantum(); @@ -170,59 +132,24 @@ uint8_t matrix_scan(void) { #if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix, current_row); -# endif - + read_cols_on_row(matrix, current_row); } - #elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix, current_col); -# endif - + read_rows_on_col(matrix, current_col); } - #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - debouncing = false; - } -# endif - matrix_scan_quantum(); return 1; } +//Deprecated. bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) - if (debouncing) return false; -#endif return true; } diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 3e407f1573c5..72b2d3cc86b2 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -1,4 +1,5 @@ COMMON_DIR = common +DEBOUNCE = $(COMMON_DIR)/debounce ifeq ($(PLATFORM),AVR) PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr else ifeq ($(PLATFORM),CHIBIOS) @@ -9,6 +10,7 @@ endif TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ $(COMMON_DIR)/keyboard.c \ + $(COMMON_DIR)/debounce.c \ $(COMMON_DIR)/action.c \ $(COMMON_DIR)/action_tapping.c \ $(COMMON_DIR)/action_macro.c \ @@ -39,7 +41,20 @@ ifeq ($(PLATFORM),TEST) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c endif - +# Debounce Modules. If implemented in matrix.c, don't use these. +ifeq ($(strip $(CUSTOM_MATRIX)), yes) + # Do nothing. Custom matrix code. +else ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + # Do nothing, debouncing is inside matrix.c inside split_common +else ifeq ($(strip $(DEBOUNCE_ALGO)), manual) + # Do nothing. do your debouncing in matrix.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) + TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) + TMK_COMMON_SRC += $(DEBOUNCE)/debounce_eager_pk.c +else # default algorithm + TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c +endif # Option modules ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes) diff --git a/tmk_core/common/debounce.c b/tmk_core/common/debounce.c new file mode 100644 index 000000000000..406d2d0f386a --- /dev/null +++ b/tmk_core/common/debounce.c @@ -0,0 +1,22 @@ +/* +Copyright 2017 Alex Ong +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 "debounce.h" +#include "matrix.h" +//Default implementation - no debouncing +__attribute__((weak)) void matrix_debounce_init(void) {} +__attribute__((weak)) void matrix_debounce(void) {} +__attribute__((weak)) matrix_row_t matrix_debounce_get_row(uint8_t row) +{ + return matrix_get_row(row); +} diff --git a/tmk_core/common/debounce.h b/tmk_core/common/debounce.h new file mode 100644 index 000000000000..fe3effab3219 --- /dev/null +++ b/tmk_core/common/debounce.h @@ -0,0 +1,21 @@ +#ifndef DEBOUNCE_H +#define DEBOUNCE_H +#include +#include +#include "matrix.h" +#ifdef __cplusplus +extern "C" { +#endif + /* called to initialize any data stores your implementation has*/ + void matrix_debounce_init(void); + /* call this every keyboard_task to debounce the matrix*/ + void matrix_debounce(void); + /* matrix state on row */ + matrix_row_t matrix_debounce_get_row(uint8_t row); + /* whether a switch is on */ + bool matrix_debounce_is_on(uint8_t row, uint8_t col); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/tmk_core/common/debounce/debounce_eager_pk.c b/tmk_core/common/debounce/debounce_eager_pk.c new file mode 100644 index 000000000000..984da0570ace --- /dev/null +++ b/tmk_core/common/debounce/debounce_eager_pk.c @@ -0,0 +1,124 @@ +/* +Copyright 2017 Alex Ong +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 . +*/ + +/* +Basic per-key algorithm. Uses an 8-bit counter per key. +After pressing a key, it immediately changes state, and sets a counter. +No further inputs are accepted until DEBOUNCE milliseconds have occurred. +*/ + +#include "debounce.h" +#include "matrix.h" +#include "timer.h" + +#ifndef DEBOUNCE + #define DEBOUNCE 5 +#endif + + +#if (MATRIX_COLS <= 8) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define ROW_SHIFTER ((uint32_t)1) +#endif + + + +#define debounce_counter_t uint8_t + +static matrix_row_t matrix_debounced[MATRIX_ROWS]; +static debounce_counter_t debounce_counters[MATRIX_ROWS*MATRIX_COLS]; + +#define DEBOUNCE_ELAPSED 251 +#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) + +void update_debounce_counters(uint8_t current_time); +void transfer_matrix_values(uint8_t current_time); + +void matrix_debounce_init(void) +{ + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + { + matrix_debounced[r] = 0; + } + + int i = 0; + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + { + for (uint8_t c = 0; c < MATRIX_COLS; c++) + { + debounce_counters[i++] = DEBOUNCE_ELAPSED; + } + } +} + +void matrix_debounce(void) +{ + uint8_t current_time = timer_read() % MAX_DEBOUNCE; + update_debounce_counters(current_time); + transfer_matrix_values(current_time); +} + +//If the current time is > debounce counter, set the counter to enable input. +void update_debounce_counters(uint8_t current_time) +{ + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) + { + for (uint8_t col = 0; col < MATRIX_COLS; col++) + { + if (*debounce_pointer != DEBOUNCE_ELAPSED) + { + if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= + DEBOUNCING_DELAY) { + *debounce_pointer = DEBOUNCE_ELAPSED; + } + } + debounce_pointer++; + } + } +} + +// upload from raw_matrix to final matrix; +void transfer_matrix_values(uint8_t current_time) +{ + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) + { + matrix_row_t existing_row = matrix_debounced[row]; + matrix_row_t raw_row = matrix_get_row(row); + + for (uint8_t col = 0; col < MATRIX_COLS; col++) + { + matrix_row_t col_mask = (ROW_SHIFTER << col); + bool final_value = raw_row & col_mask; + bool existing_value = existing_row & col_mask; + if (*debounce_pointer == DEBOUNCE_ELAPSED && + (existing_value != final_value)) + { + *debounce_pointer = current_time; + existing_row ^= col_mask; //flip the bit. + } + debounce_pointer++; + } + matrix_debounced[row] = existing_row; + } +} + +matrix_row_t matrix_debounce_get_row(uint8_t row) +{ + return matrix_debounced[row]; +} diff --git a/tmk_core/common/debounce/debounce_sym_g.c b/tmk_core/common/debounce/debounce_sym_g.c new file mode 100644 index 000000000000..2fb7a589d75a --- /dev/null +++ b/tmk_core/common/debounce/debounce_sym_g.c @@ -0,0 +1,59 @@ +/* +Copyright 2017 Alex Ong +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 . +*/ + +/* +Basic global debounce algorithm. Used in 99% of keyboards at time of implementation +When no state changes have occured for DEBOUNCE milliseconds, we push the state. +*/ +#include "debounce.h" +#include "matrix.h" +#include "timer.h" +#ifndef DEBOUNCE + #define DEBOUNCE 5 +#endif +static matrix_row_t matrix_debounced[MATRIX_ROWS]; +static bool debouncing = false; +static uint16_t debouncing_time; + +void matrix_debounce_init(void) +{ + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + { + matrix_debounced[r] = 0; + } +} + +void matrix_debounce(void) +{ + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + { + matrix_row_t raw = matrix_get_row(r); + if (raw != matrix_debounced[r]) + { + debouncing = true; + debouncing_time = timer_read(); + } + } + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int i = 0; i < MATRIX_ROWS; i++) { + matrix_debounced[i] = matrix_get_row(i); + } + debouncing = false; + } +} + +matrix_row_t matrix_debounce_get_row(uint8_t row) +{ + return matrix_debounced[row]; +} diff --git a/tmk_core/common/debounce/readme.md b/tmk_core/common/debounce/readme.md new file mode 100644 index 000000000000..1a77d44df53a --- /dev/null +++ b/tmk_core/common/debounce/readme.md @@ -0,0 +1,28 @@ +Debounce algorithms belong in this folder. +Here are a few ideas + +1) Global vs Per-Key vs Per-Row + * Global - one timer for all keys. Any key change state affects global timer + * Per key - one timer per key + * Per row - one timer per row + +2) Eager vs symmetric vs assymetric + * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. + * Symmetric - wait for no changes for DEBOUNCE ms before reporting change + * Assymetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. + +3) Timestamp vs cycles + * old old old code waits n cycles, decreasing count by one each matrix_scan + * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed. + * Timestamps are superior, i don't think cycles will ever be used again once upgraded. + +The default algorithm is symmetric and global. +Here are a few that could be implemented: + +debounce_sym_g.c +debounce_sym_pk.c +debounce_sym_pr.c +debounce_sym_pr_cycles.c //currently used in ergo-dox +debounce_eager_g.c +debounce_eager_pk.c +debounce_eager_pr.c //could be used in ergo-dox! diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 13b3cb4c0c1f..fe626efb3505 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -18,6 +18,7 @@ along with this program. If not, see . #include #include "keyboard.h" #include "matrix.h" +#include "debounce.h" #include "keymap.h" #include "host.h" #include "led.h" @@ -157,6 +158,7 @@ void keyboard_init(void) { MCUCR |= _BV(JTD); #endif matrix_init(); + matrix_debounce_init(); #ifdef PS2_MOUSE_ENABLE ps2_mouse_init(); #endif @@ -206,9 +208,6 @@ void keyboard_init(void) { void keyboard_task(void) { static matrix_row_t matrix_prev[MATRIX_ROWS]; -#ifdef MATRIX_HAS_GHOST - // static matrix_row_t matrix_ghost[MATRIX_ROWS]; -#endif static uint8_t led_status = 0; matrix_row_t matrix_row = 0; matrix_row_t matrix_change = 0; @@ -217,24 +216,15 @@ void keyboard_task(void) #endif matrix_scan(); + matrix_debounce(); + if (is_keyboard_master()) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - matrix_row = matrix_get_row(r); + matrix_row = matrix_debounce_get_row(r); matrix_change = matrix_row ^ matrix_prev[r]; if (matrix_change) { #ifdef MATRIX_HAS_GHOST - if (has_ghost_in_row(r, matrix_row)) { - /* Keep track of whether ghosted status has changed for - * debugging. But don't update matrix_prev until un-ghosted, or - * the last key would be lost. - */ - //if (debug_matrix && matrix_ghost[r] != matrix_row) { - // matrix_print(); - //} - //matrix_ghost[r] = matrix_row; - continue; - } - //matrix_ghost[r] = matrix_row; + if (has_ghost_in_row(r, matrix_row)) continue; #endif if (debug_matrix) matrix_print(); for (uint8_t c = 0; c < MATRIX_COLS; c++) { From 4db27a2c7614c0aa5a0b46d8e1f5c5cc8216fd1c Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Wed, 29 Aug 2018 10:45:53 +1000 Subject: [PATCH 006/445] Changed order of rules in TMK. Documented feature. --- docs/feature_debounce_algo.md | 51 +++++++++++++++++++++++++++++++++++ tmk_core/common.mk | 6 ++--- 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 docs/feature_debounce_algo.md diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_algo.md new file mode 100644 index 000000000000..7dcfec4a8058 --- /dev/null +++ b/docs/feature_debounce_algo.md @@ -0,0 +1,51 @@ +# Debounce algorithm + +QMK supports multiple debounce algorithms through its debounce API. + +The underlying debounce algorithm is determined by which matrix.c file you are using. + +The logic for which debounce method called is below. It checks various defines that you have set in rules.mk + +``` +ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + # Do nothing, debouncing is inside matrix.c inside split_common +else ifeq ($(strip $(DEBOUNCE_ALGO)), manual) + # Do nothing. do your debouncing in matrix.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) + TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) + TMK_COMMON_SRC += $(DEBOUNCE)/debounce_eager_pk.c +else ifeq ($(strip $(CUSTOM_MATRIX)), yes) + # Do nothing. Custom matrix code. +else # default algorithm + TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c +endif +``` +# Debounce selection +The following is for keyboards where ```SPLIT_KEYBOARD``` is not defined as ```YES``` +| DEBOUNCE_ALGO | CUSTOM_MATRIX | Description | What to do | +| ------------- | -------------| --------------------------------------------------- | ----------------------------- | +| Not defined | Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g used. | +| manual | Not defined | You are using the included matrix.c but your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | +| sym_g / eager_pk | Not defined | You are using the included matrix.c and debounce.c | Nothing. Chosen debounce method used. | +| Not defined | YES | You have your own matrix.c, and your own debounce | Write the fully debounced matrix into matrix.c's matrix | +| manual | YES | Same as above | same as above | +| sym_g/ eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | + +Note: +If ```SPLIT_KEYBOARD = YES``` is defined, the algorithm inside split_common will be used. +A future pull request will fix this to use the debounce.c code. + +# Use your own debouncing code +* Set ```DEBOUNCE_ALGO = manual```. +* Add ```SRC += debounce.c``` +* Add your own ```debounce.c```. Look at included debounce.c's for sample implementations. +* Debouncing occurs after every raw matrix scan. + +# Changing between included debouncing methods +You can either use your own code, by including your own debounce.c, or switch to another included one. +Included debounce methods are: +* debounce_eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key +* debounce_sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed. + + diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 72b2d3cc86b2..85f903fdae3a 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -42,9 +42,7 @@ ifeq ($(PLATFORM),TEST) endif # Debounce Modules. If implemented in matrix.c, don't use these. -ifeq ($(strip $(CUSTOM_MATRIX)), yes) - # Do nothing. Custom matrix code. -else ifeq ($(strip $(SPLIT_KEYBOARD)), yes) +ifeq ($(strip $(SPLIT_KEYBOARD)), yes) # Do nothing, debouncing is inside matrix.c inside split_common else ifeq ($(strip $(DEBOUNCE_ALGO)), manual) # Do nothing. do your debouncing in matrix.c @@ -52,6 +50,8 @@ else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) TMK_COMMON_SRC += $(DEBOUNCE)/debounce_eager_pk.c +else ifeq ($(strip $(CUSTOM_MATRIX)), yes) + # Do nothing. Custom matrix code. else # default algorithm TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c endif From e8e6268765b052a6f6b53d34f0d8afb200989ba7 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Wed, 29 Aug 2018 10:48:11 +1000 Subject: [PATCH 007/445] Fixed missing whitespace in debounce documentation Table wasn't working due to missing newline. --- docs/feature_debounce_algo.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_algo.md index 7dcfec4a8058..9809bd1bf2fb 100644 --- a/docs/feature_debounce_algo.md +++ b/docs/feature_debounce_algo.md @@ -23,6 +23,7 @@ endif ``` # Debounce selection The following is for keyboards where ```SPLIT_KEYBOARD``` is not defined as ```YES``` + | DEBOUNCE_ALGO | CUSTOM_MATRIX | Description | What to do | | ------------- | -------------| --------------------------------------------------- | ----------------------------- | | Not defined | Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g used. | From a55c838961c89097ab849ed6cb1f261791e6b9b4 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Wed, 29 Aug 2018 10:49:53 +1000 Subject: [PATCH 008/445] Added bold in a few areas. --- docs/feature_debounce_algo.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_algo.md index 9809bd1bf2fb..2c694cdfbde4 100644 --- a/docs/feature_debounce_algo.md +++ b/docs/feature_debounce_algo.md @@ -21,8 +21,9 @@ else # default algorithm TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c endif ``` + # Debounce selection -The following is for keyboards where ```SPLIT_KEYBOARD``` is not defined as ```YES``` +The following is for keyboards where ```SPLIT_KEYBOARD``` is **not** defined as ```YES``` | DEBOUNCE_ALGO | CUSTOM_MATRIX | Description | What to do | | ------------- | -------------| --------------------------------------------------- | ----------------------------- | @@ -33,7 +34,7 @@ The following is for keyboards where ```SPLIT_KEYBOARD``` is not defined as ```Y | manual | YES | Same as above | same as above | | sym_g/ eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | -Note: +**Note**: If ```SPLIT_KEYBOARD = YES``` is defined, the algorithm inside split_common will be used. A future pull request will fix this to use the debounce.c code. From 39ca330f103bf85fd29b0fb595469221c9c3680c Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 16:56:01 +1100 Subject: [PATCH 009/445] DO NOT USE - Removed debounce from TMK. --- tmk_core/common.mk | 17 +-- tmk_core/common/debounce.c | 22 ---- tmk_core/common/debounce.h | 21 ---- tmk_core/common/debounce/debounce_eager_pk.c | 124 ------------------- tmk_core/common/debounce/debounce_sym_g.c | 59 --------- tmk_core/common/debounce/readme.md | 28 ----- tmk_core/common/keyboard.c | 9 +- 7 files changed, 4 insertions(+), 276 deletions(-) delete mode 100644 tmk_core/common/debounce.c delete mode 100644 tmk_core/common/debounce.h delete mode 100644 tmk_core/common/debounce/debounce_eager_pk.c delete mode 100644 tmk_core/common/debounce/debounce_sym_g.c delete mode 100644 tmk_core/common/debounce/readme.md diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 7a7b3928f494..335a36cfe762 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -1,5 +1,5 @@ COMMON_DIR = common -DEBOUNCE = $(COMMON_DIR)/debounce + ifeq ($(PLATFORM),AVR) PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr else ifeq ($(PLATFORM),CHIBIOS) @@ -12,7 +12,6 @@ endif TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ $(COMMON_DIR)/keyboard.c \ - $(COMMON_DIR)/debounce.c \ $(COMMON_DIR)/action.c \ $(COMMON_DIR)/action_tapping.c \ $(COMMON_DIR)/action_macro.c \ @@ -62,20 +61,6 @@ ifeq ($(PLATFORM),TEST) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c endif -# Debounce Modules. If implemented in matrix.c, don't use these. -ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - # Do nothing, debouncing is inside matrix.c inside split_common -else ifeq ($(strip $(DEBOUNCE_ALGO)), manual) - # Do nothing. do your debouncing in matrix.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) - TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) - TMK_COMMON_SRC += $(DEBOUNCE)/debounce_eager_pk.c -else ifeq ($(strip $(CUSTOM_MATRIX)), yes) - # Do nothing. Custom matrix code. -else # default algorithm - TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c -endif # Option modules BOOTMAGIC_ENABLE ?= no diff --git a/tmk_core/common/debounce.c b/tmk_core/common/debounce.c deleted file mode 100644 index 406d2d0f386a..000000000000 --- a/tmk_core/common/debounce.c +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2017 Alex Ong -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 "debounce.h" -#include "matrix.h" -//Default implementation - no debouncing -__attribute__((weak)) void matrix_debounce_init(void) {} -__attribute__((weak)) void matrix_debounce(void) {} -__attribute__((weak)) matrix_row_t matrix_debounce_get_row(uint8_t row) -{ - return matrix_get_row(row); -} diff --git a/tmk_core/common/debounce.h b/tmk_core/common/debounce.h deleted file mode 100644 index fe3effab3219..000000000000 --- a/tmk_core/common/debounce.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef DEBOUNCE_H -#define DEBOUNCE_H -#include -#include -#include "matrix.h" -#ifdef __cplusplus -extern "C" { -#endif - /* called to initialize any data stores your implementation has*/ - void matrix_debounce_init(void); - /* call this every keyboard_task to debounce the matrix*/ - void matrix_debounce(void); - /* matrix state on row */ - matrix_row_t matrix_debounce_get_row(uint8_t row); - /* whether a switch is on */ - bool matrix_debounce_is_on(uint8_t row, uint8_t col); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/tmk_core/common/debounce/debounce_eager_pk.c b/tmk_core/common/debounce/debounce_eager_pk.c deleted file mode 100644 index 984da0570ace..000000000000 --- a/tmk_core/common/debounce/debounce_eager_pk.c +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2017 Alex Ong -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 . -*/ - -/* -Basic per-key algorithm. Uses an 8-bit counter per key. -After pressing a key, it immediately changes state, and sets a counter. -No further inputs are accepted until DEBOUNCE milliseconds have occurred. -*/ - -#include "debounce.h" -#include "matrix.h" -#include "timer.h" - -#ifndef DEBOUNCE - #define DEBOUNCE 5 -#endif - - -#if (MATRIX_COLS <= 8) -# define ROW_SHIFTER ((uint8_t)1) -#elif (MATRIX_COLS <= 16) -# define ROW_SHIFTER ((uint16_t)1) -#elif (MATRIX_COLS <= 32) -# define ROW_SHIFTER ((uint32_t)1) -#endif - - - -#define debounce_counter_t uint8_t - -static matrix_row_t matrix_debounced[MATRIX_ROWS]; -static debounce_counter_t debounce_counters[MATRIX_ROWS*MATRIX_COLS]; - -#define DEBOUNCE_ELAPSED 251 -#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) - -void update_debounce_counters(uint8_t current_time); -void transfer_matrix_values(uint8_t current_time); - -void matrix_debounce_init(void) -{ - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - { - matrix_debounced[r] = 0; - } - - int i = 0; - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - { - for (uint8_t c = 0; c < MATRIX_COLS; c++) - { - debounce_counters[i++] = DEBOUNCE_ELAPSED; - } - } -} - -void matrix_debounce(void) -{ - uint8_t current_time = timer_read() % MAX_DEBOUNCE; - update_debounce_counters(current_time); - transfer_matrix_values(current_time); -} - -//If the current time is > debounce counter, set the counter to enable input. -void update_debounce_counters(uint8_t current_time) -{ - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) - { - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (*debounce_pointer != DEBOUNCE_ELAPSED) - { - if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= - DEBOUNCING_DELAY) { - *debounce_pointer = DEBOUNCE_ELAPSED; - } - } - debounce_pointer++; - } - } -} - -// upload from raw_matrix to final matrix; -void transfer_matrix_values(uint8_t current_time) -{ - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) - { - matrix_row_t existing_row = matrix_debounced[row]; - matrix_row_t raw_row = matrix_get_row(row); - - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - matrix_row_t col_mask = (ROW_SHIFTER << col); - bool final_value = raw_row & col_mask; - bool existing_value = existing_row & col_mask; - if (*debounce_pointer == DEBOUNCE_ELAPSED && - (existing_value != final_value)) - { - *debounce_pointer = current_time; - existing_row ^= col_mask; //flip the bit. - } - debounce_pointer++; - } - matrix_debounced[row] = existing_row; - } -} - -matrix_row_t matrix_debounce_get_row(uint8_t row) -{ - return matrix_debounced[row]; -} diff --git a/tmk_core/common/debounce/debounce_sym_g.c b/tmk_core/common/debounce/debounce_sym_g.c deleted file mode 100644 index 2fb7a589d75a..000000000000 --- a/tmk_core/common/debounce/debounce_sym_g.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2017 Alex Ong -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 . -*/ - -/* -Basic global debounce algorithm. Used in 99% of keyboards at time of implementation -When no state changes have occured for DEBOUNCE milliseconds, we push the state. -*/ -#include "debounce.h" -#include "matrix.h" -#include "timer.h" -#ifndef DEBOUNCE - #define DEBOUNCE 5 -#endif -static matrix_row_t matrix_debounced[MATRIX_ROWS]; -static bool debouncing = false; -static uint16_t debouncing_time; - -void matrix_debounce_init(void) -{ - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - { - matrix_debounced[r] = 0; - } -} - -void matrix_debounce(void) -{ - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - { - matrix_row_t raw = matrix_get_row(r); - if (raw != matrix_debounced[r]) - { - debouncing = true; - debouncing_time = timer_read(); - } - } - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int i = 0; i < MATRIX_ROWS; i++) { - matrix_debounced[i] = matrix_get_row(i); - } - debouncing = false; - } -} - -matrix_row_t matrix_debounce_get_row(uint8_t row) -{ - return matrix_debounced[row]; -} diff --git a/tmk_core/common/debounce/readme.md b/tmk_core/common/debounce/readme.md deleted file mode 100644 index 1a77d44df53a..000000000000 --- a/tmk_core/common/debounce/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -Debounce algorithms belong in this folder. -Here are a few ideas - -1) Global vs Per-Key vs Per-Row - * Global - one timer for all keys. Any key change state affects global timer - * Per key - one timer per key - * Per row - one timer per row - -2) Eager vs symmetric vs assymetric - * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. - * Symmetric - wait for no changes for DEBOUNCE ms before reporting change - * Assymetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. - -3) Timestamp vs cycles - * old old old code waits n cycles, decreasing count by one each matrix_scan - * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed. - * Timestamps are superior, i don't think cycles will ever be used again once upgraded. - -The default algorithm is symmetric and global. -Here are a few that could be implemented: - -debounce_sym_g.c -debounce_sym_pk.c -debounce_sym_pr.c -debounce_sym_pr_cycles.c //currently used in ergo-dox -debounce_eager_g.c -debounce_eager_pk.c -debounce_eager_pr.c //could be used in ergo-dox! diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 1bfd4c9cca01..d223001160a7 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -18,7 +18,6 @@ along with this program. If not, see . #include #include "keyboard.h" #include "matrix.h" -#include "debounce.h" #include "keymap.h" #include "host.h" #include "led.h" @@ -164,8 +163,7 @@ bool is_keyboard_master(void) { */ void keyboard_init(void) { timer_init(); - matrix_init(); - matrix_debounce_init(); + matrix_init(); #ifdef QWIIC_ENABLE qwiic_init(); #endif @@ -225,12 +223,11 @@ void keyboard_task(void) uint8_t keys_processed = 0; #endif - matrix_scan(); - matrix_debounce(); + matrix_scan(); if (is_keyboard_master()) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - matrix_row = matrix_debounce_get_row(r); + matrix_row = matrix_get_row(r); matrix_change = matrix_row ^ matrix_prev[r]; if (matrix_change) { #ifdef MATRIX_HAS_GHOST From 3949ab322dcce75f470ddfbe701c8763add69e63 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 16:59:02 +1100 Subject: [PATCH 010/445] Remove accidental xeal60 commit --- keyboards/handwired/xeal60/config.h | 24 - keyboards/handwired/xeal60/info.json | 12 - .../handwired/xeal60/keymaps/default/config.h | 37 -- .../handwired/xeal60/keymaps/default/keymap.c | 129 ----- .../handwired/xeal60/keymaps/default/rules.mk | 3 - keyboards/handwired/xeal60/lets_split.c | 1 - keyboards/handwired/xeal60/lets_split.h | 28 -- keyboards/handwired/xeal60/matrix.c | 470 ------------------ keyboards/handwired/xeal60/readme.md | 187 ------- keyboards/handwired/xeal60/rev1/config.h | 93 ---- keyboards/handwired/xeal60/rev1/rev1.c | 15 - keyboards/handwired/xeal60/rev1/rev1.h | 33 -- keyboards/handwired/xeal60/rev1/rules.mk | 1 - keyboards/handwired/xeal60/rules.mk | 77 --- keyboards/handwired/xeal60/serial.c | 228 --------- keyboards/handwired/xeal60/serial.h | 26 - keyboards/handwired/xeal60/split_util.c | 86 ---- keyboards/handwired/xeal60/split_util.h | 20 - 18 files changed, 1470 deletions(-) delete mode 100644 keyboards/handwired/xeal60/config.h delete mode 100644 keyboards/handwired/xeal60/info.json delete mode 100644 keyboards/handwired/xeal60/keymaps/default/config.h delete mode 100644 keyboards/handwired/xeal60/keymaps/default/keymap.c delete mode 100644 keyboards/handwired/xeal60/keymaps/default/rules.mk delete mode 100644 keyboards/handwired/xeal60/lets_split.c delete mode 100644 keyboards/handwired/xeal60/lets_split.h delete mode 100644 keyboards/handwired/xeal60/matrix.c delete mode 100644 keyboards/handwired/xeal60/readme.md delete mode 100644 keyboards/handwired/xeal60/rev1/config.h delete mode 100644 keyboards/handwired/xeal60/rev1/rev1.c delete mode 100644 keyboards/handwired/xeal60/rev1/rev1.h delete mode 100644 keyboards/handwired/xeal60/rev1/rules.mk delete mode 100644 keyboards/handwired/xeal60/rules.mk delete mode 100644 keyboards/handwired/xeal60/serial.c delete mode 100644 keyboards/handwired/xeal60/serial.h delete mode 100644 keyboards/handwired/xeal60/split_util.c delete mode 100644 keyboards/handwired/xeal60/split_util.h diff --git a/keyboards/handwired/xeal60/config.h b/keyboards/handwired/xeal60/config.h deleted file mode 100644 index c910d8f24f0c..000000000000 --- a/keyboards/handwired/xeal60/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -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_H -#define CONFIG_H - -#include "config_common.h" - -#endif diff --git a/keyboards/handwired/xeal60/info.json b/keyboards/handwired/xeal60/info.json deleted file mode 100644 index aa1c3b8efc8b..000000000000 --- a/keyboards/handwired/xeal60/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "Let's Split", - "url": "", - "maintainer": "qmk", - "width": 13, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}] - } - } -} diff --git a/keyboards/handwired/xeal60/keymaps/default/config.h b/keyboards/handwired/xeal60/keymaps/default/config.h deleted file mode 100644 index 5a6261c4f7cf..000000000000 --- a/keyboards/handwired/xeal60/keymaps/default/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -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, not both */ - -#define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/handwired/xeal60/keymaps/default/keymap.c b/keyboards/handwired/xeal60/keymaps/default/keymap.c deleted file mode 100644 index d770d0c6a8e1..000000000000 --- a/keyboards/handwired/xeal60/keymaps/default/keymap.c +++ /dev/null @@ -1,129 +0,0 @@ -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// 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 _NUMPAD 1 -#define _RAISE 4 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - NUMPAD, - RAISE -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * ,-----------------------------------------------------------. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | - * |-----------------------------------------------------------| - * |FN | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | - * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | NUM | Space | Space |Alt |FN |Menu |Ctrl | - * `-----------------------------------------------------------' - */ - /* Layer 0: Qwerty */ - [_QWERTY] = LAYOUT_split60( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - RAISE, 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, \ - KC_LCTL, KC_LGUI, KC_LALT, NUMPAD, KC_SPC, KC_SPC, KC_RALT, RAISE, KC_MENU, KC_RCTL \ - ), - -/* - * ,-----------------------------------------------------------. - * | | | | | | | | | /| *| -| | | | - * |-----------------------------------------------------------| - * | | | | | | | | 7| 8| 9| +| | | | - * |-----------------------------------------------------------| - * | | | | | | | | 4| 5| 6|Bspc| |Return | - * |-----------------------------------------------------------| - * | | | | | | | | 1| 2| 3| .| | - * |-----------------------------------------------------------| - * | | | | QWE | | 0 | . | | | | - * `-----------------------------------------------------------' - */ - - /* Layer 1: Numpad */ - [_NUMPAD] = LAYOUT_split60( \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_MINUS, _______, _______, KC_BSPC, \ - _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PLUS, _______, _______, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_BSPC, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DOT, _______, \ - _______, _______, _______, QWERTY, KC_SPC, KC_0, KC_DOT, RAISE, _______, _______ \ - ), - -/* - * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | | | ^ | | | | |pUp| ^ |pDn| | | | | - * |-----------------------------------------------------------| - * | | < | v | > | | |Hom| < | v | > | | | | - * |-----------------------------------------------------------| - * | | | | | | |End| | | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | | | - * `-----------------------------------------------------------' - */ - - /* Layer 2: RAISE */ - [_RAISE] = LAYOUT_split60( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ) - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_numpad[][2] = SONG(DVORAK_SOUND); -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case NUMPAD: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_numpad); - #endif - default_layer_set(1UL<<_NUMPAD); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - break; - } - return true; -} diff --git a/keyboards/handwired/xeal60/keymaps/default/rules.mk b/keyboards/handwired/xeal60/keymaps/default/rules.mk deleted file mode 100644 index 457a3d01d4a4..000000000000 --- a/keyboards/handwired/xeal60/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/xeal60/lets_split.c b/keyboards/handwired/xeal60/lets_split.c deleted file mode 100644 index 3caa114c221d..000000000000 --- a/keyboards/handwired/xeal60/lets_split.c +++ /dev/null @@ -1 +0,0 @@ -#include "lets_split.h" diff --git a/keyboards/handwired/xeal60/lets_split.h b/keyboards/handwired/xeal60/lets_split.h deleted file mode 100644 index 0442982fae8a..000000000000 --- a/keyboards/handwired/xeal60/lets_split.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef LETS_SPLIT_H -#define LETS_SPLIT_H - -#include "quantum.h" - -#ifdef KEYBOARD_lets_split_rev1 - #include "rev1.h" -#endif - - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_kc( \ - L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ - L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ - L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \ - L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \ - L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, KC_##R07,\ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, KC_##R17,\ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, KC_##R27,\ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, KC_##R37 \ - ) - -#define LAYOUT_XEAL LAYOUT_kc - -#endif diff --git a/keyboards/handwired/xeal60/matrix.c b/keyboards/handwired/xeal60/matrix.c deleted file mode 100644 index f753d234a19b..000000000000 --- a/keyboards/handwired/xeal60/matrix.c +++ /dev/null @@ -1,470 +0,0 @@ -/* -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 "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" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -#if (DEBOUNCING_DELAY > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 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]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__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) { -} - -__attribute__ ((weak)) -void matrix_slave_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) -{ -#ifdef DISABLE_JTAG - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_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(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#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_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif - matrix_slave_scan_user(); -} - -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(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // 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); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[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 -} - -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 -} - -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 - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -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 - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - 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) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -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 -} - -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 -} - -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 - } -} - -#endif diff --git a/keyboards/handwired/xeal60/readme.md b/keyboards/handwired/xeal60/readme.md deleted file mode 100644 index 80fe08b93c90..000000000000 --- a/keyboards/handwired/xeal60/readme.md +++ /dev/null @@ -1,187 +0,0 @@ -Let's Split -====== - -This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ - -Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 -based boards. - -**Hardware files for the Let's Split are now stored at http://qmk.fm/lets_split/** -**Hardware files for the sockets version can be found at https://github.com/dumle29/let-s-Split-v2/tree/socket-reverseable** - -## Build Guide - -A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) - -There is additional information there about flashing and adding RGB underglow. - -A build guide for putting together the sockets version can be found here: *Guide will be made and linked here when the PCBs have been received and tested* - -## First Time Setup - -Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: - -``` -$ make lets_split/rev2:default -``` - -You will see a lot of output and if everything worked correctly you will see the built hex file: - -``` -lets_split_rev2_default.hex -``` - -If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: - - -``` -$ make lets_split/rev2:YOUR_KEYMAP_NAME -``` - -If everything worked correctly you will see a file: - -``` -lets_split_rev2_YOUR_KEYMAP_NAME.hex -``` - -For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. - -### Let's split 1.0 -If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead. - -Features --------- - -For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). - -Some features supported by the firmware: - -* Either half can connect to the computer via USB, or both halves can be used - independently. -* You only need 3 wires to connect the two halves. Two for VCC and GND and one - for serial communication. -* Optional support for I2C connection between the two halves if for some - reason you require a faster connection between the two halves. Note this - requires an extra wire between halves and pull-up resistors on the data lines. - -Required Hardware ------------------ - -Apart from diodes and key switches for the keyboard matrix in each half, you -will need: - -* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. -* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable - -Alternatively, you can use any sort of cable and socket that has at least 3 -wires. If you want to use I2C to communicate between halves, you will need a -cable with at least 4 wires and 2x 4.7kΩ pull-up resistors - -Optional Hardware ------------------ - -A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. - -Wiring ------- - -The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. -PD0 on the ATmega32u4) between the two Pro Micros. - -Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro -and modify the `matrix.c` accordingly. - -The wiring for serial: - -![serial wiring](https://i.imgur.com/C3D1GAQ.png) - -The wiring for i2c: - -![i2c wiring](https://i.imgur.com/Hbzhc6E.png) - -The pull-up resistors may be placed on either half. It is also possible -to use 4 resistors and have the pull-ups in both halves, but this is -unnecessary in simple use cases. - -You can change your configuration between serial and i2c by modifying your `config.h` file. - -Notes on Software Configuration -------------------------------- - -Configuring the firmware is similar to any other QMK project. One thing -to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between -the two halves, i.e. if your split keyboard has 4 rows in each half, then use -`MATRIX_ROWS=8`. - -Also, the current implementation assumes a maximum of 8 columns, but it would -not be very difficult to adapt it to support more if required. - -Flashing -------- -From the top level `qmk_firmware` directory run `make KEYBOARD:KEYMAP:avrdude` for automatic serial port resolution and flashing. -Example: `make lets_split/rev2:default:avrdude` - - -Choosing which board to plug the USB cable into (choosing Master) --------- -Because the two boards are identical, the firmware has logic to differentiate the left and right board. - -It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. - -The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side. - -The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. - -### Setting the left hand as master -If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. - -### Setting the right hand as master -If you always plug the usb cable into the right board, add an extra flag to your `config.h` -``` - #define MASTER_RIGHT -``` - -### Setting EE_hands to use either hands as master -If you define `EE_HANDS` in your `config.h`, you will need to set the -EEPROM for the left and right halves. - -The EEPROM is used to store whether the -half is left handed or right handed. This makes it so that the same firmware -file will run on both hands instead of having to flash left and right handed -versions of the firmware to each half. To flash the EEPROM file for the left -half run: -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep -// or the equivalent in dfu-programmer - -``` -and similarly for right half -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep -// or the equivalent in dfu-programmer -``` - -NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) - -After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. - -Note that you need to program both halves, but you have the option of using -different keymaps for each half. You could program the left half with a QWERTY -layout and the right half with a Colemak layout using bootmagic's default layout option. -Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the -right half is connected. - - -Notes on Using Pro Micro 3.3V ------------------------------ - -Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects -the frequency on the 3.3V board. - -Also, if the slave board is producing weird characters in certain columns, -update the following line in `matrix.c` to the following: - -``` -// _delay_us(30); // without this wait read unstable value. -_delay_us(300); // without this wait read unstable value. -``` diff --git a/keyboards/handwired/xeal60/rev1/config.h b/keyboards/handwired/xeal60/rev1/config.h deleted file mode 100644 index 504b3fe8c66a..000000000000 --- a/keyboards/handwired/xeal60/rev1/config.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -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 REV1_CONFIG_H -#define REV1_CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4131 -#define PRODUCT_ID 0x5141 -#define DEVICE_VER 0x0001 -#define MANUFACTURER XeaLouS -#define PRODUCT XeaL60 -#define DESCRIPTION A split keyboard - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 10 -#define MATRIX_COLS 8 - -// wiring of each half -//ascii art of pro micro -// PORT -//PD3 TX0 RAW -//PD2 RX1 GND -// GND RESET -// GND VCC -//PD1 2 A3 PF4 -//PD0 3 A2 PF5 -//PD4 4 A1 PF6 -//PC6 5 A0 PF7 -//PD7 6 15 PB1 -//PE6 7 14 PB3 -//PB4 8 13 PB2 -//PB5 9 10 PB6 - -#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 } -#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define 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)) \ -) - -/* - * 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 - -#endif diff --git a/keyboards/handwired/xeal60/rev1/rev1.c b/keyboards/handwired/xeal60/rev1/rev1.c deleted file mode 100644 index c243f71bc4a8..000000000000 --- a/keyboards/handwired/xeal60/rev1/rev1.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "lets_split.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(); -}; - diff --git a/keyboards/handwired/xeal60/rev1/rev1.h b/keyboards/handwired/xeal60/rev1/rev1.h deleted file mode 100644 index 8f25d7d2f2ed..000000000000 --- a/keyboards/handwired/xeal60/rev1/rev1.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef REV1_H -#define REV1_H - -#include "lets_split.h" - -//void promicro_bootloader_jmp(bool program); -#include "quantum.h" - -//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, L17, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16, L17 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44 }, \ - { R00, R01, R02, R03, R04, R05, R06}, \ - { R11, R12, R13, R14, R15, R16 }, \ - { R21, R22, R23, R24, R25, R26 }, \ - { R31, R32, R33, R34, R35, R36 }, \ - { R42, R43, R44, R45, R46 } \ - } - -#define LAYOUT_split60 LAYOUT - -#endif diff --git a/keyboards/handwired/xeal60/rev1/rules.mk b/keyboards/handwired/xeal60/rev1/rules.mk deleted file mode 100644 index f845616741c2..000000000000 --- a/keyboards/handwired/xeal60/rev1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/handwired/xeal60/rules.mk b/keyboards/handwired/xeal60/rules.mk deleted file mode 100644 index 6dde257ece9f..000000000000 --- a/keyboards/handwired/xeal60/rules.mk +++ /dev/null @@ -1,77 +0,0 @@ -SRC += matrix.c \ - split_util.c \ - serial.c \ - ssd1306.c - -# MCU name -#MCU = at90usb1287 -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) - -# 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 -# -BOOTMAGIC_ENABLE = yes # 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 = 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 = 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. -SUBPROJECT_rev1 = yes -USE_I2C = 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 - -CUSTOM_MATRIX = yes - -LAYOUTS = ortho_4x12 - -DEFAULT_FOLDER = lets_split/rev2 diff --git a/keyboards/handwired/xeal60/serial.c b/keyboards/handwired/xeal60/serial.c deleted file mode 100644 index 74bcbb6bf6e2..000000000000 --- a/keyboards/handwired/xeal60/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/handwired/xeal60/serial.h b/keyboards/handwired/xeal60/serial.h deleted file mode 100644 index 15fe4db7b4c6..000000000000 --- a/keyboards/handwired/xeal60/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/handwired/xeal60/split_util.c b/keyboards/handwired/xeal60/split_util.c deleted file mode 100644 index 346cbc908949..000000000000 --- a/keyboards/handwired/xeal60/split_util.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.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_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_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 keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif From d0b691df0ee74863ca54ca697aa4d4212cf401a7 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:03:46 +1100 Subject: [PATCH 011/445] DO NOT USE - debounce successfully compiled. --- common_features.mk | 21 ++++- quantum/debounce.c | 52 ----------- quantum/debounce.h | 25 ++++-- quantum/debounce/debounce_eager_pk.c | 123 +++++++++++++++++++++++++++ quantum/debounce/debounce_sym_g.c | 58 +++++++++++++ quantum/debounce/readme.md | 28 ++++++ quantum/matrix.c | 9 +- 7 files changed, 251 insertions(+), 65 deletions(-) delete mode 100644 quantum/debounce.c create mode 100644 quantum/debounce/debounce_eager_pk.c create mode 100644 quantum/debounce/debounce_sym_g.c create mode 100644 quantum/debounce/readme.md diff --git a/common_features.mk b/common_features.mk index 8c3361732cd0..9b9d017a7bc8 100644 --- a/common_features.mk +++ b/common_features.mk @@ -249,11 +249,15 @@ endif include $(DRIVER_PATH)/qwiic/qwiic.mk + QUANTUM_SRC:= \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c + + + # Include the standard or split matrix code if needed ifneq ($(strip $(CUSTOM_MATRIX)), yes) ifeq ($(strip $(SPLIT_KEYBOARD)), yes) @@ -263,11 +267,22 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif endif -# Include the standard debounce code if needed -ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c +DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce +# Debounce Modules. If implemented in matrix.c, don't use these. +ifeq ($(strip $(DEBOUNCE_ALGO)), manual) + # Do nothing. do your debouncing in matrix.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c +else ifeq ($(strip $(CUSTOM_MATRIX)), yes) + # Do nothing. Custom matrix code. +else # default algorithm + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c endif + + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) OPT_DEFS += -DSPLIT_KEYBOARD diff --git a/quantum/debounce.c b/quantum/debounce.c deleted file mode 100644 index 929023ab2df3..000000000000 --- a/quantum/debounce.c +++ /dev/null @@ -1,52 +0,0 @@ - -#include "matrix.h" -#include "timer.h" -#include "quantum.h" - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -void debounce_init(uint8_t num_rows) { -} - -#if DEBOUNCING_DELAY > 0 - -static bool debouncing = false; - -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - static uint16_t debouncing_time; - - if (changed) { - debouncing = true; - debouncing_time = timer_read(); - } - - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } - debouncing = false; - } -} - -bool debounce_active(void) { - return debouncing; -} - -#else - -// no debounce -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - if (changed) - { - for (uint8_t i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } - } -} - -bool debounce_active(void) { - return false; -} -#endif diff --git a/quantum/debounce.h b/quantum/debounce.h index 360af77e7818..7fe2d693d198 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -1,11 +1,26 @@ #pragma once +/* +Copyright 2017 Alex Ong +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 "matrix.h" + +void debounce_init(void); //every debounce algorithm will have unique storage needs. // raw is the current key state -// on entry cooked is the previous debounced state -// on exit cooked is the current debounced state +// cooked is the debounced input/output key state // changed is true if raw has changed since the last call -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); +void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed); bool debounce_active(void); - -void debounce_init(uint8_t num_rows); \ No newline at end of file diff --git a/quantum/debounce/debounce_eager_pk.c b/quantum/debounce/debounce_eager_pk.c new file mode 100644 index 000000000000..e6e8bfd317df --- /dev/null +++ b/quantum/debounce/debounce_eager_pk.c @@ -0,0 +1,123 @@ +/* +Copyright 2017 Alex Ong +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 . +*/ + +/* +Basic per-key algorithm. Uses an 8-bit counter per key. +After pressing a key, it immediately changes state, and sets a counter. +No further inputs are accepted until DEBOUNCE milliseconds have occurred. +*/ + +#include "debounce.h" +#include "matrix.h" +#include "timer.h" + +#ifndef DEBOUNCE + #define DEBOUNCE 5 +#endif + + +#if (MATRIX_COLS <= 8) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define ROW_SHIFTER ((uint32_t)1) +#endif + + + +#define debounce_counter_t uint8_t + +static matrix_row_t matrix_debounced[MATRIX_ROWS]; +static debounce_counter_t debounce_counters[MATRIX_ROWS*MATRIX_COLS]; + +#define DEBOUNCE_ELAPSED 251 +#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) + +void update_debounce_counters(uint8_t current_time); +void transfer_matrix_values(uint8_t current_time); + +void matrix_debounce_init(void) +{ + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + { + matrix_debounced[r] = 0; + } + + int i = 0; + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + { + for (uint8_t c = 0; c < MATRIX_COLS; c++) + { + debounce_counters[i++] = DEBOUNCE_ELAPSED; + } + } +} + +void matrix_debounce(void) +{ + uint8_t current_time = timer_read() % MAX_DEBOUNCE; + update_debounce_counters(current_time); + transfer_matrix_values(current_time); +} + +//If the current time is > debounce counter, set the counter to enable input. +void update_debounce_counters(uint8_t current_time) +{ + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) + { + for (uint8_t col = 0; col < MATRIX_COLS; col++) + { + if (*debounce_pointer != DEBOUNCE_ELAPSED) + { + if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= + DEBOUNCING_DELAY) { + *debounce_pointer = DEBOUNCE_ELAPSED; + } + } + debounce_pointer++; + } + } +} + +// upload from raw_matrix to final matrix; +void transfer_matrix_values(uint8_t current_time) +{ + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) + { + matrix_row_t existing_row = matrix_debounced[row]; + matrix_row_t raw_row = matrix_get_row(row); + + for (uint8_t col = 0; col < MATRIX_COLS; col++) + { + matrix_row_t col_mask = (ROW_SHIFTER << col); + bool final_value = raw_row & col_mask; + bool existing_value = existing_row & col_mask; + if (*debounce_pointer == DEBOUNCE_ELAPSED && + (existing_value != final_value)) + { + *debounce_pointer = current_time; + existing_row ^= col_mask; //flip the bit. + } + debounce_pointer++; + } + matrix_debounced[row] = existing_row; + } +} + + + +//Implementation of no debounce. diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/debounce_sym_g.c new file mode 100644 index 000000000000..c206f28647a0 --- /dev/null +++ b/quantum/debounce/debounce_sym_g.c @@ -0,0 +1,58 @@ +/* +Copyright 2017 Alex Ong +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 . +*/ + +/* +Basic global debounce algorithm. Used in 99% of keyboards at time of implementation +When no state changes have occured for DEBOUNCE milliseconds, we push the state. +*/ +#include "debounce.h" +#include "matrix.h" +#include "timer.h" +#ifndef DEBOUNCE + #define DEBOUNCE 5 +#endif + +static bool debouncing = false; +static uint16_t debouncing_time; + +void debounce_init(void) {} + +#if DEBOUNCE > 0 +void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) +{ + if (changed) { + debouncing = true; + debouncing_time = timer_read(); + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int i = 0; i < MATRIX_ROWS; i++) { + cooked[i] = raw[i]; + } + debouncing = false; + } +} +#else //no debouncing. +void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) +{ + for (int i = 0; i < MATRIX_ROWS; i++) { + cooked[i] = raw[i]; + } +} +#endif + +bool debounce_active() { + return debouncing; +} + diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md new file mode 100644 index 000000000000..1a77d44df53a --- /dev/null +++ b/quantum/debounce/readme.md @@ -0,0 +1,28 @@ +Debounce algorithms belong in this folder. +Here are a few ideas + +1) Global vs Per-Key vs Per-Row + * Global - one timer for all keys. Any key change state affects global timer + * Per key - one timer per key + * Per row - one timer per row + +2) Eager vs symmetric vs assymetric + * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. + * Symmetric - wait for no changes for DEBOUNCE ms before reporting change + * Assymetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. + +3) Timestamp vs cycles + * old old old code waits n cycles, decreasing count by one each matrix_scan + * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed. + * Timestamps are superior, i don't think cycles will ever be used again once upgraded. + +The default algorithm is symmetric and global. +Here are a few that could be implemented: + +debounce_sym_g.c +debounce_sym_pk.c +debounce_sym_pr.c +debounce_sym_pr_cycles.c //currently used in ergo-dox +debounce_eager_g.c +debounce_eager_pk.c +debounce_eager_pr.c //could be used in ergo-dox! diff --git a/quantum/matrix.c b/quantum/matrix.c index 71292db5118a..8fc4175bde38 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -51,9 +51,8 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; - -static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void); @@ -123,7 +122,7 @@ void matrix_init(void) { raw_matrix[i] = 0; matrix[i] = 0; } - debounce_init(MATRIX_ROWS); + debounce_init(); matrix_init_quantum(); } @@ -144,7 +143,7 @@ uint8_t matrix_scan(void) } #endif - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + debounce(raw_matrix, matrix, changed); matrix_scan_quantum(); return 1; From 123608fb318a42500d64d29aa46c7d08140033fd Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:10:27 +1100 Subject: [PATCH 012/445] DO NOT USE Revert back to original API to support split_keyboards. --- quantum/debounce.h | 4 ++-- quantum/debounce/debounce_sym_g.c | 8 ++++---- quantum/matrix.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/quantum/debounce.h b/quantum/debounce.h index 7fe2d693d198..34b952ee72e7 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -16,11 +16,11 @@ along with this program. If not, see . #include "matrix.h" -void debounce_init(void); //every debounce algorithm will have unique storage needs. +void debounce_init(uint8_t num_rows); //every debounce algorithm will have unique storage needs. // raw is the current key state // cooked is the debounced input/output key state // changed is true if raw has changed since the last call -void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed); +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); bool debounce_active(void); diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/debounce_sym_g.c index c206f28647a0..4a6996c73d43 100644 --- a/quantum/debounce/debounce_sym_g.c +++ b/quantum/debounce/debounce_sym_g.c @@ -26,10 +26,10 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. static bool debouncing = false; static uint16_t debouncing_time; -void debounce_init(void) {} +void debounce_init(uint8_t num_rows) {} #if DEBOUNCE > 0 -void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { if (changed) { debouncing = true; @@ -37,14 +37,14 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) } if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int i = 0; i < MATRIX_ROWS; i++) { + for (int i = 0; i < num_rows; i++) { cooked[i] = raw[i]; } debouncing = false; } } #else //no debouncing. -void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { for (int i = 0; i < MATRIX_ROWS; i++) { cooked[i] = raw[i]; diff --git a/quantum/matrix.c b/quantum/matrix.c index 8fc4175bde38..5b7a0e03b11a 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -122,7 +122,7 @@ void matrix_init(void) { raw_matrix[i] = 0; matrix[i] = 0; } - debounce_init(); + debounce_init(MATRIX_ROWS); matrix_init_quantum(); } @@ -143,7 +143,7 @@ uint8_t matrix_scan(void) } #endif - debounce(raw_matrix, matrix, changed); + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); matrix_scan_quantum(); return 1; From 4d8733591f30a299d6ac99165c834162d2c08fd1 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:29:02 +1100 Subject: [PATCH 013/445] Working eager_pk --- quantum/debounce/debounce_eager_pk.c | 41 ++++++++++++---------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/quantum/debounce/debounce_eager_pk.c b/quantum/debounce/debounce_eager_pk.c index e6e8bfd317df..f1457496e927 100644 --- a/quantum/debounce/debounce_eager_pk.c +++ b/quantum/debounce/debounce_eager_pk.c @@ -39,22 +39,16 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #define debounce_counter_t uint8_t -static matrix_row_t matrix_debounced[MATRIX_ROWS]; static debounce_counter_t debounce_counters[MATRIX_ROWS*MATRIX_COLS]; #define DEBOUNCE_ELAPSED 251 #define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) -void update_debounce_counters(uint8_t current_time); -void transfer_matrix_values(uint8_t current_time); +void update_debounce_counters(uint8_t num_rows, uint8_t current_time); +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); -void matrix_debounce_init(void) +void debounce_init(uint8_t num_rows) { - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - { - matrix_debounced[r] = 0; - } - int i = 0; for (uint8_t r = 0; r < MATRIX_ROWS; r++) { @@ -65,25 +59,24 @@ void matrix_debounce_init(void) } } -void matrix_debounce(void) +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { uint8_t current_time = timer_read() % MAX_DEBOUNCE; - update_debounce_counters(current_time); - transfer_matrix_values(current_time); + update_debounce_counters(num_rows, current_time); + transfer_matrix_values(raw, cooked, num_rows, current_time); } //If the current time is > debounce counter, set the counter to enable input. -void update_debounce_counters(uint8_t current_time) +void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) + for (uint8_t row = 0; row < num_rows; row++) { for (uint8_t col = 0; col < MATRIX_COLS; col++) { if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= - DEBOUNCING_DELAY) { + if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { *debounce_pointer = DEBOUNCE_ELAPSED; } } @@ -93,13 +86,13 @@ void update_debounce_counters(uint8_t current_time) } // upload from raw_matrix to final matrix; -void transfer_matrix_values(uint8_t current_time) +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) + for (uint8_t row = 0; row < num_rows; row++) { - matrix_row_t existing_row = matrix_debounced[row]; - matrix_row_t raw_row = matrix_get_row(row); + matrix_row_t existing_row = cooked[row]; + matrix_row_t raw_row = raw[row]; for (uint8_t col = 0; col < MATRIX_COLS; col++) { @@ -114,10 +107,12 @@ void transfer_matrix_values(uint8_t current_time) } debounce_pointer++; } - matrix_debounced[row] = existing_row; + cooked[row] = existing_row; } } +bool debounce_active() +{ + return true; +} - -//Implementation of no debounce. From 574fc6444bf48d10317c72bc6a5c61f7e46938a3 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:38:52 +1100 Subject: [PATCH 014/445] Whitespace cleanup. --- common_features.mk | 4 ---- docs/feature_debounce_algo.md | 17 +++++++---------- keyboards/handwired/xealous/rules.mk | 2 +- tmk_core/common.mk | 2 +- tmk_core/common/keyboard.c | 6 +++--- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/common_features.mk b/common_features.mk index 9b9d017a7bc8..deb30706addd 100644 --- a/common_features.mk +++ b/common_features.mk @@ -249,15 +249,11 @@ endif include $(DRIVER_PATH)/qwiic/qwiic.mk - QUANTUM_SRC:= \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c - - - # Include the standard or split matrix code if needed ifneq ($(strip $(CUSTOM_MATRIX)), yes) ifeq ($(strip $(SPLIT_KEYBOARD)), yes) diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_algo.md index 2c694cdfbde4..e4489662e3e8 100644 --- a/docs/feature_debounce_algo.md +++ b/docs/feature_debounce_algo.md @@ -7,18 +7,16 @@ The underlying debounce algorithm is determined by which matrix.c file you are u The logic for which debounce method called is below. It checks various defines that you have set in rules.mk ``` -ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - # Do nothing, debouncing is inside matrix.c inside split_common -else ifeq ($(strip $(DEBOUNCE_ALGO)), manual) +ifeq ($(strip $(DEBOUNCE_ALGO)), manual) # Do nothing. do your debouncing in matrix.c else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) - TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c + QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) - TMK_COMMON_SRC += $(DEBOUNCE)/debounce_eager_pk.c + QUANTUM_SRC += $(DEBOUNCE)/debounce_eager_pk.c else ifeq ($(strip $(CUSTOM_MATRIX)), yes) # Do nothing. Custom matrix code. else # default algorithm - TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c + QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c endif ``` @@ -32,11 +30,10 @@ The following is for keyboards where ```SPLIT_KEYBOARD``` is **not** defined as | sym_g / eager_pk | Not defined | You are using the included matrix.c and debounce.c | Nothing. Chosen debounce method used. | | Not defined | YES | You have your own matrix.c, and your own debounce | Write the fully debounced matrix into matrix.c's matrix | | manual | YES | Same as above | same as above | -| sym_g/ eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | +| sym_g / eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | -**Note**: -If ```SPLIT_KEYBOARD = YES``` is defined, the algorithm inside split_common will be used. -A future pull request will fix this to use the debounce.c code. +**Regarding split keyboards**: +The debounce code is compatible with split keyboards. # Use your own debouncing code * Set ```DEBOUNCE_ALGO = manual```. diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 07e1c875e603..37afdaff93fa 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -68,7 +68,7 @@ SUBPROJECT_rev1 = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = no -CUSTOM_DEBOUNCE = yes +DEBOUNCE_ALGO = manual LAYOUTS = split60 diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 335a36cfe762..063115acb1ab 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -1,5 +1,4 @@ COMMON_DIR = common - ifeq ($(PLATFORM),AVR) PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr else ifeq ($(PLATFORM),CHIBIOS) @@ -62,6 +61,7 @@ ifeq ($(PLATFORM),TEST) endif + # Option modules BOOTMAGIC_ENABLE ?= no VALID_MAGIC_TYPES := yes full lite diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index d223001160a7..25be28d02a91 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -163,7 +163,7 @@ bool is_keyboard_master(void) { */ void keyboard_init(void) { timer_init(); - matrix_init(); + matrix_init(); #ifdef QWIIC_ENABLE qwiic_init(); #endif @@ -223,7 +223,7 @@ void keyboard_task(void) uint8_t keys_processed = 0; #endif - matrix_scan(); + matrix_scan(); if (is_keyboard_master()) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { @@ -231,7 +231,7 @@ void keyboard_task(void) matrix_change = matrix_row ^ matrix_prev[r]; if (matrix_change) { #ifdef MATRIX_HAS_GHOST - if (has_ghost_in_row(r, matrix_row)) continue; + if (has_ghost_in_row(r, matrix_row)) { continue; } #endif if (debug_matrix) matrix_print(); for (uint8_t c = 0; c < MATRIX_COLS; c++) { From 5b7fc758d7b0d0ef24bc2861c4b2ba6708fbd367 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:46:27 +1100 Subject: [PATCH 015/445] Restored debounce.h since there wasnt any real change. --- quantum/debounce.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/quantum/debounce.h b/quantum/debounce.h index 34b952ee72e7..8397823ebb97 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -1,26 +1,13 @@ #pragma once -/* -Copyright 2017 Alex Ong -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 "matrix.h" -void debounce_init(uint8_t num_rows); //every debounce algorithm will have unique storage needs. - // raw is the current key state -// cooked is the debounced input/output key state +// on entry cooked is the previous debounced state +// on exit cooked is the current debounced state // changed is true if raw has changed since the last call void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); bool debounce_active(void); + +void debounce_init(uint8_t num_rows); From 14ed96aa064323acb0f8ceecaee3516fb372a56c Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 18:26:49 +1100 Subject: [PATCH 016/445] Moved debouncing_time variable to inside #if debounce --- quantum/debounce/debounce_sym_g.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/debounce_sym_g.c index 4a6996c73d43..e365cdf03772 100644 --- a/quantum/debounce/debounce_sym_g.c +++ b/quantum/debounce/debounce_sym_g.c @@ -23,12 +23,11 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. #define DEBOUNCE 5 #endif -static bool debouncing = false; -static uint16_t debouncing_time; - void debounce_init(uint8_t num_rows) {} +static bool debouncing = false; #if DEBOUNCE > 0 +static uint16_t debouncing_time; void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { if (changed) { From cce8dfab394a643fd6d0250bc8a80a721703a154 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 20:37:47 +1100 Subject: [PATCH 017/445] Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used. --- common_features.mk | 4 +--- docs/feature_debounce_algo.md | 18 ++++++------------ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/common_features.mk b/common_features.mk index deb30706addd..2c86fd31b034 100644 --- a/common_features.mk +++ b/common_features.mk @@ -271,9 +271,7 @@ else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c -else ifeq ($(strip $(CUSTOM_MATRIX)), yes) - # Do nothing. Custom matrix code. -else # default algorithm +else # default algorithm. Won't be used if we have a custom_matrix that doesn't utilize it QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c endif diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_algo.md index e4489662e3e8..c4ef86fc7d22 100644 --- a/docs/feature_debounce_algo.md +++ b/docs/feature_debounce_algo.md @@ -13,24 +13,18 @@ else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) QUANTUM_SRC += $(DEBOUNCE)/debounce_eager_pk.c -else ifeq ($(strip $(CUSTOM_MATRIX)), yes) - # Do nothing. Custom matrix code. else # default algorithm QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c endif ``` # Debounce selection -The following is for keyboards where ```SPLIT_KEYBOARD``` is **not** defined as ```YES``` -| DEBOUNCE_ALGO | CUSTOM_MATRIX | Description | What to do | -| ------------- | -------------| --------------------------------------------------- | ----------------------------- | -| Not defined | Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g used. | -| manual | Not defined | You are using the included matrix.c but your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | -| sym_g / eager_pk | Not defined | You are using the included matrix.c and debounce.c | Nothing. Chosen debounce method used. | -| Not defined | YES | You have your own matrix.c, and your own debounce | Write the fully debounced matrix into matrix.c's matrix | -| manual | YES | Same as above | same as above | -| sym_g / eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | +| DEBOUNCE_ALGO | Description | What to do | +| ------------- | --------------------------------------------------- | ----------------------------- | +| Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g will be compiled, and used if necessary | +| manual | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | +| sym_g / eager_pk | You are using the included matrix.c and debounce.c | Use an alternative debounce algorithm | **Regarding split keyboards**: The debounce code is compatible with split keyboards. @@ -38,7 +32,7 @@ The debounce code is compatible with split keyboards. # Use your own debouncing code * Set ```DEBOUNCE_ALGO = manual```. * Add ```SRC += debounce.c``` -* Add your own ```debounce.c```. Look at included debounce.c's for sample implementations. +* Add your own ```debounce.c```. Look at included ```debounce_sym_g.c```s for sample implementations. * Debouncing occurs after every raw matrix scan. # Changing between included debouncing methods From b5b119544a4e943b3eb56f6a32f350c428f532f7 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sat, 26 Jan 2019 22:44:33 +1100 Subject: [PATCH 018/445] Removed #include "matrix.h" from debounce.h --- quantum/debounce.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/quantum/debounce.h b/quantum/debounce.h index 8397823ebb97..9ca05c6824ad 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -1,7 +1,5 @@ #pragma once -#include "matrix.h" - // raw is the current key state // on entry cooked is the previous debounced state // on exit cooked is the current debounced state From 7cb8d3c7a7fe4de4629af21a92f5415cdfdffa0c Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sat, 26 Jan 2019 22:45:25 +1100 Subject: [PATCH 019/445] Bug fix - was using MATRIX_ROWS instead of num_rows --- quantum/debounce/debounce_sym_g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/debounce_sym_g.c index e365cdf03772..63bf2a64be0b 100644 --- a/quantum/debounce/debounce_sym_g.c +++ b/quantum/debounce/debounce_sym_g.c @@ -45,7 +45,7 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool #else //no debouncing. void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - for (int i = 0; i < MATRIX_ROWS; i++) { + for (int i = 0; i < num_rows; i++) { cooked[i] = raw[i]; } } From 039dde3a519d0626b9dbb2c79373f28b36d29af7 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sat, 26 Jan 2019 22:57:39 +1100 Subject: [PATCH 020/445] Fixed compilation error with debounce_sym_g --- quantum/debounce/debounce_sym_g.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/debounce_sym_g.c index 63bf2a64be0b..c8ab34e1a0ca 100644 --- a/quantum/debounce/debounce_sym_g.c +++ b/quantum/debounce/debounce_sym_g.c @@ -16,9 +16,9 @@ along with this program. If not, see . Basic global debounce algorithm. Used in 99% of keyboards at time of implementation When no state changes have occured for DEBOUNCE milliseconds, we push the state. */ -#include "debounce.h" #include "matrix.h" #include "timer.h" +#include "quantum.h" #ifndef DEBOUNCE #define DEBOUNCE 5 #endif @@ -51,7 +51,7 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool } #endif -bool debounce_active() { +bool debounce_active(void) { return debouncing; } From d30d5eeb27b7dc66ef18e65dc150cf76121a7148 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sat, 26 Jan 2019 23:01:07 +1100 Subject: [PATCH 021/445] Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE --- common_features.mk | 6 +++--- keyboards/handwired/xealous/rules.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common_features.mk b/common_features.mk index 2c86fd31b034..8e2747d5a4e0 100644 --- a/common_features.mk +++ b/common_features.mk @@ -265,11 +265,11 @@ endif DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. If implemented in matrix.c, don't use these. -ifeq ($(strip $(DEBOUNCE_ALGO)), manual) +ifeq ($(strip $(DEBOUNCE_TYPE)), custom) # Do nothing. do your debouncing in matrix.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) +else ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) +else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c else # default algorithm. Won't be used if we have a custom_matrix that doesn't utilize it QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 37afdaff93fa..7d07c9aa5ff3 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -68,7 +68,7 @@ SUBPROJECT_rev1 = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = no -DEBOUNCE_ALGO = manual +DEBOUNCE_TYPE = custom LAYOUTS = split60 From 10cc4235155d0a039faf2dc5c2b1ebe513952c3c Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 23:18:24 +1100 Subject: [PATCH 022/445] Malloc array in debounce_eager_pk, since split keyboards only use MATRIX_ROWS/2. --- quantum/debounce/debounce_eager_pk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quantum/debounce/debounce_eager_pk.c b/quantum/debounce/debounce_eager_pk.c index f1457496e927..af11362efc91 100644 --- a/quantum/debounce/debounce_eager_pk.c +++ b/quantum/debounce/debounce_eager_pk.c @@ -21,6 +21,7 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #include "debounce.h" #include "matrix.h" #include "timer.h" +#include #ifndef DEBOUNCE #define DEBOUNCE 5 @@ -39,7 +40,7 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #define debounce_counter_t uint8_t -static debounce_counter_t debounce_counters[MATRIX_ROWS*MATRIX_COLS]; +static debounce_counter_t *debounce_counters; #define DEBOUNCE_ELAPSED 251 #define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) @@ -47,10 +48,12 @@ static debounce_counter_t debounce_counters[MATRIX_ROWS*MATRIX_COLS]; void update_debounce_counters(uint8_t num_rows, uint8_t current_time); void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); +//we use num_rows rather than MATRIX_ROWS to support split keyboards void debounce_init(uint8_t num_rows) { + debounce_counters = (debounce_counter_t*)malloc(num_rows*MATRIX_COLS * sizeof(debounce_counter_t)); int i = 0; - for (uint8_t r = 0; r < MATRIX_ROWS; r++) + for (uint8_t r = 0; r < num_rows; r++) { for (uint8_t c = 0; c < MATRIX_COLS; c++) { From 562c0d702a326488d79963969ef71f2a52664cdc Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sun, 27 Jan 2019 00:10:14 +1100 Subject: [PATCH 023/445] Fix compile error in debounce_eager_pk --- quantum/debounce/debounce_eager_pk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/debounce/debounce_eager_pk.c b/quantum/debounce/debounce_eager_pk.c index af11362efc91..b8ad09cee30e 100644 --- a/quantum/debounce/debounce_eager_pk.c +++ b/quantum/debounce/debounce_eager_pk.c @@ -18,9 +18,9 @@ After pressing a key, it immediately changes state, and sets a counter. No further inputs are accepted until DEBOUNCE milliseconds have occurred. */ -#include "debounce.h" #include "matrix.h" #include "timer.h" +#include "quantum.h" #include #ifndef DEBOUNCE @@ -114,7 +114,7 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n } } -bool debounce_active() +bool debounce_active(void) { return true; } From 7d8c62993921383a35f9cd172fe0a1d2e893b2f3 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sun, 27 Jan 2019 07:23:15 +1100 Subject: [PATCH 024/445] Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk --- common_features.mk | 11 +++++----- ...ounce_algo.md => feature_debounce_type.md} | 22 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) rename docs/{feature_debounce_algo.md => feature_debounce_type.md} (74%) diff --git a/common_features.mk b/common_features.mk index 8e2747d5a4e0..d03dbed09b0c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -265,14 +265,15 @@ endif DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. If implemented in matrix.c, don't use these. -ifeq ($(strip $(DEBOUNCE_TYPE)), custom) - # Do nothing. do your debouncing in matrix.c -else ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) +DEBOUNCE_TYPE?= sym_g +VALID_DEBOUNCE_TYPES := sym_g eager_pk custom +ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),) + $(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm) +endif +ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c -else # default algorithm. Won't be used if we have a custom_matrix that doesn't utilize it - QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c endif diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_type.md similarity index 74% rename from docs/feature_debounce_algo.md rename to docs/feature_debounce_type.md index c4ef86fc7d22..82b3d7de1237 100644 --- a/docs/feature_debounce_algo.md +++ b/docs/feature_debounce_type.md @@ -7,14 +7,15 @@ The underlying debounce algorithm is determined by which matrix.c file you are u The logic for which debounce method called is below. It checks various defines that you have set in rules.mk ``` -ifeq ($(strip $(DEBOUNCE_ALGO)), manual) - # Do nothing. do your debouncing in matrix.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) - QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) - QUANTUM_SRC += $(DEBOUNCE)/debounce_eager_pk.c -else # default algorithm - QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c +DEBOUNCE_TYPE?= sym_g +VALID_DEBOUNCE_TYPES := sym_g eager_pk custom +ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),) + $(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm) +endif +ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c +else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c endif ``` @@ -23,17 +24,18 @@ endif | DEBOUNCE_ALGO | Description | What to do | | ------------- | --------------------------------------------------- | ----------------------------- | | Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g will be compiled, and used if necessary | -| manual | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | +| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | | sym_g / eager_pk | You are using the included matrix.c and debounce.c | Use an alternative debounce algorithm | **Regarding split keyboards**: The debounce code is compatible with split keyboards. # Use your own debouncing code -* Set ```DEBOUNCE_ALGO = manual```. +* Set ```DEBOUNCE_TYPE = custom ```. * Add ```SRC += debounce.c``` * Add your own ```debounce.c```. Look at included ```debounce_sym_g.c```s for sample implementations. * Debouncing occurs after every raw matrix scan. +* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly. # Changing between included debouncing methods You can either use your own code, by including your own debounce.c, or switch to another included one. From 941f8678a472823bb771ef918f60378d6193ecae Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 8 Feb 2019 16:20:38 -0500 Subject: [PATCH 025/445] Add support for Quefrency left half with 2x5 macro section (#5051) --- .../quefrency/keymaps/default65macro/config.h | 24 ++++++++++ .../quefrency/keymaps/default65macro/keymap.c | 35 +++++++++++++++ keyboards/quefrency/rev1/rev1.h | 45 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 keyboards/quefrency/keymaps/default65macro/config.h create mode 100644 keyboards/quefrency/keymaps/default65macro/keymap.c diff --git a/keyboards/quefrency/keymaps/default65macro/config.h b/keyboards/quefrency/keymaps/default65macro/config.h new file mode 100644 index 000000000000..53bf8fb933da --- /dev/null +++ b/keyboards/quefrency/keymaps/default65macro/config.h @@ -0,0 +1,24 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 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 + +// #define USE_I2C diff --git a/keyboards/quefrency/keymaps/default65macro/keymap.c b/keyboards/quefrency/keymaps/default65macro/keymap.c new file mode 100644 index 000000000000..c7ac46ea5ad6 --- /dev/null +++ b/keyboards/quefrency/keymaps/default65macro/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_65_with_macro( + KC_F1, KC_F2, 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_DEL, KC_BSPC, KC_HOME, \ + 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_LALT, KC_LGUI, MO(_FN1),KC_SPC, MO(_FN1),KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_65_with_macro( + _______, _______, KC_GESC, 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_BSPC, _______, \ + _______, _______, RGB_TOG, RGB_MOD, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/quefrency/rev1/rev1.h b/keyboards/quefrency/rev1/rev1.h index c7dcaa9fe345..137aa41c2f72 100644 --- a/keyboards/quefrency/rev1/rev1.h +++ b/keyboards/quefrency/rev1/rev1.h @@ -56,3 +56,48 @@ { RE1, RE2, RE9, RE4, RE5, RE6, RE7, RE8 }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RA9, RB9 } \ } + +#define LAYOUT_60_with_macro( \ + LA9, LA8, LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB9, LB8, LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \ + LC9, LC8, LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \ + LD9, LD8, LD1, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD6, RD7, RD8, \ + LE9, LE8, LE1, LE2, LE3, LE5, LE7, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB9, LB8 }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC9, LC8 }, \ + { LD1, LD9, LD3, LD4, LD5, LD6, LD7, LD8 }, \ + { LE1, LE2, LE3, LA9, LE5, LE9, LE7, LE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8 }, \ + { RD1, RD2, RD3, RD4, KC_NO, RD6, RD7, RD8 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } + + +#define LAYOUT_65_with_macro( \ + LA9, LA8, LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB9, LB8, LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC9, LC8, LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD9, LD8, LD1, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD6, RD7, RD8, RD9, \ + LE9, LE8, LE1, LE2, LE3, LE5, LE7, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB9, LB8 }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC9, LC8 }, \ + { LD1, LD9, LD3, LD4, LD5, LD6, LD7, LD8 }, \ + { LE1, LE2, LE3, LA9, LE5, LE9, LE7, LE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC9, RC8 }, \ + { RD1, RD2, RD3, RD4, RD9, RD6, RD7, RD8 }, \ + { RE1, RE2, RE9, RE4, RE5, RE6, RE7, RE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RA9, RB9 } \ + } From c3e0ef4d8aa34aff7baac402d474468342678f2a Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 12 Jan 2019 11:52:49 -0800 Subject: [PATCH 026/445] Update the keyboard guidelines --- docs/hardware_keyboard_guidelines.md | 80 ++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 67af78838a11..acd23fe51f2f 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -1,15 +1,89 @@ # QMK Keyboard Guidelines -We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent. +Since starting QMK has grown by leaps and bounds, and it's thanks to people like you contributing to and maintaining our community keyboards. As we have grown we have discovered some patterns that work well, and ask that you conform to them to make it easier for other people to make use of your hard work. ## Naming Your Keyboard/Project -All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. `test`, `keyboard`, and `all` are reserved by make and are not a valid name for a keyboard. +All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. The names `test`, `keyboard`, and `all` are reserved for make commands and may not be used as a keyboard or subfolder name. -## `readme.md` +Valid Examples: + +* `412_64` +* `chimera_ortho` +* `clueboard/66/rev3` +* `planck` +* `v60_type_r` + +## Sub-folders + +QMK uses sub-folders both for organization and to share code between revisions of the same keyboard. You can nest folders up to 4 levels deep: + + qmk_firmware/keyboards/top_folder/sub_1/sub_2/sub_3/sub_4 + +If a sub-folder has a `rules.mk` file it will be considered a compilable keyboard. It will be available in QMK Configurator and tested with `make all`. If you are using a folder to organize several keyboards from the same maker you should not have a `rules.mk` file. + +Example: + +Clueboard uses sub-folders for both purposes, organization and keyboard revisions. + +* [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master) + * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) + * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) <-- this is the organization folder, no `rules.mk` file + * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) <-- this is a compilable keyboard, it has a `rules.mk` file. + * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) <-- this is also compilable, it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision + * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) <-- compilable, `make clueboard/66/rev1` + * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) <-- compilable, `make clueboard/66/rev2` + * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) <-- compilable, `make clueboard/66/rev3` and `make clueboard/66` + +## Keyboard Folder Structure + +Your keyboard should be located in `qmk_firmware/keyboards/` and the directory name should be your keyboard's name as described in the previous section. Inside this directory should be several files: + +* `readme.md` +* `config.h` +* `rules.mk` +* `.c` +* `.h` + +### `readme.md` All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template). +### `config.h` + +All projects need to have a `config.h` file to set things like the processor type, bootloader, USB VID/PID, and other default settings. In general you should use this file to set reasonable defaults for your keyboard that will always work. + +### `rules.mk` + +The prescence of this file means this folder is a keyboard target, and can be used in make commands. This is where you setup the build environment for your keyboard and configure the default set of features. You should turn on only those features you have a need for and leave the rest turned off, users can enable them in their keymap `rules.mk`. + +### `` + +This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxillary hardware this file can be blank. + +The following functions are typically defined in this file: + +* `void matrix_init_kb(void)` +* `void matrix_scan_kb(void)` +* `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` +* `void led_set_kb(uint8_t usb_led)` + +### `` + +This file is used to define the matrix for your keyboard. You should define at least one CPP macro named `LAYOUT` which translates an array into a matrix representing your switch matrix. If it's possible to build your keyboard with multiple layouts you may define additional macros. + +When defining multiple layouts you should have a base layout, named `LAYOUT`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default-` that use your other layout macros. This will make it easier for people to use the layouts you define. + +Layout macro names are entirely lowercase, except for the word `LAYOUT` at the front. + +As an example, if you have a 60% PCB that supports ANSI and ISO you might define the following layouts and keymaps: + +| Layout Name | Keymap Name | Description | +|-------------|-------------|-------------| +| LAYOUT | default | A keymap that supports both ISO and ANSI | +| LAYOUT_ansi | default-ansi | An ANSI layout | +| LAYOUT_iso | default-iso | An ISO layout | + ## Image/Hardware Files In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the `readme.md` is the preferred method. From 154e1d99c398e343a6b23081e7a4ccb6e2073a8d Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 12 Jan 2019 12:08:49 -0800 Subject: [PATCH 027/445] tweak the keyboard guidelines --- docs/hardware_keyboard_guidelines.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index acd23fe51f2f..2da4ddece90b 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -1,10 +1,12 @@ # QMK Keyboard Guidelines -Since starting QMK has grown by leaps and bounds, and it's thanks to people like you contributing to and maintaining our community keyboards. As we have grown we have discovered some patterns that work well, and ask that you conform to them to make it easier for other people to make use of your hard work. +Since starting QMK has grown by leaps and bounds thanks to people like you who contributed to creating and maintaining our community keyboards. As we have grown we have discovered some patterns that work well, and ask that you conform to them to make it easier for other people to make use of your hard work. ## Naming Your Keyboard/Project -All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. The names `test`, `keyboard`, and `all` are reserved for make commands and may not be used as a keyboard or subfolder name. +All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. Forward slash (`/`) is used as a sub-folder separation character. + +The names `test`, `keyboard`, and `all` are reserved for make commands and may not be used as a keyboard or subfolder name. Valid Examples: @@ -55,7 +57,7 @@ All projects need to have a `config.h` file to set things like the processor typ ### `rules.mk` -The prescence of this file means this folder is a keyboard target, and can be used in make commands. This is where you setup the build environment for your keyboard and configure the default set of features. You should turn on only those features you have a need for and leave the rest turned off, users can enable them in their keymap `rules.mk`. +The prescence of this file means this folder is a keyboard target, and can be used in make commands. This is where you setup the build environment for your keyboard and configure the default set of features. ### `` @@ -86,7 +88,7 @@ As an example, if you have a 60% PCB that supports ANSI and ISO you might define ## Image/Hardware Files -In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the `readme.md` is the preferred method. +In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (such as ) and linking them in the `readme.md` is the preferred method. Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. From 81a5e4d718e0cac0178cc4a4ef92fc7fe7757835 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 14 Jan 2019 09:03:27 -0800 Subject: [PATCH 028/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 2da4ddece90b..b0678cf8ebf1 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -1,6 +1,6 @@ # QMK Keyboard Guidelines -Since starting QMK has grown by leaps and bounds thanks to people like you who contributed to creating and maintaining our community keyboards. As we have grown we have discovered some patterns that work well, and ask that you conform to them to make it easier for other people to make use of your hard work. +Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we have grown we have discovered some patterns that work well, and ask that you conform to them to make it easier for other people to make use of your hard work. ## Naming Your Keyboard/Project From 7e446183259c6537e79b9bb9101bb7c30494653b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:32:53 -0800 Subject: [PATCH 029/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index b0678cf8ebf1..21f3c695d90e 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -49,7 +49,7 @@ Your keyboard should be located in `qmk_firmware/keyboards/` and the directory n ### `readme.md` -All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template). +All projects need to have a `readme.md` file that explains what the keyboard is, who made it and where it's available. If applicable, it should also contain links to more information, such as the maker's website. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template). ### `config.h` From 9f2f9b53336389b3af0b4b1a61e5c2b4f3360619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:34:24 -0800 Subject: [PATCH 030/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 21f3c695d90e..c00a30664c5b 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -53,7 +53,7 @@ All projects need to have a `readme.md` file that explains what the keyboard is, ### `config.h` -All projects need to have a `config.h` file to set things like the processor type, bootloader, USB VID/PID, and other default settings. In general you should use this file to set reasonable defaults for your keyboard that will always work. +All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work. ### `rules.mk` From 096b480e3d398ec4406fbf85bc9e002c71f50eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:42:35 -0800 Subject: [PATCH 031/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index c00a30664c5b..978a1581a6d0 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -88,7 +88,7 @@ As an example, if you have a 60% PCB that supports ANSI and ISO you might define ## Image/Hardware Files -In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (such as ) and linking them in the `readme.md` is the preferred method. +In an effort to keep the repo size down we're no longer accepting binary files of any format, with few exceptions. Hosting them elsewhere (such as ) and linking them in the `readme.md` is preferred. Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. From a47860e7e3cdb214bdd9b036b9c9ec151d83d081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:46:29 -0800 Subject: [PATCH 032/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 978a1581a6d0..e0bf95cb740e 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -30,7 +30,7 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master) * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) - * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) <-- this is the organization folder, no `rules.mk` file + * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization directory, there's no `rules.mk` file. * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) <-- this is a compilable keyboard, it has a `rules.mk` file. * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) <-- this is also compilable, it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) <-- compilable, `make clueboard/66/rev1` From b577b3b461f4be9d41ed56320d5cfc9205f54d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:47:13 -0800 Subject: [PATCH 033/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index e0bf95cb740e..9c4eae154c75 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -31,7 +31,7 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master) * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization directory, there's no `rules.mk` file. - * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) <-- this is a compilable keyboard, it has a `rules.mk` file. + * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file. * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) <-- this is also compilable, it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) <-- compilable, `make clueboard/66/rev1` * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) <-- compilable, `make clueboard/66/rev2` From 59bf9127f2b50b79a239ab176d0b1d4cd2698ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:50:08 -0800 Subject: [PATCH 034/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 9c4eae154c75..0026bc12b412 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -32,7 +32,7 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization directory, there's no `rules.mk` file. * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file. - * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) <-- this is also compilable, it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision + * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision. * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) <-- compilable, `make clueboard/66/rev1` * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) <-- compilable, `make clueboard/66/rev2` * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) <-- compilable, `make clueboard/66/rev3` and `make clueboard/66` From bd9be8af4a9de3ae50e7bdda89e69346235a3b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:52:39 -0800 Subject: [PATCH 035/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 0026bc12b412..d6ebeadb44a7 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -33,7 +33,7 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization directory, there's no `rules.mk` file. * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file. * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision. - * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) <-- compilable, `make clueboard/66/rev1` + * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1` * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) <-- compilable, `make clueboard/66/rev2` * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) <-- compilable, `make clueboard/66/rev3` and `make clueboard/66` From 5fdb398e0a3f7a6f8d6555e7dceaea4ac71f334c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:53:29 -0800 Subject: [PATCH 036/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index d6ebeadb44a7..d51396cd0043 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -34,7 +34,7 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file. * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision. * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1` - * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) <-- compilable, `make clueboard/66/rev2` + * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2` * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) <-- compilable, `make clueboard/66/rev3` and `make clueboard/66` ## Keyboard Folder Structure From a5f158131638f1a68f7eaffba7aa2803944afa75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:54:01 -0800 Subject: [PATCH 037/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index d51396cd0043..6d037819190b 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -35,7 +35,7 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision. * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1` * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2` - * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) <-- compilable, `make clueboard/66/rev3` and `make clueboard/66` + * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← compilable: `make clueboard/66/rev3` or `make clueboard/66` ## Keyboard Folder Structure From a45b625b6253c30a573f29684829b6200c12b8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 09:56:26 -0800 Subject: [PATCH 038/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 6d037819190b..6b996ecf62a5 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -57,7 +57,7 @@ All projects need to have a `config.h` file that sets things like the matrix siz ### `rules.mk` -The prescence of this file means this folder is a keyboard target, and can be used in make commands. This is where you setup the build environment for your keyboard and configure the default set of features. +The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features. ### `` From 24b7d058e2e456dc4ec9cd1e640374b033b57223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 10:00:03 -0800 Subject: [PATCH 039/445] Update docs/hardware_keyboard_guidelines.md Co-Authored-By: skullydazed --- docs/hardware_keyboard_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 6b996ecf62a5..e6be7aeced77 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -72,7 +72,7 @@ The following functions are typically defined in this file: ### `` -This file is used to define the matrix for your keyboard. You should define at least one CPP macro named `LAYOUT` which translates an array into a matrix representing your switch matrix. If it's possible to build your keyboard with multiple layouts you may define additional macros. +This file is used to define the matrix for your keyboard. You should define at least one C macro named `LAYOUT` which translates an array into a matrix representing the physical switch matrix for your keyboard. If it's possible to build your keyboard with multiple layouts you may define additional macros. When defining multiple layouts you should have a base layout, named `LAYOUT`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default-` that use your other layout macros. This will make it easier for people to use the layouts you define. From 330e2e6af532bc1531be78f3aedd3479b0573421 Mon Sep 17 00:00:00 2001 From: skullY Date: Mon, 14 Jan 2019 10:38:22 -0800 Subject: [PATCH 040/445] Address comments in #4832. Move info.json reference to its own file. --- docs/_summary.md | 1 + docs/hardware_keyboard_guidelines.md | 97 +++++----------------------- docs/reference_info_json.md | 70 ++++++++++++++++++++ 3 files changed, 87 insertions(+), 81 deletions(-) create mode 100644 docs/reference_info_json.md diff --git a/docs/_summary.md b/docs/_summary.md index c467a7231aa5..6bc747189663 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -40,6 +40,7 @@ * [Unit Testing](unit_testing.md) * [Useful Functions](ref_functions.md) * [Configurator Support](reference_configurator_support.md) + * [info.json Format](reference_info_json.md) * [Features](features.md) * [Basic Keycodes](keycodes_basic.md) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index e6be7aeced77..3a74e5f5c889 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -1,6 +1,7 @@ # QMK Keyboard Guidelines -Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we have grown we have discovered some patterns that work well, and ask that you conform to them to make it easier for other people to make use of your hard work. +Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we've grown we've discovered some patterns that work well, and ask that you conform to them to make it easier for other people to benefit from your hard work. + ## Naming Your Keyboard/Project @@ -30,18 +31,19 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision * [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master) * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) - * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization directory, there's no `rules.mk` file. - * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file. - * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision. + * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization folder, there's no `rules.mk` file + * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file + * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1` * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2` * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← compilable: `make clueboard/66/rev3` or `make clueboard/66` ## Keyboard Folder Structure -Your keyboard should be located in `qmk_firmware/keyboards/` and the directory name should be your keyboard's name as described in the previous section. Inside this directory should be several files: +Your keyboard should be located in `qmk_firmware/keyboards/` and the folder name should be your keyboard's name as described in the previous section. Inside this folder should be several files: * `readme.md` +* `info.json` * `config.h` * `rules.mk` * `.c` @@ -51,6 +53,10 @@ Your keyboard should be located in `qmk_firmware/keyboards/` and the directory n All projects need to have a `readme.md` file that explains what the keyboard is, who made it and where it's available. If applicable, it should also contain links to more information, such as the maker's website. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template). +### `info.json` + +This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains the information [QMK Configurator](https://config.qmk.fm/) needs to display a representation of your keyboard. You can also set metadata here. For more information see the [reference page](reference_info_json.md). + ### `config.h` All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work. @@ -74,7 +80,7 @@ The following functions are typically defined in this file: This file is used to define the matrix for your keyboard. You should define at least one C macro named `LAYOUT` which translates an array into a matrix representing the physical switch matrix for your keyboard. If it's possible to build your keyboard with multiple layouts you may define additional macros. -When defining multiple layouts you should have a base layout, named `LAYOUT`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default-` that use your other layout macros. This will make it easier for people to use the layouts you define. +When defining multiple layouts you should have a base layout, named `LAYOUT`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default_` that use your other layout macros. This will make it easier for people to use the layouts you define. Layout macro names are entirely lowercase, except for the word `LAYOUT` at the front. @@ -82,15 +88,15 @@ As an example, if you have a 60% PCB that supports ANSI and ISO you might define | Layout Name | Keymap Name | Description | |-------------|-------------|-------------| -| LAYOUT | default | A keymap that supports both ISO and ANSI | -| LAYOUT_ansi | default-ansi | An ANSI layout | -| LAYOUT_iso | default-iso | An ISO layout | +| LAYOUT | default | A layout that supports both ISO and ANSI | +| LAYOUT_ansi | default_ansi | An ANSI layout | +| LAYOUT_iso | default_iso | An ISO layout | ## Image/Hardware Files In an effort to keep the repo size down we're no longer accepting binary files of any format, with few exceptions. Hosting them elsewhere (such as ) and linking them in the `readme.md` is preferred. -Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. +Hardware files (such as plates, cases, pcb) can be contributed to the [qmk.fm repo](https://github.com/qmk/qmk.fm) and they will be made available on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` folder for an example. ## Keyboard Defaults @@ -108,77 +114,6 @@ If your keyboard does not have 2 shift keys you should provide a working default As documented on [Customizing Functionality](custom_quantum_functions.md) you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`. -## Keyboard Metadata - -As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK. - -You can create `info.json` files at every level under `qmk_firmware/keyboards/` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%. - -### `info.json` Format - -The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard. - -* `keyboard_name` - * A free-form text string describing the keyboard. - * Example: `Clueboard 66%` -* `url` - * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. -* `maintainer` - * GitHub username of the maintainer, or `qmk` for community maintained boards -* `width` - * Width of the board in Key Units -* `height` - * Height of the board in Key Units -* `layouts` - * Physical Layout representations. See the next section for more detail. - -#### Layout Format - -Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. Within each layout macro are keys for `width`, `height`, and `key_count`, each of which should be self-explanatory. - -* `width` - * Optional: The width of the layout in Key Units -* `height` - * Optional: The height of the layout in Key Units -* `key_count` - * **Required**: The number of keys in this layout -* `layout` - * A list of Key Dictionaries describing the physical layout. See the next section for more details. - -#### Key Dictionary Format - -Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it. - -All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key. - -* `X` - * **Required**: The absolute position of the key in the horizontal axis, in Key Units. -* `Y` - * **Required**: The absolute position of the key in the vertical axis, in Key Units. -* `W` - * The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1` -* `H` - * The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1` -* `R` - * How many degrees clockwise to rotate the key. -* `RX` - * The absolute position of the point to rotate the key around in the horizontal axis. Default: `x` -* `RY` - * The absolute position of the point to rotate the key around in the vertical axis. Default: `y` -* `KS` - * Key Shape: define a polygon by providing a list of points, in Key Units. - * **Important**: These are relative to the top-left of the key, not absolute. - * Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` - -### How is the Metadata Exposed? - -This metadata is primarily used in two ways: - -* To allow web-based configurators to dynamically generate UI -* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter. - -Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API. - ## Non-Production/Handwired Projects We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder! diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md new file mode 100644 index 000000000000..8f903a2e0ed9 --- /dev/null +++ b/docs/reference_info_json.md @@ -0,0 +1,70 @@ +# `info.json` + +This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains the information [QMK Configurator](https://config.qmk.fm/) needs to display a representation of your keyboard. You can also set metadata here. + +You can create `info.json` files at every level under `qmk_firmware/keyboards/` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%. + +## `info.json` Format + +The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard. + +* `keyboard_name` + * A free-form text string describing the keyboard. + * Example: `Clueboard 66%` +* `url` + * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. +* `maintainer` + * GitHub username of the maintainer, or `qmk` for community maintained boards +* `width` + * Width of the board in Key Units +* `height` + * Height of the board in Key Units +* `layouts` + * Physical Layout representations. See the next section for more detail. + +### Layout Format + +Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. Within each layout macro are keys for `width`, `height`, and `key_count`, each of which should be self-explanatory. + +* `width` + * Optional: The width of the layout in Key Units +* `height` + * Optional: The height of the layout in Key Units +* `key_count` + * **Required**: The number of keys in this layout +* `layout` + * A list of Key Dictionaries describing the physical layout. See the next section for more details. + +### Key Dictionary Format + +Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it. + +All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key. + +* `X` + * **Required**: The absolute position of the key in the horizontal axis, in Key Units. +* `Y` + * **Required**: The absolute position of the key in the vertical axis, in Key Units. +* `W` + * The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1` +* `H` + * The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1` +* `R` + * How many degrees clockwise to rotate the key. +* `RX` + * The absolute position of the point to rotate the key around in the horizontal axis. Default: `x` +* `RY` + * The absolute position of the point to rotate the key around in the vertical axis. Default: `y` +* `KS` + * Key Shape: define a polygon by providing a list of points, in Key Units. + * **Important**: These are relative to the top-left of the key, not absolute. + * Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` + +## How is the Metadata Exposed? + +This metadata is primarily used in two ways: + +* To allow web-based configurators to dynamically generate UI +* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter. + +Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API. From aeee735f3572d266a356926852838d4573369796 Mon Sep 17 00:00:00 2001 From: skullY Date: Mon, 14 Jan 2019 13:56:48 -0800 Subject: [PATCH 041/445] Clarify LAYOUT vs LAYOUT_all --- docs/hardware_keyboard_guidelines.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 3a74e5f5c889..c8aec40e072f 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -78,9 +78,11 @@ The following functions are typically defined in this file: ### `` -This file is used to define the matrix for your keyboard. You should define at least one C macro named `LAYOUT` which translates an array into a matrix representing the physical switch matrix for your keyboard. If it's possible to build your keyboard with multiple layouts you may define additional macros. +This file is used to define the matrix for your keyboard. You should define at least one C macro which translates an array into a matrix representing the physical switch matrix for your keyboard. If it's possible to build your keyboard with multiple layouts you should define additional macros. -When defining multiple layouts you should have a base layout, named `LAYOUT`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default_` that use your other layout macros. This will make it easier for people to use the layouts you define. +If you have only a single layout you should call this macro `LAYOUT`. + +When defining multiple layouts you should have a base layout, named `LAYOUT_all`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default_` that use your other layout macros. This will make it easier for people to use the layouts you define. Layout macro names are entirely lowercase, except for the word `LAYOUT` at the front. @@ -88,7 +90,7 @@ As an example, if you have a 60% PCB that supports ANSI and ISO you might define | Layout Name | Keymap Name | Description | |-------------|-------------|-------------| -| LAYOUT | default | A layout that supports both ISO and ANSI | +| LAYOUT_all | default | A layout that supports both ISO and ANSI | | LAYOUT_ansi | default_ansi | An ANSI layout | | LAYOUT_iso | default_iso | An ISO layout | From c6183ab4fc0fdcb732958c0c4a76e1dc2069d804 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 14 Jan 2019 14:30:22 -0800 Subject: [PATCH 042/445] Update docs/reference_info_json.md Co-Authored-By: skullydazed --- docs/reference_info_json.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 8f903a2e0ed9..829ea2124dfa 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -67,4 +67,4 @@ This metadata is primarily used in two ways: * To allow web-based configurators to dynamically generate UI * To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter. -Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API. +Configurator authors can see the [QMK Compiler](https://docs.api.qmk.fm/using-the-api) docs for more information on using the JSON API. From 83f74dd94c805dc255aa9f9b8643342edb462f02 Mon Sep 17 00:00:00 2001 From: skullY Date: Mon, 14 Jan 2019 14:29:54 -0800 Subject: [PATCH 043/445] fix the case for some elements --- docs/reference_info_json.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 829ea2124dfa..444807f841aa 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -41,21 +41,21 @@ Each Key Dictionary in a layout describes the physical properties of a key. If y All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key. -* `X` +* `x` * **Required**: The absolute position of the key in the horizontal axis, in Key Units. -* `Y` +* `y` * **Required**: The absolute position of the key in the vertical axis, in Key Units. -* `W` +* `w` * The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1` -* `H` +* `h` * The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1` -* `R` +* `r` * How many degrees clockwise to rotate the key. -* `RX` +* `rx` * The absolute position of the point to rotate the key around in the horizontal axis. Default: `x` -* `RY` +* `ry` * The absolute position of the point to rotate the key around in the vertical axis. Default: `y` -* `KS` +* `ks` * Key Shape: define a polygon by providing a list of points, in Key Units. * **Important**: These are relative to the top-left of the key, not absolute. * Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` From bcb18154206332c85e500ef65bffa98be6ac1cb7 Mon Sep 17 00:00:00 2001 From: skullY Date: Mon, 14 Jan 2019 14:34:24 -0800 Subject: [PATCH 044/445] Add label to the info.json reference --- docs/reference_info_json.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 444807f841aa..badfabd9120d 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -59,6 +59,9 @@ All key positions and rotations are specified in relation to the top-left corner * Key Shape: define a polygon by providing a list of points, in Key Units. * **Important**: These are relative to the top-left of the key, not absolute. * Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` +* `label` + * What to name this position in the matrix. + * This should usually be the same name as what is silkscreened on the PCB at this location. ## How is the Metadata Exposed? From 6fa0c48563088abcd8718b5413187c1f3222cccc Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 8 Feb 2019 18:33:27 -0500 Subject: [PATCH 045/445] Convert Viterbi to use split_common, add rev2 (#5085) * Convert Viterbi to use split_common, add rev2 * Update keyboards/viterbi/rev2/config.h Co-Authored-By: nooges * Update keyboards/viterbi/rev2/config.h Co-Authored-By: nooges --- keyboards/viterbi/config.h | 2 +- keyboards/viterbi/i2c.c | 162 -------- keyboards/viterbi/i2c.h | 49 --- keyboards/viterbi/keymaps/default/config.h | 11 +- keyboards/viterbi/keymaps/default/keymap.c | 4 +- keyboards/viterbi/matrix.c | 454 --------------------- keyboards/viterbi/rev1/config.h | 30 +- keyboards/viterbi/rev2/config.h | 57 +++ keyboards/viterbi/rev2/rev2.c | 1 + keyboards/viterbi/rev2/rev2.h | 35 ++ keyboards/viterbi/rev2/rules.mk | 3 + keyboards/viterbi/rules.mk | 50 +-- keyboards/viterbi/serial.c | 228 ----------- keyboards/viterbi/serial.h | 26 -- keyboards/viterbi/split_util.c | 86 ---- keyboards/viterbi/split_util.h | 21 - keyboards/viterbi/viterbi.h | 10 +- 17 files changed, 110 insertions(+), 1119 deletions(-) delete mode 100644 keyboards/viterbi/i2c.c delete mode 100644 keyboards/viterbi/i2c.h delete mode 100644 keyboards/viterbi/matrix.c create mode 100644 keyboards/viterbi/rev2/config.h create mode 100644 keyboards/viterbi/rev2/rev2.c create mode 100644 keyboards/viterbi/rev2/rev2.h create mode 100644 keyboards/viterbi/rev2/rules.mk delete mode 100644 keyboards/viterbi/serial.c delete mode 100644 keyboards/viterbi/serial.h delete mode 100644 keyboards/viterbi/split_util.c delete mode 100644 keyboards/viterbi/split_util.h diff --git a/keyboards/viterbi/config.h b/keyboards/viterbi/config.h index 863722d7d04d..27a7d9e1a572 100644 --- a/keyboards/viterbi/config.h +++ b/keyboards/viterbi/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2019 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 diff --git a/keyboards/viterbi/i2c.c b/keyboards/viterbi/i2c.c deleted file mode 100644 index 084c890c405f..000000000000 --- a/keyboards/viterbi/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#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 -#define SCL_CLOCK 100000L - -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/viterbi/keymaps/default/config.h b/keyboards/viterbi/keymaps/default/config.h index dabff8f9633a..a841066f4d0b 100644 --- a/keyboards/viterbi/keymaps/default/config.h +++ b/keyboards/viterbi/keymaps/default/config.h @@ -15,19 +15,12 @@ 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 +#pragma once -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS @@ -37,5 +30,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/viterbi/keymaps/default/keymap.c b/keyboards/viterbi/keymaps/default/keymap.c index eee207c94d01..3db912f6ae28 100644 --- a/keyboards/viterbi/keymaps/default/keymap.c +++ b/keyboards/viterbi/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; diff --git a/keyboards/viterbi/matrix.c b/keyboards/viterbi/matrix.c deleted file mode 100644 index c56b49c5ff59..000000000000 --- a/keyboards/viterbi/matrix.c +++ /dev/null @@ -1,454 +0,0 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#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" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -#if (DEBOUNCING_DELAY > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 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]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__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; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t _matrix_scan(void) -{ - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_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(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#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_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#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(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // 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); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[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 -} - -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 -} - -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 - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -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 - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - 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) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -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 -} - -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 -} - -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 - } -} - -#endif diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/viterbi/rev1/config.h index c7707fa0f123..3b5e8fe665e1 100644 --- a/keyboards/viterbi/rev1/config.h +++ b/keyboards/viterbi/rev1/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1157 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -36,16 +36,11 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define SOFT_SERIAL_PIN D0 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -56,25 +51,6 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 16 // Number of LEDs - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +#define RGBLED_NUM 14 #endif diff --git a/keyboards/viterbi/rev2/config.h b/keyboards/viterbi/rev2/config.h new file mode 100644 index 000000000000..01a0bfa047ac --- /dev/null +++ b/keyboards/viterbi/rev2/config.h @@ -0,0 +1,57 @@ +/* +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 + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1157 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT The Viterbi Keyboard +#define DESCRIPTION Split 5x14 ortholinear keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define SPLIT_HAND_PIN D2 +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 14 + +/* Backlight LEDs */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 diff --git a/keyboards/viterbi/rev2/rev2.c b/keyboards/viterbi/rev2/rev2.c new file mode 100644 index 000000000000..509e42dc515d --- /dev/null +++ b/keyboards/viterbi/rev2/rev2.c @@ -0,0 +1 @@ +#include "viterbi.h" diff --git a/keyboards/viterbi/rev2/rev2.h b/keyboards/viterbi/rev2/rev2.h new file mode 100644 index 000000000000..599e6415a3bb --- /dev/null +++ b/keyboards/viterbi/rev2/rev2.h @@ -0,0 +1,35 @@ +#pragma once + +#include "viterbi.h" +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#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, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { 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 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { 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 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +#define LAYOUT_ortho_5x14 LAYOUT diff --git a/keyboards/viterbi/rev2/rules.mk b/keyboards/viterbi/rev2/rules.mk new file mode 100644 index 000000000000..f95e7ae6a4a9 --- /dev/null +++ b/keyboards/viterbi/rev2/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes + +LAYOUTS = ortho_5x14 diff --git a/keyboards/viterbi/rules.mk b/keyboards/viterbi/rules.mk index ee043cca3b45..1aa4314f490d 100644 --- a/keyboards/viterbi/rules.mk +++ b/keyboards/viterbi/rules.mk @@ -1,48 +1,7 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - -# MCU name -#MCU = at90usb1287 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) - -# 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) @@ -63,14 +22,11 @@ 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. -SUBPROJECT_rev1 = yes -USE_I2C = yes +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 -CUSTOM_MATRIX = yes - -DEFAULT_FOLDER = viterbi/rev1 +SPLIT_KEYBOARD = yes +DEFAULT_FOLDER = viterbi/rev2 LAYOUTS = ortho_5x14 diff --git a/keyboards/viterbi/serial.c b/keyboards/viterbi/serial.c deleted file mode 100644 index 74bcbb6bf6e2..000000000000 --- a/keyboards/viterbi/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/viterbi/serial.h b/keyboards/viterbi/serial.h deleted file mode 100644 index 15fe4db7b4c6..000000000000 --- a/keyboards/viterbi/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/viterbi/split_util.c b/keyboards/viterbi/split_util.c deleted file mode 100644 index 346cbc908949..000000000000 --- a/keyboards/viterbi/split_util.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.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_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_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 keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/viterbi/viterbi.h b/keyboards/viterbi/viterbi.h index 80d2a8f25a62..b19f33154bb8 100644 --- a/keyboards/viterbi/viterbi.h +++ b/keyboards/viterbi/viterbi.h @@ -1,8 +1,11 @@ -#ifndef VITERBI_H -#define VITERBI_H +#pragma once + +#include "quantum.h" #ifdef KEYBOARD_viterbi_rev1 #include "rev1.h" +#elif KEYBOARD_viterbi_rev2 + #include "rev2.h" #endif // Used to create a keymap using only KC_ prefixed keys @@ -23,6 +26,3 @@ #define LAYOUT_ortho_5x14 LAYOUT -#include "quantum.h" - -#endif From aea45c5483f0373c60205eb1951a86169a6d3700 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 8 Feb 2019 18:34:44 -0500 Subject: [PATCH 046/445] [Keymap] Add HHKB JP keymap for bakingpy (#5084) --- keyboards/hhkb/keymaps/bakingpy/keymap.c | 18 ++++++++++++++++++ keyboards/hhkb/keymaps/bakingpy/rules.mk | 1 + 2 files changed, 19 insertions(+) create mode 100644 keyboards/hhkb/keymaps/bakingpy/keymap.c create mode 100644 keyboards/hhkb/keymaps/bakingpy/rules.mk diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/keymaps/bakingpy/keymap.c new file mode 100644 index 000000000000..969f4fc4f19e --- /dev/null +++ b/keyboards/hhkb/keymaps/bakingpy/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_DEL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_BSLS, + MO(1), KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; diff --git a/keyboards/hhkb/keymaps/bakingpy/rules.mk b/keyboards/hhkb/keymaps/bakingpy/rules.mk new file mode 100644 index 000000000000..a7f700f019c2 --- /dev/null +++ b/keyboards/hhkb/keymaps/bakingpy/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP From f4f75acbd6ac6e962ba750cfe5f7c81346847b95 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 8 Feb 2019 18:35:49 -0500 Subject: [PATCH 047/445] [Keyboard] Update default keymap, change RGB LEDs to 4 for Rev. 1.1 (#5086) --- keyboards/bdn9/config.h | 2 +- keyboards/bdn9/keymaps/default/keymap.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/keyboards/bdn9/config.h b/keyboards/bdn9/config.h index 3fc92a062e90..1d0062375227 100644 --- a/keyboards/bdn9/config.h +++ b/keyboards/bdn9/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN - #define RGBLED_NUM 3 + #define RGBLED_NUM 4 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/bdn9/keymaps/default/keymap.c b/keyboards/bdn9/keymaps/default/keymap.c index 66b9a3eb674c..3bab86ae5468 100644 --- a/keyboards/bdn9/keymaps/default/keymap.c +++ b/keyboards/bdn9/keymaps/default/keymap.c @@ -17,25 +17,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_A, KC_B, KC_C, \ - BL_STEP, KC_UP, RGB_MOD, \ + KC_MUTE, KC_HOME, KC_MPLY, \ + MO(1), KC_UP, RGB_MOD, \ KC_LEFT, KC_DOWN, KC_RGHT \ ), + [1] = LAYOUT( + RESET, BL_STEP, KC_STOP, \ + _______, KC_HOME, RGB_MOD, \ + KC_MPRV, KC_END, KC_MNXT \ + ), }; void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { - tap_code(KC_PGDN); + tap_code(KC_VOLU); } else { - tap_code(KC_PGUP); + tap_code(KC_VOLD); } } else if (index == 1) { if (clockwise) { - tap_code(KC_DOWN); + tap_code(KC_PGDN); } else { - tap_code(KC_UP); + tap_code(KC_PGUP); } } } From 932d96ad56ae46593be8866c11676b7accee4727 Mon Sep 17 00:00:00 2001 From: Braydon Bubnick Date: Fri, 8 Feb 2019 17:37:23 -0600 Subject: [PATCH 048/445] [Keyboard] 1up60hte Readme update (#5075) * Tweaks to default 1up60hte layout + support for HHKB style layout * Added changes to layouts * Fix config.h * Fixed errant KC_NO in layout * Added readme to keyboard... Will update with images/store link when avail. * Update to use LAYOUT_60_hhkb default layout * md formatting fix * Update keyboards/1upkeyboards/1up60hte/readme.md Co-Authored-By: bubnick * Update keyboards/1upkeyboards/1up60hte/readme.md Co-Authored-By: bubnick * Added layout to rules.mk, fixed layout to be compatble with community HHKB keymaps * Added image, updated store page to readme --- keyboards/1upkeyboards/1up60hte/readme.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hte/readme.md b/keyboards/1upkeyboards/1up60hte/readme.md index a5278788b713..93767c541f35 100644 --- a/keyboards/1upkeyboards/1up60hte/readme.md +++ b/keyboards/1upkeyboards/1up60hte/readme.md @@ -1,10 +1,15 @@ -# 1up60hte (Hot Swap Edition - Tsangan) + +# 1up60hte (Hot Swap Tsangan Edition) + +![1up60hte](https://www.1upkeyboards.com/wp-content/uploads/2019/01/PCB-60-HS-TSA-both.jpg) + A 60% PCB with USB C, RGB underglow, backlighting, hotswappable switches, and a Tsangan layout. Keyboard Maintainer: [Bubnick](https://github.com/bubnick) Hardware Supported: 1up60hte 60% PCB -Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/) + +Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/) Make example for this keyboard (after setting up your build environment): From e251850cd848445cb20819ea95f2d4d3aea20d9e Mon Sep 17 00:00:00 2001 From: Joshua Bragge Date: Sat, 9 Feb 2019 10:18:08 -0700 Subject: [PATCH 049/445] added missing ; on example (#5089) --- docs/feature_combo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 05ffc0d72577..a2fd1423c887 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -29,7 +29,7 @@ If you want to add a list, then you'd use something like this: enum combos { AB_ESC, JK_TAB -} +}; const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; From 6848002601d9b84ed53639aadd035cc640de9aad Mon Sep 17 00:00:00 2001 From: takashiski Date: Mon, 11 Feb 2019 05:40:31 +0900 Subject: [PATCH 050/445] [Keyboard] Namecard rev2 (#5080) * add revision * change to row2col * remove old config.h * remove rule.mk from namecard2x4/ --- keyboards/namecard2x4/{ => rev1}/config.h | 0 keyboards/namecard2x4/{ => rev1}/rules.mk | 0 keyboards/namecard2x4/rev2/config.h | 216 ++++++++++++++++++++++ keyboards/namecard2x4/rev2/rules.mk | 81 ++++++++ 4 files changed, 297 insertions(+) rename keyboards/namecard2x4/{ => rev1}/config.h (100%) rename keyboards/namecard2x4/{ => rev1}/rules.mk (100%) create mode 100644 keyboards/namecard2x4/rev2/config.h create mode 100644 keyboards/namecard2x4/rev2/rules.mk diff --git a/keyboards/namecard2x4/config.h b/keyboards/namecard2x4/rev1/config.h similarity index 100% rename from keyboards/namecard2x4/config.h rename to keyboards/namecard2x4/rev1/config.h diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rev1/rules.mk similarity index 100% rename from keyboards/namecard2x4/rules.mk rename to keyboards/namecard2x4/rev1/rules.mk diff --git a/keyboards/namecard2x4/rev2/config.h b/keyboards/namecard2x4/rev2/config.h new file mode 100644 index 000000000000..569ba8199b3c --- /dev/null +++ b/keyboards/namecard2x4/rev2/config.h @@ -0,0 +1,216 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT namecard2x4 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* + * 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 { B2,B6 } +#define MATRIX_COL_PINS { D7,E6,B4,B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +//#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION ROW2COL +#define RGB_DI_PIN D4 +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +//#define BACKLIGHT_PIN F4 +//#define BACKLIGHT_BREATHING +//#define BACKLIGHT_LEVELS 1 + +/* 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. + * + */ + +/* 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 +*/ diff --git a/keyboards/namecard2x4/rev2/rules.mk b/keyboards/namecard2x4/rev2/rules.mk new file mode 100644 index 000000000000..51d2cbcb2e86 --- /dev/null +++ b/keyboards/namecard2x4/rev2/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 + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# 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 +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) + +#UNICODEMAP_ENABLE = yes # for emoji user +#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips From 6ba39689d3ed14a69f161cf08c48004eb4e0daea Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 10 Feb 2019 15:44:39 -0500 Subject: [PATCH 051/445] [Keyboard] Initial support for TKC M0LLY (#5087) * Initial support for TKC M0LLY * Remove depreciated Magic Keys define * Update keyboards/m0lly/README.md Co-Authored-By: TerryMathews * Update keyboards/m0lly/README.md Co-Authored-By: TerryMathews * Update keyboards/m0lly/info.json Co-Authored-By: TerryMathews * Update keyboards/m0lly/info.json Co-Authored-By: TerryMathews * Update keyboards/m0lly/m0lly.h Co-Authored-By: TerryMathews * Suggested review changes --- keyboards/m0lly/README.md | 17 +++ keyboards/m0lly/config.h | 178 +++++++++++++++++++++++ keyboards/m0lly/i2c.c | 166 +++++++++++++++++++++ keyboards/m0lly/i2c.h | 49 +++++++ keyboards/m0lly/info.json | 97 ++++++++++++ keyboards/m0lly/keymaps/default/config.h | 24 +++ keyboards/m0lly/keymaps/default/keymap.c | 149 +++++++++++++++++++ keyboards/m0lly/m0lly.c | 69 +++++++++ keyboards/m0lly/m0lly.h | 32 ++++ keyboards/m0lly/rules.mk | 72 +++++++++ 10 files changed, 853 insertions(+) create mode 100644 keyboards/m0lly/README.md create mode 100644 keyboards/m0lly/config.h create mode 100644 keyboards/m0lly/i2c.c create mode 100644 keyboards/m0lly/i2c.h create mode 100644 keyboards/m0lly/info.json create mode 100644 keyboards/m0lly/keymaps/default/config.h create mode 100644 keyboards/m0lly/keymaps/default/keymap.c create mode 100644 keyboards/m0lly/m0lly.c create mode 100644 keyboards/m0lly/m0lly.h create mode 100644 keyboards/m0lly/rules.mk diff --git a/keyboards/m0lly/README.md b/keyboards/m0lly/README.md new file mode 100644 index 000000000000..e0c8b45d95f0 --- /dev/null +++ b/keyboards/m0lly/README.md @@ -0,0 +1,17 @@ +The Key Company M0LLY + +[TKC M0LLY](https://cdn.shopify.com/s/files/1/1679/2319/files/Molly_Terminal_1024x1024.jpg?v=1529067702) + + +The Key Company's M0LLY keyboard is inspired by the Apple Macintosh M0110A, and utilizes the AT90USB1286 microcontroller. + +Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) +Hardware Supported: TKC M0LLY +Hardware Availability: [TheKey.Company](https://thekey.company) + + +Make example for this keyboard (after setting up your build environment): + + make m0lly: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/m0lly/config.h b/keyboards/m0lly/config.h new file mode 100644 index 000000000000..21f5fd3fb4c4 --- /dev/null +++ b/keyboards/m0lly/config.h @@ -0,0 +1,178 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER The Key Company +#define PRODUCT M0lly +#define DESCRIPTION QMK keyboard firmware for M0lly + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +*/ +#define MATRIX_ROW_PINS { F2, F1, F0, E1, E0 } +/* Column pin configuration + */ +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* + * 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. + * + */ + +/* 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 diff --git a/keyboards/m0lly/i2c.c b/keyboards/m0lly/i2c.c new file mode 100644 index 000000000000..cd2b835d501d --- /dev/null +++ b/keyboards/m0lly/i2c.c @@ -0,0 +1,166 @@ +#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 +#define SCL_CLOCK 800000L + +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/m0lly/info.json b/keyboards/m0lly/info.json new file mode 100644 index 000000000000..f2ac456b16e0 --- /dev/null +++ b/keyboards/m0lly/info.json @@ -0,0 +1,97 @@ +{ + "keyboard_name": "TKC M0LLY", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"Bksp", "x":13, "y":0}, + {"x":14, "y":0}, + {"label":"Num", "x":15.5, "y":0}, + {"label":"/", "x":16.5, "y":0}, + {"label":"*", "x":17.5, "y":0}, + {"label":"-", "x":18.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":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"7", "x":15.5, "y":1}, + {"label":"8", "x":16.5, "y":1}, + {"label":"9", "x":17.5, "y":1}, + {"x":18.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":"ISO ~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"4", "x":15.5, "y":2}, + {"label":"5", "x":16.5, "y":2}, + {"label":"6", "x":17.5, "y":2}, + {"label":"+", "x":18.5, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"label":"1", "x":15.5, "y":3}, + {"label":"2", "x":16.5, "y":3}, + {"label":"3", "x":17.5, "y":3}, + {"x":18.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"FN", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, + {"label":"0", "x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"label":".", "x":17.5, "y":4}, + {"label":"Ent", "x":18.5, "y":4}] + } + } +} diff --git a/keyboards/m0lly/keymaps/default/config.h b/keyboards/m0lly/keymaps/default/config.h new file mode 100644 index 000000000000..ee142927f3ad --- /dev/null +++ b/keyboards/m0lly/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Mathias Andersson + * + * 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_I2C +#define SSD1306OLED +//#define OLED_ROTATE180 +#define SSD1306_ADDRESS 0x3C + +// place overrides here diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/m0lly/keymaps/default/keymap.c new file mode 100644 index 000000000000..784deb04a729 --- /dev/null +++ b/keyboards/m0lly/keymaps/default/keymap.c @@ -0,0 +1,149 @@ +/* Copyright 2017 Mathias Andersson + * + * 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 "LUFA/Drivers/Peripheral/TWI.h" +#include "i2c.h" +#include "ssd1306.h" + + +//Layers + +enum { + BASE = 0, + FUNCTION, +}; + +bool screenWorks = 0; + +//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() +static char layer_lookup[][14] = {"Base","Function"}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | + * |-----------------------------------------------------------| |--------------| + | + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | + * |-----------------------------------------------------------| |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------| |--------------| | + * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | + * `-----------------------------------------------------------' '-------------------' + */ + [BASE] = LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, 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, XXXXXXX, \ + 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_P4, KC_P5, KC_P6, KC_PPLS, \ + 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, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT \ + ), + /* Keymap FUNCTION: (Function Layer) + * + * ,-----------------------------------------------------------. .-------------------. + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |-----------------------------------------------------------| |--------------| | + * | | | | | | | | | | | | | + * `-----------------------------------------------------------' '-------------------' + */ + [FUNCTION] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + if ( iota_gfx_init() ) { // turns on the display + screenWorks = 1; + } + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif +} + +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) { + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("TKC M0LLY")); + + uint8_t layer = biton32(layer_state); + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%d", layer); + matrix_write_P(&matrix, PSTR("\nLayer: ")); + matrix_write(&matrix, layer_lookup[layer]); + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n\n%s %s %s", + (host_keyboard_leds() & (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 . + */ +#include "m0lly.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + led_init_ports(); + 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_init_ports(void) { + DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT + DDRB |= (1<<7); // OUT + PORTB |= (1<<7); +} + +void led_set_kb(uint8_t usb_led) { +// led_set_user(usb_led); + if (usb_led & (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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, K1I, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ + K40, K41, K42, K45, K49, K4B, K4C, K4D, K4F, K4G, K4H, K4I \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F, K1G, K1H, K1I }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I } \ +} diff --git a/keyboards/m0lly/rules.mk b/keyboards/m0lly/rules.mk new file mode 100644 index 000000000000..ae6cdcb53501 --- /dev/null +++ b/keyboards/m0lly/rules.mk @@ -0,0 +1,72 @@ + +# MCU name +MCU = at90usb1286 + +# 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 + + +# Build Options +# change yes to no to disable +# +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 = 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +SRC = i2c.c \ + ssd1306.c From 65d3afc915a725292a4af9cc4aed231cbce25bef Mon Sep 17 00:00:00 2001 From: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Sun, 10 Feb 2019 12:50:55 -0800 Subject: [PATCH 052/445] [Keyboard] Update ergodash readme.md (#5092) Clarification of Keys to Keymap note added --- keyboards/ergodash/readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keyboards/ergodash/readme.md b/keyboards/ergodash/readme.md index 1545b44624e0..40d9fddfa5fd 100644 --- a/keyboards/ergodash/readme.md +++ b/keyboards/ergodash/readme.md @@ -22,4 +22,10 @@ Note: # Layout ![layout](https://github.com/omkbd/picture/blob/master/ergodash-layout.png) + +Layout Note: +- In thumb cluster, it is not possible to use all 5 positions as small keys. (as pictured) +- The top 2 1u keys in the thumb cluster share the same connection. +- 2u key (center) position shares with the lower 1u key position + ![PCB](https://github.com/omkbd/picture/blob/master/Ergodash_PCB.jpg) From aeafcc9fd3f41fce6506af5ccf9d9a1fe3b968d8 Mon Sep 17 00:00:00 2001 From: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Sun, 10 Feb 2019 14:52:03 -0600 Subject: [PATCH 053/445] [Keymap] Added my THE50 Keymap (#5093) * adding my planck keymap * adding my planck keymap * added my espectro keymap * the50 keymap --- .../the50/keymaps/mikethetiger/keymap.c | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c diff --git a/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..a792d34fbd3b --- /dev/null +++ b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _L1, + _L2 +}; + +// Act as Shift on hold and as CapsLock on tap +#define SFT_CPS LSFT_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------. ,--------------. + * |Esc | Q | W | E | R | T | Y | U | I | O | P |Bspc| | 7 | 8 | 9 | + * |-----------------------------------------------------------| |--------------| + * | Tab | A | S | D | F | G | H | J | K | L | Enter | | 4 | 5 | 6 | + * |-----------------------------------------------------------| |--------------| + * | Shift | Z | X | C | V | B | N | M | , | . | L2 | | 1 | 2 | 3 | + * |-----------------------------------------------------------| |--------------| + * | Ctrl |Gui | Alt | Space | Space | RAlt |RCtrl| L1 | | 0 | . |Entr| + * `-----------------------------------------------------------' `--------------' + */ + +[_QWERTY] = LAYOUT( +KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9, +KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_P4, KC_P5, KC_P6, +SFT_CPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(_L2), KC_P1, KC_P2, KC_P3, +KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_L1), KC_0, KC_PDOT, KC_PENT +), + +/* L1 + * ,-----------------------------------------------------------. ,--------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |Del | |NMLK| | / | + * |-----------------------------------------------------------| |--------------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | [ | ] | \ | | - | = | * | + * |-----------------------------------------------------------| |--------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | , | . | / | | | | | - | + * |-----------------------------------------------------------| |--------------| + * | | | | | | ; | ' | | | | | + | + * `-----------------------------------------------------------' `--------------' + */ + +[_L1] = LAYOUT( +KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_NUMLOCK, _______, KC_PSLS, +_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_LBRC, KC_RBRC, KC_BSLASH, KC_MINS, KC_EQL, KC_PAST, +_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, KC_PMNS, +_______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, KC_PPLS +), + +/* L2 + * ,-----------------------------------------------------------. ,--------------. + * |RST | | | | | | | | | |Ins |Del | |Home|PgUp| | + * |-----------------------------------------------------------| |--------------| + * | |Prev|Play|Next| | | |VolD|Mute|VolU| | |End |PgDn| | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | up | | + * |-----------------------------------------------------------| |--------------| + * |EEPRST| | | | | | | | |left|down| rt | + * `-----------------------------------------------------------' `--------------' + */ + +[_L2] = LAYOUT( +RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_HOME, KC_PGUP, _______, +_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_END, KC_PGDN, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, +EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT +) +}; + +void led_set_user(uint8_t usb_led) { + // Turn LED On/Off for Caps Lock + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + the50_led_on(); + } else { + the50_led_off(); + } +} From fd698c43d78ebbc42c1eb2bec74078b791616ad1 Mon Sep 17 00:00:00 2001 From: skullY Date: Wed, 23 Jan 2019 15:43:48 -0800 Subject: [PATCH 054/445] The beginning of a simple led matrix driver for is31fl3731 --- common_features.mk | 20 +- docs/feature_led_matrix.md | 217 +++++++++++++++++ drivers/issi/is31fl3731-simple.c | 240 ++++++++++++++++++ drivers/issi/is31fl3731-simple.h | 209 ++++++++++++++++ quantum/led_matrix.c | 404 +++++++++++++++++++++++++++++++ quantum/led_matrix.h | 142 +++++++++++ quantum/led_matrix_drivers.c | 147 +++++++++++ quantum/rgb_matrix.h | 12 +- 8 files changed, 1380 insertions(+), 11 deletions(-) create mode 100644 docs/feature_led_matrix.md create mode 100644 drivers/issi/is31fl3731-simple.c create mode 100644 drivers/issi/is31fl3731-simple.h create mode 100644 quantum/led_matrix.c create mode 100644 quantum/led_matrix.h create mode 100644 quantum/led_matrix_drivers.c diff --git a/common_features.mk b/common_features.mk index 8c3361732cd0..8c7043cb7ec2 100644 --- a/common_features.mk +++ b/common_features.mk @@ -114,8 +114,26 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif -RGB_MATRIX_ENABLE ?= no VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom + +LED_MATRIX_ENABLE ?= no +ifneq ($(strip $(LED_MATRIX_ENABLE)), no) +ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) + $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) +endif + OPT_DEFS += -DLED_MATRIX_ENABLE + SRC += $(QUANTUM_DIR)/led_matrix.c + SRC += $(QUANTUM_DIR)/led_matrix_drivers.c +endif + +ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731) + OPT_DEFS += -DIS31FL3731 + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3731-simple.c + SRC += i2c_master.c +endif + +RGB_MATRIX_ENABLE ?= no ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type) diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md new file mode 100644 index 000000000000..5a62cc5309b8 --- /dev/null +++ b/docs/feature_led_matrix.md @@ -0,0 +1,217 @@ +# RGB Matrix Lighting + +## Driver configuration + +### IS31FL3731 + +There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: + + LED_MATRIX_ENABLE = IS31FL3731 + +Configure the hardware via your `config.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) + // The address will vary depending on your wiring: + // 0b1110100 AD <-> GND + // 0b1110111 AD <-> VCC + // 0b1110101 AD <-> SCL + // 0b1110110 AD <-> SDA + #define LED_DRIVER_ADDR_1 0b1110100 + #define LED_DRIVER_ADDR_2 0b1110110 + + #define LED_DRIVER_COUNT 2 + #define LED_DRIVER_1_LED_TOTAL 25 + #define LED_DRIVER_2_LED_TOTAL 24 + #define LED_DRIVER_LED_TOTAL LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL + +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. + +Define these arrays listing all the LEDs in your `.c`: + + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + /* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_3, C2_3, C3_3}, + .... + } + +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). + +### IS31FL3733 + +There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: + + RGB_MATRIX_ENABLE = IS31FL3733 + +Configure the hardware via your `config.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) + // The address will vary depending on your wiring: + // 00 <-> GND + // 01 <-> SCL + // 10 <-> SDA + // 11 <-> VCC + // ADDR1 represents A1:A0 of the 7-bit address. + // ADDR2 represents A3:A2 of the 7-bit address. + // The result is: 0b101(ADDR2)(ADDR1) + #define DRIVER_ADDR_1 0b1010000 + #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + + #define DRIVER_COUNT 1 + #define DRIVER_1_LED_TOTAL 64 + #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + +Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` + +Define these arrays listing all the LEDs in your `.c`: + + 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}, + .... + } + +Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). + +From this point forward the configuration is the same for all the drivers. + + const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + /* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, + {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, + .... + } + +The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: + + x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION + y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION + +Where all variables are decimels/floats. + +`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). + +## Keycodes + +All RGB keycodes are currently shared with the RGBLIGHT system: + + * `RGB_TOG` - toggle + * `RGB_MOD` - cycle through modes + * `RGB_HUI` - increase hue + * `RGB_HUD` - decrease hue + * `RGB_SAI` - increase saturation + * `RGB_SAD` - decrease saturation + * `RGB_VAI` - increase value + * `RGB_VAD` - decrease value + * `RGB_SPI` - increase speed effect (no EEPROM support) + * `RGB_SPD` - decrease speed effect (no EEPROM support) + + + * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system + +## RGB Matrix Effects + +These are the effects that are currently available: + + enum rgb_matrix_effects { + RGB_MATRIX_SOLID_COLOR = 1, + RGB_MATRIX_ALPHAS_MODS, + RGB_MATRIX_DUAL_BEACON, + RGB_MATRIX_GRADIENT_UP_DOWN, + RGB_MATRIX_RAINDROPS, + RGB_MATRIX_CYCLE_ALL, + RGB_MATRIX_CYCLE_LEFT_RIGHT, + RGB_MATRIX_CYCLE_UP_DOWN, + RGB_MATRIX_RAINBOW_BEACON, + RGB_MATRIX_RAINBOW_PINWHEELS, + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, + RGB_MATRIX_JELLYBEAN_RAINDROPS, + RGB_MATRIX_DIGITAL_RAIN, + #ifdef RGB_MATRIX_KEYPRESSES + RGB_MATRIX_SOLID_REACTIVE, + RGB_MATRIX_SPLASH, + RGB_MATRIX_MULTISPLASH, + RGB_MATRIX_SOLID_SPLASH, + RGB_MATRIX_SOLID_MULTISPLASH, + #endif + RGB_MATRIX_EFFECT_MAX + }; + +You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: + + +|Define |Description | +|---------------------------------------------------|--------------------------------------------| +|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | +|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | +|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | +|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | +|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | +|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | +|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| +|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | +|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | +|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | +|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | +|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | +|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | + + +## Custom layer effects + +Custom layer effects can be done by defining this in your `.c`: + + void rgb_matrix_indicators_kb(void) { + rgb_matrix_set_color(index, red, green, blue); + } + +A similar function works in the keymap as `rgb_matrix_indicators_user`. + +## Additional `config.h` Options + + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) + #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) + #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 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 + +## EEPROM storage + +The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: + + #define EECONFIG_RGB_MATRIX (uint32_t *)16 + +Where `16` is an unused index from `eeconfig.h`. + +## Suspended state + +To use the suspend feature, add this to your `.c`: + + void suspend_power_down_kb(void) + { + rgb_matrix_set_suspend_state(true); + } + + void suspend_wakeup_init_kb(void) + { + rgb_matrix_set_suspend_state(false); + } diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c new file mode 100644 index 000000000000..46d51dac7046 --- /dev/null +++ b/drivers/issi/is31fl3731-simple.c @@ -0,0 +1,240 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 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 . + */ + +#ifdef __AVR__ +#include +#include +#include +#else +#include "wait.h" +#endif + +#include +#include +#include +#include "is31fl3731-simple.h" +#include "i2c_master.h" +#include "progmem.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) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define ISSI_ADDR_DEFAULT 0x74 + +#define ISSI_REG_CONFIG 0x00 +#define ISSI_REG_CONFIG_PICTUREMODE 0x00 +#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 +#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 + +#define ISSI_CONF_PICTUREMODE 0x00 +#define ISSI_CONF_AUTOFRAMEMODE 0x04 +#define ISSI_CONF_AUDIOMODE 0x08 + +#define ISSI_REG_PICTUREFRAME 0x01 + +#define ISSI_REG_SHUTDOWN 0x0A +#define ISSI_REG_AUDIOSYNC 0x06 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' + +#ifndef ISSI_TIMEOUT + #define ISSI_TIMEOUT 100 +#endif + +#ifndef ISSI_PERSISTENCE + #define ISSI_PERSISTENCE 0 +#endif + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20]; + +// These buffers match the IS31FL3731 PWM registers 0x24-0xB3. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[DRIVER_COUNT][144]; +bool g_pwm_buffer_update_required = false; + +uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; +bool g_led_control_registers_update_required = false; + +// This is the bit pattern in the LED control registers +// (for matrix A, add one to register for matrix B) +// +// reg - b7 b6 b5 b4 b3 b2 b1 b0 +// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01 +// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00 +// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00 +// 0x06 - - , - , - , - , - ,B02,B01,B00 +// 0x08 - - , - , - , - , - , - , - , - +// 0x0A - B17,B16,B15, - , - , - , - , - +// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09 +// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 +// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 + + +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + + #if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) { + break; + } + } + #else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); + #endif +} + +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { + // assumes bank is already selected + + // transmit PWM registers in 9 transfers of 16 bytes + // g_twi_transfer_buffer[] is 20 bytes + + // iterate over the pwm_buffer contents at 16 byte intervals + for (int i = 0; i < 144; i += 16) { + // set the first register, e.g. 0x24, 0x34, 0x44, etc. + g_twi_transfer_buffer[0] = 0x24 + i; + // copy the data from i to i+15 + // device will auto-increment register for data after the first byte + // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer + for (int j = 0; j < 16; j++) { + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; + } + + #if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) + break; + } + #else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); + #endif + } +} + +void IS31FL3731_init(uint8_t addr) { + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, first enable software shutdown, + // then set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + + // select "function register" bank + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + + // enable software shutdown + IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); + // this delay was copied from other drivers, might not be needed + // FIXME: Don't we have a wrapper for this already? + #ifdef __AVR__ + _delay_ms(10); + #else + wait_ms(10); + #endif + + // picture mode + IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); + // display frame 0 + IS31FL3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00); + // audio sync off + IS31FL3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00); + + // select bank 0 + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + + // turn off all LEDs in the LED control register + for (int i = 0x00; i <= 0x11; i++) { + IS31FL3731_write_register(addr, i, 0x00); + } + + // turn off all LEDs in the blink control register (not really needed) + for (int i = 0x12; i <= 0x23; i++) { + IS31FL3731_write_register(addr, i, 0x00); + } + + // set PWM on all LEDs to 0 + for (int i = 0x24; i <= 0xB3; i++) { + IS31FL3731_write_register(addr, i, 0x00); + } + + // select "function register" bank + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + + // disable software shutdown + IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01); + + // select bank 0 and leave it selected. + // most usage after initialization is just writing PWM buffers in bank 0 + // as there's not much point in double-buffering + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + +} + +void IS31FL3731_set_value(int index, uint8_t value) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { + is31_led led = g_is31_leds[index]; + + // Subtract 0x24 to get the second index of g_pwm_buffer + g_pwm_buffer[led.driver][led.v - 0x24] = value; + g_pwm_buffer_update_required = true; + } +} + +void IS31FL3731_set_value_all(uint8_t value) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3731_set_value(i, value); + } +} + +void IS31FL3731_set_led_control_register(uint8_t index, bool value) { + is31_led led = g_is31_leds[index]; + + uint8_t control_register = (led.v - 0x24) / 8; + uint8_t bit_value = (led.v - 0x24) % 8; + + if (value) { + g_led_control_registers[led.driver][control_register] |= (1 << bit_value); + } else { + g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value); + } + + g_led_control_registers_update_required = true; +} + +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required) { + IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]); + g_pwm_buffer_update_required = false; + } +} + +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_led_control_registers_update_required) { + for (int i=0; i<18; i++) { + IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]); + } + } +} diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h new file mode 100644 index 000000000000..c102837a30f5 --- /dev/null +++ b/drivers/issi/is31fl3731-simple.h @@ -0,0 +1,209 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 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 IS31FL3731_DRIVER_H +#define IS31FL3731_DRIVER_H + + +typedef struct is31_led { + uint8_t driver:2; + uint8_t v; +} __attribute__((packed)) is31_led; + +extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3731_init(uint8_t addr); +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3731_set_value(int index, uint8_t value); +void IS31FL3731_set_value_all(uint8_t value); + +void IS31FL3731_set_led_control_register(uint8_t index, bool value); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); + +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B + +#define C1_9 0x2C +#define C1_10 0x2D +#define C1_11 0x2E +#define C1_12 0x2F +#define C1_13 0x30 +#define C1_14 0x31 +#define C1_15 0x32 +#define C1_16 0x33 + +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B + +#define C2_9 0x3C +#define C2_10 0x3D +#define C2_11 0x3E +#define C2_12 0x3F +#define C2_13 0x40 +#define C2_14 0x41 +#define C2_15 0x42 +#define C2_16 0x43 + +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B + +#define C3_9 0x4C +#define C3_10 0x4D +#define C3_11 0x4E +#define C3_12 0x4F +#define C3_13 0x50 +#define C3_14 0x51 +#define C3_15 0x52 +#define C3_16 0x53 + +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B + +#define C4_9 0x5C +#define C4_10 0x5D +#define C4_11 0x5E +#define C4_12 0x5F +#define C4_13 0x60 +#define C4_14 0x61 +#define C4_15 0x62 +#define C4_16 0x63 + +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B + +#define C5_9 0x6C +#define C5_10 0x6D +#define C5_11 0x6E +#define C5_12 0x6F +#define C5_13 0x70 +#define C5_14 0x71 +#define C5_15 0x72 +#define C5_16 0x73 + +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B + +#define C6_9 0x7C +#define C6_10 0x7D +#define C6_11 0x7E +#define C6_12 0x7F +#define C6_13 0x80 +#define C6_14 0x81 +#define C6_15 0x82 +#define C6_16 0x83 + +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B + +#define C7_9 0x8C +#define C7_10 0x8D +#define C7_11 0x8E +#define C7_12 0x8F +#define C7_13 0x90 +#define C7_14 0x91 +#define C7_15 0x92 +#define C7_16 0x93 + +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B + +#define C8_9 0x9C +#define C8_10 0x9D +#define C8_11 0x9E +#define C8_12 0x9F +#define C8_13 0xA0 +#define C8_14 0xA1 +#define C8_15 0xA2 +#define C8_16 0xA3 + +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB + +#define C9_9 0xAC +#define C9_10 0xAD +#define C9_11 0xAE +#define C9_12 0xAF +#define C9_13 0xB0 +#define C9_14 0xB1 +#define C9_15 0xB2 +#define C9_16 0xB3 + + +#endif // IS31FL3731_DRIVER_H diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c new file mode 100644 index 000000000000..9a0aa6acd940 --- /dev/null +++ b/quantum/led_matrix.c @@ -0,0 +1,404 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2019 Clueboard + * + * 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 "quantum.h" +#include "led_matrix.h" +#include "progmem.h" +#include "config.h" +#include "eeprom.h" +#include +#include + +led_config_t led_matrix_config; + +#ifndef MAX + #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + +#ifndef MIN + #define MIN(a,b) ((a) < (b)? (a): (b)) +#endif + +#ifndef LED_DISABLE_AFTER_TIMEOUT + #define LED_DISABLE_AFTER_TIMEOUT 0 +#endif + +#ifndef LED_DISABLE_WHEN_USB_SUSPENDED + #define LED_DISABLE_WHEN_USB_SUSPENDED false +#endif + +#ifndef EECONFIG_LED_MATRIX + #define EECONFIG_LED_MATRIX EECONFIG_RGBLIGHT +#endif + +#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > 255 + #define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 +#endif + +bool g_suspend_state = false; + +// Global tick at 20 Hz +uint32_t g_tick = 0; + +// Ticks since this key was last hit. +uint8_t g_key_hit[DRIVER_LED_TOTAL]; + +// Ticks since any key was last hit. +uint32_t g_any_key_hit = 0; + +uint32_t eeconfig_read_led_matrix(void) { + return eeprom_read_dword(EECONFIG_LED_MATRIX); +} +void eeconfig_update_led_matrix(uint32_t config_value) { + eeprom_update_dword(EECONFIG_LED_MATRIX, config_value); +} +void eeconfig_update_led_matrix_default(void) { + dprintf("eeconfig_update_led_matrix_default\n"); + led_matrix_config.enable = 1; + led_matrix_config.mode = LED_MATRIX_UNIFORM_BRIGHTNESS; + led_matrix_config.val = 128; + led_matrix_config.speed = 0; + eeconfig_update_led_matrix(led_matrix_config.raw); +} +void eeconfig_debug_led_matrix(void) { + dprintf("led_matrix_config eprom\n"); + dprintf("led_matrix_config.enable = %d\n", led_matrix_config.enable); + dprintf("led_matrix_config.mode = %d\n", led_matrix_config.mode); + dprintf("led_matrix_config.val = %d\n", led_matrix_config.val); + dprintf("led_matrix_config.speed = %d\n", led_matrix_config.speed); +} + +// Last led hit +#define LED_HITS_TO_REMEMBER 8 +uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; +uint8_t g_last_led_count = 0; + +void map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) { + led_matrix led; + *led_count = 0; + + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + // map_index_to_led(i, &led); + led = g_leds[i]; + if (row == led.matrix_co.row && column == led.matrix_co.col) { + led_i[*led_count] = i; + (*led_count)++; + } + } +} + +void led_matrix_update_pwm_buffers(void) { + led_matrix_driver.flush(); +} + +void led_matrix_set_index_value(int index, uint8_t value) { + led_matrix_driver.set_value(index, value); +} + +void led_matrix_set_index_value_all(uint8_t value) { + led_matrix_driver.set_value_all(value); +} + +bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + uint8_t led[8], led_count; + map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); + if (led_count > 0) { + for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) { + g_last_led_hit[i - 1] = g_last_led_hit[i - 2]; + } + g_last_led_hit[0] = led[0]; + g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1); + } + for(uint8_t i = 0; i < led_count; i++) + g_key_hit[led[i]] = 0; + g_any_key_hit = 0; + } else { + #ifdef LED_MATRIX_KEYRELEASES + uint8_t led[8], led_count; + map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); + for(uint8_t i = 0; i < led_count; i++) + g_key_hit[led[i]] = 255; + + g_any_key_hit = 255; + #endif + } + return true; +} + +void led_matrix_set_suspend_state(bool state) { + g_suspend_state = state; +} + +// All LEDs off +void led_matrix_all_off(void) { + led_matrix_set_index_value_all(0); +} + +// Uniform brightness +void led_matrix_uniform_brightness(void) { + led_matrix_set_index_value_all(led_matrix_config.val); +} + +void led_matrix_custom(void) {} + +void led_matrix_task(void) { + #ifdef TRACK_PREVIOUS_EFFECT + static uint8_t toggle_enable_last = 255; + #endif + if (!led_matrix_config.enable) { + led_matrix_all_off(); + led_matrix_indicators(); + #ifdef TRACK_PREVIOUS_EFFECT + toggle_enable_last = led_matrix_config.enable; + #endif + return; + } + + // delay 1 second before driving LEDs or doing anything else + // FIXME: Can't we use wait_ms() here? + static uint8_t startup_tick = 0; + if (startup_tick < 20) { + startup_tick++; + return; + } + + g_tick++; + + if (g_any_key_hit < 0xFFFFFFFF) { + g_any_key_hit++; + } + + for (int led = 0; led < DRIVER_LED_TOTAL; led++) { + if (g_key_hit[led] < 255) { + if (g_key_hit[led] == 254) + g_last_led_count = MAX(g_last_led_count - 1, 0); + g_key_hit[led]++; + } + } + + // Factory default magic value + if (led_matrix_config.mode == 255) { + led_matrix_uniform_brightness(); + return; + } + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || + (LED_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_AFTER_TIMEOUT * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : led_matrix_config.mode; + + #ifdef TRACK_PREVIOUS_EFFECT + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + + static uint8_t effect_last = 255; + bool initialize = (effect != effect_last) || (led_matrix_config.enable != toggle_enable_last); + effect_last = effect; + toggle_enable_last = led_matrix_config.enable; + #endif + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch (effect) { + case LED_MATRIX_UNIFORM_BRIGHTNESS: + led_matrix_uniform_brightness(); + break; + default: + led_matrix_custom(); + break; + } + + if (! suspend_backlight) { + led_matrix_indicators(); + } + +} + +void led_matrix_indicators(void) { + led_matrix_indicators_kb(); + led_matrix_indicators_user(); +} + +__attribute__((weak)) +void led_matrix_indicators_kb(void) {} + +__attribute__((weak)) +void led_matrix_indicators_user(void) {} + + +// void led_matrix_set_indicator_index(uint8_t *index, uint8_t row, uint8_t column) +// { +// if (row >= MATRIX_ROWS) +// { +// // Special value, 255=none, 254=all +// *index = row; +// } +// else +// { +// // This needs updated to something like +// // uint8_t led[8], led_count; +// // map_row_column_to_led(row,column,led,&led_count); +// // for(uint8_t i = 0; i < led_count; i++) +// map_row_column_to_led(row, column, index); +// } +// } + +void led_matrix_init(void) { + led_matrix_driver.init(); + + // TODO: put the 1 second startup delay here? + + // clear the key hits + for (int led=0; led= LED_MATRIX_EFFECT_MAX) + led_matrix_config.mode = 1; + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_step_reverse(void) { + led_matrix_config.mode--; + if (led_matrix_config.mode < 1) + led_matrix_config.mode = LED_MATRIX_EFFECT_MAX - 1; + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_increase_val(void) { + led_matrix_config.val = increment(led_matrix_config.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS); + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_decrease_val(void) { + led_matrix_config.val = decrement(led_matrix_config.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS); + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_increase_speed(void) { + led_matrix_config.speed = increment(led_matrix_config.speed, 1, 0, 3); + eeconfig_update_led_matrix(led_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +void led_matrix_decrease_speed(void) { + led_matrix_config.speed = decrement(led_matrix_config.speed, 1, 0, 3); + eeconfig_update_led_matrix(led_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +void led_matrix_mode(uint8_t mode, bool eeprom_write) { + led_matrix_config.mode = mode; + if (eeprom_write) { + eeconfig_update_led_matrix(led_matrix_config.raw); + } +} + +uint8_t led_matrix_get_mode(void) { + return led_matrix_config.mode; +} + +void led_matrix_set_value(uint8_t val, bool eeprom_write) { + led_matrix_config.val = val; + if (eeprom_write) { + eeconfig_update_led_matrix(led_matrix_config.raw); + } +} diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h new file mode 100644 index 000000000000..20f2e73c69de --- /dev/null +++ b/quantum/led_matrix.h @@ -0,0 +1,142 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2019 Clueboard + * + * 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 LED_MATRIX_H +#define LED_MATRIX_H + + +typedef struct Point { + uint8_t x; + uint8_t y; +} __attribute__((packed)) Point; + +typedef struct led_matrix { + union { + uint8_t raw; + struct { + uint8_t row:4; // 16 max + uint8_t col:4; // 16 max + }; + } matrix_co; + Point point; + uint8_t modifier:1; +} __attribute__((packed)) led_matrix; + +extern const led_matrix g_leds[DRIVER_LED_TOTAL]; + +typedef struct { + uint8_t index; + uint8_t value; +} led_indicator; + +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t mode :6; + uint8_t hue :8; // Unused by led_matrix + uint8_t sat :8; // Unused by led_matrix + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} led_config_t; + +enum led_matrix_effects { + LED_MATRIX_UNIFORM_BRIGHTNESS = 1, + // All new effects go above this line + LED_MATRIX_EFFECT_MAX +}; + +void led_matrix_set_index_value(int index, uint8_t value); +void led_matrix_set_index_value_all(uint8_t value); + +// This runs after another backlight effect and replaces +// colors already set +void led_matrix_indicators(void); +void led_matrix_indicators_kb(void); +void led_matrix_indicators_user(void); + +void led_matrix_init(void); +void led_matrix_setup_drivers(void); + +void led_matrix_set_suspend_state(bool state); +void led_matrix_set_indicator_state(uint8_t state); + +void led_matrix_task(void); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void led_matrix_update_pwm_buffers(void); + +bool process_led_matrix(uint16_t keycode, keyrecord_t *record); + +uint32_t led_matrix_get_tick(void); + +void led_matrix_toggle(void); +void led_matrix_enable(void); +void led_matrix_enable_noeeprom(void); +void led_matrix_disable(void); +void led_matrix_disable_noeeprom(void); +void led_matrix_step(void); +void led_matrix_step_reverse(void); +void led_matrix_increase_val(void); +void led_matrix_decrease_val(void); +void led_matrix_increase_speed(void); +void led_matrix_decrease_speed(void); +void led_matrix_mode(uint8_t mode, bool eeprom_write); +void led_matrix_mode_noeeprom(uint8_t mode); +uint8_t led_matrix_get_mode(void); +void led_matrix_set_value(uint8_t mode, bool eeprom_write); + +#ifndef BACKLIGHT_ENABLE +#define backlight_toggle() backlight_matrix_toggle() +#define backlight_enable() backlight_matrix_enable() +#define backlight_enable_noeeprom() backlight_matrix_enable_noeeprom() +#define backlight_disable() backlight_matrix_disable() +#define backlight_disable_noeeprom() backlight_matrix_disable_noeeprom() +#define backlight_step() backlight_matrix_step() +#define backlight_set_value(val) backlight_matrix_set_value(val) +#define backlight_set_value_noeeprom(val) backlight_matrix_set_value_noeeprom(val) +#define backlight_step_reverse() backlight_matrix_step_reverse() +#define backlight_increase_val() backlight_matrix_increase_val() +#define backlight_decrease_val() backlight_matrix_decrease_val() +#define backlight_increase_speed() backlight_matrix_increase_speed() +#define backlight_decrease_speed() backlight_matrix_decrease_speed() +#define backlight_mode(mode) backlight_matrix_mode(mode) +#define backlight_mode_noeeprom(mode) backlight_matrix_mode_noeeprom(mode) +#define backlight_get_mode() backlight_matrix_get_mode() +#endif + +typedef struct { + /* Perform any initialisation required for the other driver functions to work. */ + void (*init)(void); + + /* Set the brightness of a single LED in the buffer. */ + void (*set_value)(int index, uint8_t value); + /* Set the brightness of all LEDS on the keyboard in the buffer. */ + void (*set_value_all)(uint8_t value); + /* Flush any buffered changes to the hardware. */ + void (*flush)(void); +} led_matrix_driver_t; + +extern const led_matrix_driver_t led_matrix_driver; + +#endif diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c new file mode 100644 index 000000000000..f00f4f366807 --- /dev/null +++ b/quantum/led_matrix_drivers.c @@ -0,0 +1,147 @@ +/* Copyright 2018 Clueboard + * + * 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 "quantum.h" +#include "led_matrix.h" + +/* Each driver needs to define a struct: + * + * const led_matrix_driver_t led_matrix_driver; + * + * All members must be provided. Keyboard custom drivers must define this + * in their own files. + */ + +#if defined(IS31FL3731) || defined(IS31FL3733) + +#if defined(IS31FL3731) + #include "is31fl3731-simple.h" +#endif + +#include "i2c_master.h" + +static void init(void) { + i2c_init(); + #ifdef IS31FL3731 + #ifdef LED_DRIVER_ADDR_1 + IS31FL3731_init(DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3731_init(DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3731_init(DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3731_init(DRIVER_ADDR_4); + #endif + #else + #ifdef LED_DRIVER_ADDR_1 + IS31FL3733_init(DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3733_init(DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3733_init(DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3733_init(DRIVER_ADDR_4); + #endif + #endif + for (int index = 0; index < DRIVER_LED_TOTAL; index++) { + #ifdef IS31FL3731 + IS31FL3731_set_led_control_register(index, true); + #else + IS31FL3733_set_led_control_register(index, true); + #endif + } + // This actually updates the LED drivers + #ifdef IS31FL3731 + #ifdef LED_DRIVER_ADDR_1 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_4); + #endif + #else + #ifdef LED_DRIVER_ADDR_1 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_4); + #endif + #endif +} + +static void flush(void) { + #ifdef IS31FL3731 + #ifdef LED_DRIVER_ADDR_1 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4); + #endif + #else + #ifdef LED_DRIVER_ADDR_1 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4); + #endif + #endif +} + +const led_matrix_driver_t led_matrix_driver = { + .init = init, + .flush = flush, +#ifdef IS31FL3731 + .set_value = IS31FL3731_set_value, + .set_value_all = IS31FL3731_set_value_all, +#else + .set_value = IS31FL3733_set_value, + .set_value_all = IS31FL3733_set_value_all, +#endif +}; + + +#endif diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index e43532d11e77..b64ddec07437 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -50,25 +50,17 @@ typedef struct rgb_led { extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; -typedef struct -{ - HSV color; - uint8_t index; -} rgb_indicator; - typedef union { uint32_t raw; struct { bool enable :1; uint8_t mode :6; - uint16_t hue :9; - uint8_t sat :8; uint8_t val :8; uint8_t speed :8;//EECONFIG needs to be increased to support this }; -} rgb_config_t; +} led_config_t; -enum rgb_matrix_effects { +enum _matrix_effects { RGB_MATRIX_SOLID_COLOR = 1, #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS RGB_MATRIX_ALPHAS_MODS, From 159191a8747891920aea7de2324507daa8a661fb Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 26 Jan 2019 12:39:55 -0800 Subject: [PATCH 055/445] revert accidental rgb_matrix.h changes --- quantum/rgb_matrix.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index b64ddec07437..e43532d11e77 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -50,17 +50,25 @@ typedef struct rgb_led { extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +typedef struct +{ + HSV color; + uint8_t index; +} rgb_indicator; + typedef union { uint32_t raw; struct { bool enable :1; uint8_t mode :6; + uint16_t hue :9; + uint8_t sat :8; uint8_t val :8; uint8_t speed :8;//EECONFIG needs to be increased to support this }; -} led_config_t; +} rgb_config_t; -enum _matrix_effects { +enum rgb_matrix_effects { RGB_MATRIX_SOLID_COLOR = 1, #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS RGB_MATRIX_ALPHAS_MODS, From bf2670601d29551896bab6811b9bb64de2d0ee0e Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 26 Jan 2019 14:33:55 -0800 Subject: [PATCH 056/445] compiles, but long delay on startup and problems --- drivers/issi/is31fl3731-simple.c | 18 +++++++++--- drivers/issi/is31fl3731-simple.h | 2 +- quantum/led_matrix.c | 20 +++++++------ quantum/led_matrix.h | 30 +++++++------------ quantum/led_matrix_drivers.c | 50 ++++++++++++++++---------------- quantum/quantum.c | 16 +++++++--- quantum/quantum.h | 6 +++- tmk_core/common/action.c | 2 +- 8 files changed, 79 insertions(+), 65 deletions(-) diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c index 46d51dac7046..9c31df209245 100644 --- a/drivers/issi/is31fl3731-simple.c +++ b/drivers/issi/is31fl3731-simple.c @@ -29,6 +29,7 @@ #include "is31fl3731-simple.h" #include "i2c_master.h" #include "progmem.h" +#include "print.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) @@ -72,10 +73,19 @@ uint8_t g_twi_transfer_buffer[20]; // We could optimize this and take out the unused registers from these // buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's // probably not worth the extra complexity. -uint8_t g_pwm_buffer[DRIVER_COUNT][144]; +uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144]; bool g_pwm_buffer_update_required = false; -uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; +/* There's probably a better way to init this... */ +#if LED_DRIVER_COUNT == 1 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}}; +#elif LED_DRIVER_COUNT == 2 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}}; +#elif LED_DRIVER_COUNT == 3 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}}; +#elif LED_DRIVER_COUNT == 4 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}}; +#endif bool g_led_control_registers_update_required = false; // This is the bit pattern in the LED control registers @@ -194,7 +204,7 @@ void IS31FL3731_init(uint8_t addr) { } void IS31FL3731_set_value(int index, uint8_t value) { - if (index >= 0 && index < DRIVER_LED_TOTAL) { + if (index >= 0 && index < LED_DRIVER_LED_COUNT) { is31_led led = g_is31_leds[index]; // Subtract 0x24 to get the second index of g_pwm_buffer @@ -204,7 +214,7 @@ void IS31FL3731_set_value(int index, uint8_t value) { } void IS31FL3731_set_value_all(uint8_t value) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + for (int i = 0; i < LED_DRIVER_LED_COUNT; i++) { IS31FL3731_set_value(i, value); } } diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h index c102837a30f5..3b107d48f6ba 100644 --- a/drivers/issi/is31fl3731-simple.h +++ b/drivers/issi/is31fl3731-simple.h @@ -25,7 +25,7 @@ typedef struct is31_led { uint8_t v; } __attribute__((packed)) is31_led; -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led g_is31_leds[LED_DRIVER_LED_COUNT]; void IS31FL3731_init(uint8_t addr); void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index 9a0aa6acd940..3b284990d989 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c @@ -59,7 +59,7 @@ bool g_suspend_state = false; uint32_t g_tick = 0; // Ticks since this key was last hit. -uint8_t g_key_hit[DRIVER_LED_TOTAL]; +uint8_t g_key_hit[LED_DRIVER_LED_COUNT]; // Ticks since any key was last hit. uint32_t g_any_key_hit = 0; @@ -95,7 +95,7 @@ void map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i, uint8_t led_matrix led; *led_count = 0; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + for (uint8_t i = 0; i < LED_DRIVER_LED_COUNT; i++) { // map_index_to_led(i, &led); led = g_leds[i]; if (row == led.matrix_co.row && column == led.matrix_co.col) { @@ -187,7 +187,7 @@ void led_matrix_task(void) { g_any_key_hit++; } - for (int led = 0; led < DRIVER_LED_TOTAL; led++) { + for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) { if (g_key_hit[led] < 255) { if (g_key_hit[led] == 254) g_last_led_count = MAX(g_last_led_count - 1, 0); @@ -271,7 +271,7 @@ void led_matrix_init(void) { // TODO: put the 1 second startup delay here? // clear the key hits - for (int led=0; led BACKLIGHT_LEVELS) diff --git a/quantum/quantum.h b/quantum/quantum.h index 56a6a1a991ad..1698836094de 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -28,7 +28,11 @@ #include "matrix.h" #include "keymap.h" #ifdef BACKLIGHT_ENABLE - #include "backlight.h" + #ifdef LED_MATRIX_ENABLE + #include "led_matrix.h" + #else + #include "backlight.h" + #endif #endif #ifdef RGBLIGHT_ENABLE #include "rgblight.h" diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index ec8d6ed7b9cb..d4d4ac28da79 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -537,7 +537,7 @@ void process_action(keyrecord_t *record, action_t action) action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); break; #endif -#ifdef BACKLIGHT_ENABLE +#if defined(BACKLIGHT_ENABLE) | defined(LED_MATRIX_ENABLE) case ACT_BACKLIGHT: if (!event.pressed) { switch (action.backlight.opt) { From 6b74dd6de5359da18e87b2d4894e3ffc3fc89d47 Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 26 Jan 2019 21:25:59 -0800 Subject: [PATCH 057/445] led_matrix works now --- common_features.mk | 5 +++- drivers/arm/i2c_master.c | 11 ++++---- drivers/arm/i2c_master.h | 10 +++++++ drivers/issi/is31fl3731-simple.c | 5 ---- quantum/led_matrix.c | 47 ++++++++++++++++---------------- quantum/led_matrix.h | 3 -- quantum/led_matrix_drivers.c | 3 +- 7 files changed, 45 insertions(+), 39 deletions(-) diff --git a/common_features.mk b/common_features.mk index 8c7043cb7ec2..ff01ecb85df8 100644 --- a/common_features.mk +++ b/common_features.mk @@ -209,7 +209,10 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes) CIE1931_CURVE = yes endif - ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER + endif + ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif endif diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 385bd97cb889..1c3da2a1a28a 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -46,13 +46,13 @@ __attribute__ ((weak)) void i2c_init(void) { // Try releasing special pins for a short time - palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); - palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); + palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_INPUT); + palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_INPUT); chThdSleepMilliseconds(10); - - palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); + + palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); //i2cInit(); //This is invoked by halInit() so no need to redo it. } @@ -67,6 +67,7 @@ uint8_t i2c_start(uint8_t address) uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { + // FIXME: Next steps: Add a print here, copy this file to your rgb_matrix firmware. Compare both. i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 392760328f78..7a9eb32eb9fb 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -26,6 +26,16 @@ #include "ch.h" #include +#ifndef I2C1_BANK + #define I2C1_BANK GPIOB +#endif +#ifndef I2C1_SCL + #define I2C1_SCL 6 +#endif +#ifndef I2C1_SDA + #define I2C1_SDA 7 +#endif + #ifndef I2C_DRIVER #define I2C_DRIVER I2CD1 #endif diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c index 9c31df209245..ff6620b72fba 100644 --- a/drivers/issi/is31fl3731-simple.c +++ b/drivers/issi/is31fl3731-simple.c @@ -158,12 +158,7 @@ void IS31FL3731_init(uint8_t addr) { // enable software shutdown IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); // this delay was copied from other drivers, might not be needed - // FIXME: Don't we have a wrapper for this already? - #ifdef __AVR__ - _delay_ms(10); - #else wait_ms(10); - #endif // picture mode IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index 3b284990d989..f849d478ddc2 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c @@ -55,6 +55,9 @@ led_config_t led_matrix_config; bool g_suspend_state = false; +// Last uniform brightness level. +uint8_t g_uniform_brightness = 0; + // Global tick at 20 Hz uint32_t g_tick = 0; @@ -118,6 +121,7 @@ void led_matrix_set_index_value_all(uint8_t value) { } bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { +/* FIXME: Why you comment out skully? if (record->event.pressed) { uint8_t led[8], led_count; map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); @@ -141,6 +145,7 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { g_any_key_hit = 255; #endif } +*/ return true; } @@ -155,22 +160,20 @@ void led_matrix_all_off(void) { // Uniform brightness void led_matrix_uniform_brightness(void) { - led_matrix_set_index_value_all(led_matrix_config.val); + uint8_t current_brightness = (LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS) * led_matrix_config.val; + if (current_brightness != g_uniform_brightness) { + g_uniform_brightness = current_brightness; + led_matrix_set_index_value_all(current_brightness); + } } void led_matrix_custom(void) {} void led_matrix_task(void) { - #ifdef TRACK_PREVIOUS_EFFECT - static uint8_t toggle_enable_last = 255; - #endif - if (!led_matrix_config.enable) { - led_matrix_all_off(); - led_matrix_indicators(); - #ifdef TRACK_PREVIOUS_EFFECT - toggle_enable_last = led_matrix_config.enable; - #endif - return; + if (!led_matrix_config.enable) { + led_matrix_all_off(); + led_matrix_indicators(); + return; } // delay 1 second before driving LEDs or doing anything else @@ -187,6 +190,7 @@ void led_matrix_task(void) { g_any_key_hit++; } +/* FIXME: WHY YOU COMMENT OUT?! for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) { if (g_key_hit[led] < 255) { if (g_key_hit[led] == 254) @@ -200,24 +204,13 @@ void led_matrix_task(void) { led_matrix_uniform_brightness(); return; } - +*/ // Ideally we would also stop sending zeros to the LED driver PWM buffers // while suspended and just do a software shutdown. This is a cheap hack for now. bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || (LED_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_AFTER_TIMEOUT * 60 * 20)); uint8_t effect = suspend_backlight ? 0 : led_matrix_config.mode; - #ifdef TRACK_PREVIOUS_EFFECT - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - - static uint8_t effect_last = 255; - bool initialize = (effect != effect_last) || (led_matrix_config.enable != toggle_enable_last); - effect_last = effect; - toggle_enable_last = led_matrix_config.enable; - #endif - // this gets ticked at 20 Hz. // each effect can opt to do calculations // and/or request PWM buffer updates. @@ -230,10 +223,12 @@ void led_matrix_task(void) { break; } - if (! suspend_backlight) { + if (!suspend_backlight) { led_matrix_indicators(); } + // Tell the LED driver to update its state + led_matrix_driver.flush(); } void led_matrix_indicators(void) { @@ -404,3 +399,7 @@ void led_matrix_set_value(uint8_t val) { led_matrix_set_value_noeeprom(val); eeconfig_update_led_matrix(led_matrix_config.raw); } + +void backlight_set(uint8_t val) { + led_matrix_set_value(val); +} diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h index 6db162963eec..9bf20d04478d 100644 --- a/quantum/led_matrix.h +++ b/quantum/led_matrix.h @@ -112,9 +112,6 @@ uint8_t led_matrix_get_mode(void); void led_matrix_set_value(uint8_t mode); void led_matrix_set_value_noeeprom(uint8_t mode); -// Hook into the existing backlight API -#define backlight_set(val) led_matrix_set_value(val) - typedef struct { /* Perform any initialisation required for the other driver functions to work. */ void (*init)(void); diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c index e0f8b2094905..21e8a14c66f6 100644 --- a/quantum/led_matrix_drivers.c +++ b/quantum/led_matrix_drivers.c @@ -64,7 +64,8 @@ static void init(void) { IS31FL3733_init(LED_DRIVER_ADDR_4); #endif #endif - for (int index = 0; index < LED_DRIVER_COUNT; index++) { + + for (int index = 0; index < LED_DRIVER_LED_COUNT; index++) { #ifdef IS31FL3731 IS31FL3731_set_led_control_register(index, true); #else From cc738e32dd02cbc6e10f3e229332390d3b886e4d Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 16:19:44 -0800 Subject: [PATCH 058/445] Force backlight on when led matrix is enabled --- common_features.mk | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/common_features.mk b/common_features.mk index ff01ecb85df8..b5fdb404bb2b 100644 --- a/common_features.mk +++ b/common_features.mk @@ -118,12 +118,13 @@ VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom LED_MATRIX_ENABLE ?= no ifneq ($(strip $(LED_MATRIX_ENABLE)), no) -ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) - $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) -endif - OPT_DEFS += -DLED_MATRIX_ENABLE - SRC += $(QUANTUM_DIR)/led_matrix.c - SRC += $(QUANTUM_DIR)/led_matrix_drivers.c + ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) + $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) + else + OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER + SRC += $(QUANTUM_DIR)/led_matrix.c + SRC += $(QUANTUM_DIR)/led_matrix_drivers.c + endif endif ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731) @@ -212,9 +213,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif - ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) - OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER - endif endif ifeq ($(strip $(CIE1931_CURVE)), yes) From 24df54b80794144907db94c2cb5ceca928700e2d Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 16:19:55 -0800 Subject: [PATCH 059/445] Add documentation for led matrix --- docs/feature_led_matrix.md | 199 +++++++------------------------------ docs/feature_rgb_matrix.md | 4 + docs/i2c_driver.md | 18 ++-- 3 files changed, 51 insertions(+), 170 deletions(-) diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index 5a62cc5309b8..372407b90c2a 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -1,14 +1,31 @@ -# RGB Matrix Lighting +# LED Matrix Lighting + +This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it. + +If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix.md) instead. ## Driver configuration ### IS31FL3731 -There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: +There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: LED_MATRIX_ENABLE = IS31FL3731 + +You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: -Configure the hardware via your `config.h`: +| Variable | Description | Default | +|----------|-------------|---------| +| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages | 100 | +| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | | +| `LED_DRIVER_LED_COUNT` | (Required) How many LED lights are present across all drivers | | +| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | | +| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | | +| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | | +| `LED_DRIVER_ADDR_4` | (Optional) Address for the fourth LED driver | | + +Here is an example using 2 drivers. // 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) @@ -21,9 +38,9 @@ Configure the hardware via your `config.h`: #define LED_DRIVER_ADDR_2 0b1110110 #define LED_DRIVER_COUNT 2 - #define LED_DRIVER_1_LED_TOTAL 25 - #define LED_DRIVER_2_LED_TOTAL 24 - #define LED_DRIVER_LED_TOTAL LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL + #define LED_DRIVER_1_LED_COUNT 25 + #define LED_DRIVER_2_LED_COUNT 24 + #define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. @@ -32,175 +49,31 @@ Define these arrays listing all the LEDs in your `.c`: const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C1_3, C2_3, C3_3}, + * | LED address + * | | */ + {0, C3_3}, .... } -Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). - -### IS31FL3733 - -There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: - - RGB_MATRIX_ENABLE = IS31FL3733 - -Configure the hardware via your `config.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) - // The address will vary depending on your wiring: - // 00 <-> GND - // 01 <-> SCL - // 10 <-> SDA - // 11 <-> VCC - // ADDR1 represents A1:A0 of the 7-bit address. - // ADDR2 represents A3:A2 of the 7-bit address. - // The result is: 0b101(ADDR2)(ADDR1) - #define DRIVER_ADDR_1 0b1010000 - #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - - #define DRIVER_COUNT 1 - #define DRIVER_1_LED_TOTAL 64 - #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL - -Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` - -Define these arrays listing all the LEDs in your `.c`: - - 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}, - .... - } - -Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). - -From this point forward the configuration is the same for all the drivers. - - const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - /* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, - {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, - .... - } - -The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: - - x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION - y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION - -Where all variables are decimels/floats. - -`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). ## Keycodes -All RGB keycodes are currently shared with the RGBLIGHT system: - - * `RGB_TOG` - toggle - * `RGB_MOD` - cycle through modes - * `RGB_HUI` - increase hue - * `RGB_HUD` - decrease hue - * `RGB_SAI` - increase saturation - * `RGB_SAD` - decrease saturation - * `RGB_VAI` - increase value - * `RGB_VAD` - decrease value - * `RGB_SPI` - increase speed effect (no EEPROM support) - * `RGB_SPD` - decrease speed effect (no EEPROM support) - - - * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system - -## RGB Matrix Effects - -These are the effects that are currently available: - - enum rgb_matrix_effects { - RGB_MATRIX_SOLID_COLOR = 1, - RGB_MATRIX_ALPHAS_MODS, - RGB_MATRIX_DUAL_BEACON, - RGB_MATRIX_GRADIENT_UP_DOWN, - RGB_MATRIX_RAINDROPS, - RGB_MATRIX_CYCLE_ALL, - RGB_MATRIX_CYCLE_LEFT_RIGHT, - RGB_MATRIX_CYCLE_UP_DOWN, - RGB_MATRIX_RAINBOW_BEACON, - RGB_MATRIX_RAINBOW_PINWHEELS, - RGB_MATRIX_RAINBOW_MOVING_CHEVRON, - RGB_MATRIX_JELLYBEAN_RAINDROPS, - RGB_MATRIX_DIGITAL_RAIN, - #ifdef RGB_MATRIX_KEYPRESSES - RGB_MATRIX_SOLID_REACTIVE, - RGB_MATRIX_SPLASH, - RGB_MATRIX_MULTISPLASH, - RGB_MATRIX_SOLID_SPLASH, - RGB_MATRIX_SOLID_MULTISPLASH, - #endif - RGB_MATRIX_EFFECT_MAX - }; - -You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: - - -|Define |Description | -|---------------------------------------------------|--------------------------------------------| -|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | -|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | -|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| -|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | -|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | -|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | +All LED matrix keycodes are currently shared with the [backlight system](feature_backlight.md). + +## LED Matrix Effects +Currently no LED matrix effects have been created. ## Custom layer effects Custom layer effects can be done by defining this in your `.c`: - void rgb_matrix_indicators_kb(void) { - rgb_matrix_set_color(index, red, green, blue); + void led_matrix_indicators_kb(void) { + led_matrix_set_index_value(index, value); } -A similar function works in the keymap as `rgb_matrix_indicators_user`. - -## Additional `config.h` Options - - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) - #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) - #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 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 - -## EEPROM storage - -The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: - - #define EECONFIG_RGB_MATRIX (uint32_t *)16 - -Where `16` is an unused index from `eeconfig.h`. +A similar function works in the keymap as `led_matrix_indicators_user`. ## Suspended state @@ -208,10 +81,10 @@ To use the suspend feature, add this to your `.c`: void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); + led_matrix_set_suspend_state(true); } void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); + led_matrix_set_suspend_state(false); } diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 0af1e4947960..e955eb26f7e7 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -1,5 +1,9 @@ # RGB Matrix Lighting +This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it. + +If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead. + ## Driver configuration ### IS31FL3731 diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index ea24dc64f392..18546fc62be5 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -33,8 +33,8 @@ The following defines can be used to configure the I2C master driver. |Variable |Description |Default| |------------------|---------------------------------------------------|-------| -|`#F_SCL` |Clock frequency in Hz |400KHz | -|`#Prescaler` |Divides master clock to aid in I2C clock selection |1 | +|`F_SCL` |Clock frequency in Hz |400KHz | +|`Prescaler` |Divides master clock to aid in I2C clock selection |1 | AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required. @@ -63,20 +63,24 @@ Lastly, we need to assign the correct GPIO pins depending on the I2C hardware dr By default the I2C1 hardware driver is assumed to be used. If another hardware driver is used, `#define I2C_DRIVER I2CDX` should be added to the `config.h` file with X being the number of hardware driver used. For example is I2C3 is enabled, the `config.h` file should contain `#define I2C_DRIVER I2CD3`. This aligns the QMK I2C driver with the Chibios I2C driver. -STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. +STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. You can use these defines to set your i2c pins: -This can be changed by declaring the `i2c_init` function which intentionally has a weak attribute. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: +| Variable | Description | Default | +|-------------|----------------------------------------------|---------| +| `I2C1_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | +| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` | +| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` | + +You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: ```C void i2c_init(void) { setPinInput(B6); // Try releasing special pins for a short time setPinInput(B7); - chThdSleepMilliseconds(10); // Wait for the release to happen + wait_ms(10); // Wait for the release to happen palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B6 to I2C function palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B7 to I2C function } ``` - - From 32116f1a4580e36c92870ca800cf3cc9106c35dd Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 16:28:11 -0800 Subject: [PATCH 060/445] Move the 1 second delay to led_matrix_init --- quantum/led_matrix.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index f849d478ddc2..2709de11232b 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c @@ -82,7 +82,7 @@ void eeconfig_update_led_matrix_default(void) { eeconfig_update_led_matrix(led_matrix_config.raw); } void eeconfig_debug_led_matrix(void) { - dprintf("led_matrix_config eprom\n"); + dprintf("led_matrix_config eeprom\n"); dprintf("led_matrix_config.enable = %d\n", led_matrix_config.enable); dprintf("led_matrix_config.mode = %d\n", led_matrix_config.mode); dprintf("led_matrix_config.val = %d\n", led_matrix_config.val); @@ -176,21 +176,12 @@ void led_matrix_task(void) { return; } - // delay 1 second before driving LEDs or doing anything else - // FIXME: Can't we use wait_ms() here? - static uint8_t startup_tick = 0; - if (startup_tick < 20) { - startup_tick++; - return; - } - g_tick++; if (g_any_key_hit < 0xFFFFFFFF) { g_any_key_hit++; } -/* FIXME: WHY YOU COMMENT OUT?! for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) { if (g_key_hit[led] < 255) { if (g_key_hit[led] == 254) @@ -199,12 +190,6 @@ void led_matrix_task(void) { } } - // Factory default magic value - if (led_matrix_config.mode == 255) { - led_matrix_uniform_brightness(); - return; - } -*/ // Ideally we would also stop sending zeros to the LED driver PWM buffers // while suspended and just do a software shutdown. This is a cheap hack for now. bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || @@ -263,25 +248,28 @@ void led_matrix_indicators_user(void) {} void led_matrix_init(void) { led_matrix_driver.init(); - // TODO: put the 1 second startup delay here? + // Wait a second for the driver to finish initializing + wait_ms(1000); // clear the key hits for (int led=0; led Date: Sun, 27 Jan 2019 16:52:07 -0800 Subject: [PATCH 061/445] cleanup --- quantum/led_matrix.c | 76 +++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index 2709de11232b..ca37af0d3dd9 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c @@ -55,9 +55,6 @@ led_config_t led_matrix_config; bool g_suspend_state = false; -// Last uniform brightness level. -uint8_t g_uniform_brightness = 0; - // Global tick at 20 Hz uint32_t g_tick = 0; @@ -70,9 +67,11 @@ uint32_t g_any_key_hit = 0; uint32_t eeconfig_read_led_matrix(void) { return eeprom_read_dword(EECONFIG_LED_MATRIX); } + void eeconfig_update_led_matrix(uint32_t config_value) { eeprom_update_dword(EECONFIG_LED_MATRIX, config_value); } + void eeconfig_update_led_matrix_default(void) { dprintf("eeconfig_update_led_matrix_default\n"); led_matrix_config.enable = 1; @@ -81,6 +80,7 @@ void eeconfig_update_led_matrix_default(void) { led_matrix_config.speed = 0; eeconfig_update_led_matrix(led_matrix_config.raw); } + void eeconfig_debug_led_matrix(void) { dprintf("led_matrix_config eeprom\n"); dprintf("led_matrix_config.enable = %d\n", led_matrix_config.enable); @@ -90,7 +90,9 @@ void eeconfig_debug_led_matrix(void) { } // Last led hit -#define LED_HITS_TO_REMEMBER 8 +#ifndef LED_HITS_TO_REMEMBER + #define LED_HITS_TO_REMEMBER 8 +#endif uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; uint8_t g_last_led_count = 0; @@ -121,7 +123,6 @@ void led_matrix_set_index_value_all(uint8_t value) { } bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { -/* FIXME: Why you comment out skully? if (record->event.pressed) { uint8_t led[8], led_count; map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); @@ -145,7 +146,6 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { g_any_key_hit = 255; #endif } -*/ return true; } @@ -160,11 +160,7 @@ void led_matrix_all_off(void) { // Uniform brightness void led_matrix_uniform_brightness(void) { - uint8_t current_brightness = (LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS) * led_matrix_config.val; - if (current_brightness != g_uniform_brightness) { - g_uniform_brightness = current_brightness; - led_matrix_set_index_value_all(current_brightness); - } + led_matrix_set_index_value_all(LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS * led_matrix_config.val); } void led_matrix_custom(void) {} @@ -246,44 +242,44 @@ void led_matrix_indicators_user(void) {} // } void led_matrix_init(void) { - led_matrix_driver.init(); + led_matrix_driver.init(); - // Wait a second for the driver to finish initializing - wait_ms(1000); + // Wait half a second for the driver to finish initializing + wait_ms(500); - // clear the key hits - for (int led=0; led= LED_MATRIX_EFFECT_MAX) + if (led_matrix_config.mode >= LED_MATRIX_EFFECT_MAX) { led_matrix_config.mode = 1; + } eeconfig_update_led_matrix(led_matrix_config.raw); } void led_matrix_step_reverse(void) { led_matrix_config.mode--; - if (led_matrix_config.mode < 1) + if (led_matrix_config.mode < 1) { led_matrix_config.mode = LED_MATRIX_EFFECT_MAX - 1; + } eeconfig_update_led_matrix(led_matrix_config.raw); } From 84879f28a3e9e61053f7db37724b23bb32fbb0b4 Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 16:58:21 -0800 Subject: [PATCH 062/445] fix compiling for backlight without led matrix --- quantum/quantum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 0e605d4cb45f..376578ade426 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1206,7 +1206,7 @@ static inline void set_pwm(uint16_t val) { OCRxx = val; } -#ifndef BACKLIGHT_CUSTOM_DRIVER || LED_MATRIX_ENABLE +#ifndef BACKLIGHT_CUSTOM_DRIVER __attribute__ ((weak)) void backlight_set(uint8_t level) { if (level > BACKLIGHT_LEVELS) From 1a680c1d6a426dfcd43af90c1083da15b0217086 Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 17:07:07 -0800 Subject: [PATCH 063/445] cleanup --- drivers/arm/i2c_master.c | 1 - drivers/issi/is31fl3731-simple.c | 1 + drivers/issi/is31fl3731-simple.h | 1 + quantum/led_matrix.h | 4 ++-- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 1c3da2a1a28a..50a30ebce77d 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -67,7 +67,6 @@ uint8_t i2c_start(uint8_t address) uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { - // FIXME: Next steps: Add a print here, copy this file to your rgb_matrix firmware. Compare both. i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c index ff6620b72fba..a7faa9c38c0b 100644 --- a/drivers/issi/is31fl3731-simple.c +++ b/drivers/issi/is31fl3731-simple.c @@ -1,5 +1,6 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert + * Copyright 2019 Clueboard * * 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/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h index 3b107d48f6ba..dbe498281791 100644 --- a/drivers/issi/is31fl3731-simple.h +++ b/drivers/issi/is31fl3731-simple.h @@ -1,5 +1,6 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert + * Copyright 2019 Clueboard * * 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/quantum/led_matrix.h b/quantum/led_matrix.h index 9bf20d04478d..618c5d67674e 100644 --- a/quantum/led_matrix.h +++ b/quantum/led_matrix.h @@ -63,8 +63,8 @@ typedef union { } led_config_t; enum led_matrix_effects { - LED_MATRIX_UNIFORM_BRIGHTNESS = 1, - // All new effects go above this line + LED_MATRIX_UNIFORM_BRIGHTNESS = 1, + // All new effects go above this line LED_MATRIX_EFFECT_MAX }; From 5fc24218113a4c862a05a5e4c900cb1733ef75b7 Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 17:13:23 -0800 Subject: [PATCH 064/445] Put back an accidentally stripped copyright --- quantum/led_matrix_drivers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c index 21e8a14c66f6..aeb3bfd550e3 100644 --- a/quantum/led_matrix_drivers.c +++ b/quantum/led_matrix_drivers.c @@ -1,4 +1,5 @@ -/* Copyright 2018 Clueboard +/* Copyright 2018 James Laird-Wah + * Copyright 2019 Clueboard * * 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 From c5221fa1cb1e903600205ba831c841f9d3aad33f Mon Sep 17 00:00:00 2001 From: skullY Date: Sun, 27 Jan 2019 17:34:44 -0800 Subject: [PATCH 065/445] fix the led_matrix.h naming conflict --- quantum/led_matrix.c | 2 +- quantum/led_matrix_drivers.c | 2 +- quantum/{led_matrix.h => ledmatrix.h} | 0 quantum/quantum.h | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename quantum/{led_matrix.h => ledmatrix.h} (100%) diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index ca37af0d3dd9..8ef8abe712b9 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c @@ -20,7 +20,7 @@ #include #include #include "quantum.h" -#include "led_matrix.h" +#include "ledmatrix.h" #include "progmem.h" #include "config.h" #include "eeprom.h" diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c index aeb3bfd550e3..4ee509ee5694 100644 --- a/quantum/led_matrix_drivers.c +++ b/quantum/led_matrix_drivers.c @@ -18,7 +18,7 @@ #include #include #include "quantum.h" -#include "led_matrix.h" +#include "ledmatrix.h" /* Each driver needs to define a struct: * diff --git a/quantum/led_matrix.h b/quantum/ledmatrix.h similarity index 100% rename from quantum/led_matrix.h rename to quantum/ledmatrix.h diff --git a/quantum/quantum.h b/quantum/quantum.h index 1698836094de..c6acf83e5af4 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -29,7 +29,7 @@ #include "keymap.h" #ifdef BACKLIGHT_ENABLE #ifdef LED_MATRIX_ENABLE - #include "led_matrix.h" + #include "ledmatrix.h" #else #include "backlight.h" #endif From 0b3b80afc12e823d859725a30054de65c761ecc6 Mon Sep 17 00:00:00 2001 From: Mike Bell Date: Mon, 11 Feb 2019 14:29:11 +0000 Subject: [PATCH 066/445] Add digital layout for KBD75 (#5095) * Initial commit of digital kbd75 layout * Add readme * Update readme * Update readme with suggestions --- .../kbdfans/kbd75/keymaps/digital/keymap.c | 22 +++++++++++++++++++ .../kbdfans/kbd75/keymaps/digital/readme.md | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 keyboards/kbdfans/kbd75/keymaps/digital/keymap.c create mode 100644 keyboards/kbdfans/kbd75/keymaps/digital/readme.md diff --git a/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c b/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c new file mode 100644 index 000000000000..cb43052c2293 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c @@ -0,0 +1,22 @@ +#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_MPRV, KC_MNXT, KC_MPLY, + 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_DEL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_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_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_INS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______ + ) +}; diff --git a/keyboards/kbdfans/kbd75/keymaps/digital/readme.md b/keyboards/kbdfans/kbd75/keymaps/digital/readme.md new file mode 100644 index 000000000000..99c95a00ff94 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/digital/readme.md @@ -0,0 +1,5 @@ +# digital KBD75 Keymap + +ISO KBD75 keymap. + +![KBD75 digital keymap](https://i.imgur.com/IMb7eML.png) From 516f51606232f3094cb2a8dfe7a7d27fd31a9f5a Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 11 Feb 2019 18:29:57 -0800 Subject: [PATCH 067/445] [Keyboard] Space65: RGB Animations on by default (#5097) --- keyboards/gray_studio/space65/config.h | 2 +- keyboards/gray_studio/space65/rules.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 356e6a8cd809..2c05979f7cbf 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -66,7 +66,7 @@ along with this program. If not, see . #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 + #define RGBLIGHT_ANIMATIONS // /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 0ede67719f76..10bd7cf03563 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -64,8 +64,8 @@ BOOTLOADER = atmel-dfu BOOTMAGIC_ENABLE = lite # 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 +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 From c5e10b7203f140e747ac3a95b6964c52110e07df Mon Sep 17 00:00:00 2001 From: Wilba Date: Wed, 13 Feb 2019 07:59:56 +1100 Subject: [PATCH 068/445] Added WT75-A, refactor wilba.tech PCBs (#5100) * Added WT75-A, added "via" keymaps to wilba.tech * Missed file last commit --- .../wilba_tech/wt60_a/keymaps/via/keymap.c | 38 ++++ .../wilba_tech/wt60_a/keymaps/via/rules.mk | 71 ++++++ keyboards/wilba_tech/wt60_a/rules.mk | 3 - .../wilba_tech/wt65_a/keymaps/via/keymap.c | 37 ++++ .../wilba_tech/wt65_a/keymaps/via/rules.mk | 71 ++++++ keyboards/wilba_tech/wt65_a/rules.mk | 3 - keyboards/wilba_tech/wt75_a/config.h | 202 ++++++++++++++++++ keyboards/wilba_tech/wt75_a/info.json | 13 ++ .../wt75_a/keymaps/default/keymap.c | 41 ++++ .../wilba_tech/wt75_a/keymaps/via/keymap.c | 41 ++++ .../wilba_tech/wt75_a/keymaps/via/rules.mk | 71 ++++++ keyboards/wilba_tech/wt75_a/readme.md | 15 ++ keyboards/wilba_tech/wt75_a/rules.mk | 68 ++++++ keyboards/wilba_tech/wt75_a/wt75_a.c | 17 ++ keyboards/wilba_tech/wt75_a/wt75_a.h | 43 ++++ .../wilba_tech/wt80_a/keymaps/via/keymap.c | 38 ++++ .../wilba_tech/wt80_a/keymaps/via/rules.mk | 71 ++++++ keyboards/wilba_tech/wt80_a/rules.mk | 3 - .../wilba_tech/wt8_a/keymaps/via/keymap.c | 16 ++ .../wilba_tech/wt8_a/keymaps/via/rules.mk | 68 ++++++ keyboards/wilba_tech/wt8_a/rules.mk | 3 - 21 files changed, 921 insertions(+), 12 deletions(-) create mode 100644 keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt75_a/config.h create mode 100644 keyboards/wilba_tech/wt75_a/info.json create mode 100644 keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt75_a/readme.md create mode 100644 keyboards/wilba_tech/wt75_a/rules.mk create mode 100644 keyboards/wilba_tech/wt75_a/wt75_a.c create mode 100644 keyboards/wilba_tech/wt75_a/wt75_a.h create mode 100644 keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..566736f5e3bf --- /dev/null +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-A +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_60_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer +[3] = LAYOUT_60_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 76a07d7a44ac..e41f2186b3a3 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -66,6 +66,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..c5ae81168097 --- /dev/null +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + 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_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 76a07d7a44ac..e41f2186b3a3 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -66,6 +66,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h new file mode 100644 index 000000000000..a24ab246299c --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -0,0 +1,202 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 0x6582 // wilba.tech +#define PRODUCT_ID 0x075A // 75-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT75-A +#define DESCRIPTION wilba.tech WT75-A + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * 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, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* 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. + * + */ + +/* 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 + +#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// 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 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_a/info.json b/keyboards/wilba_tech/wt75_a/info.json new file mode 100644 index 000000000000..d9c54a63a6ba --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wilba.tech WT75-A", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":5.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10, "y":0}, {"label":"F10", "x":11, "y":0}, {"label":"F11", "x":12, "y":0}, {"label":"F12", "x":13, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25}, {"label":"Bksp", "x":14, "y":1.25}, {"label":"Home", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"PgUp", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"PgDn", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"End", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"label":"6.25U", "x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c new file mode 100644 index 000000000000..77a534a2329f --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_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_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt75_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..77a534a2329f --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_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_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/readme.md b/keyboards/wilba_tech/wt75_a/readme.md new file mode 100644 index 000000000000..027081360d8b --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/readme.md @@ -0,0 +1,15 @@ +# WILBA.TECH WT75-A + +![WILBA.TECH WT75-A](https://wilba.tech) + +WT75-A is a keyboard PCB supporting 75% layout with 0.25U blocker. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: WILBA.TECH WT75-A +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt75_a: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/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk new file mode 100644 index 000000000000..e41f2186b3a3 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 diff --git a/keyboards/wilba_tech/wt75_a/wt75_a.c b/keyboards/wilba_tech/wt75_a/wt75_a.c new file mode 100644 index 000000000000..ccff6d62c94b --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/wt75_a.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt75_a/wt75_a.h b/keyboards/wilba_tech/wt75_a/wt75_a.h new file mode 100644 index 000000000000..4ddd1aabf994 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/wt75_a.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K313, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K506, K510, K511, K512, K513, K514 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, K514 } \ +} + diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..9cbe7ff6241a --- /dev/null +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = 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, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 76a07d7a44ac..e41f2186b3a3 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -66,6 +66,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..a9f40362c7de --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8 ), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..f072c67198c2 --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index f072c67198c2..f1c632289cca 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -63,6 +63,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file From d3f7910e680379edd80f8fbe76dd756f7f35c0f3 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 12 Feb 2019 16:46:04 -0800 Subject: [PATCH 069/445] Remove AUTOGEN and fix Travis Compiled Push scripts (#5077) * Grab HEX and BIN files from autogen And push them to qmk.fm/compiled * Make autogen copy extension agnostic This way, when travis cl scrpit looks for hex files, it will actually grab bin files, and not hex files for ARM boards * Handle the AUTOGEN in :bin target to properly handle edge cases Both the TADA68 and ATSAM boards generate the hex file and then convert it to a bin file. The changes I made does not handle this well, at all. This removes the hex and replaces it with a bin, if a bin is normally generated. * Revert hex target to original copy command * Check hex and bin separately in compile push script Since I don't know how to script this, well * Simplify push to compiled folder * Further simplify compiled push script * Move AUTOGEN parsing to a more sane location to prevent tech debt Thanks to skully! * Remove AUTOGEN completely, as it's not needed This has the benefit of making everything super simple, since we can pull every hex and bin from the root of the qmk_firmware folder, and move that to th compiled folder. This also removes old and unneeded code, and removes some tech debt that has been accrued, without adding more, in theory. --- .travis.yml | 2 +- tmk_core/rules.mk | 13 +++---------- util/travis_build.sh | 12 ++++++------ util/travis_compiled_push.sh | 7 +++---- 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cfc9e067ec8..41a1019978ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ before_script: - avr-gcc --version script: - git rev-parse --short HEAD -- make test:all AUTOGEN=false +- make test:all - bash util/travis_build.sh - bash util/travis_docs.sh addons: diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 2e419dd667d4..c43f14292aaf 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -48,9 +48,6 @@ FORMAT = ihex # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) OPT = s -AUTOGEN ?= false - - # Compiler flag to set the C Standard level. # c89 = "ANSI" C # gnu89 = c89 plus GCC extensions @@ -142,7 +139,7 @@ CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) # files -- see avr-libc docs [FIXME: not yet described there] # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. -ASFLAGS += $(ADEFS) +ASFLAGS += $(ADEFS) ifndef SKIP_DEBUG_INFO ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 else @@ -260,10 +257,6 @@ gccversion : @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD) $(eval CMD=$(HEX) $< $@) @$(BUILD_CMD) - @if $(AUTOGEN); then \ - $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(TARGET).hex\n"; \ - $(COPY) $@ $(KEYMAP_PATH)/$(TARGET).hex; \ - fi %.eep: %.elf @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD) @@ -297,7 +290,7 @@ BEGIN = gccversion sizebefore @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD) $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) @$(BUILD_CMD) - + define GEN_OBJRULE $1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC)) @@ -371,7 +364,7 @@ DEPS = $(patsubst %.o,%.d,$(patsubst %.a,%.o,$(OBJ))) .PRECIOUS: $(DEPS) # Empty rule to force recompilation if the .d file is missing $(DEPS): - + $(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT)))) diff --git a/util/travis_build.sh b/util/travis_build.sh index d12a87a942c3..a25d871e2df8 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -5,9 +5,9 @@ TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" -MAKE_ALL="make all:default AUTOGEN=\"true\"" +MAKE_ALL="make all:default" -if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then exit_code=0 git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} if [ $? -eq 128 ]; then @@ -30,15 +30,15 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l) if [[ $KEYMAP_ONLY -gt 0 ]]; then echo "Making all keymaps for $KB" - make ${KB}:all AUTOGEN=true + make ${KB}:all : $((exit_code = $exit_code + $?)) else MKM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards/'${KB}'/keymaps/)([a-zA-Z0-9_]+)(?=\/)' | sort -u) for KM in $MKM ; do - echo "Making $KM for $KB" - make ${KB}:${KM} AUTOGEN=true + echo "Making $KM for $KB" + make ${KB}:${KM} : $((exit_code = $exit_code + $?)) - done + done fi done fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 66b3beb6cef5..155a9a8d2bb5 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -69,10 +69,9 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then # rm -f compiled/*.hex # ignore errors here - for file in ../qmk_firmware/keyboards/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done - for file in ../qmk_firmware/keyboards/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done - for file in ../qmk_firmware/keyboards/*/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done - for file in ../qmk_firmware/keyboards/*/*/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done + # In theory, this is more flexible, and will allow for additional expansion of additional types of files and other names + mv -t compiled ../qmk_firmware/*_default.*(hex|bin) || true + bash _util/generate_keyboard_page.sh git add -A git commit -m "generated from qmk/qmk_firmware@${rev}" From 15297bcfce016b8f03c2004b3db5a26e38cf994e Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Wed, 13 Feb 2019 11:46:40 +1100 Subject: [PATCH 070/445] [Keymap] Add Minidox keymap by dustypomerleau (#5101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add dusty keymap * change keymap folder to match my github username * initial keymap completed in comments only * layout without NAV completed in comments only * disable Command to prevent interference with Space Cadet keys * switch _ and \ in the symbol layer * Layers complete through _NAV * add thumb keys to _NAV * complete _NUM * all layouts complete; still needs `process_user_record()` * completed first draft of keymap; still needs config.h to match * corrected keycodes for Mac macro-volume keys * fix Mac mute keycode * add missing Mac keycodes for previous and next track * placeholder for qwerty layout, not yet completed; remove unnecessary breaks; add todos * eliminate Preonic branch before switching to Minidox branch: • delete dustypomerleau Preonic keymap folder • complete keymap.c (QWERTY layer, vanilla numbers layer) TODO: • add preferences to config.h • complete the README * edit commented keymap diagrams for clarity in dual function keys * define initial config.h and add rules.mk for mouse key support * fix redundant line after implementation of tap_code() * fixed key_timer declaration, added README and rules * formatting of keymap * add CTPC to config * cycle thumb keys to favor center position * modify config.h for temporary Pro Micro compatibility * remove superfluous call to use serial; homebrewed mod tap keys are still broken with OSL * merge _SYS and _MEDIA on new Z_SYS key * ALT_OP example of new MT macro complete * initial narze-inspired MT fixes in PRU * add (currently superfluous) custom keycode for the _SYS layer * rudimentary `OSL` symbol macros that immediately register the mod and fail to reset the oneshot layer, but do output the proper keys—fix both of these things * remove permissive hold to improve tapping performance * remove calls to `clear_oneshot_layer_state()`, as they have no effect inside `process_record_user()`. Tapdance appears to be the way forward. * final commit before tapdance code; correct layout in comments * initial tapdance code for shifted mod taps * add numeric and ergo NUM layers and pinky shifts for keycuts * add TD() wrappers to tapdance codes and clean up commented layout guides * add faux return to cur_dance to allow compilation - TODO: research what the default clause should be in cur_dance * update commented schematics for better readability * add backspace and delete to lockable layers, Z_SYS -> SYS_Z for consistency, fix schematic errors * add `DOUBLE_SINGLE_TAP` to tapdance cases to allow doubling of the single tap character without waiting tapping term * remove reduced oneshot tapping toggles * update README * newline tweak :) * Update keyboards/minidox/keymaps/dustypomerleau/keymap.c Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * remove `PREVENT_STUCK_MODIFIERS`, as this is default behavior --- .../minidox/keymaps/dustypomerleau/README.md | 28 + .../minidox/keymaps/dustypomerleau/config.h | 26 + .../minidox/keymaps/dustypomerleau/keymap.c | 489 ++++++++++++++++++ .../minidox/keymaps/dustypomerleau/rules.mk | 4 + 4 files changed, 547 insertions(+) create mode 100644 keyboards/minidox/keymaps/dustypomerleau/README.md create mode 100644 keyboards/minidox/keymaps/dustypomerleau/config.h create mode 100644 keyboards/minidox/keymaps/dustypomerleau/keymap.c create mode 100644 keyboards/minidox/keymaps/dustypomerleau/rules.mk diff --git a/keyboards/minidox/keymaps/dustypomerleau/README.md b/keyboards/minidox/keymaps/dustypomerleau/README.md new file mode 100644 index 000000000000..b2ec771257e3 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/README.md @@ -0,0 +1,28 @@ +## dustypomerleau, Minidox layout + +The rationale behind my layout can be summarized as follows: + +- Symmetry is important because use-cases are hard to predict. Whenever possible, modifiers and layer keys should be available from either hand. +- Inward rolls should be leveraged not just for alphas (Colemak DHm), but also for coding/symbols. +- Number order—like alpha order—should be designed to favor use of the strongest fingers. +- One-shot keys can greatly reduce the strain of typing, and should be leveraged. + +Some aspects of my layout are optimized for macOS (order of modifiers, manner of producing en and em dashes, coding of micro-volume adjustments, etc.), but can be easily tweaked for the OS of your choice. + +Shift can be a tricky modifier when used in `MT()` combinations, particularly for fast typists on split boards using serial. This can be partially mitigated with options in `config.h`, but still requires a relatively strict typing style/accuracy from the fast typist. The tendency is for faster typists to combat mod/tap mistakes by using very short intervals for `TAPPING_TERM`, but this can introduce its own set of complications. Shift is also one of the highest-yield opportunities to use `OSM()`. For these reasons, I pulled Shift onto dedicated keys in the thumbs for use during regular typing (the home row Shifts have been left in place for use during selection and keycuts). + +The tapdance code that I used to create mod/tap keys inside my symbol layer allows up to 2 consecutive symbols within `TAPPING_TERM`. If you think you will need to quickly nest more than that, feel free to add more `case`s. + +### Special thanks + +- Everyone on the QMK Discord, for helping me work out the code for mod/tap keys using shifted symbols. +- Everyone on the Colemak Discord, for their initial feedback on the layout. +- @stevep and @DreymaR, for their work on Colemak DH(m), a truly awesome typing experience (and of course Shai Coleman, for starting it all off!). +- @ckofy, for offering a dramatic improvement on Dvorak's original number order. +- u/That-Canadian, for designing this awesome keyboard. + +### Questions or comments? + +- GitHub @dustypomerleau +- Twitter @duspom +- Discord @dusty#8897 diff --git a/keyboards/minidox/keymaps/dustypomerleau/config.h b/keyboards/minidox/keymaps/dustypomerleau/config.h new file mode 100644 index 000000000000..5166e06d834b --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/config.h @@ -0,0 +1,26 @@ +// dustypomerleau, Minidox config + +#pragma once + + +#define EE_HANDS +#define IGNORE_MOD_TAP_INTERRUPT +#define ONESHOT_TIMEOUT 1000 +#define TAPPING_TERM 200 +#define USE_SERIAL + +// optional configuration: + +// #define CONVERT_TO_PROTON_C +// #define ONESHOT_TAP_TOGGLE 2 // not compatible with TAPPING_FORCE_HOLD +// #define PERMISSIVE_HOLD +// #define TAPPING_FORCE_HOLD // allows rapid mod use after tap event, but sacrifices double-tap to repeat + +// #define MOUSEKEY_DELAY 0 // delay before cursor movement (high feels sluggish, low makes fine movement difficult) +// #define MOUSEKEY_INTERVAL 20 // time between movement reports - low settings feel like high mouse speed +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_WHEEL_DELAY 0 +// #define MOUSEKEY_WHEEL_MAX_SPEED 8 +// #define MOUSEKEY_WHEEL_TIME_TO_MAX 4 + diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c new file mode 100644 index 000000000000..13b84d64d1e5 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -0,0 +1,489 @@ +// Minidox keymap by dustypomerleau +// Thanks for checking out my keymap. The rationale behind the layout is described in the README. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum custom_layers { + _CMK_DHM, + _QWERTY, + _SYS, + _NAV, + _NUM_E, + _NUM_N, + _SYM +}; + +enum custom_keycodes { + CMK_DHM = SAFE_RANGE, + QWERTY, + SYS, + NAV, + NUM_E, + NUM_N, + SYM +}; + +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_SINGLE_TAP = 3 +}; + +enum { + ALT_OP = 0, + CTL_CCB, + GUI_CP, + SFT_OCB, + SFT_PLS +}; + +int cur_dance (qk_tap_dance_state_t *state); +void altop_finished (qk_tap_dance_state_t *state, void *user_data); +void altop_reset (qk_tap_dance_state_t *state, void *user_data); +void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data); +void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data); +void guicp_finished (qk_tap_dance_state_t *state, void *user_data); +void guicp_reset (qk_tap_dance_state_t *state, void *user_data); +void sftocb_finished (qk_tap_dance_state_t *state, void *user_data); +void sftocb_reset (qk_tap_dance_state_t *state, void *user_data); +void sftpls_finished (qk_tap_dance_state_t *state, void *user_data); +void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); + +#define _______ KC_TRNS +#define ALT_2 LALT_T(KC_2) +#define ALT_3 LALT_T(KC_3) +#define ALT_8 LALT_T(KC_8) +#define ALT_D LALT_T(KC_D) +#define ALT_E LALT_T(KC_E) +#define ALT_K LALT_T(KC_K) +#define ALT_OB LALT_T(KC_LBRC) +#define ALT_S LALT_T(KC_S) +#define CTRL_2 LCTL_T(KC_2) +#define CTRL_4 LCTL_T(KC_4) +#define CTRL_5 LCTL_T(KC_5) +#define CTRL_9 LCTL_T(KC_9) +#define CTRL_EQ LCTL_T(KC_EQL) +#define CTRL_I LCTL_T(KC_I) +#define CTRL_L LCTL_T(KC_L) +#define CTRL_R LCTL_T(KC_R) +#define CTRL_S LCTL_T(KC_S) +#define GUI_0 LGUI_T(KC_0) +#define GUI_1 LGUI_T(KC_1) +#define GUI_4 LGUI_T(KC_4) +#define GUI_7 LGUI_T(KC_7) +#define GUI_CB LGUI_T(KC_RBRC) +#define GUI_F LGUI_T(KC_F) +#define GUI_J LGUI_T(KC_J) +#define GUI_N LGUI_T(KC_N) +#define GUI_TEA LGUI_T(KC_T) +#define MAC_EM S(LALT(KC_MINS)) +#define MAC_EN LALT(KC_MINS) +#define NAV_BK LT(_NAV, KC_BSPC) +#define NAV_LK TG(_NAV) +#define NUME_SPC LT(_NUM_E, KC_SPC) +#define NUMLK_E TG(_NUM_E) +#define NUMLK_N TG(_NUM_N) +#define NUMN_SPC LT(_NUM_N, KC_SPC) +#define SFT_0 LSFT_T(KC_0) +#define SFT_1 LSFT_T(KC_1) +#define SFT_6 LSFT_T(KC_6) +#define SFT_7 LSFT_T(KC_7) +#define SFT_A LSFT_T(KC_A) +#define SFT_O LSFT_T(KC_O) +#define SFT_OS OSM(MOD_LSFT) +#define SFT_QOT LSFT_T(KC_QUOT) +#define SYM_OS OSL(_SYM) +#define SYS_Z LT(_SYS, KC_Z) +#define VOL_DN S(LALT(KC__VOLDOWN)) +#define VOL_UP S(LALT(KC__VOLUP)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak DHm + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | B | | J | L | U | Y | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/A| CTL/R| ALT/S| GUI/T| G | | M | GUI/N| ALT/E| CTL/I| SFT/O| + * |------+------+------+------+------| |------+------+------+------+------| + * | SYS/Z| X | C | D | V | | K | H | , | . | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * |SFT/OS|NAV/BK| | | |NUM/SP|SFT/OS| + * `------+------|SYM/OS| |SYM/OS|------+------' + * | | | | + * `------' `------' + */ +[_CMK_DHM] = LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, \ + SFT_A, CTRL_R, ALT_S, GUI_TEA, KC_G, KC_M, GUI_N, ALT_E, CTRL_I, SFT_O, \ + SYS_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SCLN, \ + SFT_OS, NAV_BK, SYM_OS, SYM_OS, NUME_SPC, SFT_OS \ +), + +/* QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/A| CTL/S| ALT/D| GUI/F| G | | H | GUI/J| ALT/K| CTL/L| SFT/'| + * |------+------+------+------+------| |------+------+------+------+------| + * | SYS/Z| X | C | V | B | | N | M | , | . | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * |SFT/OS|NAV/BK| | | |NUM/SP|SFT/OS| + * `------+------|SYM/OS| |SYM/OS|------+------' + * | | | | + * `------' `------' + */ +[_QWERTY] = LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + SFT_A, CTRL_S, ALT_D, GUI_F, KC_G, KC_H, GUI_J, ALT_K, CTRL_L, SFT_QOT, \ + SYS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, \ + SFT_OS, NAV_BK, SYM_OS, SYM_OS, NUMN_SPC, SFT_OS \ +), + +/* System, media, and layer lock keys + * If you use QWERTY + the Vanilla numbers primarily, change NUMLK_E to NUMLK_N here. + * + * ,----------------------------------. ,----------------------------------. + * | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++| | | + * |------+------+------+------+------| |------+------+------+------+------| + * | SHIFT| CTRL | ALT | GUI |NAV LK| | POWER| VOL- | VOL+ | MUTE | MPLY | + * |------+------+------+------+------| |------+------+------+------+------| + * | | |AU OFF| AU ON| | | |NUM LK| MRWD | MFFD | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | | | | | | | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_SYS] = LAYOUT( \ + RESET, DEBUG, QWERTY, CMK_DHM, _______, _______, KC__VOLDOWN, KC__VOLUP, _______, _______, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_POWER, VOL_DN, VOL_UP, KC__MUTE, KC_MPLY, \ + _______, _______, AU_OFF, AU_ON, _______, _______, NUMLK_E, KC_MRWD, KC_MFFD, _______, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Navigation + mouse keys + * + * ,----------------------------------. ,----------------------------------. + * | PSCR | | WH U | WH D | | | BSPC | PGDN | PGUP | HOME | END | + * |------+------+------+------+------| |------+------+------+------+------| + * | SHIFT| CTRL | ALT | GUI |NAV LK| | CAPS | LEFT | DOWN | UP | RIGHT| + * |------+------+------+------+------| |------+------+------+------+------| + * | | ACL0 | ACL1 | ACL2 | BTN2 | | BTN1 | MS L | MS D | MS U | MS R | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | | | | | ENTER| | + * `------+------| ESC | | DEL |------+------' + * | | | | + * `------' `------' + */ +[_NAV] = LAYOUT( \ + KC_PSCR, _______, KC_WH_U, KC_WH_D, _______, KC_BSPC, KC_PGDN, KC_PGUP, KC_HOME, KC_END, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \ + _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN2, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, \ + _______, _______, KC_ESC, KC_DEL, KC_ENT, _______ \ +), + +/* Number + function keys (ergonomic number order - default pairing with Colemak) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/7| CTL/5| ALT/3| GUI/1| 9 | | 8 | GUI/0| ALT/2| CTL/4| SFT/6| + * |------+------+------+------+------| |------+------+------+------+------| + * | | | F11 | F12 | BSPC | | DEL |NUM LK| | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | TAB | | | | | | + * `------+------| ESC | | |------+------' + * | | | | + * `------' `------' + */ +[_NUM_E] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \ + _______, _______, KC_F11, KC_F12, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, _______, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ +), + +/* Number + function keys (numeric number order - default pairing with QWERTY) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/1| CTL/2| ALT/3| GUI/4| 5 | | 6 | GUI/7| ALT/8| CTL/9| SFT/0| + * |------+------+------+------+------| |------+------+------+------+------| + * | | | F11 | F12 | BSPC | | DEL |NUM LK| | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | TAB | | | | | | + * `------+------| ESC | | |------+------' + * | | | | + * `------' `------' + */ +[_NUM_N] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \ + _______, _______, KC_F11, KC_F12, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, _______, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ +), + + +/* Symbols + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ? | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/+| CTL/=| ALT/(| GUI/)| " | | : | GUI/]| ALT/[| CTL/}| SFT/{| + * |------+------+------+------+------| |------+------+------+------+------| + * | < | | | - | > | \ | | ` | _ | / | ~ | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | |ENDASH| | | |EMDASH| | + * `------+------| | | |------+------' + * | | | | + * `------' `------' + */ +[_SYM] = LAYOUT( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_QUOT, \ + TD(SFT_PLS), CTRL_EQ, TD(ALT_OP), TD(GUI_CP), KC_DQT, KC_COLN, GUI_CB, ALT_OB, TD(CTL_CCB), TD(SFT_OCB), \ + KC_LT, KC_PIPE, KC_MINS, KC_GT, KC_BSLS, KC_GRV, KC_UNDS, KC_SLSH, KC_TILD, KC_SCLN, \ + _______, MAC_EN, _______, _______, MAC_EM, _______ \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CMK_DHM: + if (record->event.pressed) { + set_single_persistent_default_layer(_CMK_DHM); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + default: + return true; + } +}; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + if (state->count == 2) return DOUBLE_SINGLE_TAP; + else return 8; +} + +static tap altop_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void altop_finished (qk_tap_dance_state_t *state, void *user_data) { + altop_tap_state.state = cur_dance(state); + switch (altop_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_9); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_9); + register_code(KC_9); + } +} + +void altop_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (altop_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_9); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_9); + unregister_mods(MOD_BIT(KC_LSFT)); + } + altop_tap_state.state = 0; +} + +static tap ctlccb_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data) { + ctlccb_tap_state.state = cur_dance(state); + switch (ctlccb_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_RBRC); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LCTL)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_RBRC); + register_code(KC_RBRC); + } +} + +void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (ctlccb_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_RBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LCTL)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_RBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + } + ctlccb_tap_state.state = 0; +} + +static tap guicp_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void guicp_finished (qk_tap_dance_state_t *state, void *user_data) { + guicp_tap_state.state = cur_dance(state); + switch (guicp_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_0); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LGUI)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_0); + register_code(KC_0); + } +} + +void guicp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (guicp_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_0); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LGUI)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_0); + unregister_mods(MOD_BIT(KC_LSFT)); + } + guicp_tap_state.state = 0; +} + +static tap sftocb_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void sftocb_finished (qk_tap_dance_state_t *state, void *user_data) { + sftocb_tap_state.state = cur_dance(state); + switch (sftocb_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_LBRC); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_LBRC); + register_code(KC_LBRC); + } +} + +void sftocb_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (sftocb_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_LBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_LBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + } + sftocb_tap_state.state = 0; +} + +static tap sftpls_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) { + sftpls_tap_state.state = cur_dance(state); + switch (sftpls_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_EQL); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_EQL); + register_code(KC_EQL); + } +} + +void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (sftpls_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_EQL); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_EQL); + unregister_mods(MOD_BIT(KC_LSFT)); + } + sftpls_tap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_OP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altop_finished, altop_reset), + [CTL_CCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlccb_finished, ctlccb_reset), + [GUI_CP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guicp_finished, guicp_reset), + [SFT_OCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftocb_finished, sftocb_reset), + [SFT_PLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftpls_finished, sftpls_reset) +}; diff --git a/keyboards/minidox/keymaps/dustypomerleau/rules.mk b/keyboards/minidox/keymaps/dustypomerleau/rules.mk new file mode 100644 index 000000000000..5ed4c5446eb8 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/rules.mk @@ -0,0 +1,4 @@ +# dustypomerleau, Minidox rules + +MOUSEKEY_ENABLE = yes +TAP_DANCE_ENABLE = yes From 994852712dbd183e2c764d624ae8ba7d3efb385a Mon Sep 17 00:00:00 2001 From: kwerdenker Date: Wed, 13 Feb 2019 01:48:05 +0100 Subject: [PATCH 071/445] [Keymap] Plain60 rgb (#5104) * Fix compile error if not used with VIA * Add keymap with support for RGB * Integrate changes from PR code review --- keyboards/plain60/config.h | 2 +- keyboards/plain60/keymaps/RGB/config.h | 26 ++++++++++++ keyboards/plain60/keymaps/RGB/keymap.c | 57 ++++++++++++++++++++++++++ keyboards/plain60/keymaps/RGB/rules.mk | 23 +++++++++++ 4 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 keyboards/plain60/keymaps/RGB/config.h create mode 100644 keyboards/plain60/keymaps/RGB/keymap.c create mode 100644 keyboards/plain60/keymaps/RGB/rules.mk diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h index 763aeff08239..5dd784887cfc 100644 --- a/keyboards/plain60/config.h +++ b/keyboards/plain60/config.h @@ -17,7 +17,7 @@ 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 0x4705 diff --git a/keyboards/plain60/keymaps/RGB/config.h b/keyboards/plain60/keymaps/RGB/config.h new file mode 100644 index 000000000000..5fadcf821a4f --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2019 Sebastian Spindler + +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 + +/* RGB Underglow */ +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/plain60/keymaps/RGB/keymap.c b/keyboards/plain60/keymaps/RGB/keymap.c new file mode 100644 index 000000000000..25370823dfa7 --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2019 Sebastian Spindler + +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_extras/keymap_german.h" + +//Layer renaming +#define _DL 0 //default +#define _FUN 1 //function layer +#define _LED 2 //LED configurations + +//Keymapping renaming +#define ______ KC_TRNS //renaming KC_TRNS for readability in keymaps +#define RGB_MI RGB_MODE_FORWARD //increase RGB mode +#define RGB_MD RGB_MODE_REVERSE //decrease RGB mode +#define RGB_ST RGB_M_P //rgb static +#define MONKEY LCTL(LALT(KC_DEL)) //ctrl+alt+del == monkey grip +#define SPECIAL LT(_FUN, DE_CIRC) // + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, ______, KC_BSPC, \ + 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, ______, \ + SPECIAL, 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, MONKEY, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), + + [_FUN] = 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_DEL, \ + ______, KC_PGUP, KC_UP, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_HOME, ______, ______, KC_END, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, \ + ______, ______, ______, ______ , ______, KC_LEFT, KC_DOWN, KC_RIGHT ), + + [_LED] = LAYOUT( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, RGB_TOG, RGB_MI, RGB_MD, RGB_ST, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______ , ______, ______, TG(_LED), ______ ), +}; diff --git a/keyboards/plain60/keymaps/RGB/rules.mk b/keyboards/plain60/keymaps/RGB/rules.mk new file mode 100644 index 000000000000..793bd869ae97 --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/rules.mk @@ -0,0 +1,23 @@ +#Copyright 2019 Sebastian Spindler + +#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 . + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no From b2ee290c9f506e42dd9c4577c8147646c405aeb0 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 12 Feb 2019 19:57:24 -0500 Subject: [PATCH 072/445] [Keyboard] Move Keebio boards to own folder (#5109) * Move boards into keebio folder * Rename keymap * Update BDN9 files * Update BFO-9000 files * Update Chocopad files * Update Dilly files * Update Fourier files, collapse rev1 into main * Update Iris files * Update Laplace files * Update Levinson files, fix buswerks keymap * Update Nyquist files * Fix keymap issues * Update Quefrency files * Update Rorschach files * Update TF68 files * Update Viterbi files * Update Viterbi files * Update Wavelet files * Reformat default layout * Fix up default folder for Iris * Remove already defined aliases --- keyboards/dilly/keymaps/default/config.h | 6 - keyboards/fourier/rev1/rev1.c | 5 - keyboards/fourier/rev1/rev1.h | 21 -- keyboards/{ => keebio}/bdn9/bdn9.c | 0 keyboards/{ => keebio}/bdn9/bdn9.h | 0 keyboards/{ => keebio}/bdn9/config.h | 1 - keyboards/{ => keebio}/bdn9/info.json | 0 .../bdn9/keymaps/default/keymap.c | 0 keyboards/{ => keebio}/bdn9/readme.md | 2 +- keyboards/{ => keebio}/bdn9/rules.mk | 0 keyboards/{ => keebio}/bfo9000/bfo9000.c | 0 keyboards/{ => keebio}/bfo9000/bfo9000.h | 0 keyboards/{ => keebio}/bfo9000/config.h | 8 +- keyboards/{ => keebio}/bfo9000/i2c.c | 0 keyboards/{ => keebio}/bfo9000/i2c.h | 0 .../keymaps/andylikescandy6x18/config.h | 0 .../keymaps/andylikescandy6x18/keymap.c | 5 - .../bfo9000/keymaps/default/config.h | 12 +- .../bfo9000/keymaps/default/keymap.c | 4 - keyboards/{ => keebio}/bfo9000/matrix.c | 0 keyboards/{ => keebio}/bfo9000/readme.md | 4 +- keyboards/{ => keebio}/bfo9000/rules.mk | 0 keyboards/{ => keebio}/bfo9000/serial.c | 0 keyboards/{ => keebio}/bfo9000/serial.h | 0 keyboards/{ => keebio}/bfo9000/split_util.c | 0 keyboards/{ => keebio}/bfo9000/split_util.h | 0 keyboards/{ => keebio}/chocopad/README.md | 2 +- keyboards/{ => keebio}/chocopad/chocopad.c | 0 keyboards/{ => keebio}/chocopad/chocopad.h | 5 +- keyboards/{ => keebio}/chocopad/config.h | 3 +- keyboards/{ => keebio}/chocopad/info.json | 0 .../chocopad/keymaps/default/config.h | 0 .../chocopad/keymaps/default/keymap.c | 2 - .../chocopad/keymaps/default/rules.mk | 0 .../chocopad/keymaps/khord/config.h | 0 .../chocopad/keymaps/khord/keymap.c | 6 +- .../chocopad/keymaps/khord/rules.mk | 0 keyboards/{ => keebio}/chocopad/rules.mk | 0 keyboards/{ => keebio}/dilly/README.md | 2 +- keyboards/{ => keebio}/dilly/config.h | 0 keyboards/{ => keebio}/dilly/dilly.c | 0 keyboards/{ => keebio}/dilly/dilly.h | 0 keyboards/{ => keebio}/dilly/info.json | 0 .../keebio/dilly/keymaps/bakingpy/config.h | 3 + .../keebio/dilly/keymaps/bakingpy/keymap.c | 106 ++++++++ .../dilly/keymaps/bakingpy}/rules.mk | 0 .../keebio/dilly/keymaps/default/config.h | 1 + .../dilly/keymaps/default/keymap.c | 2 - .../dilly/keymaps/default}/rules.mk | 0 .../{ => keebio}/dilly/keymaps/delmo/config.h | 0 .../{ => keebio}/dilly/keymaps/delmo/keymap.c | 3 +- .../dilly/keymaps/delmo}/rules.mk | 0 .../dilly/keymaps/pletcher/config.h | 0 .../dilly/keymaps/pletcher/keymap.c | 1 - .../dilly/keymaps/pletcher/rules.mk | 0 keyboards/{ => keebio}/dilly/rules.mk | 0 .../{fourier/rev1 => keebio/fourier}/config.h | 2 + keyboards/{ => keebio}/fourier/fourier.c | 0 keyboards/{ => keebio}/fourier/fourier.h | 17 ++ keyboards/{ => keebio}/fourier/info.json | 0 .../fourier/keymaps/default/config.h | 1 - .../fourier/keymaps/default/keymap.c | 6 +- .../fourier/keymaps/default/rules.mk | 0 .../fourier/keymaps/jennetters/config.h | 0 .../fourier/keymaps/jennetters/keymap.c | 14 +- .../fourier/keymaps/jennetters/rules.mk | 0 .../fourier/keymaps/maxim/config.h | 0 .../fourier/keymaps/maxim/keymap.c | 0 .../fourier/keymaps/valgrahf/config.h | 0 .../fourier/keymaps/valgrahf/keymap.c | 2 - .../fourier/keymaps/valgrahf/rules.mk | 0 .../fourier/keymaps/xyverz/config.h | 0 .../fourier/keymaps/xyverz/keymap.c | 8 +- keyboards/{ => keebio}/fourier/readme.md | 4 +- keyboards/{ => keebio}/fourier/rules.mk | 3 - keyboards/{ => keebio}/iris/config.h | 0 keyboards/{ => keebio}/iris/info.json | 0 keyboards/{ => keebio}/iris/iris.c | 0 keyboards/{ => keebio}/iris/iris.h | 6 +- .../{ => keebio}/iris/keymaps/ave-63/config.h | 0 .../{ => keebio}/iris/keymaps/ave-63/keymap.c | 0 .../iris/keymaps/bmoorey/config.h | 0 .../iris/keymaps/bmoorey/keymap.c | 0 .../iris/keymaps/bmoorey/readme.md | 0 .../iris/keymaps/bmoorey/rules.mk | 0 .../iris/keymaps/broswen/config.h | 0 .../iris/keymaps/broswen/keymap.c | 3 +- .../iris/keymaps/broswen/rules.mk | 0 .../iris/keymaps/davidrambo/config.h | 0 .../iris/keymaps/davidrambo/keymap.c | 0 .../iris/keymaps/davidrambo/readme.md | 0 .../iris/keymaps/davidrambo/rules.mk | 0 .../iris/keymaps/dbroqua/config.h | 0 .../iris/keymaps/dbroqua/keymap.c | 1 - .../iris/keymaps/dbroqua/rules.mk | 0 .../iris/keymaps/default/config.h | 0 .../iris/keymaps/default/keymap.c | 0 .../iris/keymaps/default/rules.mk | 0 .../iris/keymaps/drashna/config.h | 0 .../iris/keymaps/drashna/keymap.c | 0 .../iris/keymaps/drashna/rules.mk | 0 .../iris/keymaps/drashna_old/config.h | 0 .../iris/keymaps/drashna_old/keymap.c | 0 .../iris/keymaps/drashna_old/rules.mk | 0 .../iris/keymaps/dvp-zjpxshade/config.h | 0 .../iris/keymaps/dvp-zjpxshade/keymap.c | 1 - .../iris/keymaps/dvp-zjpxshade/rules.mk | 0 .../iris/keymaps/edvorakjp/config.h | 0 .../iris/keymaps/edvorakjp/keymap.c | 0 .../iris/keymaps/edvorakjp/readme.md | 0 .../iris/keymaps/edvorakjp/rules.mk | 0 .../{ => keebio}/iris/keymaps/fabian/config.h | 0 .../{ => keebio}/iris/keymaps/fabian/keymap.c | 1 - .../{ => keebio}/iris/keymaps/fate/config.h | 0 .../{ => keebio}/iris/keymaps/fate/keymap.c | 1 - .../{ => keebio}/iris/keymaps/fate/readme.md | 0 .../{ => keebio}/iris/keymaps/fate/rules.mk | 0 .../iris/keymaps/gsigler/config.h | 0 .../iris/keymaps/gsigler/keymap.c | 0 .../iris/keymaps/gsigler/rules.mk | 0 .../{ => keebio}/iris/keymaps/hag/config.h | 0 .../{ => keebio}/iris/keymaps/hag/keymap.c | 2 - .../{ => keebio}/iris/keymaps/hag/rules.mk | 0 .../iris/keymaps/hexwire/config.h | 0 .../iris/keymaps/hexwire/keymap.c | 1 - .../iris/keymaps/hexwire/rules.mk | 0 .../iris/keymaps/impstyle/README.md | 0 .../iris/keymaps/impstyle/config.h | 0 .../iris/keymaps/impstyle/keymap.c | 7 +- .../iris/keymaps/impstyle/rules.mk | 0 .../iris/keymaps/jennetters/config.h | 0 .../iris/keymaps/jennetters/keymap.c | 19 +- .../iris/keymaps/jennetters/readme.md | 0 .../iris/keymaps/jennetters/rules.mk | 0 .../{ => keebio}/iris/keymaps/khord/config.h | 0 .../{ => keebio}/iris/keymaps/khord/keymap.c | 0 .../{ => keebio}/iris/keymaps/khord/rules.mk | 0 .../iris/keymaps/krusli/README.md | 0 .../{ => keebio}/iris/keymaps/krusli/config.h | 0 .../{ => keebio}/iris/keymaps/krusli/keymap.c | 2 - .../{ => keebio}/iris/keymaps/krusli/rules.mk | 0 .../iris/keymaps/lewisridden/config.h | 0 .../iris/keymaps/lewisridden/keymap.c | 1 - .../iris/keymaps/lewisridden/rules.mk | 0 .../{ => keebio}/iris/keymaps/mtdjr/config.h | 0 .../{ => keebio}/iris/keymaps/mtdjr/keymap.c | 0 .../{ => keebio}/iris/keymaps/mtdjr/rules.mk | 0 .../iris/keymaps/olligranlund_nordic/config.h | 0 .../iris/keymaps/olligranlund_nordic/keymap.c | 0 .../keymaps/olligranlund_nordic/readme.md | 0 .../iris/keymaps/olligranlund_nordic/rules.mk | 0 .../{ => keebio}/iris/keymaps/omgvee/config.h | 0 .../{ => keebio}/iris/keymaps/omgvee/keymap.c | 0 .../iris/keymaps/omgvee/readme.md | 0 .../{ => keebio}/iris/keymaps/omgvee/rules.mk | 0 .../iris/keymaps/rdhaene/config.h | 0 .../iris/keymaps/rdhaene/keymap.c | 1 - .../iris/keymaps/rdhaene/rules.mk | 0 .../{ => keebio}/iris/keymaps/rs/config.h | 0 .../iris/keymaps/rs/karabiner.json | 0 .../{ => keebio}/iris/keymaps/rs/keymap.c | 0 .../{ => keebio}/iris/keymaps/rs/readme.md | 0 .../{ => keebio}/iris/keymaps/rs/rules.mk | 0 .../iris/keymaps/s1carii/config.h | 0 .../iris/keymaps/s1carii/keymap.c | 5 +- .../iris/keymaps/s1carii/readme.md | 0 .../iris/keymaps/s1carii/rules.mk | 0 .../{ => keebio}/iris/keymaps/saviof/config.h | 0 .../{ => keebio}/iris/keymaps/saviof/keymap.c | 0 .../{ => keebio}/iris/keymaps/saviof/rules.mk | 0 .../iris/keymaps/swedish/config.h | 0 .../iris/keymaps/swedish/keymap.c | 1 - .../iris/keymaps/swedish/rules.mk | 0 .../iris/keymaps/transmogrified/Readme.md | 0 .../iris/keymaps/transmogrified/config.h | 0 .../iris/keymaps/transmogrified/keymap.c | 0 .../iris/keymaps/transmogrified/rules.mk | 0 .../{ => keebio}/iris/keymaps/via/config.h | 0 .../{ => keebio}/iris/keymaps/via/keymap.c | 0 .../{ => keebio}/iris/keymaps/via/rules.mk | 0 .../{ => keebio}/iris/keymaps/vyolle/config.h | 0 .../{ => keebio}/iris/keymaps/vyolle/keymap.c | 0 .../{ => keebio}/iris/keymaps/vyolle/rules.mk | 0 .../{ => keebio}/iris/keymaps/wanleg/config.h | 0 .../{ => keebio}/iris/keymaps/wanleg/keymap.c | 0 .../{ => keebio}/iris/keymaps/wanleg/rules.mk | 0 .../{ => keebio}/iris/keymaps/xyverz/config.h | 0 .../{ => keebio}/iris/keymaps/xyverz/keymap.c | 0 .../{ => keebio}/iris/keymaps/xyverz/rules.mk | 0 .../iris/keymaps/yanfali/config.h | 0 .../iris/keymaps/yanfali/keymap.c | 1 - .../iris/keymaps/yanfali/readme.md | 0 .../iris/keymaps/yanfali/rules.mk | 0 keyboards/{ => keebio}/iris/readme.md | 4 +- keyboards/{ => keebio}/iris/rev1/config.h | 0 keyboards/{ => keebio}/iris/rev1/rev1.c | 0 keyboards/{ => keebio}/iris/rev1/rev1.h | 0 keyboards/{ => keebio}/iris/rev1/rules.mk | 0 keyboards/{ => keebio}/iris/rev1_led/config.h | 0 .../{ => keebio}/iris/rev1_led/rev1_led.c | 0 .../{ => keebio}/iris/rev1_led/rev1_led.h | 0 keyboards/{ => keebio}/iris/rev1_led/rules.mk | 0 keyboards/{ => keebio}/iris/rev2/config.h | 0 keyboards/{ => keebio}/iris/rev2/rev2.c | 0 keyboards/{ => keebio}/iris/rev2/rev2.h | 0 keyboards/{ => keebio}/iris/rev2/rules.mk | 0 keyboards/{ => keebio}/iris/rev3/config.h | 0 keyboards/{ => keebio}/iris/rev3/rev3.c | 0 keyboards/{ => keebio}/iris/rev3/rev3.h | 0 keyboards/{ => keebio}/iris/rev3/rules.mk | 0 keyboards/{ => keebio}/iris/rules.mk | 2 +- keyboards/{ => keebio}/laplace/config.h | 5 +- keyboards/{ => keebio}/laplace/info.json | 0 .../laplace/keymaps/bakingpy/keymap.c | 8 +- .../laplace/keymaps/bakingpy}/rules.mk | 0 .../laplace/keymaps/default/keymap.c | 3 - .../laplace/keymaps/default}/rules.mk | 0 keyboards/{ => keebio}/laplace/laplace.c | 0 keyboards/{ => keebio}/laplace/laplace.h | 4 +- keyboards/{ => keebio}/laplace/readme.md | 4 +- keyboards/{ => keebio}/laplace/rules.mk | 0 keyboards/{ => keebio}/levinson/config.h | 0 keyboards/{ => keebio}/levinson/info.json | 0 .../levinson/keymaps/atreus/config.h | 0 .../levinson/keymaps/atreus/keymap.c | 0 .../levinson/keymaps/atreus/readme.md | 0 .../levinson/keymaps/bakingpy2u/config.h | 0 .../levinson/keymaps/bakingpy2u/keymap.c | 1 - .../levinson/keymaps/bakingpy2u/rules.mk | 0 .../levinson/keymaps/default/config.h | 5 - .../levinson}/keymaps/default/keymap.c | 4 - .../levinson/keymaps/default/rules.mk | 0 .../levinson/keymaps/drogglbecher/config.h | 0 .../levinson/keymaps/drogglbecher/keymap.c | 0 .../levinson/keymaps/drogglbecher/rules.mk | 0 .../levinson/keymaps/jyh/config.h | 0 .../levinson/keymaps/jyh/keymap.c | 0 .../levinson/keymaps/jyh/readme.md | 0 .../levinson/keymaps/jyh/rules.mk | 0 .../levinson/keymaps/jyh2/config.h | 0 .../levinson/keymaps/jyh2/keymap.c | 0 .../levinson/keymaps/jyh2/readme.md | 0 .../levinson/keymaps/jyh2/rules.mk | 0 .../keymaps/losinggeneration/README.md | 0 .../keymaps/losinggeneration/config.h | 0 .../keymaps/losinggeneration/keymap.c | 0 .../keymaps/losinggeneration/rules.mk | 0 .../levinson/keymaps/mmacdougall/README.md | 0 .../levinson/keymaps/mmacdougall/config.h | 0 .../levinson/keymaps/mmacdougall/keymap.c | 4 - .../levinson/keymaps/mmacdougall/rules.mk | 0 .../levinson/keymaps/steno/config.h | 0 .../levinson/keymaps/steno/keymap.c | 0 .../levinson/keymaps/steno/rules.mk | 0 .../levinson/keymaps/treadwell/config.h | 0 .../levinson/keymaps/treadwell/keymap.c | 1 - .../levinson/keymaps/treadwell/rules.mk | 0 .../levinson/keymaps/valgrahf/config.h | 0 .../levinson/keymaps/valgrahf/keymap.c | 2 - .../levinson/keymaps/valgrahf/rules.mk | 0 .../levinson/keymaps/xtonhasvim/config.h | 0 .../levinson/keymaps/xtonhasvim/keymap.c | 0 .../levinson/keymaps/xtonhasvim/readme.md | 0 .../levinson/keymaps/xtonhasvim/rules.mk | 0 keyboards/{ => keebio}/levinson/levinson.c | 0 keyboards/{ => keebio}/levinson/levinson.h | 2 +- keyboards/{ => keebio}/levinson/readme.md | 0 keyboards/{ => keebio}/levinson/rev1/config.h | 2 +- keyboards/{ => keebio}/levinson/rev1/rev1.c | 0 keyboards/{ => keebio}/levinson/rev1/rev1.h | 0 keyboards/{ => keebio}/levinson/rev1/rules.mk | 0 keyboards/{ => keebio}/levinson/rev2/config.h | 2 +- keyboards/{ => keebio}/levinson/rev2/rev2.c | 0 keyboards/{ => keebio}/levinson/rev2/rev2.h | 0 keyboards/{ => keebio}/levinson/rev2/rules.mk | 0 keyboards/{ => keebio}/levinson/rules.mk | 4 +- keyboards/{ => keebio}/nyquist/config.h | 5 +- keyboards/{ => keebio}/nyquist/info.json | 0 .../nyquist/keymaps/DivergeJM/README.md | 0 .../nyquist/keymaps/DivergeJM/config.h | 0 .../nyquist/keymaps/DivergeJM/keymap.c | 4 - .../nyquist/keymaps/DivergeJM/rules.mk | 0 .../nyquist/keymaps/bakingpy}/README.md | 0 .../keymaps/bakingpy}/Underglow Pinouts.md | 0 .../nyquist/keymaps/bakingpy}/config.h | 4 - .../nyquist/keymaps/bakingpy}/keymap.c | 1 - .../keymaps/bakingpy}/keymap_converter.py | 0 .../keymaps/bakingpy}/keymap_to_readme.rb | 0 .../nyquist/keymaps/bakingpy}/rules.mk | 0 .../nyquist/keymaps/bramver/README.md | 0 .../nyquist/keymaps/bramver/config.h | 0 .../nyquist/keymaps/bramver/keymap.c | 4 - .../nyquist/keymaps/bramver/rules.mk | 0 .../nyquist/keymaps/danielhklein/config.h | 0 .../nyquist/keymaps/danielhklein/keymap.c | 4 - .../nyquist/keymaps/danielhklein/rules.mk | 0 .../nyquist/keymaps/default}/config.h | 14 +- .../nyquist/keymaps/default/keymap.c | 4 - .../nyquist}/keymaps/default/rules.mk | 0 .../nyquist/keymaps/jojiichan/config.h | 0 .../nyquist/keymaps/jojiichan/keymap.c | 5 - .../nyquist/keymaps/jojiichan/rules.mk | 0 .../nyquist/keymaps/kim-kim/config.h | 0 .../nyquist/keymaps/kim-kim/keymap.c | 4 - .../nyquist/keymaps/kim-kim/rules.mk | 0 .../keymaps/losinggeneration/README.md | 0 .../nyquist/keymaps/losinggeneration/config.h | 0 .../nyquist/keymaps/losinggeneration/keymap.c | 0 .../nyquist/keymaps/losinggeneration/rules.mk | 0 .../nyquist/keymaps/mtdjr}/config.h | 0 .../nyquist/keymaps/mtdjr/keymap.c | 0 .../nyquist/keymaps/mtdjr/rules.mk | 0 .../nyquist/keymaps/pitty/README.md | 0 .../nyquist/keymaps/pitty/config.h | 0 .../nyquist/keymaps/pitty/keymap.c | 5 - .../nyquist/keymaps/pitty/rules.mk | 0 .../nyquist/keymaps/shovelpaw/config.h | 0 .../nyquist/keymaps/shovelpaw/keymap.c | 0 .../nyquist/keymaps/shovelpaw/rules.mk | 0 .../nyquist/keymaps/skug/config.h | 0 .../nyquist/keymaps/skug/keymap.c | 0 .../nyquist/keymaps/skug/rules.mk | 0 .../keebio/nyquist/keymaps/tester/config.h | 20 ++ .../keebio/nyquist/keymaps/tester/keymap.c | 226 ++++++++++++++++++ .../nyquist/keymaps/tester}/rules.mk | 0 .../nyquist/keymaps/yshrsmz/config.h | 0 .../nyquist/keymaps/yshrsmz/keymap.c | 4 - .../nyquist/keymaps/yshrsmz/rules.mk | 0 keyboards/{ => keebio}/nyquist/nyquist.c | 0 keyboards/{ => keebio}/nyquist/nyquist.h | 6 +- keyboards/{ => keebio}/nyquist/readme.md | 4 +- keyboards/{ => keebio}/nyquist/rev1/config.h | 0 keyboards/{ => keebio}/nyquist/rev1/rev1.c | 0 keyboards/{ => keebio}/nyquist/rev1/rev1.h | 0 keyboards/{ => keebio}/nyquist/rev1/rules.mk | 0 keyboards/{ => keebio}/nyquist/rev2/config.h | 0 keyboards/{ => keebio}/nyquist/rev2/rev2.c | 0 keyboards/{ => keebio}/nyquist/rev2/rev2.h | 0 keyboards/{ => keebio}/nyquist/rev2/rules.mk | 0 keyboards/{ => keebio}/nyquist/rev3/config.h | 0 keyboards/{ => keebio}/nyquist/rev3/rev3.c | 0 keyboards/{ => keebio}/nyquist/rev3/rev3.h | 0 keyboards/{ => keebio}/nyquist/rev3/rules.mk | 0 keyboards/{ => keebio}/nyquist/rules.mk | 2 +- .../{fourier => keebio/quefrency}/config.h | 0 keyboards/{ => keebio}/quefrency/info.json | 0 .../quefrency/keymaps/bjohnson/config.h | 0 .../quefrency/keymaps/bjohnson/keymap.c | 0 .../quefrency/keymaps/bjohnson/rules.mk | 0 .../quefrency/keymaps/bramver/README.md | 0 .../quefrency/keymaps/bramver/config.h | 0 .../quefrency/keymaps/bramver/keymap.c | 11 +- .../quefrency/keymaps/bramver/rules.mk | 0 .../quefrency/keymaps/default/config.h | 0 .../quefrency/keymaps/default/keymap.c | 3 - .../quefrency}/keymaps/default/rules.mk | 0 .../quefrency/keymaps/default65/config.h | 0 .../quefrency/keymaps/default65/keymap.c | 3 - .../quefrency/keymaps/default65}/rules.mk | 0 .../quefrency/keymaps/default65macro/config.h | 0 .../quefrency/keymaps/default65macro/keymap.c | 3 - keyboards/{ => keebio}/quefrency/quefrency.c | 0 keyboards/{ => keebio}/quefrency/quefrency.h | 6 +- keyboards/{ => keebio}/quefrency/readme.md | 4 +- .../{ => keebio}/quefrency/rev1/config.h | 0 keyboards/{ => keebio}/quefrency/rev1/rev1.c | 0 keyboards/{ => keebio}/quefrency/rev1/rev1.h | 0 .../quefrency/rev1}/rules.mk | 0 keyboards/{ => keebio}/quefrency/rules.mk | 6 +- keyboards/{ => keebio}/rorschach/config.h | 5 +- keyboards/{ => keebio}/rorschach/info.json | 0 .../rorschach/keymaps/default/config.h | 3 - .../rorschach/keymaps/default/keymap.c | 0 .../keymaps/insertsnideremarks/config.h | 0 .../keymaps/insertsnideremarks/keymap.c | 55 ++--- .../keymaps/insertsnideremarks/rules.mk | 0 keyboards/{ => keebio}/rorschach/readme.md | 4 +- .../{ => keebio}/rorschach/rev1/config.h | 2 +- keyboards/{ => keebio}/rorschach/rev1/rev1.c | 0 keyboards/{ => keebio}/rorschach/rev1/rev1.h | 0 .../{ => keebio}/rorschach/rev1/rules.mk | 0 keyboards/{ => keebio}/rorschach/rorschach.c | 0 keyboards/{ => keebio}/rorschach/rorschach.h | 2 +- keyboards/{ => keebio}/rorschach/rules.mk | 4 +- .../{ => keebio}/tragicforce68/README.md | 4 +- keyboards/{ => keebio}/tragicforce68/config.h | 7 +- .../{ => keebio}/tragicforce68/info.json | 0 .../tragicforce68/keymaps/buswerks/keymap.c | 0 .../tragicforce68/keymaps/default/keymap.c | 0 keyboards/{ => keebio}/tragicforce68/rules.mk | 0 .../tragicforce68/tragicforce68.c | 0 .../tragicforce68/tragicforce68.h | 0 keyboards/{ => keebio}/viterbi/config.h | 5 +- .../viterbi/keymaps/bakingpy}/README.md | 0 .../viterbi/keymaps/bakingpy}/config.h | 7 +- .../viterbi/keymaps/bakingpy}/keymap.c | 5 +- .../viterbi/keymaps/bakingpy}/rules.mk | 0 .../viterbi/keymaps/default/config.h | 0 .../viterbi/keymaps/default/keymap.c | 86 ++----- .../viterbi/keymaps/default}/rules.mk | 0 .../viterbi/keymaps/drashna/config.h | 0 .../viterbi/keymaps/drashna/keymap.c | 5 - .../viterbi/keymaps/drashna/rules.mk | 0 .../viterbi/keymaps/drashna_old/config.h | 0 .../viterbi/keymaps/drashna_old/keymap.c | 0 .../viterbi/keymaps/drashna_old/rules.mk | 0 .../viterbi/keymaps/dwallace/config.h | 0 .../viterbi/keymaps/dwallace/keymap.c | 1 - .../viterbi/keymaps/dwallace}/rules.mk | 0 .../viterbi/keymaps/fido/config.h | 0 .../viterbi/keymaps/fido/keymap.c | 1 - .../keebio/viterbi/keymaps/fido/rules.mk | 1 + .../viterbi/keymaps/mike808/config.h | 0 .../viterbi/keymaps/mike808/keymap.c | 5 +- .../keebio/viterbi/keymaps/mike808/rules.mk | 1 + keyboards/{ => keebio}/viterbi/readme.md | 4 +- keyboards/{ => keebio}/viterbi/rev1/config.h | 5 +- .../rev2.c => keebio/viterbi/rev1/rev1.c} | 0 keyboards/{ => keebio}/viterbi/rev1/rev1.h | 9 +- keyboards/{ => keebio}/viterbi/rev1/rules.mk | 0 keyboards/{ => keebio}/viterbi/rev2/config.h | 1 - .../viterbi.c => keebio/viterbi/rev2/rev2.c} | 0 keyboards/{ => keebio}/viterbi/rev2/rev2.h | 0 keyboards/{ => keebio}/viterbi/rev2/rules.mk | 0 keyboards/{ => keebio}/viterbi/rules.mk | 2 +- keyboards/keebio/viterbi/viterbi.c | 1 + keyboards/{ => keebio}/viterbi/viterbi.h | 4 +- keyboards/{ => keebio}/wavelet/config.h | 6 +- keyboards/{ => keebio}/wavelet/info.json | 0 .../wavelet}/keymaps/default/keymap.c | 4 - .../wavelet/keymaps/default/rules.mk | 0 keyboards/{ => keebio}/wavelet/readme.md | 4 +- keyboards/{ => keebio}/wavelet/rules.mk | 0 keyboards/{ => keebio}/wavelet/wavelet.c | 0 keyboards/{ => keebio}/wavelet/wavelet.h | 0 keyboards/quefrency/config.h | 28 --- keyboards/quefrency/rev1/rules.mk | 0 keyboards/viterbi/rev1/rev1.c | 22 -- .../community/ortho_4x12/buswerks/keymap.c | 4 +- layouts/community/ortho_4x12/xyverz/config.h | 2 +- layouts/community/ortho_5x12/rs/keymap.c | 2 + layouts/community/ortho_5x12/xyverz/config.h | 2 + 442 files changed, 543 insertions(+), 483 deletions(-) delete mode 100644 keyboards/dilly/keymaps/default/config.h delete mode 100644 keyboards/fourier/rev1/rev1.c delete mode 100644 keyboards/fourier/rev1/rev1.h rename keyboards/{ => keebio}/bdn9/bdn9.c (100%) rename keyboards/{ => keebio}/bdn9/bdn9.h (100%) rename keyboards/{ => keebio}/bdn9/config.h (99%) rename keyboards/{ => keebio}/bdn9/info.json (100%) rename keyboards/{ => keebio}/bdn9/keymaps/default/keymap.c (100%) rename keyboards/{ => keebio}/bdn9/readme.md (96%) rename keyboards/{ => keebio}/bdn9/rules.mk (100%) rename keyboards/{ => keebio}/bfo9000/bfo9000.c (100%) rename keyboards/{ => keebio}/bfo9000/bfo9000.h (100%) rename keyboards/{ => keebio}/bfo9000/config.h (96%) rename keyboards/{ => keebio}/bfo9000/i2c.c (100%) rename keyboards/{ => keebio}/bfo9000/i2c.h (100%) rename keyboards/{ => keebio}/bfo9000/keymaps/andylikescandy6x18/config.h (100%) rename keyboards/{ => keebio}/bfo9000/keymaps/andylikescandy6x18/keymap.c (98%) rename keyboards/{ => keebio}/bfo9000/keymaps/default/config.h (84%) rename keyboards/{ => keebio}/bfo9000/keymaps/default/keymap.c (93%) rename keyboards/{ => keebio}/bfo9000/matrix.c (100%) rename keyboards/{ => keebio}/bfo9000/readme.md (91%) rename keyboards/{ => keebio}/bfo9000/rules.mk (100%) rename keyboards/{ => keebio}/bfo9000/serial.c (100%) rename keyboards/{ => keebio}/bfo9000/serial.h (100%) rename keyboards/{ => keebio}/bfo9000/split_util.c (100%) rename keyboards/{ => keebio}/bfo9000/split_util.h (100%) rename keyboards/{ => keebio}/chocopad/README.md (93%) rename keyboards/{ => keebio}/chocopad/chocopad.c (100%) rename keyboards/{ => keebio}/chocopad/chocopad.h (93%) rename keyboards/{ => keebio}/chocopad/config.h (97%) rename keyboards/{ => keebio}/chocopad/info.json (100%) rename keyboards/{ => keebio}/chocopad/keymaps/default/config.h (100%) rename keyboards/{ => keebio}/chocopad/keymaps/default/keymap.c (96%) rename keyboards/{ => keebio}/chocopad/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/chocopad/keymaps/khord/config.h (100%) rename keyboards/{ => keebio}/chocopad/keymaps/khord/keymap.c (96%) rename keyboards/{ => keebio}/chocopad/keymaps/khord/rules.mk (100%) rename keyboards/{ => keebio}/chocopad/rules.mk (100%) rename keyboards/{ => keebio}/dilly/README.md (94%) rename keyboards/{ => keebio}/dilly/config.h (100%) rename keyboards/{ => keebio}/dilly/dilly.c (100%) rename keyboards/{ => keebio}/dilly/dilly.h (100%) rename keyboards/{ => keebio}/dilly/info.json (100%) create mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/config.h create mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/keymap.c rename keyboards/{dilly/keymaps/default => keebio/dilly/keymaps/bakingpy}/rules.mk (100%) create mode 100644 keyboards/keebio/dilly/keymaps/default/config.h rename keyboards/{ => keebio}/dilly/keymaps/default/keymap.c (99%) rename keyboards/{dilly/keymaps/delmo => keebio/dilly/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/dilly/keymaps/delmo/config.h (100%) rename keyboards/{ => keebio}/dilly/keymaps/delmo/keymap.c (99%) rename keyboards/{nyquist/keymaps/default => keebio/dilly/keymaps/delmo}/rules.mk (100%) rename keyboards/{ => keebio}/dilly/keymaps/pletcher/config.h (100%) rename keyboards/{ => keebio}/dilly/keymaps/pletcher/keymap.c (99%) rename keyboards/{ => keebio}/dilly/keymaps/pletcher/rules.mk (100%) rename keyboards/{ => keebio}/dilly/rules.mk (100%) rename keyboards/{fourier/rev1 => keebio/fourier}/config.h (98%) rename keyboards/{ => keebio}/fourier/fourier.c (100%) rename keyboards/{ => keebio}/fourier/fourier.h (58%) rename keyboards/{ => keebio}/fourier/info.json (100%) rename keyboards/{ => keebio}/fourier/keymaps/default/config.h (97%) rename keyboards/{ => keebio}/fourier/keymaps/default/keymap.c (91%) rename keyboards/{ => keebio}/fourier/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/fourier/keymaps/jennetters/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/jennetters/keymap.c (97%) rename keyboards/{ => keebio}/fourier/keymaps/jennetters/rules.mk (100%) rename keyboards/{ => keebio}/fourier/keymaps/maxim/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/maxim/keymap.c (100%) rename keyboards/{ => keebio}/fourier/keymaps/valgrahf/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/valgrahf/keymap.c (98%) rename keyboards/{ => keebio}/fourier/keymaps/valgrahf/rules.mk (100%) rename keyboards/{ => keebio}/fourier/keymaps/xyverz/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/xyverz/keymap.c (96%) rename keyboards/{ => keebio}/fourier/readme.md (90%) rename keyboards/{ => keebio}/fourier/rules.mk (98%) rename keyboards/{ => keebio}/iris/config.h (100%) rename keyboards/{ => keebio}/iris/info.json (100%) rename keyboards/{ => keebio}/iris/iris.c (100%) rename keyboards/{ => keebio}/iris/iris.h (93%) rename keyboards/{ => keebio}/iris/keymaps/ave-63/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/ave-63/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/broswen/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/broswen/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/broswen/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/davidrambo/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/davidrambo/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/davidrambo/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/davidrambo/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/dbroqua/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/dbroqua/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/dbroqua/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/default/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/default/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna_old/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna_old/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna_old/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/dvp-zjpxshade/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/dvp-zjpxshade/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/dvp-zjpxshade/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/edvorakjp/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/edvorakjp/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/edvorakjp/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/edvorakjp/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/fabian/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/fabian/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/fate/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/fate/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/fate/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/fate/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/gsigler/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/gsigler/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/gsigler/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/hag/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/hag/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/hag/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/hexwire/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/hexwire/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/hexwire/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/README.md (100%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/khord/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/khord/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/khord/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/krusli/README.md (100%) rename keyboards/{ => keebio}/iris/keymaps/krusli/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/krusli/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/krusli/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/lewisridden/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/lewisridden/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/lewisridden/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/mtdjr/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/mtdjr/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/mtdjr/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/rdhaene/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/rdhaene/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/rdhaene/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/rs/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/rs/karabiner.json (100%) rename keyboards/{ => keebio}/iris/keymaps/rs/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/rs/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/rs/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/saviof/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/saviof/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/saviof/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/swedish/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/swedish/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/swedish/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/Readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/via/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/via/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/via/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/vyolle/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/vyolle/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/vyolle/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/wanleg/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/wanleg/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/wanleg/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/xyverz/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/xyverz/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/xyverz/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/rules.mk (100%) rename keyboards/{ => keebio}/iris/readme.md (89%) rename keyboards/{ => keebio}/iris/rev1/config.h (100%) rename keyboards/{ => keebio}/iris/rev1/rev1.c (100%) rename keyboards/{ => keebio}/iris/rev1/rev1.h (100%) rename keyboards/{ => keebio}/iris/rev1/rules.mk (100%) rename keyboards/{ => keebio}/iris/rev1_led/config.h (100%) rename keyboards/{ => keebio}/iris/rev1_led/rev1_led.c (100%) rename keyboards/{ => keebio}/iris/rev1_led/rev1_led.h (100%) rename keyboards/{ => keebio}/iris/rev1_led/rules.mk (100%) rename keyboards/{ => keebio}/iris/rev2/config.h (100%) rename keyboards/{ => keebio}/iris/rev2/rev2.c (100%) rename keyboards/{ => keebio}/iris/rev2/rev2.h (100%) rename keyboards/{ => keebio}/iris/rev2/rules.mk (100%) rename keyboards/{ => keebio}/iris/rev3/config.h (100%) rename keyboards/{ => keebio}/iris/rev3/rev3.c (100%) rename keyboards/{ => keebio}/iris/rev3/rev3.h (100%) rename keyboards/{ => keebio}/iris/rev3/rules.mk (100%) rename keyboards/{ => keebio}/iris/rules.mk (97%) rename keyboards/{ => keebio}/laplace/config.h (96%) rename keyboards/{ => keebio}/laplace/info.json (100%) rename keyboards/{ => keebio}/laplace/keymaps/bakingpy/keymap.c (95%) rename keyboards/{fourier/rev1 => keebio/laplace/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{ => keebio}/laplace/keymaps/default/keymap.c (97%) rename keyboards/{laplace/keymaps/bakingpy => keebio/laplace/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/laplace/laplace.c (100%) rename keyboards/{ => keebio}/laplace/laplace.h (97%) rename keyboards/{ => keebio}/laplace/readme.md (90%) rename keyboards/{ => keebio}/laplace/rules.mk (100%) rename keyboards/{ => keebio}/levinson/config.h (100%) rename keyboards/{ => keebio}/levinson/info.json (100%) rename keyboards/{ => keebio}/levinson/keymaps/atreus/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/atreus/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/atreus/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/bakingpy2u/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/bakingpy2u/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/bakingpy2u/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/default/config.h (92%) rename keyboards/{wavelet => keebio/levinson}/keymaps/default/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/drogglbecher/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/drogglbecher/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/drogglbecher/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/README.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/README.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/steno/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/steno/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/steno/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/treadwell/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/treadwell/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/treadwell/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/valgrahf/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/valgrahf/keymap.c (98%) rename keyboards/{ => keebio}/levinson/keymaps/valgrahf/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/rules.mk (100%) rename keyboards/{ => keebio}/levinson/levinson.c (100%) rename keyboards/{ => keebio}/levinson/levinson.h (96%) rename keyboards/{ => keebio}/levinson/readme.md (100%) rename keyboards/{ => keebio}/levinson/rev1/config.h (98%) rename keyboards/{ => keebio}/levinson/rev1/rev1.c (100%) rename keyboards/{ => keebio}/levinson/rev1/rev1.h (100%) rename keyboards/{ => keebio}/levinson/rev1/rules.mk (100%) rename keyboards/{ => keebio}/levinson/rev2/config.h (98%) rename keyboards/{ => keebio}/levinson/rev2/rev2.c (100%) rename keyboards/{ => keebio}/levinson/rev2/rev2.h (100%) rename keyboards/{ => keebio}/levinson/rev2/rules.mk (100%) rename keyboards/{ => keebio}/levinson/rules.mk (92%) rename keyboards/{ => keebio}/nyquist/config.h (92%) rename keyboards/{ => keebio}/nyquist/info.json (100%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/rules.mk (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/README.md (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/Underglow Pinouts.md (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/config.h (96%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/keymap.c (99%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/keymap_converter.py (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/keymap_to_readme.rb (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/danielhklein/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/danielhklein/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/danielhklein/rules.mk (100%) rename keyboards/{viterbi/keymaps/hexwire => keebio/nyquist/keymaps/default}/config.h (83%) rename keyboards/{ => keebio}/nyquist/keymaps/default/keymap.c (99%) rename keyboards/{viterbi => keebio/nyquist}/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/jojiichan/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/jojiichan/keymap.c (97%) rename keyboards/{ => keebio}/nyquist/keymaps/jojiichan/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/kim-kim/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/kim-kim/keymap.c (98%) rename keyboards/{ => keebio}/nyquist/keymaps/kim-kim/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/rules.mk (100%) rename keyboards/{nyquist/keymaps/default => keebio/nyquist/keymaps/mtdjr}/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/mtdjr/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/mtdjr/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/shovelpaw/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/shovelpaw/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/shovelpaw/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/skug/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/skug/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/skug/rules.mk (100%) create mode 100644 keyboards/keebio/nyquist/keymaps/tester/config.h create mode 100644 keyboards/keebio/nyquist/keymaps/tester/keymap.c rename keyboards/{viterbi/keymaps/dwallace => keebio/nyquist/keymaps/tester}/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/yshrsmz/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/yshrsmz/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/yshrsmz/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/nyquist.c (100%) rename keyboards/{ => keebio}/nyquist/nyquist.h (92%) rename keyboards/{ => keebio}/nyquist/readme.md (89%) rename keyboards/{ => keebio}/nyquist/rev1/config.h (100%) rename keyboards/{ => keebio}/nyquist/rev1/rev1.c (100%) rename keyboards/{ => keebio}/nyquist/rev1/rev1.h (100%) rename keyboards/{ => keebio}/nyquist/rev1/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/rev2/config.h (100%) rename keyboards/{ => keebio}/nyquist/rev2/rev2.c (100%) rename keyboards/{ => keebio}/nyquist/rev2/rev2.h (100%) rename keyboards/{ => keebio}/nyquist/rev2/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/rev3/config.h (100%) rename keyboards/{ => keebio}/nyquist/rev3/rev3.c (100%) rename keyboards/{ => keebio}/nyquist/rev3/rev3.h (100%) rename keyboards/{ => keebio}/nyquist/rev3/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/rules.mk (98%) rename keyboards/{fourier => keebio/quefrency}/config.h (100%) rename keyboards/{ => keebio}/quefrency/info.json (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bjohnson/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bjohnson/keymap.c (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bjohnson/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/README.md (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/keymap.c (98%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default/keymap.c (97%) rename keyboards/{laplace => keebio/quefrency}/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65/keymap.c (97%) rename keyboards/{quefrency/keymaps/default => keebio/quefrency/keymaps/default65}/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65macro/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65macro/keymap.c (97%) rename keyboards/{ => keebio}/quefrency/quefrency.c (100%) rename keyboards/{ => keebio}/quefrency/quefrency.h (92%) rename keyboards/{ => keebio}/quefrency/readme.md (90%) rename keyboards/{ => keebio}/quefrency/rev1/config.h (100%) rename keyboards/{ => keebio}/quefrency/rev1/rev1.c (100%) rename keyboards/{ => keebio}/quefrency/rev1/rev1.h (100%) rename keyboards/{quefrency/keymaps/default65 => keebio/quefrency/rev1}/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/rules.mk (90%) rename keyboards/{ => keebio}/rorschach/config.h (92%) rename keyboards/{ => keebio}/rorschach/info.json (100%) rename keyboards/{ => keebio}/rorschach/keymaps/default/config.h (91%) rename keyboards/{ => keebio}/rorschach/keymaps/default/keymap.c (100%) rename keyboards/{ => keebio}/rorschach/keymaps/insertsnideremarks/config.h (100%) rename keyboards/{ => keebio}/rorschach/keymaps/insertsnideremarks/keymap.c (97%) rename keyboards/{ => keebio}/rorschach/keymaps/insertsnideremarks/rules.mk (100%) rename keyboards/{ => keebio}/rorschach/readme.md (89%) rename keyboards/{ => keebio}/rorschach/rev1/config.h (98%) rename keyboards/{ => keebio}/rorschach/rev1/rev1.c (100%) rename keyboards/{ => keebio}/rorschach/rev1/rev1.h (100%) rename keyboards/{ => keebio}/rorschach/rev1/rules.mk (100%) rename keyboards/{ => keebio}/rorschach/rorschach.c (100%) rename keyboards/{ => keebio}/rorschach/rorschach.h (96%) rename keyboards/{ => keebio}/rorschach/rules.mk (91%) rename keyboards/{ => keebio}/tragicforce68/README.md (87%) rename keyboards/{ => keebio}/tragicforce68/config.h (96%) rename keyboards/{ => keebio}/tragicforce68/info.json (100%) rename keyboards/{ => keebio}/tragicforce68/keymaps/buswerks/keymap.c (100%) rename keyboards/{ => keebio}/tragicforce68/keymaps/default/keymap.c (100%) rename keyboards/{ => keebio}/tragicforce68/rules.mk (100%) rename keyboards/{ => keebio}/tragicforce68/tragicforce68.c (100%) rename keyboards/{ => keebio}/tragicforce68/tragicforce68.h (100%) rename keyboards/{ => keebio}/viterbi/config.h (92%) rename keyboards/{viterbi/keymaps/hexwire => keebio/viterbi/keymaps/bakingpy}/README.md (100%) rename keyboards/{nyquist/keymaps/mtdjr => keebio/viterbi/keymaps/bakingpy}/config.h (92%) rename keyboards/{viterbi/keymaps/hexwire => keebio/viterbi/keymaps/bakingpy}/keymap.c (99%) rename keyboards/{viterbi/keymaps/fido => keebio/viterbi/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/default/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/default/keymap.c (60%) rename keyboards/{viterbi/keymaps/hexwire => keebio/viterbi/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna/keymap.c (97%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna_old/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna_old/keymap.c (100%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna_old/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/dwallace/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/dwallace/keymap.c (99%) rename keyboards/{viterbi/keymaps/mike808 => keebio/viterbi/keymaps/dwallace}/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/fido/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/fido/keymap.c (99%) create mode 100644 keyboards/keebio/viterbi/keymaps/fido/rules.mk rename keyboards/{ => keebio}/viterbi/keymaps/mike808/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/mike808/keymap.c (99%) create mode 100644 keyboards/keebio/viterbi/keymaps/mike808/rules.mk rename keyboards/{ => keebio}/viterbi/readme.md (88%) rename keyboards/{ => keebio}/viterbi/rev1/config.h (96%) rename keyboards/{viterbi/rev2/rev2.c => keebio/viterbi/rev1/rev1.c} (100%) rename keyboards/{ => keebio}/viterbi/rev1/rev1.h (95%) rename keyboards/{ => keebio}/viterbi/rev1/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/rev2/config.h (99%) rename keyboards/{viterbi/viterbi.c => keebio/viterbi/rev2/rev2.c} (100%) rename keyboards/{ => keebio}/viterbi/rev2/rev2.h (100%) rename keyboards/{ => keebio}/viterbi/rev2/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/rules.mk (97%) create mode 100644 keyboards/keebio/viterbi/viterbi.c rename keyboards/{ => keebio}/viterbi/viterbi.h (95%) rename keyboards/{ => keebio}/wavelet/config.h (97%) rename keyboards/{ => keebio}/wavelet/info.json (100%) rename keyboards/{levinson => keebio/wavelet}/keymaps/default/keymap.c (99%) rename keyboards/{ => keebio}/wavelet/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/wavelet/readme.md (90%) rename keyboards/{ => keebio}/wavelet/rules.mk (100%) rename keyboards/{ => keebio}/wavelet/wavelet.c (100%) rename keyboards/{ => keebio}/wavelet/wavelet.h (100%) delete mode 100644 keyboards/quefrency/config.h delete mode 100644 keyboards/quefrency/rev1/rules.mk delete mode 100644 keyboards/viterbi/rev1/rev1.c diff --git a/keyboards/dilly/keymaps/default/config.h b/keyboards/dilly/keymaps/default/config.h deleted file mode 100644 index 7fa3bf328ec9..000000000000 --- a/keyboards/dilly/keymaps/default/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#endif diff --git a/keyboards/fourier/rev1/rev1.c b/keyboards/fourier/rev1/rev1.c deleted file mode 100644 index 1e662e7b8d0f..000000000000 --- a/keyboards/fourier/rev1/rev1.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "fourier.h" - -void matrix_init_kb(void) { - matrix_init_user(); -}; diff --git a/keyboards/fourier/rev1/rev1.h b/keyboards/fourier/rev1/rev1.h deleted file mode 100644 index ac889462b30b..000000000000 --- a/keyboards/fourier/rev1/rev1.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "fourier.h" -#include "quantum.h" - -#define LAYOUT( \ - LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ - LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ - LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ - LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ - ) \ - { \ - { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ - { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ - { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ - { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ - { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ - { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ - { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ - { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ - } diff --git a/keyboards/bdn9/bdn9.c b/keyboards/keebio/bdn9/bdn9.c similarity index 100% rename from keyboards/bdn9/bdn9.c rename to keyboards/keebio/bdn9/bdn9.c diff --git a/keyboards/bdn9/bdn9.h b/keyboards/keebio/bdn9/bdn9.h similarity index 100% rename from keyboards/bdn9/bdn9.h rename to keyboards/keebio/bdn9/bdn9.h diff --git a/keyboards/bdn9/config.h b/keyboards/keebio/bdn9/config.h similarity index 99% rename from keyboards/bdn9/config.h rename to keyboards/keebio/bdn9/config.h index 1d0062375227..23b92b6cee42 100644 --- a/keyboards/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -32,7 +32,6 @@ along with this program. If not, see . #define MATRIX_COLS 9 /* Keyboard Matrix Assignments */ -#define NO_PIN (~0) #define MATRIX_ROW_PINS { NO_PIN } #define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 } diff --git a/keyboards/bdn9/info.json b/keyboards/keebio/bdn9/info.json similarity index 100% rename from keyboards/bdn9/info.json rename to keyboards/keebio/bdn9/info.json diff --git a/keyboards/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c similarity index 100% rename from keyboards/bdn9/keymaps/default/keymap.c rename to keyboards/keebio/bdn9/keymaps/default/keymap.c diff --git a/keyboards/bdn9/readme.md b/keyboards/keebio/bdn9/readme.md similarity index 96% rename from keyboards/bdn9/readme.md rename to keyboards/keebio/bdn9/readme.md index c9d5ed0b3567..ddbe7f144b65 100644 --- a/keyboards/bdn9/readme.md +++ b/keyboards/keebio/bdn9/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-m Make example for this keyboard (after setting up your build environment): - make bdn9:default + make keebio/bdn9: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/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk similarity index 100% rename from keyboards/bdn9/rules.mk rename to keyboards/keebio/bdn9/rules.mk diff --git a/keyboards/bfo9000/bfo9000.c b/keyboards/keebio/bfo9000/bfo9000.c similarity index 100% rename from keyboards/bfo9000/bfo9000.c rename to keyboards/keebio/bfo9000/bfo9000.c diff --git a/keyboards/bfo9000/bfo9000.h b/keyboards/keebio/bfo9000/bfo9000.h similarity index 100% rename from keyboards/bfo9000/bfo9000.h rename to keyboards/keebio/bfo9000/bfo9000.h diff --git a/keyboards/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h similarity index 96% rename from keyboards/bfo9000/config.h rename to keyboards/keebio/bfo9000/config.h index 8098428d66cc..5dc2bd434365 100644 --- a/keyboards/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -16,13 +16,12 @@ 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 +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1169 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -48,7 +47,6 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B4 - #define RGBLED_NUM 20 // Number of LEDs /* @@ -68,5 +66,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bfo9000/i2c.c b/keyboards/keebio/bfo9000/i2c.c similarity index 100% rename from keyboards/bfo9000/i2c.c rename to keyboards/keebio/bfo9000/i2c.c diff --git a/keyboards/bfo9000/i2c.h b/keyboards/keebio/bfo9000/i2c.h similarity index 100% rename from keyboards/bfo9000/i2c.h rename to keyboards/keebio/bfo9000/i2c.h diff --git a/keyboards/bfo9000/keymaps/andylikescandy6x18/config.h b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h similarity index 100% rename from keyboards/bfo9000/keymaps/andylikescandy6x18/config.h rename to keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h diff --git a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c similarity index 98% rename from keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c rename to keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c index 24208e2a890a..0aa1e780a74c 100644 --- a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c @@ -9,11 +9,6 @@ #define _RAISE 2 #define _NAVIGATION 3 - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Switch Layouts #define SWBASE M(_BASE) #define SWQWERTY M(_QWERTY) diff --git a/keyboards/bfo9000/keymaps/default/config.h b/keyboards/keebio/bfo9000/keymaps/default/config.h similarity index 84% rename from keyboards/bfo9000/keymaps/default/config.h rename to keyboards/keebio/bfo9000/keymaps/default/config.h index 6b31e8d14ee1..a9ae6791103c 100644 --- a/keyboards/bfo9000/keymaps/default/config.h +++ b/keyboards/keebio/bfo9000/keymaps/default/config.h @@ -18,20 +18,10 @@ 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 +#pragma once -#include "config_common.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - -#endif diff --git a/keyboards/bfo9000/keymaps/default/keymap.c b/keyboards/keebio/bfo9000/keymaps/default/keymap.c similarity index 93% rename from keyboards/bfo9000/keymaps/default/keymap.c rename to keyboards/keebio/bfo9000/keymaps/default/keymap.c index 5de5e123e509..956e7b9efa70 100644 --- a/keyboards/bfo9000/keymaps/default/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/default/keymap.c @@ -2,10 +2,6 @@ #define _BASE 0 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( \ diff --git a/keyboards/bfo9000/matrix.c b/keyboards/keebio/bfo9000/matrix.c similarity index 100% rename from keyboards/bfo9000/matrix.c rename to keyboards/keebio/bfo9000/matrix.c diff --git a/keyboards/bfo9000/readme.md b/keyboards/keebio/bfo9000/readme.md similarity index 91% rename from keyboards/bfo9000/readme.md rename to keyboards/keebio/bfo9000/readme.md index d2175af23606..059f2800a235 100644 --- a/keyboards/bfo9000/readme.md +++ b/keyboards/keebio/bfo9000/readme.md @@ -9,10 +9,10 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make bfo9000:default + make keebio/bfo9000:default Example of flashing this keyboard: - make bfo9000:default:avrdude + make keebio/bfo9000:default:avrdude 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/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk similarity index 100% rename from keyboards/bfo9000/rules.mk rename to keyboards/keebio/bfo9000/rules.mk diff --git a/keyboards/bfo9000/serial.c b/keyboards/keebio/bfo9000/serial.c similarity index 100% rename from keyboards/bfo9000/serial.c rename to keyboards/keebio/bfo9000/serial.c diff --git a/keyboards/bfo9000/serial.h b/keyboards/keebio/bfo9000/serial.h similarity index 100% rename from keyboards/bfo9000/serial.h rename to keyboards/keebio/bfo9000/serial.h diff --git a/keyboards/bfo9000/split_util.c b/keyboards/keebio/bfo9000/split_util.c similarity index 100% rename from keyboards/bfo9000/split_util.c rename to keyboards/keebio/bfo9000/split_util.c diff --git a/keyboards/bfo9000/split_util.h b/keyboards/keebio/bfo9000/split_util.h similarity index 100% rename from keyboards/bfo9000/split_util.h rename to keyboards/keebio/bfo9000/split_util.h diff --git a/keyboards/chocopad/README.md b/keyboards/keebio/chocopad/README.md similarity index 93% rename from keyboards/chocopad/README.md rename to keyboards/keebio/chocopad/README.md index ae28009c3c16..3cdb3b3b9c8a 100644 --- a/keyboards/chocopad/README.md +++ b/keyboards/keebio/chocopad/README.md @@ -9,6 +9,6 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make chocopad:default + make keebio/chocopad:default 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/chocopad/chocopad.c b/keyboards/keebio/chocopad/chocopad.c similarity index 100% rename from keyboards/chocopad/chocopad.c rename to keyboards/keebio/chocopad/chocopad.c diff --git a/keyboards/chocopad/chocopad.h b/keyboards/keebio/chocopad/chocopad.h similarity index 93% rename from keyboards/chocopad/chocopad.h rename to keyboards/keebio/chocopad/chocopad.h index ec73b1465bcf..d37aefc57e12 100644 --- a/keyboards/chocopad/chocopad.h +++ b/keyboards/keebio/chocopad/chocopad.h @@ -1,5 +1,4 @@ -#ifndef CHOCOPAD_H -#define CHOCOPAD_H +#pragma once #include "quantum.h" @@ -28,5 +27,3 @@ KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ KC_##D1, KC_##D2, KC_##D3, KC_##D4 \ ) - -#endif diff --git a/keyboards/chocopad/config.h b/keyboards/keebio/chocopad/config.h similarity index 97% rename from keyboards/chocopad/config.h rename to keyboards/keebio/chocopad/config.h index 62596a2ed752..fb00ae70ac1b 100644 --- a/keyboards/chocopad/config.h +++ b/keyboards/keebio/chocopad/config.h @@ -4,7 +4,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1144 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -42,7 +42,6 @@ #define RGBLIGHT_VAL_STEP 8 #endif #define RGB_DI_PIN D3 - #define RGBLED_NUM 4 #endif diff --git a/keyboards/chocopad/info.json b/keyboards/keebio/chocopad/info.json similarity index 100% rename from keyboards/chocopad/info.json rename to keyboards/keebio/chocopad/info.json diff --git a/keyboards/chocopad/keymaps/default/config.h b/keyboards/keebio/chocopad/keymaps/default/config.h similarity index 100% rename from keyboards/chocopad/keymaps/default/config.h rename to keyboards/keebio/chocopad/keymaps/default/config.h diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/keebio/chocopad/keymaps/default/keymap.c similarity index 96% rename from keyboards/chocopad/keymaps/default/keymap.c rename to keyboards/keebio/chocopad/keymaps/default/keymap.c index df22e8b1fb18..7b4b752c9ca9 100644 --- a/keyboards/chocopad/keymaps/default/keymap.c +++ b/keyboards/keebio/chocopad/keymaps/default/keymap.c @@ -4,8 +4,6 @@ #define _FN1 1 #define _FN2 2 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_ortho_4x4( diff --git a/keyboards/chocopad/keymaps/default/rules.mk b/keyboards/keebio/chocopad/keymaps/default/rules.mk similarity index 100% rename from keyboards/chocopad/keymaps/default/rules.mk rename to keyboards/keebio/chocopad/keymaps/default/rules.mk diff --git a/keyboards/chocopad/keymaps/khord/config.h b/keyboards/keebio/chocopad/keymaps/khord/config.h similarity index 100% rename from keyboards/chocopad/keymaps/khord/config.h rename to keyboards/keebio/chocopad/keymaps/khord/config.h diff --git a/keyboards/chocopad/keymaps/khord/keymap.c b/keyboards/keebio/chocopad/keymaps/khord/keymap.c similarity index 96% rename from keyboards/chocopad/keymaps/khord/keymap.c rename to keyboards/keebio/chocopad/keymaps/khord/keymap.c index ea36c6f6401f..2c871c4e820a 100644 --- a/keyboards/chocopad/keymaps/khord/keymap.c +++ b/keyboards/keebio/chocopad/keymaps/khord/keymap.c @@ -35,7 +35,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----. P7 , P8 , P9 ,BSPC, //|----+----+----+----| @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----. ESC ,MAC1,MAC2,DEL , //|----+----+----+----| @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----. RST , XX , XX , XX , //|----+----+----+----| diff --git a/keyboards/chocopad/keymaps/khord/rules.mk b/keyboards/keebio/chocopad/keymaps/khord/rules.mk similarity index 100% rename from keyboards/chocopad/keymaps/khord/rules.mk rename to keyboards/keebio/chocopad/keymaps/khord/rules.mk diff --git a/keyboards/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk similarity index 100% rename from keyboards/chocopad/rules.mk rename to keyboards/keebio/chocopad/rules.mk diff --git a/keyboards/dilly/README.md b/keyboards/keebio/dilly/README.md similarity index 94% rename from keyboards/dilly/README.md rename to keyboards/keebio/dilly/README.md index a676313f3e1b..74139eaeaeea 100644 --- a/keyboards/dilly/README.md +++ b/keyboards/keebio/dilly/README.md @@ -9,6 +9,6 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make dilly:default + make keebio/dilly:default 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/dilly/config.h b/keyboards/keebio/dilly/config.h similarity index 100% rename from keyboards/dilly/config.h rename to keyboards/keebio/dilly/config.h diff --git a/keyboards/dilly/dilly.c b/keyboards/keebio/dilly/dilly.c similarity index 100% rename from keyboards/dilly/dilly.c rename to keyboards/keebio/dilly/dilly.c diff --git a/keyboards/dilly/dilly.h b/keyboards/keebio/dilly/dilly.h similarity index 100% rename from keyboards/dilly/dilly.h rename to keyboards/keebio/dilly/dilly.h diff --git a/keyboards/dilly/info.json b/keyboards/keebio/dilly/info.json similarity index 100% rename from keyboards/dilly/info.json rename to keyboards/keebio/dilly/info.json diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/config.h b/keyboards/keebio/dilly/keymaps/bakingpy/config.h new file mode 100644 index 000000000000..d141283ea4af --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/bakingpy/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define TAPPING_TERM 150 diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c new file mode 100644 index 000000000000..7b52d5ff74b5 --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c @@ -0,0 +1,106 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 +#define _FN3 3 +#define _FN4 4 +#define _FN5 5 + +#define KC_ KC_TRNS + +// Tap-Hold keys +#define KC_ASFT MT(MOD_LSFT, KC_A) +#define KC_F_L3 LT(_FN3, KC_F) +#define KC_ZCTL MT(MOD_LCTL, KC_Z) +#define KC_XALT MT(MOD_LALT, KC_X) +#define KC_CGUI MT(MOD_LGUI, KC_C) +#define KC_V_L4 LT(_FN4, KC_V) +#define KC_SPL2 LT(_FN2, KC_SPC) +#define KC_B_L1 LT(_FN1, KC_B) +#define KC_N_L5 LT(_FN5, KC_N) +#define KC_MALT MT(MOD_RALT, KC_M) +#define KC_BSCT MT(MOD_RCTL, KC_BSPC) +#define KC_ENTS MT(MOD_RSFT, KC_ENT) +#define KC_ESCS MT(MOD_RSFT, KC_ESC) +#define KC_SCNS MT(MOD_RSFT, KC_SCLN) + +#define KC_GUIC LGUI(KC_C) + +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + Q , W , E , R , T , Y , U , I , O , P , + //|----+----+----+----+----+----+----+----+----+----| + ASFT, S , D ,F_L3, G , H , J , K , L ,ESCS, + //|----+----+----+----+----+----+----+----+----+----| + ZCTL,XALT,CGUI,V_L4,SPL2,B_L1,N_L5,MALT,BSCT,ENTS + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, + //|----+----+----+----+----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN2] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , + //|----+----+----+----+----+----+----+----+----+----| + F11 ,F12 , , , ,LEFT,DOWN, UP ,RGHT,GRV , + //|----+----+----+----+----+----+----+----+----+----| + , , , , ,DEL , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN3] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT, + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN4] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , , LT , GT ,QUES,COLN,DQUO, + //|----+----+----+----+----+----+----+----+----+----| + , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN5] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , , + //|----+----+----+----+----+----+----+----+----+----| + , ,DBUG, ,RHUD,RSAD,RVAD, , , , + //|----+----+----+----+----+----+----+----+----+----| + BL_S, ,GUIC, , , , , , , + //`----+----+----+----+----+----+----+----+----+----' + ) + +}; diff --git a/keyboards/dilly/keymaps/default/rules.mk b/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/dilly/keymaps/default/rules.mk rename to keyboards/keebio/dilly/keymaps/bakingpy/rules.mk diff --git a/keyboards/keebio/dilly/keymaps/default/config.h b/keyboards/keebio/dilly/keymaps/default/config.h new file mode 100644 index 000000000000..6f70f09beec2 --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/default/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/dilly/keymaps/default/keymap.c b/keyboards/keebio/dilly/keymaps/default/keymap.c similarity index 99% rename from keyboards/dilly/keymaps/default/keymap.c rename to keyboards/keebio/dilly/keymaps/default/keymap.c index 03b539e3d80e..dc92afbd0da4 100644 --- a/keyboards/dilly/keymaps/default/keymap.c +++ b/keyboards/keebio/dilly/keymaps/default/keymap.c @@ -9,8 +9,6 @@ extern keymap_config_t keymap_config; #define _FN4 4 #define _FN5 5 -#define _______ KC_TRNS - // Tap-Hold keys #define KC_ASFT MT(MOD_LSFT, KC_A) #define KC_F_L3 LT(_FN3, KC_F) diff --git a/keyboards/dilly/keymaps/delmo/rules.mk b/keyboards/keebio/dilly/keymaps/default/rules.mk similarity index 100% rename from keyboards/dilly/keymaps/delmo/rules.mk rename to keyboards/keebio/dilly/keymaps/default/rules.mk diff --git a/keyboards/dilly/keymaps/delmo/config.h b/keyboards/keebio/dilly/keymaps/delmo/config.h similarity index 100% rename from keyboards/dilly/keymaps/delmo/config.h rename to keyboards/keebio/dilly/keymaps/delmo/config.h diff --git a/keyboards/dilly/keymaps/delmo/keymap.c b/keyboards/keebio/dilly/keymaps/delmo/keymap.c similarity index 99% rename from keyboards/dilly/keymaps/delmo/keymap.c rename to keyboards/keebio/dilly/keymaps/delmo/keymap.c index d3e8c5daf24d..9d6c900ff41a 100644 --- a/keyboards/dilly/keymaps/delmo/keymap.c +++ b/keyboards/keebio/dilly/keymaps/delmo/keymap.c @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; #define _FN5 5 #define KC_ KC_TRNS -#define _______ KC_TRNS // Tap-Hold keys //#define KC_ASFT MT(MOD_LSFT, KC_A) @@ -103,4 +102,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ) -}; \ No newline at end of file +}; diff --git a/keyboards/nyquist/keymaps/default/rules.mk b/keyboards/keebio/dilly/keymaps/delmo/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/default/rules.mk rename to keyboards/keebio/dilly/keymaps/delmo/rules.mk diff --git a/keyboards/dilly/keymaps/pletcher/config.h b/keyboards/keebio/dilly/keymaps/pletcher/config.h similarity index 100% rename from keyboards/dilly/keymaps/pletcher/config.h rename to keyboards/keebio/dilly/keymaps/pletcher/config.h diff --git a/keyboards/dilly/keymaps/pletcher/keymap.c b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c similarity index 99% rename from keyboards/dilly/keymaps/pletcher/keymap.c rename to keyboards/keebio/dilly/keymaps/pletcher/keymap.c index 4e7a5c89d22a..8bad575d6b57 100644 --- a/keyboards/dilly/keymaps/pletcher/keymap.c +++ b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; #define _FN5 5 #define KC_ KC_TRNS -#define _______ KC_TRNS // Tap-Hold keys #define KC_F_L3 LT(_FN3, KC_F) diff --git a/keyboards/dilly/keymaps/pletcher/rules.mk b/keyboards/keebio/dilly/keymaps/pletcher/rules.mk similarity index 100% rename from keyboards/dilly/keymaps/pletcher/rules.mk rename to keyboards/keebio/dilly/keymaps/pletcher/rules.mk diff --git a/keyboards/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk similarity index 100% rename from keyboards/dilly/rules.mk rename to keyboards/keebio/dilly/rules.mk diff --git a/keyboards/fourier/rev1/config.h b/keyboards/keebio/fourier/config.h similarity index 98% rename from keyboards/fourier/rev1/config.h rename to keyboards/keebio/fourier/config.h index 601d843e713f..70967a13f6c9 100644 --- a/keyboards/fourier/rev1/config.h +++ b/keyboards/keebio/fourier/config.h @@ -18,6 +18,8 @@ along with this program. If not, see . #pragma once +#include "config_common.h" + /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1247 diff --git a/keyboards/fourier/fourier.c b/keyboards/keebio/fourier/fourier.c similarity index 100% rename from keyboards/fourier/fourier.c rename to keyboards/keebio/fourier/fourier.c diff --git a/keyboards/fourier/fourier.h b/keyboards/keebio/fourier/fourier.h similarity index 58% rename from keyboards/fourier/fourier.h rename to keyboards/keebio/fourier/fourier.h index 1b4585c82164..7505ad8b3e17 100644 --- a/keyboards/fourier/fourier.h +++ b/keyboards/keebio/fourier/fourier.h @@ -6,6 +6,23 @@ #include "quantum.h" +#define LAYOUT( \ + LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ + LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ + { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ + { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ + { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ + { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ + { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ + { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ + } + // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ diff --git a/keyboards/fourier/info.json b/keyboards/keebio/fourier/info.json similarity index 100% rename from keyboards/fourier/info.json rename to keyboards/keebio/fourier/info.json diff --git a/keyboards/fourier/keymaps/default/config.h b/keyboards/keebio/fourier/keymaps/default/config.h similarity index 97% rename from keyboards/fourier/keymaps/default/config.h rename to keyboards/keebio/fourier/keymaps/default/config.h index 18f4c1f7ac4a..8cea39218168 100644 --- a/keyboards/fourier/keymaps/default/config.h +++ b/keyboards/keebio/fourier/keymaps/default/config.h @@ -21,5 +21,4 @@ along with this program. If not, see . #pragma once /* Use I2C or Serial, not both */ -#define USE_SERIAL // #define USE_I2C diff --git a/keyboards/fourier/keymaps/default/keymap.c b/keyboards/keebio/fourier/keymaps/default/keymap.c similarity index 91% rename from keyboards/fourier/keymaps/default/keymap.c rename to keyboards/keebio/fourier/keymaps/default/keymap.c index a08f27b7ce15..341bc99a7e83 100644 --- a/keyboards/fourier/keymaps/default/keymap.c +++ b/keyboards/keebio/fourier/keymaps/default/keymap.c @@ -14,15 +14,15 @@ enum custom_keycodes { #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) -#define KC_SPFN1 LT(_FN1, KC_SPACE) -#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define SPFN1 LT(_FN1, KC_SPACE) +#define BSFN2 LT(_FN2, KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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, - KC_LCTL, KC_LALT, KC_LGUI, KC_FN1, KC_SPFN1, KC_BSFN2, KC_RGUI, KC_RALT, KC_FN2, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, KC_FN1, SPFN1, BSFN2, KC_RGUI, KC_RALT, KC_FN2, KC_RCTL ), [_FN1] = LAYOUT( diff --git a/keyboards/fourier/keymaps/default/rules.mk b/keyboards/keebio/fourier/keymaps/default/rules.mk similarity index 100% rename from keyboards/fourier/keymaps/default/rules.mk rename to keyboards/keebio/fourier/keymaps/default/rules.mk diff --git a/keyboards/fourier/keymaps/jennetters/config.h b/keyboards/keebio/fourier/keymaps/jennetters/config.h similarity index 100% rename from keyboards/fourier/keymaps/jennetters/config.h rename to keyboards/keebio/fourier/keymaps/jennetters/config.h diff --git a/keyboards/fourier/keymaps/jennetters/keymap.c b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c similarity index 97% rename from keyboards/fourier/keymaps/jennetters/keymap.c rename to keyboards/keebio/fourier/keymaps/jennetters/keymap.c index 5037d3ddf5e9..a6ec95e1e3aa 100644 --- a/keyboards/fourier/keymaps/jennetters/keymap.c +++ b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c @@ -15,8 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_SPFN1 LT(_FN1, KC_SPACE) @@ -53,7 +51,7 @@ enum { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BASE] = LAYOUT( +[_BASE] = LAYOUT( // ,----+----+----+----+----+----|----+----+----+----+----+----+----. // |ESC | Q1 | W2 | E3 | R4 | T5 | Y6 | U7 | I8 | O9 | P0 | -[ | =] | // |----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -63,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |-------`----`----`----`----`----|----`----`----`----`----`------| // | CTL | SYS| ALT | SP SPACE | SPACE | FN1 | CTL | \ | ENT | // `-----+----+-----+----+--------|--------+-----+------+----+------' - + TD(ESC_GR), TD(Q_1), TD(W_2), TD(E_3), TD(R_4), TD(T_5), TD(Y_6), TD(U_7), TD(I_8), TD(O_9), TD(P_0),TD(MIN_LB),TD(EQL_RB), \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(SCL_QUO), KC_BSPC, \ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ @@ -80,11 +78,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |-------`----`----`----`----`----|----`----`----`----`----`------| // | | | | | | | | | | | // `-----+----+-----+----+--------|--------+-----+------+----+------' - + , , UP, , , , , , , , , , , \ , LEFT, DOWN, RIGHT, , , , , , , QUOT, DEL, \ , , , , , , , , , , NUBS, , \ - , , , , , , , , , + , , , , , , , , , ), [_FN2] = LAYOUT_kc( @@ -101,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , , , , , , , , , \ , , , , , , , , , , , , \ , , , , , , , , , , , , \ - , , , , , , , , , + , , , , , , , , , ) }; @@ -145,4 +143,4 @@ qk_tap_dance_action_t tap_dance_actions[] = { [EQL_RB] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_RBRC), //Tap once for =, twice for ]/} [SCL_QUO] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT) //Tap once for ;, '/" // Other declarations would go here, separated by commas, if you have them -}; \ No newline at end of file +}; diff --git a/keyboards/fourier/keymaps/jennetters/rules.mk b/keyboards/keebio/fourier/keymaps/jennetters/rules.mk similarity index 100% rename from keyboards/fourier/keymaps/jennetters/rules.mk rename to keyboards/keebio/fourier/keymaps/jennetters/rules.mk diff --git a/keyboards/fourier/keymaps/maxim/config.h b/keyboards/keebio/fourier/keymaps/maxim/config.h similarity index 100% rename from keyboards/fourier/keymaps/maxim/config.h rename to keyboards/keebio/fourier/keymaps/maxim/config.h diff --git a/keyboards/fourier/keymaps/maxim/keymap.c b/keyboards/keebio/fourier/keymaps/maxim/keymap.c similarity index 100% rename from keyboards/fourier/keymaps/maxim/keymap.c rename to keyboards/keebio/fourier/keymaps/maxim/keymap.c diff --git a/keyboards/fourier/keymaps/valgrahf/config.h b/keyboards/keebio/fourier/keymaps/valgrahf/config.h similarity index 100% rename from keyboards/fourier/keymaps/valgrahf/config.h rename to keyboards/keebio/fourier/keymaps/valgrahf/config.h diff --git a/keyboards/fourier/keymaps/valgrahf/keymap.c b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c similarity index 98% rename from keyboards/fourier/keymaps/valgrahf/keymap.c rename to keyboards/keebio/fourier/keymaps/valgrahf/keymap.c index 4679d165c438..a31c884750c6 100644 --- a/keyboards/fourier/keymaps/valgrahf/keymap.c +++ b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c @@ -15,8 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 LT(_FN1, KC_NO) #define KC_FN2 LT(_FN2, KC_NO) #define KC_SPFN LT(_FN1, KC_SPACE) diff --git a/keyboards/fourier/keymaps/valgrahf/rules.mk b/keyboards/keebio/fourier/keymaps/valgrahf/rules.mk similarity index 100% rename from keyboards/fourier/keymaps/valgrahf/rules.mk rename to keyboards/keebio/fourier/keymaps/valgrahf/rules.mk diff --git a/keyboards/fourier/keymaps/xyverz/config.h b/keyboards/keebio/fourier/keymaps/xyverz/config.h similarity index 100% rename from keyboards/fourier/keymaps/xyverz/config.h rename to keyboards/keebio/fourier/keymaps/xyverz/config.h diff --git a/keyboards/fourier/keymaps/xyverz/keymap.c b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c similarity index 96% rename from keyboards/fourier/keymaps/xyverz/keymap.c rename to keyboards/keebio/fourier/keymaps/xyverz/keymap.c index 09aaa97f7def..4e864cdef7e5 100644 --- a/keyboards/fourier/keymaps/xyverz/keymap.c +++ b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c @@ -17,8 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_ESFN1 LT(_FN1, KC_ESC) @@ -46,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , //|-------`----`----`----`----`----|----`----`----`----`----`------| - LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL + LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ), @@ -58,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , //|-------`----`----`----`----`----|----`----`----`----`----`------| - RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT + RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ), @@ -70,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , //|-------`----`----`----`----`----|----`----`----`----`----`------| - , , , , DEL , INS , , , , + , , , , DEL , INS , , , , //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ) diff --git a/keyboards/fourier/readme.md b/keyboards/keebio/fourier/readme.md similarity index 90% rename from keyboards/fourier/readme.md rename to keyboards/keebio/fourier/readme.md index ca29c7aba612..c18d1a7484a1 100644 --- a/keyboards/fourier/readme.md +++ b/keyboards/keebio/fourier/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io/collections/frontpage/products/f Make example for this keyboard (after setting up your build environment): - make fourier/rev1:default + make keebio/fourier:default Example of flashing this keyboard: - make fourier/rev1:default:avrdude + make keebio/fourier:default:avrdude 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/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk similarity index 98% rename from keyboards/fourier/rules.mk rename to keyboards/keebio/fourier/rules.mk index 93935e02eb41..9512c0f64827 100644 --- a/keyboards/fourier/rules.mk +++ b/keyboards/keebio/fourier/rules.mk @@ -58,11 +58,8 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = 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 SPLIT_KEYBOARD = yes - -DEFAULT_FOLDER = fourier/rev1 diff --git a/keyboards/iris/config.h b/keyboards/keebio/iris/config.h similarity index 100% rename from keyboards/iris/config.h rename to keyboards/keebio/iris/config.h diff --git a/keyboards/iris/info.json b/keyboards/keebio/iris/info.json similarity index 100% rename from keyboards/iris/info.json rename to keyboards/keebio/iris/info.json diff --git a/keyboards/iris/iris.c b/keyboards/keebio/iris/iris.c similarity index 100% rename from keyboards/iris/iris.c rename to keyboards/keebio/iris/iris.c diff --git a/keyboards/iris/iris.h b/keyboards/keebio/iris/iris.h similarity index 93% rename from keyboards/iris/iris.h rename to keyboards/keebio/iris/iris.h index 4212462c1584..ec78efc220db 100644 --- a/keyboards/iris/iris.h +++ b/keyboards/keebio/iris/iris.h @@ -1,10 +1,10 @@ #pragma once -#ifdef KEYBOARD_iris_rev1 +#ifdef KEYBOARD_keebio_iris_rev1 #include "rev1.h" -#elif KEYBOARD_iris_rev1_led +#elif KEYBOARD_keebio_iris_rev1_led #include "rev1_led.h" -#elif KEYBOARD_iris_rev2 +#elif KEYBOARD_keebio_iris_rev2 #include "rev2.h" #else #include "rev3.h" diff --git a/keyboards/iris/keymaps/ave-63/config.h b/keyboards/keebio/iris/keymaps/ave-63/config.h similarity index 100% rename from keyboards/iris/keymaps/ave-63/config.h rename to keyboards/keebio/iris/keymaps/ave-63/config.h diff --git a/keyboards/iris/keymaps/ave-63/keymap.c b/keyboards/keebio/iris/keymaps/ave-63/keymap.c similarity index 100% rename from keyboards/iris/keymaps/ave-63/keymap.c rename to keyboards/keebio/iris/keymaps/ave-63/keymap.c diff --git a/keyboards/iris/keymaps/bmoorey/config.h b/keyboards/keebio/iris/keymaps/bmoorey/config.h similarity index 100% rename from keyboards/iris/keymaps/bmoorey/config.h rename to keyboards/keebio/iris/keymaps/bmoorey/config.h diff --git a/keyboards/iris/keymaps/bmoorey/keymap.c b/keyboards/keebio/iris/keymaps/bmoorey/keymap.c similarity index 100% rename from keyboards/iris/keymaps/bmoorey/keymap.c rename to keyboards/keebio/iris/keymaps/bmoorey/keymap.c diff --git a/keyboards/iris/keymaps/bmoorey/readme.md b/keyboards/keebio/iris/keymaps/bmoorey/readme.md similarity index 100% rename from keyboards/iris/keymaps/bmoorey/readme.md rename to keyboards/keebio/iris/keymaps/bmoorey/readme.md diff --git a/keyboards/iris/keymaps/bmoorey/rules.mk b/keyboards/keebio/iris/keymaps/bmoorey/rules.mk similarity index 100% rename from keyboards/iris/keymaps/bmoorey/rules.mk rename to keyboards/keebio/iris/keymaps/bmoorey/rules.mk diff --git a/keyboards/iris/keymaps/broswen/config.h b/keyboards/keebio/iris/keymaps/broswen/config.h similarity index 100% rename from keyboards/iris/keymaps/broswen/config.h rename to keyboards/keebio/iris/keymaps/broswen/config.h diff --git a/keyboards/iris/keymaps/broswen/keymap.c b/keyboards/keebio/iris/keymaps/broswen/keymap.c similarity index 98% rename from keyboards/iris/keymaps/broswen/keymap.c rename to keyboards/keebio/iris/keymaps/broswen/keymap.c index 6d783142e40b..a64b03f57188 100644 --- a/keyboards/iris/keymaps/broswen/keymap.c +++ b/keyboards/keebio/iris/keymaps/broswen/keymap.c @@ -16,7 +16,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -51,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| , GRV,BSLS,UNDS, EQL, , , , , , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - , , , , , + , , , , , // `----+----+----' `----+----+----' ), diff --git a/keyboards/iris/keymaps/broswen/rules.mk b/keyboards/keebio/iris/keymaps/broswen/rules.mk similarity index 100% rename from keyboards/iris/keymaps/broswen/rules.mk rename to keyboards/keebio/iris/keymaps/broswen/rules.mk diff --git a/keyboards/iris/keymaps/davidrambo/config.h b/keyboards/keebio/iris/keymaps/davidrambo/config.h similarity index 100% rename from keyboards/iris/keymaps/davidrambo/config.h rename to keyboards/keebio/iris/keymaps/davidrambo/config.h diff --git a/keyboards/iris/keymaps/davidrambo/keymap.c b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c similarity index 100% rename from keyboards/iris/keymaps/davidrambo/keymap.c rename to keyboards/keebio/iris/keymaps/davidrambo/keymap.c diff --git a/keyboards/iris/keymaps/davidrambo/readme.md b/keyboards/keebio/iris/keymaps/davidrambo/readme.md similarity index 100% rename from keyboards/iris/keymaps/davidrambo/readme.md rename to keyboards/keebio/iris/keymaps/davidrambo/readme.md diff --git a/keyboards/iris/keymaps/davidrambo/rules.mk b/keyboards/keebio/iris/keymaps/davidrambo/rules.mk similarity index 100% rename from keyboards/iris/keymaps/davidrambo/rules.mk rename to keyboards/keebio/iris/keymaps/davidrambo/rules.mk diff --git a/keyboards/iris/keymaps/dbroqua/config.h b/keyboards/keebio/iris/keymaps/dbroqua/config.h similarity index 100% rename from keyboards/iris/keymaps/dbroqua/config.h rename to keyboards/keebio/iris/keymaps/dbroqua/config.h diff --git a/keyboards/iris/keymaps/dbroqua/keymap.c b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c similarity index 99% rename from keyboards/iris/keymaps/dbroqua/keymap.c rename to keyboards/keebio/iris/keymaps/dbroqua/keymap.c index 4cbb8af54055..fe19696e1bc7 100644 --- a/keyboards/iris/keymaps/dbroqua/keymap.c +++ b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c @@ -14,7 +14,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/dbroqua/rules.mk b/keyboards/keebio/iris/keymaps/dbroqua/rules.mk similarity index 100% rename from keyboards/iris/keymaps/dbroqua/rules.mk rename to keyboards/keebio/iris/keymaps/dbroqua/rules.mk diff --git a/keyboards/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/default/config.h similarity index 100% rename from keyboards/iris/keymaps/default/config.h rename to keyboards/keebio/iris/keymaps/default/config.h diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c similarity index 100% rename from keyboards/iris/keymaps/default/keymap.c rename to keyboards/keebio/iris/keymaps/default/keymap.c diff --git a/keyboards/iris/keymaps/default/rules.mk b/keyboards/keebio/iris/keymaps/default/rules.mk similarity index 100% rename from keyboards/iris/keymaps/default/rules.mk rename to keyboards/keebio/iris/keymaps/default/rules.mk diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h similarity index 100% rename from keyboards/iris/keymaps/drashna/config.h rename to keyboards/keebio/iris/keymaps/drashna/config.h diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c similarity index 100% rename from keyboards/iris/keymaps/drashna/keymap.c rename to keyboards/keebio/iris/keymaps/drashna/keymap.c diff --git a/keyboards/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk similarity index 100% rename from keyboards/iris/keymaps/drashna/rules.mk rename to keyboards/keebio/iris/keymaps/drashna/rules.mk diff --git a/keyboards/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h similarity index 100% rename from keyboards/iris/keymaps/drashna_old/config.h rename to keyboards/keebio/iris/keymaps/drashna_old/config.h diff --git a/keyboards/iris/keymaps/drashna_old/keymap.c b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c similarity index 100% rename from keyboards/iris/keymaps/drashna_old/keymap.c rename to keyboards/keebio/iris/keymaps/drashna_old/keymap.c diff --git a/keyboards/iris/keymaps/drashna_old/rules.mk b/keyboards/keebio/iris/keymaps/drashna_old/rules.mk similarity index 100% rename from keyboards/iris/keymaps/drashna_old/rules.mk rename to keyboards/keebio/iris/keymaps/drashna_old/rules.mk diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/config.h b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h similarity index 100% rename from keyboards/iris/keymaps/dvp-zjpxshade/config.h rename to keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c similarity index 99% rename from keyboards/iris/keymaps/dvp-zjpxshade/keymap.c rename to keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c index 48402e964c42..12ac00cd7892 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c +++ b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk similarity index 100% rename from keyboards/iris/keymaps/dvp-zjpxshade/rules.mk rename to keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk diff --git a/keyboards/iris/keymaps/edvorakjp/config.h b/keyboards/keebio/iris/keymaps/edvorakjp/config.h similarity index 100% rename from keyboards/iris/keymaps/edvorakjp/config.h rename to keyboards/keebio/iris/keymaps/edvorakjp/config.h diff --git a/keyboards/iris/keymaps/edvorakjp/keymap.c b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c similarity index 100% rename from keyboards/iris/keymaps/edvorakjp/keymap.c rename to keyboards/keebio/iris/keymaps/edvorakjp/keymap.c diff --git a/keyboards/iris/keymaps/edvorakjp/readme.md b/keyboards/keebio/iris/keymaps/edvorakjp/readme.md similarity index 100% rename from keyboards/iris/keymaps/edvorakjp/readme.md rename to keyboards/keebio/iris/keymaps/edvorakjp/readme.md diff --git a/keyboards/iris/keymaps/edvorakjp/rules.mk b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk similarity index 100% rename from keyboards/iris/keymaps/edvorakjp/rules.mk rename to keyboards/keebio/iris/keymaps/edvorakjp/rules.mk diff --git a/keyboards/iris/keymaps/fabian/config.h b/keyboards/keebio/iris/keymaps/fabian/config.h similarity index 100% rename from keyboards/iris/keymaps/fabian/config.h rename to keyboards/keebio/iris/keymaps/fabian/config.h diff --git a/keyboards/iris/keymaps/fabian/keymap.c b/keyboards/keebio/iris/keymaps/fabian/keymap.c similarity index 99% rename from keyboards/iris/keymaps/fabian/keymap.c rename to keyboards/keebio/iris/keymaps/fabian/keymap.c index 383bacfa486b..d7d98fdc06b8 100644 --- a/keyboards/iris/keymaps/fabian/keymap.c +++ b/keyboards/keebio/iris/keymaps/fabian/keymap.c @@ -24,7 +24,6 @@ enum custom_keycodes { #include "dynamic_macro.h" #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_COLE COLEMAK #define KC_LOWR LOWER diff --git a/keyboards/iris/keymaps/fate/config.h b/keyboards/keebio/iris/keymaps/fate/config.h similarity index 100% rename from keyboards/iris/keymaps/fate/config.h rename to keyboards/keebio/iris/keymaps/fate/config.h diff --git a/keyboards/iris/keymaps/fate/keymap.c b/keyboards/keebio/iris/keymaps/fate/keymap.c similarity index 99% rename from keyboards/iris/keymaps/fate/keymap.c rename to keyboards/keebio/iris/keymaps/fate/keymap.c index ca92b597877b..0e21944c7972 100644 --- a/keyboards/iris/keymaps/fate/keymap.c +++ b/keyboards/keebio/iris/keymaps/fate/keymap.c @@ -17,7 +17,6 @@ enum { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR MO(_LOWER) #define KC_RASE MO(_RAISE) diff --git a/keyboards/iris/keymaps/fate/readme.md b/keyboards/keebio/iris/keymaps/fate/readme.md similarity index 100% rename from keyboards/iris/keymaps/fate/readme.md rename to keyboards/keebio/iris/keymaps/fate/readme.md diff --git a/keyboards/iris/keymaps/fate/rules.mk b/keyboards/keebio/iris/keymaps/fate/rules.mk similarity index 100% rename from keyboards/iris/keymaps/fate/rules.mk rename to keyboards/keebio/iris/keymaps/fate/rules.mk diff --git a/keyboards/iris/keymaps/gsigler/config.h b/keyboards/keebio/iris/keymaps/gsigler/config.h similarity index 100% rename from keyboards/iris/keymaps/gsigler/config.h rename to keyboards/keebio/iris/keymaps/gsigler/config.h diff --git a/keyboards/iris/keymaps/gsigler/keymap.c b/keyboards/keebio/iris/keymaps/gsigler/keymap.c similarity index 100% rename from keyboards/iris/keymaps/gsigler/keymap.c rename to keyboards/keebio/iris/keymaps/gsigler/keymap.c diff --git a/keyboards/iris/keymaps/gsigler/rules.mk b/keyboards/keebio/iris/keymaps/gsigler/rules.mk similarity index 100% rename from keyboards/iris/keymaps/gsigler/rules.mk rename to keyboards/keebio/iris/keymaps/gsigler/rules.mk diff --git a/keyboards/iris/keymaps/hag/config.h b/keyboards/keebio/iris/keymaps/hag/config.h similarity index 100% rename from keyboards/iris/keymaps/hag/config.h rename to keyboards/keebio/iris/keymaps/hag/config.h diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/keebio/iris/keymaps/hag/keymap.c similarity index 99% rename from keyboards/iris/keymaps/hag/keymap.c rename to keyboards/keebio/iris/keymaps/hag/keymap.c index a690f8761a34..222b68208f77 100644 --- a/keyboards/iris/keymaps/hag/keymap.c +++ b/keyboards/keebio/iris/keymaps/hag/keymap.c @@ -36,8 +36,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define KC_XXXX KC_NO #define KC_Sw2 RALT(KC_2) // Nordic @ #define KC_Sw3 RALT(KC_3) // Nordic something diff --git a/keyboards/iris/keymaps/hag/rules.mk b/keyboards/keebio/iris/keymaps/hag/rules.mk similarity index 100% rename from keyboards/iris/keymaps/hag/rules.mk rename to keyboards/keebio/iris/keymaps/hag/rules.mk diff --git a/keyboards/iris/keymaps/hexwire/config.h b/keyboards/keebio/iris/keymaps/hexwire/config.h similarity index 100% rename from keyboards/iris/keymaps/hexwire/config.h rename to keyboards/keebio/iris/keymaps/hexwire/config.h diff --git a/keyboards/iris/keymaps/hexwire/keymap.c b/keyboards/keebio/iris/keymaps/hexwire/keymap.c similarity index 99% rename from keyboards/iris/keymaps/hexwire/keymap.c rename to keyboards/keebio/iris/keymaps/hexwire/keymap.c index e9ab58bcda93..33105c1c86ab 100644 --- a/keyboards/iris/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/iris/keymaps/hexwire/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/iris/keymaps/hexwire/rules.mk b/keyboards/keebio/iris/keymaps/hexwire/rules.mk similarity index 100% rename from keyboards/iris/keymaps/hexwire/rules.mk rename to keyboards/keebio/iris/keymaps/hexwire/rules.mk diff --git a/keyboards/iris/keymaps/impstyle/README.md b/keyboards/keebio/iris/keymaps/impstyle/README.md similarity index 100% rename from keyboards/iris/keymaps/impstyle/README.md rename to keyboards/keebio/iris/keymaps/impstyle/README.md diff --git a/keyboards/iris/keymaps/impstyle/config.h b/keyboards/keebio/iris/keymaps/impstyle/config.h similarity index 100% rename from keyboards/iris/keymaps/impstyle/config.h rename to keyboards/keebio/iris/keymaps/impstyle/config.h diff --git a/keyboards/iris/keymaps/impstyle/keymap.c b/keyboards/keebio/iris/keymaps/impstyle/keymap.c similarity index 98% rename from keyboards/iris/keymaps/impstyle/keymap.c rename to keyboards/keebio/iris/keymaps/impstyle/keymap.c index 30b4bf2d920d..c1964f5e1aee 100644 --- a/keyboards/iris/keymaps/impstyle/keymap.c +++ b/keyboards/keebio/iris/keymaps/impstyle/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR MO(_LOWER) // Lower layer #define KC_RASE MO(_RAISE) // Raise layer #define KC_TGLW TG(_LOWER) // toggle lower @@ -47,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PLUS, KC_MOUS,KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, KC_LGUI,KC_RASE,KC_SPC , KC_ENT ,KC_LOWR,KC_LALT ), - + // LOWER Layer //,----+----+----+----+----+----. ,----+----+----+----+----+----. // TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, @@ -59,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' // , ,DEL , BSPC , , P0 - // `----+----+----' `----+----+----' + // `----+----+----' `----+----+----' [_LOWER] = LAYOUT( KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, @@ -108,4 +107,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______,_______,_______ ), -}; \ No newline at end of file +}; diff --git a/keyboards/iris/keymaps/impstyle/rules.mk b/keyboards/keebio/iris/keymaps/impstyle/rules.mk similarity index 100% rename from keyboards/iris/keymaps/impstyle/rules.mk rename to keyboards/keebio/iris/keymaps/impstyle/rules.mk diff --git a/keyboards/iris/keymaps/jennetters/config.h b/keyboards/keebio/iris/keymaps/jennetters/config.h similarity index 100% rename from keyboards/iris/keymaps/jennetters/config.h rename to keyboards/keebio/iris/keymaps/jennetters/config.h diff --git a/keyboards/iris/keymaps/jennetters/keymap.c b/keyboards/keebio/iris/keymaps/jennetters/keymap.c similarity index 98% rename from keyboards/iris/keymaps/jennetters/keymap.c rename to keyboards/keebio/iris/keymaps/jennetters/keymap.c index 287dc9712df6..c06079c92627 100644 --- a/keyboards/iris/keymaps/jennetters/keymap.c +++ b/keyboards/keebio/iris/keymaps/jennetters/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | SFT| Z | X | C | V | B | SPC| | SPC| N | M | , | . | / | ENT| // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ GUI| ALT| CTL / \RASE\ CTL | SFT / + // \ GUI| ALT| CTL / \RASE\ CTL | SFT / // `----+----+----' `----+----+----' TD(ESC_GR), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ @@ -56,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = LAYOUT_kc( - + // ,----+----+----+----+----+----. ,----+----+----+----+----+----. // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL| // |----+----+----+----+----+----| |----+----+----+----+----+----| @@ -66,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | \ | | | | | [ | ( | | ) | ] | | | | - | | // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ | | DEL / \ DEL\ | / + // \ | | DEL / \ DEL\ | / // `----+----+----' `----+----+----' TILD, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL, \ , 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, , \ , , , , , , , , , , ,PIPE, \ BL_S, , , , , LCBR, LPRN, RPRN, RCBR, , , , MINS, , \ - , , DEL, DEL, , + , , DEL, DEL, , ), [_RAISE] = LAYOUT_kc( @@ -86,14 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | | | | | | | | | | | | | | \ | | // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ | | / \ \ | / + // \ | | / \ \ | / // `----+----+----' `----+----+----' , F1, F2, , , , , , , LBRC, RBRC, EQL, \ , , UP, , , , YUNO, NOVY, , LCBR, RCBR, DEL, \ , LEFT, DOWN, RIGHT, , , SHRG, , , , PIPE, , \ , , , , , , , , , , , , BSLS, , \ - , , , , , + , , , , , ), [_ADJUST] = LAYOUT( @@ -200,8 +199,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { SEND_STRING("ლ(ಠ_ಠლ)"); // YUNO?! return false; - } - */ + } + */ } return true; -} \ No newline at end of file +} diff --git a/keyboards/iris/keymaps/jennetters/readme.md b/keyboards/keebio/iris/keymaps/jennetters/readme.md similarity index 100% rename from keyboards/iris/keymaps/jennetters/readme.md rename to keyboards/keebio/iris/keymaps/jennetters/readme.md diff --git a/keyboards/iris/keymaps/jennetters/rules.mk b/keyboards/keebio/iris/keymaps/jennetters/rules.mk similarity index 100% rename from keyboards/iris/keymaps/jennetters/rules.mk rename to keyboards/keebio/iris/keymaps/jennetters/rules.mk diff --git a/keyboards/iris/keymaps/khord/config.h b/keyboards/keebio/iris/keymaps/khord/config.h similarity index 100% rename from keyboards/iris/keymaps/khord/config.h rename to keyboards/keebio/iris/keymaps/khord/config.h diff --git a/keyboards/iris/keymaps/khord/keymap.c b/keyboards/keebio/iris/keymaps/khord/keymap.c similarity index 100% rename from keyboards/iris/keymaps/khord/keymap.c rename to keyboards/keebio/iris/keymaps/khord/keymap.c diff --git a/keyboards/iris/keymaps/khord/rules.mk b/keyboards/keebio/iris/keymaps/khord/rules.mk similarity index 100% rename from keyboards/iris/keymaps/khord/rules.mk rename to keyboards/keebio/iris/keymaps/khord/rules.mk diff --git a/keyboards/iris/keymaps/krusli/README.md b/keyboards/keebio/iris/keymaps/krusli/README.md similarity index 100% rename from keyboards/iris/keymaps/krusli/README.md rename to keyboards/keebio/iris/keymaps/krusli/README.md diff --git a/keyboards/iris/keymaps/krusli/config.h b/keyboards/keebio/iris/keymaps/krusli/config.h similarity index 100% rename from keyboards/iris/keymaps/krusli/config.h rename to keyboards/keebio/iris/keymaps/krusli/config.h diff --git a/keyboards/iris/keymaps/krusli/keymap.c b/keyboards/keebio/iris/keymaps/krusli/keymap.c similarity index 99% rename from keyboards/iris/keymaps/krusli/keymap.c rename to keyboards/keebio/iris/keymaps/krusli/keymap.c index 4aa076ab16ad..095716621d14 100644 --- a/keyboards/iris/keymaps/krusli/keymap.c +++ b/keyboards/keebio/iris/keymaps/krusli/keymap.c @@ -16,8 +16,6 @@ enum custom_keycodes { ADJUST, }; -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, diff --git a/keyboards/iris/keymaps/krusli/rules.mk b/keyboards/keebio/iris/keymaps/krusli/rules.mk similarity index 100% rename from keyboards/iris/keymaps/krusli/rules.mk rename to keyboards/keebio/iris/keymaps/krusli/rules.mk diff --git a/keyboards/iris/keymaps/lewisridden/config.h b/keyboards/keebio/iris/keymaps/lewisridden/config.h similarity index 100% rename from keyboards/iris/keymaps/lewisridden/config.h rename to keyboards/keebio/iris/keymaps/lewisridden/config.h diff --git a/keyboards/iris/keymaps/lewisridden/keymap.c b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c similarity index 99% rename from keyboards/iris/keymaps/lewisridden/keymap.c rename to keyboards/keebio/iris/keymaps/lewisridden/keymap.c index 331c0632ac43..e5d12ebd11a1 100644 --- a/keyboards/iris/keymaps/lewisridden/keymap.c +++ b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/lewisridden/rules.mk b/keyboards/keebio/iris/keymaps/lewisridden/rules.mk similarity index 100% rename from keyboards/iris/keymaps/lewisridden/rules.mk rename to keyboards/keebio/iris/keymaps/lewisridden/rules.mk diff --git a/keyboards/iris/keymaps/mtdjr/config.h b/keyboards/keebio/iris/keymaps/mtdjr/config.h similarity index 100% rename from keyboards/iris/keymaps/mtdjr/config.h rename to keyboards/keebio/iris/keymaps/mtdjr/config.h diff --git a/keyboards/iris/keymaps/mtdjr/keymap.c b/keyboards/keebio/iris/keymaps/mtdjr/keymap.c similarity index 100% rename from keyboards/iris/keymaps/mtdjr/keymap.c rename to keyboards/keebio/iris/keymaps/mtdjr/keymap.c diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/keebio/iris/keymaps/mtdjr/rules.mk similarity index 100% rename from keyboards/iris/keymaps/mtdjr/rules.mk rename to keyboards/keebio/iris/keymaps/mtdjr/rules.mk diff --git a/keyboards/iris/keymaps/olligranlund_nordic/config.h b/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/config.h rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h diff --git a/keyboards/iris/keymaps/olligranlund_nordic/keymap.c b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/keymap.c rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c diff --git a/keyboards/iris/keymaps/olligranlund_nordic/readme.md b/keyboards/keebio/iris/keymaps/olligranlund_nordic/readme.md similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/readme.md rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/readme.md diff --git a/keyboards/iris/keymaps/olligranlund_nordic/rules.mk b/keyboards/keebio/iris/keymaps/olligranlund_nordic/rules.mk similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/rules.mk rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/rules.mk diff --git a/keyboards/iris/keymaps/omgvee/config.h b/keyboards/keebio/iris/keymaps/omgvee/config.h similarity index 100% rename from keyboards/iris/keymaps/omgvee/config.h rename to keyboards/keebio/iris/keymaps/omgvee/config.h diff --git a/keyboards/iris/keymaps/omgvee/keymap.c b/keyboards/keebio/iris/keymaps/omgvee/keymap.c similarity index 100% rename from keyboards/iris/keymaps/omgvee/keymap.c rename to keyboards/keebio/iris/keymaps/omgvee/keymap.c diff --git a/keyboards/iris/keymaps/omgvee/readme.md b/keyboards/keebio/iris/keymaps/omgvee/readme.md similarity index 100% rename from keyboards/iris/keymaps/omgvee/readme.md rename to keyboards/keebio/iris/keymaps/omgvee/readme.md diff --git a/keyboards/iris/keymaps/omgvee/rules.mk b/keyboards/keebio/iris/keymaps/omgvee/rules.mk similarity index 100% rename from keyboards/iris/keymaps/omgvee/rules.mk rename to keyboards/keebio/iris/keymaps/omgvee/rules.mk diff --git a/keyboards/iris/keymaps/rdhaene/config.h b/keyboards/keebio/iris/keymaps/rdhaene/config.h similarity index 100% rename from keyboards/iris/keymaps/rdhaene/config.h rename to keyboards/keebio/iris/keymaps/rdhaene/config.h diff --git a/keyboards/iris/keymaps/rdhaene/keymap.c b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c similarity index 99% rename from keyboards/iris/keymaps/rdhaene/keymap.c rename to keyboards/keebio/iris/keymaps/rdhaene/keymap.c index 68b187aafb3b..7a153346c562 100644 --- a/keyboards/iris/keymaps/rdhaene/keymap.c +++ b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/rdhaene/rules.mk b/keyboards/keebio/iris/keymaps/rdhaene/rules.mk similarity index 100% rename from keyboards/iris/keymaps/rdhaene/rules.mk rename to keyboards/keebio/iris/keymaps/rdhaene/rules.mk diff --git a/keyboards/iris/keymaps/rs/config.h b/keyboards/keebio/iris/keymaps/rs/config.h similarity index 100% rename from keyboards/iris/keymaps/rs/config.h rename to keyboards/keebio/iris/keymaps/rs/config.h diff --git a/keyboards/iris/keymaps/rs/karabiner.json b/keyboards/keebio/iris/keymaps/rs/karabiner.json similarity index 100% rename from keyboards/iris/keymaps/rs/karabiner.json rename to keyboards/keebio/iris/keymaps/rs/karabiner.json diff --git a/keyboards/iris/keymaps/rs/keymap.c b/keyboards/keebio/iris/keymaps/rs/keymap.c similarity index 100% rename from keyboards/iris/keymaps/rs/keymap.c rename to keyboards/keebio/iris/keymaps/rs/keymap.c diff --git a/keyboards/iris/keymaps/rs/readme.md b/keyboards/keebio/iris/keymaps/rs/readme.md similarity index 100% rename from keyboards/iris/keymaps/rs/readme.md rename to keyboards/keebio/iris/keymaps/rs/readme.md diff --git a/keyboards/iris/keymaps/rs/rules.mk b/keyboards/keebio/iris/keymaps/rs/rules.mk similarity index 100% rename from keyboards/iris/keymaps/rs/rules.mk rename to keyboards/keebio/iris/keymaps/rs/rules.mk diff --git a/keyboards/iris/keymaps/s1carii/config.h b/keyboards/keebio/iris/keymaps/s1carii/config.h similarity index 100% rename from keyboards/iris/keymaps/s1carii/config.h rename to keyboards/keebio/iris/keymaps/s1carii/config.h diff --git a/keyboards/iris/keymaps/s1carii/keymap.c b/keyboards/keebio/iris/keymaps/s1carii/keymap.c similarity index 99% rename from keyboards/iris/keymaps/s1carii/keymap.c rename to keyboards/keebio/iris/keymaps/s1carii/keymap.c index dd993a9bc625..4655bb1ad954 100644 --- a/keyboards/iris/keymaps/s1carii/keymap.c +++ b/keyboards/keebio/iris/keymaps/s1carii/keymap.c @@ -15,7 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -80,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , // `----+----+----' `----+----+----' ) - + /* [_DEVLAYER] = LAYOUT_kc( //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----. @@ -95,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , // `----+----+----' `----+----+----' ) -*/ +*/ }; diff --git a/keyboards/iris/keymaps/s1carii/readme.md b/keyboards/keebio/iris/keymaps/s1carii/readme.md similarity index 100% rename from keyboards/iris/keymaps/s1carii/readme.md rename to keyboards/keebio/iris/keymaps/s1carii/readme.md diff --git a/keyboards/iris/keymaps/s1carii/rules.mk b/keyboards/keebio/iris/keymaps/s1carii/rules.mk similarity index 100% rename from keyboards/iris/keymaps/s1carii/rules.mk rename to keyboards/keebio/iris/keymaps/s1carii/rules.mk diff --git a/keyboards/iris/keymaps/saviof/config.h b/keyboards/keebio/iris/keymaps/saviof/config.h similarity index 100% rename from keyboards/iris/keymaps/saviof/config.h rename to keyboards/keebio/iris/keymaps/saviof/config.h diff --git a/keyboards/iris/keymaps/saviof/keymap.c b/keyboards/keebio/iris/keymaps/saviof/keymap.c similarity index 100% rename from keyboards/iris/keymaps/saviof/keymap.c rename to keyboards/keebio/iris/keymaps/saviof/keymap.c diff --git a/keyboards/iris/keymaps/saviof/rules.mk b/keyboards/keebio/iris/keymaps/saviof/rules.mk similarity index 100% rename from keyboards/iris/keymaps/saviof/rules.mk rename to keyboards/keebio/iris/keymaps/saviof/rules.mk diff --git a/keyboards/iris/keymaps/swedish/config.h b/keyboards/keebio/iris/keymaps/swedish/config.h similarity index 100% rename from keyboards/iris/keymaps/swedish/config.h rename to keyboards/keebio/iris/keymaps/swedish/config.h diff --git a/keyboards/iris/keymaps/swedish/keymap.c b/keyboards/keebio/iris/keymaps/swedish/keymap.c similarity index 99% rename from keyboards/iris/keymaps/swedish/keymap.c rename to keyboards/keebio/iris/keymaps/swedish/keymap.c index 015e26aec9ef..26e28479e8df 100644 --- a/keyboards/iris/keymaps/swedish/keymap.c +++ b/keyboards/keebio/iris/keymaps/swedish/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/swedish/rules.mk b/keyboards/keebio/iris/keymaps/swedish/rules.mk similarity index 100% rename from keyboards/iris/keymaps/swedish/rules.mk rename to keyboards/keebio/iris/keymaps/swedish/rules.mk diff --git a/keyboards/iris/keymaps/transmogrified/Readme.md b/keyboards/keebio/iris/keymaps/transmogrified/Readme.md similarity index 100% rename from keyboards/iris/keymaps/transmogrified/Readme.md rename to keyboards/keebio/iris/keymaps/transmogrified/Readme.md diff --git a/keyboards/iris/keymaps/transmogrified/config.h b/keyboards/keebio/iris/keymaps/transmogrified/config.h similarity index 100% rename from keyboards/iris/keymaps/transmogrified/config.h rename to keyboards/keebio/iris/keymaps/transmogrified/config.h diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/keebio/iris/keymaps/transmogrified/keymap.c similarity index 100% rename from keyboards/iris/keymaps/transmogrified/keymap.c rename to keyboards/keebio/iris/keymaps/transmogrified/keymap.c diff --git a/keyboards/iris/keymaps/transmogrified/rules.mk b/keyboards/keebio/iris/keymaps/transmogrified/rules.mk similarity index 100% rename from keyboards/iris/keymaps/transmogrified/rules.mk rename to keyboards/keebio/iris/keymaps/transmogrified/rules.mk diff --git a/keyboards/iris/keymaps/via/config.h b/keyboards/keebio/iris/keymaps/via/config.h similarity index 100% rename from keyboards/iris/keymaps/via/config.h rename to keyboards/keebio/iris/keymaps/via/config.h diff --git a/keyboards/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c similarity index 100% rename from keyboards/iris/keymaps/via/keymap.c rename to keyboards/keebio/iris/keymaps/via/keymap.c diff --git a/keyboards/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk similarity index 100% rename from keyboards/iris/keymaps/via/rules.mk rename to keyboards/keebio/iris/keymaps/via/rules.mk diff --git a/keyboards/iris/keymaps/vyolle/config.h b/keyboards/keebio/iris/keymaps/vyolle/config.h similarity index 100% rename from keyboards/iris/keymaps/vyolle/config.h rename to keyboards/keebio/iris/keymaps/vyolle/config.h diff --git a/keyboards/iris/keymaps/vyolle/keymap.c b/keyboards/keebio/iris/keymaps/vyolle/keymap.c similarity index 100% rename from keyboards/iris/keymaps/vyolle/keymap.c rename to keyboards/keebio/iris/keymaps/vyolle/keymap.c diff --git a/keyboards/iris/keymaps/vyolle/rules.mk b/keyboards/keebio/iris/keymaps/vyolle/rules.mk similarity index 100% rename from keyboards/iris/keymaps/vyolle/rules.mk rename to keyboards/keebio/iris/keymaps/vyolle/rules.mk diff --git a/keyboards/iris/keymaps/wanleg/config.h b/keyboards/keebio/iris/keymaps/wanleg/config.h similarity index 100% rename from keyboards/iris/keymaps/wanleg/config.h rename to keyboards/keebio/iris/keymaps/wanleg/config.h diff --git a/keyboards/iris/keymaps/wanleg/keymap.c b/keyboards/keebio/iris/keymaps/wanleg/keymap.c similarity index 100% rename from keyboards/iris/keymaps/wanleg/keymap.c rename to keyboards/keebio/iris/keymaps/wanleg/keymap.c diff --git a/keyboards/iris/keymaps/wanleg/rules.mk b/keyboards/keebio/iris/keymaps/wanleg/rules.mk similarity index 100% rename from keyboards/iris/keymaps/wanleg/rules.mk rename to keyboards/keebio/iris/keymaps/wanleg/rules.mk diff --git a/keyboards/iris/keymaps/xyverz/config.h b/keyboards/keebio/iris/keymaps/xyverz/config.h similarity index 100% rename from keyboards/iris/keymaps/xyverz/config.h rename to keyboards/keebio/iris/keymaps/xyverz/config.h diff --git a/keyboards/iris/keymaps/xyverz/keymap.c b/keyboards/keebio/iris/keymaps/xyverz/keymap.c similarity index 100% rename from keyboards/iris/keymaps/xyverz/keymap.c rename to keyboards/keebio/iris/keymaps/xyverz/keymap.c diff --git a/keyboards/iris/keymaps/xyverz/rules.mk b/keyboards/keebio/iris/keymaps/xyverz/rules.mk similarity index 100% rename from keyboards/iris/keymaps/xyverz/rules.mk rename to keyboards/keebio/iris/keymaps/xyverz/rules.mk diff --git a/keyboards/iris/keymaps/yanfali/config.h b/keyboards/keebio/iris/keymaps/yanfali/config.h similarity index 100% rename from keyboards/iris/keymaps/yanfali/config.h rename to keyboards/keebio/iris/keymaps/yanfali/config.h diff --git a/keyboards/iris/keymaps/yanfali/keymap.c b/keyboards/keebio/iris/keymaps/yanfali/keymap.c similarity index 99% rename from keyboards/iris/keymaps/yanfali/keymap.c rename to keyboards/keebio/iris/keymaps/yanfali/keymap.c index bae09a62eaf6..92117bd6dec9 100644 --- a/keyboards/iris/keymaps/yanfali/keymap.c +++ b/keyboards/keebio/iris/keymaps/yanfali/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/iris/keymaps/yanfali/readme.md b/keyboards/keebio/iris/keymaps/yanfali/readme.md similarity index 100% rename from keyboards/iris/keymaps/yanfali/readme.md rename to keyboards/keebio/iris/keymaps/yanfali/readme.md diff --git a/keyboards/iris/keymaps/yanfali/rules.mk b/keyboards/keebio/iris/keymaps/yanfali/rules.mk similarity index 100% rename from keyboards/iris/keymaps/yanfali/rules.mk rename to keyboards/keebio/iris/keymaps/yanfali/rules.mk diff --git a/keyboards/iris/readme.md b/keyboards/keebio/iris/readme.md similarity index 89% rename from keyboards/iris/readme.md rename to keyboards/keebio/iris/readme.md index 0a1eb1e17583..6d166e7564aa 100644 --- a/keyboards/iris/readme.md +++ b/keyboards/keebio/iris/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make iris/rev2:default + make keebio/iris/rev2:default Example of flashing this keyboard: - make iris/rev2:default:avrdude + make keebio/iris/rev2:default:avrdude See [build environment setup](https://docs.qmk.fm/#/newbs_getting_started) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h similarity index 100% rename from keyboards/iris/rev1/config.h rename to keyboards/keebio/iris/rev1/config.h diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/keebio/iris/rev1/rev1.c similarity index 100% rename from keyboards/iris/rev1/rev1.c rename to keyboards/keebio/iris/rev1/rev1.c diff --git a/keyboards/iris/rev1/rev1.h b/keyboards/keebio/iris/rev1/rev1.h similarity index 100% rename from keyboards/iris/rev1/rev1.h rename to keyboards/keebio/iris/rev1/rev1.h diff --git a/keyboards/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk similarity index 100% rename from keyboards/iris/rev1/rules.mk rename to keyboards/keebio/iris/rev1/rules.mk diff --git a/keyboards/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h similarity index 100% rename from keyboards/iris/rev1_led/config.h rename to keyboards/keebio/iris/rev1_led/config.h diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/keebio/iris/rev1_led/rev1_led.c similarity index 100% rename from keyboards/iris/rev1_led/rev1_led.c rename to keyboards/keebio/iris/rev1_led/rev1_led.c diff --git a/keyboards/iris/rev1_led/rev1_led.h b/keyboards/keebio/iris/rev1_led/rev1_led.h similarity index 100% rename from keyboards/iris/rev1_led/rev1_led.h rename to keyboards/keebio/iris/rev1_led/rev1_led.h diff --git a/keyboards/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk similarity index 100% rename from keyboards/iris/rev1_led/rules.mk rename to keyboards/keebio/iris/rev1_led/rules.mk diff --git a/keyboards/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h similarity index 100% rename from keyboards/iris/rev2/config.h rename to keyboards/keebio/iris/rev2/config.h diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/keebio/iris/rev2/rev2.c similarity index 100% rename from keyboards/iris/rev2/rev2.c rename to keyboards/keebio/iris/rev2/rev2.c diff --git a/keyboards/iris/rev2/rev2.h b/keyboards/keebio/iris/rev2/rev2.h similarity index 100% rename from keyboards/iris/rev2/rev2.h rename to keyboards/keebio/iris/rev2/rev2.h diff --git a/keyboards/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk similarity index 100% rename from keyboards/iris/rev2/rules.mk rename to keyboards/keebio/iris/rev2/rules.mk diff --git a/keyboards/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h similarity index 100% rename from keyboards/iris/rev3/config.h rename to keyboards/keebio/iris/rev3/config.h diff --git a/keyboards/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c similarity index 100% rename from keyboards/iris/rev3/rev3.c rename to keyboards/keebio/iris/rev3/rev3.c diff --git a/keyboards/iris/rev3/rev3.h b/keyboards/keebio/iris/rev3/rev3.h similarity index 100% rename from keyboards/iris/rev3/rev3.h rename to keyboards/keebio/iris/rev3/rev3.h diff --git a/keyboards/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk similarity index 100% rename from keyboards/iris/rev3/rules.mk rename to keyboards/keebio/iris/rev3/rules.mk diff --git a/keyboards/iris/rules.mk b/keyboards/keebio/iris/rules.mk similarity index 97% rename from keyboards/iris/rules.mk rename to keyboards/keebio/iris/rules.mk index 28ca5a8cb8e2..9745d5e3c1ae 100644 --- a/keyboards/iris/rules.mk +++ b/keyboards/keebio/iris/rules.mk @@ -38,4 +38,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = iris/rev2 +DEFAULT_FOLDER = keebio/iris/rev2 diff --git a/keyboards/laplace/config.h b/keyboards/keebio/laplace/config.h similarity index 96% rename from keyboards/laplace/config.h rename to keyboards/keebio/laplace/config.h index 45b89a97acb5..cce642526fa3 100644 --- a/keyboards/laplace/config.h +++ b/keyboards/keebio/laplace/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/laplace/info.json b/keyboards/keebio/laplace/info.json similarity index 100% rename from keyboards/laplace/info.json rename to keyboards/keebio/laplace/info.json diff --git a/keyboards/laplace/keymaps/bakingpy/keymap.c b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c similarity index 95% rename from keyboards/laplace/keymaps/bakingpy/keymap.c rename to keyboards/keebio/laplace/keymaps/bakingpy/keymap.c index 2cad24fa077f..97fb70af5e50 100644 --- a/keyboards/laplace/keymaps/bakingpy/keymap.c +++ b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c @@ -5,8 +5,6 @@ #define _FN2 2 #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_SPFN1 LT(_FN1, KC_SPACE) @@ -33,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 + GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ), @@ -45,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT + RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ), @@ -57,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ , , ,DEL ,PGDN,END , , , , , , , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - , , , , DEL , , , , , + , , , , DEL , , , , , //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ) }; diff --git a/keyboards/fourier/rev1/rules.mk b/keyboards/keebio/laplace/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/fourier/rev1/rules.mk rename to keyboards/keebio/laplace/keymaps/bakingpy/rules.mk diff --git a/keyboards/laplace/keymaps/default/keymap.c b/keyboards/keebio/laplace/keymaps/default/keymap.c similarity index 97% rename from keyboards/laplace/keymaps/default/keymap.c rename to keyboards/keebio/laplace/keymaps/default/keymap.c index 03b7c9b15bd3..053bfb7ad61a 100644 --- a/keyboards/laplace/keymaps/default/keymap.c +++ b/keyboards/keebio/laplace/keymaps/default/keymap.c @@ -4,9 +4,6 @@ #define _FN1 1 #define _FN2 2 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define FN1 MO(_FN1) #define FN2 MO(_FN2) #define SP_FN1 LT(_FN1, KC_SPACE) diff --git a/keyboards/laplace/keymaps/bakingpy/rules.mk b/keyboards/keebio/laplace/keymaps/default/rules.mk similarity index 100% rename from keyboards/laplace/keymaps/bakingpy/rules.mk rename to keyboards/keebio/laplace/keymaps/default/rules.mk diff --git a/keyboards/laplace/laplace.c b/keyboards/keebio/laplace/laplace.c similarity index 100% rename from keyboards/laplace/laplace.c rename to keyboards/keebio/laplace/laplace.c diff --git a/keyboards/laplace/laplace.h b/keyboards/keebio/laplace/laplace.h similarity index 97% rename from keyboards/laplace/laplace.h rename to keyboards/keebio/laplace/laplace.h index 17f928f344a8..fc0510fe5893 100644 --- a/keyboards/laplace/laplace.h +++ b/keyboards/keebio/laplace/laplace.h @@ -1,5 +1,4 @@ -#ifndef LAPLACE_H -#define LAPLACE_H +#pragma once #include "quantum.h" @@ -32,4 +31,3 @@ KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C9, KC_##C10, KC_##C11, KC_##C12, KC_##C13, \ KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D7, KC_##D10, KC_##D11, KC_##D12, KC_##D13 \ ) -#endif diff --git a/keyboards/laplace/readme.md b/keyboards/keebio/laplace/readme.md similarity index 90% rename from keyboards/laplace/readme.md rename to keyboards/keebio/laplace/readme.md index 7871992f76a5..4292483bc82d 100644 --- a/keyboards/laplace/readme.md +++ b/keyboards/keebio/laplace/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make laplace:default + make keebio/laplace:default Example of flashing this keyboard: - make laplace:default:avrdude + make keebio/laplace:default:avrdude 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/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk similarity index 100% rename from keyboards/laplace/rules.mk rename to keyboards/keebio/laplace/rules.mk diff --git a/keyboards/levinson/config.h b/keyboards/keebio/levinson/config.h similarity index 100% rename from keyboards/levinson/config.h rename to keyboards/keebio/levinson/config.h diff --git a/keyboards/levinson/info.json b/keyboards/keebio/levinson/info.json similarity index 100% rename from keyboards/levinson/info.json rename to keyboards/keebio/levinson/info.json diff --git a/keyboards/levinson/keymaps/atreus/config.h b/keyboards/keebio/levinson/keymaps/atreus/config.h similarity index 100% rename from keyboards/levinson/keymaps/atreus/config.h rename to keyboards/keebio/levinson/keymaps/atreus/config.h diff --git a/keyboards/levinson/keymaps/atreus/keymap.c b/keyboards/keebio/levinson/keymaps/atreus/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/atreus/keymap.c rename to keyboards/keebio/levinson/keymaps/atreus/keymap.c diff --git a/keyboards/levinson/keymaps/atreus/readme.md b/keyboards/keebio/levinson/keymaps/atreus/readme.md similarity index 100% rename from keyboards/levinson/keymaps/atreus/readme.md rename to keyboards/keebio/levinson/keymaps/atreus/readme.md diff --git a/keyboards/levinson/keymaps/bakingpy2u/config.h b/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h similarity index 100% rename from keyboards/levinson/keymaps/bakingpy2u/config.h rename to keyboards/keebio/levinson/keymaps/bakingpy2u/config.h diff --git a/keyboards/levinson/keymaps/bakingpy2u/keymap.c b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/bakingpy2u/keymap.c rename to keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c index 219e3468fbc3..6a6ab496abcc 100644 --- a/keyboards/levinson/keymaps/bakingpy2u/keymap.c +++ b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/levinson/keymaps/bakingpy2u/rules.mk b/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/bakingpy2u/rules.mk rename to keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk diff --git a/keyboards/levinson/keymaps/default/config.h b/keyboards/keebio/levinson/keymaps/default/config.h similarity index 92% rename from keyboards/levinson/keymaps/default/config.h rename to keyboards/keebio/levinson/keymaps/default/config.h index e710d6e4aaba..be2d71e8f02f 100644 --- a/keyboards/levinson/keymaps/default/config.h +++ b/keyboards/keebio/levinson/keymaps/default/config.h @@ -21,13 +21,8 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/wavelet/keymaps/default/keymap.c b/keyboards/keebio/levinson/keymaps/default/keymap.c similarity index 99% rename from keyboards/wavelet/keymaps/default/keymap.c rename to keyboards/keebio/levinson/keymaps/default/keymap.c index dac8068a42a3..abf253380b2e 100644 --- a/keyboards/wavelet/keymaps/default/keymap.c +++ b/keyboards/keebio/levinson/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/levinson/keymaps/default/rules.mk b/keyboards/keebio/levinson/keymaps/default/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/default/rules.mk rename to keyboards/keebio/levinson/keymaps/default/rules.mk diff --git a/keyboards/levinson/keymaps/drogglbecher/config.h b/keyboards/keebio/levinson/keymaps/drogglbecher/config.h similarity index 100% rename from keyboards/levinson/keymaps/drogglbecher/config.h rename to keyboards/keebio/levinson/keymaps/drogglbecher/config.h diff --git a/keyboards/levinson/keymaps/drogglbecher/keymap.c b/keyboards/keebio/levinson/keymaps/drogglbecher/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/drogglbecher/keymap.c rename to keyboards/keebio/levinson/keymaps/drogglbecher/keymap.c diff --git a/keyboards/levinson/keymaps/drogglbecher/rules.mk b/keyboards/keebio/levinson/keymaps/drogglbecher/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/drogglbecher/rules.mk rename to keyboards/keebio/levinson/keymaps/drogglbecher/rules.mk diff --git a/keyboards/levinson/keymaps/jyh/config.h b/keyboards/keebio/levinson/keymaps/jyh/config.h similarity index 100% rename from keyboards/levinson/keymaps/jyh/config.h rename to keyboards/keebio/levinson/keymaps/jyh/config.h diff --git a/keyboards/levinson/keymaps/jyh/keymap.c b/keyboards/keebio/levinson/keymaps/jyh/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/jyh/keymap.c rename to keyboards/keebio/levinson/keymaps/jyh/keymap.c diff --git a/keyboards/levinson/keymaps/jyh/readme.md b/keyboards/keebio/levinson/keymaps/jyh/readme.md similarity index 100% rename from keyboards/levinson/keymaps/jyh/readme.md rename to keyboards/keebio/levinson/keymaps/jyh/readme.md diff --git a/keyboards/levinson/keymaps/jyh/rules.mk b/keyboards/keebio/levinson/keymaps/jyh/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/jyh/rules.mk rename to keyboards/keebio/levinson/keymaps/jyh/rules.mk diff --git a/keyboards/levinson/keymaps/jyh2/config.h b/keyboards/keebio/levinson/keymaps/jyh2/config.h similarity index 100% rename from keyboards/levinson/keymaps/jyh2/config.h rename to keyboards/keebio/levinson/keymaps/jyh2/config.h diff --git a/keyboards/levinson/keymaps/jyh2/keymap.c b/keyboards/keebio/levinson/keymaps/jyh2/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/jyh2/keymap.c rename to keyboards/keebio/levinson/keymaps/jyh2/keymap.c diff --git a/keyboards/levinson/keymaps/jyh2/readme.md b/keyboards/keebio/levinson/keymaps/jyh2/readme.md similarity index 100% rename from keyboards/levinson/keymaps/jyh2/readme.md rename to keyboards/keebio/levinson/keymaps/jyh2/readme.md diff --git a/keyboards/levinson/keymaps/jyh2/rules.mk b/keyboards/keebio/levinson/keymaps/jyh2/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/jyh2/rules.mk rename to keyboards/keebio/levinson/keymaps/jyh2/rules.mk diff --git a/keyboards/levinson/keymaps/losinggeneration/README.md b/keyboards/keebio/levinson/keymaps/losinggeneration/README.md similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/README.md rename to keyboards/keebio/levinson/keymaps/losinggeneration/README.md diff --git a/keyboards/levinson/keymaps/losinggeneration/config.h b/keyboards/keebio/levinson/keymaps/losinggeneration/config.h similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/config.h rename to keyboards/keebio/levinson/keymaps/losinggeneration/config.h diff --git a/keyboards/levinson/keymaps/losinggeneration/keymap.c b/keyboards/keebio/levinson/keymaps/losinggeneration/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/keymap.c rename to keyboards/keebio/levinson/keymaps/losinggeneration/keymap.c diff --git a/keyboards/levinson/keymaps/losinggeneration/rules.mk b/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/rules.mk rename to keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk diff --git a/keyboards/levinson/keymaps/mmacdougall/README.md b/keyboards/keebio/levinson/keymaps/mmacdougall/README.md similarity index 100% rename from keyboards/levinson/keymaps/mmacdougall/README.md rename to keyboards/keebio/levinson/keymaps/mmacdougall/README.md diff --git a/keyboards/levinson/keymaps/mmacdougall/config.h b/keyboards/keebio/levinson/keymaps/mmacdougall/config.h similarity index 100% rename from keyboards/levinson/keymaps/mmacdougall/config.h rename to keyboards/keebio/levinson/keymaps/mmacdougall/config.h diff --git a/keyboards/levinson/keymaps/mmacdougall/keymap.c b/keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/mmacdougall/keymap.c rename to keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c index dec47a7616e0..76d9c729980b 100644 --- a/keyboards/levinson/keymaps/mmacdougall/keymap.c +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/levinson/keymaps/mmacdougall/rules.mk b/keyboards/keebio/levinson/keymaps/mmacdougall/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/mmacdougall/rules.mk rename to keyboards/keebio/levinson/keymaps/mmacdougall/rules.mk diff --git a/keyboards/levinson/keymaps/steno/config.h b/keyboards/keebio/levinson/keymaps/steno/config.h similarity index 100% rename from keyboards/levinson/keymaps/steno/config.h rename to keyboards/keebio/levinson/keymaps/steno/config.h diff --git a/keyboards/levinson/keymaps/steno/keymap.c b/keyboards/keebio/levinson/keymaps/steno/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/steno/keymap.c rename to keyboards/keebio/levinson/keymaps/steno/keymap.c diff --git a/keyboards/levinson/keymaps/steno/rules.mk b/keyboards/keebio/levinson/keymaps/steno/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/steno/rules.mk rename to keyboards/keebio/levinson/keymaps/steno/rules.mk diff --git a/keyboards/levinson/keymaps/treadwell/config.h b/keyboards/keebio/levinson/keymaps/treadwell/config.h similarity index 100% rename from keyboards/levinson/keymaps/treadwell/config.h rename to keyboards/keebio/levinson/keymaps/treadwell/config.h diff --git a/keyboards/levinson/keymaps/treadwell/keymap.c b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/treadwell/keymap.c rename to keyboards/keebio/levinson/keymaps/treadwell/keymap.c index bcc744a6ddfd..2f0da0f525c9 100644 --- a/keyboards/levinson/keymaps/treadwell/keymap.c +++ b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_X1 CODE #define KC_X2 NUMB diff --git a/keyboards/levinson/keymaps/treadwell/rules.mk b/keyboards/keebio/levinson/keymaps/treadwell/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/treadwell/rules.mk rename to keyboards/keebio/levinson/keymaps/treadwell/rules.mk diff --git a/keyboards/levinson/keymaps/valgrahf/config.h b/keyboards/keebio/levinson/keymaps/valgrahf/config.h similarity index 100% rename from keyboards/levinson/keymaps/valgrahf/config.h rename to keyboards/keebio/levinson/keymaps/valgrahf/config.h diff --git a/keyboards/levinson/keymaps/valgrahf/keymap.c b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c similarity index 98% rename from keyboards/levinson/keymaps/valgrahf/keymap.c rename to keyboards/keebio/levinson/keymaps/valgrahf/keymap.c index 7b3df539dbbe..cbe86db37350 100644 --- a/keyboards/levinson/keymaps/valgrahf/keymap.c +++ b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c @@ -7,8 +7,6 @@ extern keymap_config_t keymap_config; #define _FN2 2 #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 LT(_FN1, KC_NO) #define KC_FN2 LT(_FN2, KC_NO) #define KC_SPFN LT(_FN1, KC_SPACE) diff --git a/keyboards/levinson/keymaps/valgrahf/rules.mk b/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/valgrahf/rules.mk rename to keyboards/keebio/levinson/keymaps/valgrahf/rules.mk diff --git a/keyboards/levinson/keymaps/xtonhasvim/config.h b/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/config.h rename to keyboards/keebio/levinson/keymaps/xtonhasvim/config.h diff --git a/keyboards/levinson/keymaps/xtonhasvim/keymap.c b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/keymap.c rename to keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c diff --git a/keyboards/levinson/keymaps/xtonhasvim/readme.md b/keyboards/keebio/levinson/keymaps/xtonhasvim/readme.md similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/readme.md rename to keyboards/keebio/levinson/keymaps/xtonhasvim/readme.md diff --git a/keyboards/levinson/keymaps/xtonhasvim/rules.mk b/keyboards/keebio/levinson/keymaps/xtonhasvim/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/rules.mk rename to keyboards/keebio/levinson/keymaps/xtonhasvim/rules.mk diff --git a/keyboards/levinson/levinson.c b/keyboards/keebio/levinson/levinson.c similarity index 100% rename from keyboards/levinson/levinson.c rename to keyboards/keebio/levinson/levinson.c diff --git a/keyboards/levinson/levinson.h b/keyboards/keebio/levinson/levinson.h similarity index 96% rename from keyboards/levinson/levinson.h rename to keyboards/keebio/levinson/levinson.h index 2106bc0e37c7..88c2361ad02a 100644 --- a/keyboards/levinson/levinson.h +++ b/keyboards/keebio/levinson/levinson.h @@ -2,7 +2,7 @@ #include "quantum.h" -#ifdef KEYBOARD_levinson_rev1 +#ifdef KEYBOARD_keebio_levinson_rev1 #include "rev1.h" #else #include "rev2.h" diff --git a/keyboards/levinson/readme.md b/keyboards/keebio/levinson/readme.md similarity index 100% rename from keyboards/levinson/readme.md rename to keyboards/keebio/levinson/readme.md diff --git a/keyboards/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h similarity index 98% rename from keyboards/levinson/rev1/config.h rename to keyboards/keebio/levinson/rev1/config.h index 4d70a6af1682..0359796febd8 100644 --- a/keyboards/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio diff --git a/keyboards/levinson/rev1/rev1.c b/keyboards/keebio/levinson/rev1/rev1.c similarity index 100% rename from keyboards/levinson/rev1/rev1.c rename to keyboards/keebio/levinson/rev1/rev1.c diff --git a/keyboards/levinson/rev1/rev1.h b/keyboards/keebio/levinson/rev1/rev1.h similarity index 100% rename from keyboards/levinson/rev1/rev1.h rename to keyboards/keebio/levinson/rev1/rev1.h diff --git a/keyboards/levinson/rev1/rules.mk b/keyboards/keebio/levinson/rev1/rules.mk similarity index 100% rename from keyboards/levinson/rev1/rules.mk rename to keyboards/keebio/levinson/rev1/rules.mk diff --git a/keyboards/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h similarity index 98% rename from keyboards/levinson/rev2/config.h rename to keyboards/keebio/levinson/rev2/config.h index 9bf11bee9b51..a9fe89586616 100644 --- a/keyboards/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio diff --git a/keyboards/levinson/rev2/rev2.c b/keyboards/keebio/levinson/rev2/rev2.c similarity index 100% rename from keyboards/levinson/rev2/rev2.c rename to keyboards/keebio/levinson/rev2/rev2.c diff --git a/keyboards/levinson/rev2/rev2.h b/keyboards/keebio/levinson/rev2/rev2.h similarity index 100% rename from keyboards/levinson/rev2/rev2.h rename to keyboards/keebio/levinson/rev2/rev2.h diff --git a/keyboards/levinson/rev2/rules.mk b/keyboards/keebio/levinson/rev2/rules.mk similarity index 100% rename from keyboards/levinson/rev2/rules.mk rename to keyboards/keebio/levinson/rev2/rules.mk diff --git a/keyboards/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk similarity index 92% rename from keyboards/levinson/rules.mk rename to keyboards/keebio/levinson/rules.mk index 8f1fa130fa62..cdaef48890f6 100644 --- a/keyboards/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -22,7 +22,7 @@ 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. +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 @@ -30,4 +30,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes LAYOUTS = ortho_4x12 -DEFAULT_FOLDER = levinson/rev2 +DEFAULT_FOLDER = keebio/levinson/rev2 diff --git a/keyboards/nyquist/config.h b/keyboards/keebio/nyquist/config.h similarity index 92% rename from keyboards/nyquist/config.h rename to keyboards/keebio/nyquist/config.h index 863722d7d04d..6868dc13541e 100644 --- a/keyboards/nyquist/config.h +++ b/keyboards/keebio/nyquist/config.h @@ -15,9 +15,6 @@ 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 +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/nyquist/info.json b/keyboards/keebio/nyquist/info.json similarity index 100% rename from keyboards/nyquist/info.json rename to keyboards/keebio/nyquist/info.json diff --git a/keyboards/nyquist/keymaps/DivergeJM/README.md b/keyboards/keebio/nyquist/keymaps/DivergeJM/README.md similarity index 100% rename from keyboards/nyquist/keymaps/DivergeJM/README.md rename to keyboards/keebio/nyquist/keymaps/DivergeJM/README.md diff --git a/keyboards/nyquist/keymaps/DivergeJM/config.h b/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h similarity index 100% rename from keyboards/nyquist/keymaps/DivergeJM/config.h rename to keyboards/keebio/nyquist/keymaps/DivergeJM/config.h diff --git a/keyboards/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/DivergeJM/keymap.c rename to keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c index db802280636a..585fa6347e39 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c @@ -57,10 +57,6 @@ enum { #define PIPE M(R_PIPE) #define POINT M(R_POINT) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/nyquist/keymaps/DivergeJM/rules.mk b/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/DivergeJM/rules.mk rename to keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk diff --git a/keyboards/nyquist/keymaps/hexwire/README.md b/keyboards/keebio/nyquist/keymaps/bakingpy/README.md similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/README.md rename to keyboards/keebio/nyquist/keymaps/bakingpy/README.md diff --git a/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md b/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md rename to keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md diff --git a/keyboards/nyquist/keymaps/hexwire/config.h b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h similarity index 96% rename from keyboards/nyquist/keymaps/hexwire/config.h rename to keyboards/keebio/nyquist/keymaps/bakingpy/config.h index 4f1901b5dd20..eecff3dd51cb 100644 --- a/keyboards/nyquist/keymaps/hexwire/config.h +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h @@ -18,13 +18,9 @@ along with this program. If not, see . #pragma once /* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/hexwire/keymap.c rename to keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c index c030cd3b6af1..38c13f3baa67 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/keymap_converter.py rename to keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb rename to keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb diff --git a/keyboards/nyquist/keymaps/hexwire/rules.mk b/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/rules.mk rename to keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk diff --git a/keyboards/nyquist/keymaps/bramver/README.md b/keyboards/keebio/nyquist/keymaps/bramver/README.md similarity index 100% rename from keyboards/nyquist/keymaps/bramver/README.md rename to keyboards/keebio/nyquist/keymaps/bramver/README.md diff --git a/keyboards/nyquist/keymaps/bramver/config.h b/keyboards/keebio/nyquist/keymaps/bramver/config.h similarity index 100% rename from keyboards/nyquist/keymaps/bramver/config.h rename to keyboards/keebio/nyquist/keymaps/bramver/config.h diff --git a/keyboards/nyquist/keymaps/bramver/keymap.c b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/bramver/keymap.c rename to keyboards/keebio/nyquist/keymaps/bramver/keymap.c index f1562546791a..c671b7798c1c 100644 --- a/keyboards/nyquist/keymaps/bramver/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c @@ -15,10 +15,6 @@ */ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // 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 diff --git a/keyboards/nyquist/keymaps/bramver/rules.mk b/keyboards/keebio/nyquist/keymaps/bramver/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/bramver/rules.mk rename to keyboards/keebio/nyquist/keymaps/bramver/rules.mk diff --git a/keyboards/nyquist/keymaps/danielhklein/config.h b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h similarity index 100% rename from keyboards/nyquist/keymaps/danielhklein/config.h rename to keyboards/keebio/nyquist/keymaps/danielhklein/config.h diff --git a/keyboards/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/danielhklein/keymap.c rename to keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index e072527b1e87..496b1afa3633 100644 --- a/keyboards/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c @@ -41,10 +41,6 @@ enum custom_keycodes { #define BSP_RSE FUNC(1) #define ARW FUNC(2) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Underglow setup #define RGBLIGHT_SLEEP #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/nyquist/keymaps/danielhklein/rules.mk b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/danielhklein/rules.mk rename to keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk diff --git a/keyboards/viterbi/keymaps/hexwire/config.h b/keyboards/keebio/nyquist/keymaps/default/config.h similarity index 83% rename from keyboards/viterbi/keymaps/hexwire/config.h rename to keyboards/keebio/nyquist/keymaps/default/config.h index 7acf84510e64..ef1c4a51ab9b 100644 --- a/keyboards/viterbi/keymaps/hexwire/config.h +++ b/keyboards/keebio/nyquist/keymaps/default/config.h @@ -15,29 +15,17 @@ 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 +#pragma once -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define TAPPING_TERM 150 - #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/nyquist/keymaps/default/keymap.c b/keyboards/keebio/nyquist/keymaps/default/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/default/keymap.c rename to keyboards/keebio/nyquist/keymaps/default/keymap.c index 0e3a1b9ab823..ecaad49bb2b6 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/viterbi/keymaps/default/rules.mk b/keyboards/keebio/nyquist/keymaps/default/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/default/rules.mk rename to keyboards/keebio/nyquist/keymaps/default/rules.mk diff --git a/keyboards/nyquist/keymaps/jojiichan/config.h b/keyboards/keebio/nyquist/keymaps/jojiichan/config.h similarity index 100% rename from keyboards/nyquist/keymaps/jojiichan/config.h rename to keyboards/keebio/nyquist/keymaps/jojiichan/config.h diff --git a/keyboards/nyquist/keymaps/jojiichan/keymap.c b/keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c similarity index 97% rename from keyboards/nyquist/keymaps/jojiichan/keymap.c rename to keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c index e8f92f37d744..a0d8c4647509 100644 --- a/keyboards/nyquist/keymaps/jojiichan/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c @@ -2,11 +2,6 @@ extern keymap_config_t keymap_config; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/nyquist/keymaps/jojiichan/rules.mk b/keyboards/keebio/nyquist/keymaps/jojiichan/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/jojiichan/rules.mk rename to keyboards/keebio/nyquist/keymaps/jojiichan/rules.mk diff --git a/keyboards/nyquist/keymaps/kim-kim/config.h b/keyboards/keebio/nyquist/keymaps/kim-kim/config.h similarity index 100% rename from keyboards/nyquist/keymaps/kim-kim/config.h rename to keyboards/keebio/nyquist/keymaps/kim-kim/config.h diff --git a/keyboards/nyquist/keymaps/kim-kim/keymap.c b/keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c similarity index 98% rename from keyboards/nyquist/keymaps/kim-kim/keymap.c rename to keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c index 4051f296ee24..79e485f003b2 100644 --- a/keyboards/nyquist/keymaps/kim-kim/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define _LW 1 #define _RS 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SPLIT QWERTY diff --git a/keyboards/nyquist/keymaps/kim-kim/rules.mk b/keyboards/keebio/nyquist/keymaps/kim-kim/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/kim-kim/rules.mk rename to keyboards/keebio/nyquist/keymaps/kim-kim/rules.mk diff --git a/keyboards/nyquist/keymaps/losinggeneration/README.md b/keyboards/keebio/nyquist/keymaps/losinggeneration/README.md similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/README.md rename to keyboards/keebio/nyquist/keymaps/losinggeneration/README.md diff --git a/keyboards/nyquist/keymaps/losinggeneration/config.h b/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/config.h rename to keyboards/keebio/nyquist/keymaps/losinggeneration/config.h diff --git a/keyboards/nyquist/keymaps/losinggeneration/keymap.c b/keyboards/keebio/nyquist/keymaps/losinggeneration/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/keymap.c rename to keyboards/keebio/nyquist/keymaps/losinggeneration/keymap.c diff --git a/keyboards/nyquist/keymaps/losinggeneration/rules.mk b/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/rules.mk rename to keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/keebio/nyquist/keymaps/mtdjr/config.h similarity index 100% rename from keyboards/nyquist/keymaps/default/config.h rename to keyboards/keebio/nyquist/keymaps/mtdjr/config.h diff --git a/keyboards/nyquist/keymaps/mtdjr/keymap.c b/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/mtdjr/keymap.c rename to keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c diff --git a/keyboards/nyquist/keymaps/mtdjr/rules.mk b/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/mtdjr/rules.mk rename to keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk diff --git a/keyboards/nyquist/keymaps/pitty/README.md b/keyboards/keebio/nyquist/keymaps/pitty/README.md similarity index 100% rename from keyboards/nyquist/keymaps/pitty/README.md rename to keyboards/keebio/nyquist/keymaps/pitty/README.md diff --git a/keyboards/nyquist/keymaps/pitty/config.h b/keyboards/keebio/nyquist/keymaps/pitty/config.h similarity index 100% rename from keyboards/nyquist/keymaps/pitty/config.h rename to keyboards/keebio/nyquist/keymaps/pitty/config.h diff --git a/keyboards/nyquist/keymaps/pitty/keymap.c b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/pitty/keymap.c rename to keyboards/keebio/nyquist/keymaps/pitty/keymap.c index dea317d2ae8d..4dec42b85370 100644 --- a/keyboards/nyquist/keymaps/pitty/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c @@ -13,11 +13,6 @@ enum custom_macros { DRIGHT, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/nyquist/keymaps/pitty/rules.mk b/keyboards/keebio/nyquist/keymaps/pitty/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/pitty/rules.mk rename to keyboards/keebio/nyquist/keymaps/pitty/rules.mk diff --git a/keyboards/nyquist/keymaps/shovelpaw/config.h b/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h similarity index 100% rename from keyboards/nyquist/keymaps/shovelpaw/config.h rename to keyboards/keebio/nyquist/keymaps/shovelpaw/config.h diff --git a/keyboards/nyquist/keymaps/shovelpaw/keymap.c b/keyboards/keebio/nyquist/keymaps/shovelpaw/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/shovelpaw/keymap.c rename to keyboards/keebio/nyquist/keymaps/shovelpaw/keymap.c diff --git a/keyboards/nyquist/keymaps/shovelpaw/rules.mk b/keyboards/keebio/nyquist/keymaps/shovelpaw/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/shovelpaw/rules.mk rename to keyboards/keebio/nyquist/keymaps/shovelpaw/rules.mk diff --git a/keyboards/nyquist/keymaps/skug/config.h b/keyboards/keebio/nyquist/keymaps/skug/config.h similarity index 100% rename from keyboards/nyquist/keymaps/skug/config.h rename to keyboards/keebio/nyquist/keymaps/skug/config.h diff --git a/keyboards/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/skug/keymap.c rename to keyboards/keebio/nyquist/keymaps/skug/keymap.c diff --git a/keyboards/nyquist/keymaps/skug/rules.mk b/keyboards/keebio/nyquist/keymaps/skug/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/skug/rules.mk rename to keyboards/keebio/nyquist/keymaps/skug/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/tester/config.h b/keyboards/keebio/nyquist/keymaps/tester/config.h new file mode 100644 index 000000000000..4f5f10cebcfd --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/tester/config.h @@ -0,0 +1,20 @@ +/* +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 + +#define USE_I2C diff --git a/keyboards/keebio/nyquist/keymaps/tester/keymap.c b/keyboards/keebio/nyquist/keymaps/tester/keymap.c new file mode 100644 index 000000000000..f1e193271076 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/tester/keymap.c @@ -0,0 +1,226 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + BL_STEP, KC_Q, KC_W, KC_E, KC_R, KC_T, BL_STEP, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + RGB_MOD, KC_A, KC_S, KC_D, KC_F, KC_G, RGB_MOD, 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT( \ + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT( \ + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_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_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 / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_BSPC, \ + 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_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, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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/viterbi/keymaps/dwallace/rules.mk b/keyboards/keebio/nyquist/keymaps/tester/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/dwallace/rules.mk rename to keyboards/keebio/nyquist/keymaps/tester/rules.mk diff --git a/keyboards/nyquist/keymaps/yshrsmz/config.h b/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h similarity index 100% rename from keyboards/nyquist/keymaps/yshrsmz/config.h rename to keyboards/keebio/nyquist/keymaps/yshrsmz/config.h diff --git a/keyboards/nyquist/keymaps/yshrsmz/keymap.c b/keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/yshrsmz/keymap.c rename to keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c index 78070279d1fc..d4c2d4ba233a 100644 --- a/keyboards/nyquist/keymaps/yshrsmz/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/nyquist/keymaps/yshrsmz/rules.mk b/keyboards/keebio/nyquist/keymaps/yshrsmz/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/yshrsmz/rules.mk rename to keyboards/keebio/nyquist/keymaps/yshrsmz/rules.mk diff --git a/keyboards/nyquist/nyquist.c b/keyboards/keebio/nyquist/nyquist.c similarity index 100% rename from keyboards/nyquist/nyquist.c rename to keyboards/keebio/nyquist/nyquist.c diff --git a/keyboards/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h similarity index 92% rename from keyboards/nyquist/nyquist.h rename to keyboards/keebio/nyquist/nyquist.h index 9a3e996476f4..7b0ecf54237b 100644 --- a/keyboards/nyquist/nyquist.h +++ b/keyboards/keebio/nyquist/nyquist.h @@ -1,12 +1,12 @@ #pragma once -#ifdef KEYBOARD_nyquist_rev1 +#ifdef KEYBOARD_keebio_nyquist_rev1 #include "rev1.h" #endif -#ifdef KEYBOARD_nyquist_rev2 +#ifdef KEYBOARD_keebio_nyquist_rev2 #include "rev2.h" #endif -#ifdef KEYBOARD_nyquist_rev3 +#ifdef KEYBOARD_keebio_nyquist_rev3 #include "rev3.h" #endif diff --git a/keyboards/nyquist/readme.md b/keyboards/keebio/nyquist/readme.md similarity index 89% rename from keyboards/nyquist/readme.md rename to keyboards/keebio/nyquist/readme.md index e3d75b448fef..9fa7259d8771 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/keebio/nyquist/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make nyquist/rev1:default + make keebio/nyquist/rev2:default Example of flashing this keyboard: - make nyquist/rev1:default:avrdude + make keebio/nyquist/rev2:default:avrdude 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/nyquist/rev1/config.h b/keyboards/keebio/nyquist/rev1/config.h similarity index 100% rename from keyboards/nyquist/rev1/config.h rename to keyboards/keebio/nyquist/rev1/config.h diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/keebio/nyquist/rev1/rev1.c similarity index 100% rename from keyboards/nyquist/rev1/rev1.c rename to keyboards/keebio/nyquist/rev1/rev1.c diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h similarity index 100% rename from keyboards/nyquist/rev1/rev1.h rename to keyboards/keebio/nyquist/rev1/rev1.h diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk similarity index 100% rename from keyboards/nyquist/rev1/rules.mk rename to keyboards/keebio/nyquist/rev1/rules.mk diff --git a/keyboards/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h similarity index 100% rename from keyboards/nyquist/rev2/config.h rename to keyboards/keebio/nyquist/rev2/config.h diff --git a/keyboards/nyquist/rev2/rev2.c b/keyboards/keebio/nyquist/rev2/rev2.c similarity index 100% rename from keyboards/nyquist/rev2/rev2.c rename to keyboards/keebio/nyquist/rev2/rev2.c diff --git a/keyboards/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h similarity index 100% rename from keyboards/nyquist/rev2/rev2.h rename to keyboards/keebio/nyquist/rev2/rev2.h diff --git a/keyboards/nyquist/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk similarity index 100% rename from keyboards/nyquist/rev2/rules.mk rename to keyboards/keebio/nyquist/rev2/rules.mk diff --git a/keyboards/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h similarity index 100% rename from keyboards/nyquist/rev3/config.h rename to keyboards/keebio/nyquist/rev3/config.h diff --git a/keyboards/nyquist/rev3/rev3.c b/keyboards/keebio/nyquist/rev3/rev3.c similarity index 100% rename from keyboards/nyquist/rev3/rev3.c rename to keyboards/keebio/nyquist/rev3/rev3.c diff --git a/keyboards/nyquist/rev3/rev3.h b/keyboards/keebio/nyquist/rev3/rev3.h similarity index 100% rename from keyboards/nyquist/rev3/rev3.h rename to keyboards/keebio/nyquist/rev3/rev3.h diff --git a/keyboards/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk similarity index 100% rename from keyboards/nyquist/rev3/rules.mk rename to keyboards/keebio/nyquist/rev3/rules.mk diff --git a/keyboards/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk similarity index 98% rename from keyboards/nyquist/rules.mk rename to keyboards/keebio/nyquist/rules.mk index 5313b85022fb..51821a48241f 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/keebio/nyquist/rules.mk @@ -68,4 +68,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes LAYOUTS = ortho_5x12 -DEFAULT_FOLDER = nyquist/rev2 +DEFAULT_FOLDER = keebio/nyquist/rev2 diff --git a/keyboards/fourier/config.h b/keyboards/keebio/quefrency/config.h similarity index 100% rename from keyboards/fourier/config.h rename to keyboards/keebio/quefrency/config.h diff --git a/keyboards/quefrency/info.json b/keyboards/keebio/quefrency/info.json similarity index 100% rename from keyboards/quefrency/info.json rename to keyboards/keebio/quefrency/info.json diff --git a/keyboards/quefrency/keymaps/bjohnson/config.h b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h similarity index 100% rename from keyboards/quefrency/keymaps/bjohnson/config.h rename to keyboards/keebio/quefrency/keymaps/bjohnson/config.h diff --git a/keyboards/quefrency/keymaps/bjohnson/keymap.c b/keyboards/keebio/quefrency/keymaps/bjohnson/keymap.c similarity index 100% rename from keyboards/quefrency/keymaps/bjohnson/keymap.c rename to keyboards/keebio/quefrency/keymaps/bjohnson/keymap.c diff --git a/keyboards/quefrency/keymaps/bjohnson/rules.mk b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/bjohnson/rules.mk rename to keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk diff --git a/keyboards/quefrency/keymaps/bramver/README.md b/keyboards/keebio/quefrency/keymaps/bramver/README.md similarity index 100% rename from keyboards/quefrency/keymaps/bramver/README.md rename to keyboards/keebio/quefrency/keymaps/bramver/README.md diff --git a/keyboards/quefrency/keymaps/bramver/config.h b/keyboards/keebio/quefrency/keymaps/bramver/config.h similarity index 100% rename from keyboards/quefrency/keymaps/bramver/config.h rename to keyboards/keebio/quefrency/keymaps/bramver/config.h diff --git a/keyboards/quefrency/keymaps/bramver/keymap.c b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c similarity index 98% rename from keyboards/quefrency/keymaps/bramver/keymap.c rename to keyboards/keebio/quefrency/keymaps/bramver/keymap.c index 527f5de04748..f995f9bfab4e 100644 --- a/keyboards/quefrency/keymaps/bramver/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c @@ -4,9 +4,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _BASE 0 #define _LMSE 1 #define _RMSE 2 @@ -100,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ _______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,\ _______ , _______ , KC_PGDN , KC_PGUP , KC_END , KC_HOME , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_RMSE] = LAYOUT( @@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , _______ , _______ , _______ , _______ , _______ , KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ , _______ , _______ , \ _______ , _______ , _______ , _______ , _______ , _______ , KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ , _______ ,\ _______ , _______ , _______ , _______ , _______ , _______ , KC_HOME , KC_END , KC_PGUP , KC_PGDN , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_SYMB] = LAYOUT( @@ -116,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ _______ , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , _______ , _______ ,\ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_EMOJ] = LAYOUT( @@ -124,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , \ _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ ,\ _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), }; diff --git a/keyboards/quefrency/keymaps/bramver/rules.mk b/keyboards/keebio/quefrency/keymaps/bramver/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/bramver/rules.mk rename to keyboards/keebio/quefrency/keymaps/bramver/rules.mk diff --git a/keyboards/quefrency/keymaps/default/config.h b/keyboards/keebio/quefrency/keymaps/default/config.h similarity index 100% rename from keyboards/quefrency/keymaps/default/config.h rename to keyboards/keebio/quefrency/keymaps/default/config.h diff --git a/keyboards/quefrency/keymaps/default/keymap.c b/keyboards/keebio/quefrency/keymaps/default/keymap.c similarity index 97% rename from keyboards/quefrency/keymaps/default/keymap.c rename to keyboards/keebio/quefrency/keymaps/default/keymap.c index 964a997dd9d8..744a8d32a4eb 100644 --- a/keyboards/quefrency/keymaps/default/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( 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_DEL, KC_BSPC, \ diff --git a/keyboards/laplace/keymaps/default/rules.mk b/keyboards/keebio/quefrency/keymaps/default/rules.mk similarity index 100% rename from keyboards/laplace/keymaps/default/rules.mk rename to keyboards/keebio/quefrency/keymaps/default/rules.mk diff --git a/keyboards/quefrency/keymaps/default65/config.h b/keyboards/keebio/quefrency/keymaps/default65/config.h similarity index 100% rename from keyboards/quefrency/keymaps/default65/config.h rename to keyboards/keebio/quefrency/keymaps/default65/config.h diff --git a/keyboards/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c similarity index 97% rename from keyboards/quefrency/keymaps/default65/keymap.c rename to keyboards/keebio/quefrency/keymaps/default65/keymap.c index 4b07949b0694..3e77731671de 100644 --- a/keyboards/quefrency/keymaps/default65/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65( 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_DEL, KC_BSPC, KC_HOME, \ diff --git a/keyboards/quefrency/keymaps/default/rules.mk b/keyboards/keebio/quefrency/keymaps/default65/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/default/rules.mk rename to keyboards/keebio/quefrency/keymaps/default65/rules.mk diff --git a/keyboards/quefrency/keymaps/default65macro/config.h b/keyboards/keebio/quefrency/keymaps/default65macro/config.h similarity index 100% rename from keyboards/quefrency/keymaps/default65macro/config.h rename to keyboards/keebio/quefrency/keymaps/default65macro/config.h diff --git a/keyboards/quefrency/keymaps/default65macro/keymap.c b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c similarity index 97% rename from keyboards/quefrency/keymaps/default65macro/keymap.c rename to keyboards/keebio/quefrency/keymaps/default65macro/keymap.c index c7ac46ea5ad6..4503291d28f9 100644 --- a/keyboards/quefrency/keymaps/default65macro/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65_with_macro( KC_F1, KC_F2, 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_DEL, KC_BSPC, KC_HOME, \ diff --git a/keyboards/quefrency/quefrency.c b/keyboards/keebio/quefrency/quefrency.c similarity index 100% rename from keyboards/quefrency/quefrency.c rename to keyboards/keebio/quefrency/quefrency.c diff --git a/keyboards/quefrency/quefrency.h b/keyboards/keebio/quefrency/quefrency.h similarity index 92% rename from keyboards/quefrency/quefrency.h rename to keyboards/keebio/quefrency/quefrency.h index 7a791230df42..0c387a6d5def 100644 --- a/keyboards/quefrency/quefrency.h +++ b/keyboards/keebio/quefrency/quefrency.h @@ -1,9 +1,8 @@ -#ifndef QUEFRENCY_H -#define QUEFRENCY_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_quefrency_rev1 +#ifdef KEYBOARD_keebio_quefrency_rev1 #include "rev1.h" #endif @@ -20,4 +19,3 @@ KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \ KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \ ) -#endif diff --git a/keyboards/quefrency/readme.md b/keyboards/keebio/quefrency/readme.md similarity index 90% rename from keyboards/quefrency/readme.md rename to keyboards/keebio/quefrency/readme.md index 66d033b6b21c..3f0e7d98e70c 100644 --- a/keyboards/quefrency/readme.md +++ b/keyboards/keebio/quefrency/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io/) Make example for this keyboard (after setting up your build environment): - make quefrency/rev1:default + make keebio/quefrency/rev1:default Example of flashing this keyboard: - make quefrency/rev1:default:avrdude + make keebio/quefrency/rev1:default:avrdude Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. diff --git a/keyboards/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h similarity index 100% rename from keyboards/quefrency/rev1/config.h rename to keyboards/keebio/quefrency/rev1/config.h diff --git a/keyboards/quefrency/rev1/rev1.c b/keyboards/keebio/quefrency/rev1/rev1.c similarity index 100% rename from keyboards/quefrency/rev1/rev1.c rename to keyboards/keebio/quefrency/rev1/rev1.c diff --git a/keyboards/quefrency/rev1/rev1.h b/keyboards/keebio/quefrency/rev1/rev1.h similarity index 100% rename from keyboards/quefrency/rev1/rev1.h rename to keyboards/keebio/quefrency/rev1/rev1.h diff --git a/keyboards/quefrency/keymaps/default65/rules.mk b/keyboards/keebio/quefrency/rev1/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/default65/rules.mk rename to keyboards/keebio/quefrency/rev1/rules.mk diff --git a/keyboards/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk similarity index 90% rename from keyboards/quefrency/rules.mk rename to keyboards/keebio/quefrency/rules.mk index 3ec04fbf1f3d..c28696c08e66 100644 --- a/keyboards/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -22,12 +22,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes +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 SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = quefrency/rev1 +DEFAULT_FOLDER = keebio/quefrency/rev1 diff --git a/keyboards/rorschach/config.h b/keyboards/keebio/rorschach/config.h similarity index 92% rename from keyboards/rorschach/config.h rename to keyboards/keebio/rorschach/config.h index 03fde5399d20..769330e39997 100644 --- a/keyboards/rorschach/config.h +++ b/keyboards/keebio/rorschach/config.h @@ -15,9 +15,6 @@ 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 +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/rorschach/info.json b/keyboards/keebio/rorschach/info.json similarity index 100% rename from keyboards/rorschach/info.json rename to keyboards/keebio/rorschach/info.json diff --git a/keyboards/rorschach/keymaps/default/config.h b/keyboards/keebio/rorschach/keymaps/default/config.h similarity index 91% rename from keyboards/rorschach/keymaps/default/config.h rename to keyboards/keebio/rorschach/keymaps/default/config.h index b6a94363235b..da32daebb3e7 100644 --- a/keyboards/rorschach/keymaps/default/config.h +++ b/keyboards/keebio/rorschach/keymaps/default/config.h @@ -17,11 +17,8 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/rorschach/keymaps/default/keymap.c b/keyboards/keebio/rorschach/keymaps/default/keymap.c similarity index 100% rename from keyboards/rorschach/keymaps/default/keymap.c rename to keyboards/keebio/rorschach/keymaps/default/keymap.c diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/config.h b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h similarity index 100% rename from keyboards/rorschach/keymaps/insertsnideremarks/config.h rename to keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c similarity index 97% rename from keyboards/rorschach/keymaps/insertsnideremarks/keymap.c rename to keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c index 5d93e2f05796..81c163a028f6 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c @@ -28,9 +28,6 @@ enum rorschach_keycodes { NKROTG = MAGIC_TOGGLE_NKRO, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Tap Dance Declarations enum { ADJ = 0, @@ -60,7 +57,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -86,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ins | ` | [ | ] |App/Alt| Spc/FN| |Bsp/Fn2| RGUI | Left | Down | Up | Right | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | Ent/NS| Bspc | | Enter |Del/NS2| -* `---------------' `---------------' +* `---------------' `---------------' */ [_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_BSLS, @@ -95,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ENTNS, KC_BSPC, KC_ENT, DELNS ), - + /* QWERTY * (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) * ,-----------------------------------------------. ,-----------------------------------------------. @@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ins | ` | [ | ] |App/Alt| Spc/FN| |Bsp/Fn2| RGUI | Left | Down | Up | Right | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | Ent/NS| Bspc | | Enter |Del/NS2| -* `---------------' `---------------' +* `---------------' `---------------' */ [_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_BSLS, @@ -130,15 +127,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMBERS] = LAYOUT( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), /* Number/Function Key layer * (Multiple characters: single-tap for first, double-tap for second) @@ -152,15 +149,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMBERS2] = LAYOUT( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), /* Function layer * ,-----------------------------------------------. ,-----------------------------------------------. @@ -173,23 +170,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Prev | Play | Next | Stop | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_FUNCTION] = LAYOUT( - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _______, _______, _______, _______ -), +), [_FUNCTION2] = LAYOUT( - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _______, _______, _______, _______ -), +), /* Numpad layer * (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) @@ -203,11 +200,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | KP 0 | = | KP . | KP + | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | KP Ent| | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMPAD] = LAYOUT( - _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, - _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, KC_NLCK, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, KC_P0, KC_EQL, KC_PDOT, KC_PPLS, _______, _______, _______, KC_PENT, _______ @@ -225,24 +222,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_ADJUST] = LAYOUT( - _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), [_ADJUST2] = LAYOUT( - _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - + }; uint32_t layer_state_set_user(uint32_t state) { @@ -286,4 +283,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk similarity index 100% rename from keyboards/rorschach/keymaps/insertsnideremarks/rules.mk rename to keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk diff --git a/keyboards/rorschach/readme.md b/keyboards/keebio/rorschach/readme.md similarity index 89% rename from keyboards/rorschach/readme.md rename to keyboards/keebio/rorschach/readme.md index 8858b72144c5..1a623a535310 100644 --- a/keyboards/rorschach/readme.md +++ b/keyboards/keebio/rorschach/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make rorschach/rev1:default + make keebio/rorschach/rev1:default Example of flashing this keyboard: - make rorschach/rev1:default:avrdude + make keebio/rorschach/rev1:default:avrdude 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/rorschach/rev1/config.h b/keyboards/keebio/rorschach/rev1/config.h similarity index 98% rename from keyboards/rorschach/rev1/config.h rename to keyboards/keebio/rorschach/rev1/config.h index 0ec9cdb31e0f..13402544f8b9 100644 --- a/keyboards/rorschach/rev1/config.h +++ b/keyboards/keebio/rorschach/rev1/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1246 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio diff --git a/keyboards/rorschach/rev1/rev1.c b/keyboards/keebio/rorschach/rev1/rev1.c similarity index 100% rename from keyboards/rorschach/rev1/rev1.c rename to keyboards/keebio/rorschach/rev1/rev1.c diff --git a/keyboards/rorschach/rev1/rev1.h b/keyboards/keebio/rorschach/rev1/rev1.h similarity index 100% rename from keyboards/rorschach/rev1/rev1.h rename to keyboards/keebio/rorschach/rev1/rev1.h diff --git a/keyboards/rorschach/rev1/rules.mk b/keyboards/keebio/rorschach/rev1/rules.mk similarity index 100% rename from keyboards/rorschach/rev1/rules.mk rename to keyboards/keebio/rorschach/rev1/rules.mk diff --git a/keyboards/rorschach/rorschach.c b/keyboards/keebio/rorschach/rorschach.c similarity index 100% rename from keyboards/rorschach/rorschach.c rename to keyboards/keebio/rorschach/rorschach.c diff --git a/keyboards/rorschach/rorschach.h b/keyboards/keebio/rorschach/rorschach.h similarity index 96% rename from keyboards/rorschach/rorschach.h rename to keyboards/keebio/rorschach/rorschach.h index 5c320b6a1265..45e64587f455 100644 --- a/keyboards/rorschach/rorschach.h +++ b/keyboards/keebio/rorschach/rorschach.h @@ -1,6 +1,6 @@ #pragma once -#ifdef KEYBOARD_rorschach_rev1 +#ifdef KEYBOARD_keebio_rorschach_rev1 #include "rev1.h" #endif diff --git a/keyboards/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk similarity index 91% rename from keyboards/rorschach/rules.mk rename to keyboards/keebio/rorschach/rules.mk index 32012534871e..b50074052279 100644 --- a/keyboards/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -17,10 +17,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +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 SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = rorschach/rev1 +DEFAULT_FOLDER = keebio/rorschach/rev1 diff --git a/keyboards/tragicforce68/README.md b/keyboards/keebio/tragicforce68/README.md similarity index 87% rename from keyboards/tragicforce68/README.md rename to keyboards/keebio/tragicforce68/README.md index 7cca1b50551a..c3ea92d7ad87 100644 --- a/keyboards/tragicforce68/README.md +++ b/keyboards/keebio/tragicforce68/README.md @@ -9,10 +9,10 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make tragicforce68:default + make keebio/tragicforce68:default Example of flashing this keyboard: - make tragicforce68:default:avrdude + make keebio/tragicforce68:default:avrdude 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/tragicforce68/config.h b/keyboards/keebio/tragicforce68/config.h similarity index 96% rename from keyboards/tragicforce68/config.h rename to keyboards/keebio/tragicforce68/config.h index 2a7f3de0f21d..b415b5d714c6 100644 --- a/keyboards/tragicforce68/config.h +++ b/keyboards/keebio/tragicforce68/config.h @@ -15,13 +15,12 @@ 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 +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x0510 #define DEVICE_VER 0x0101 #define MANUFACTURER Keebio @@ -60,5 +59,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/tragicforce68/info.json b/keyboards/keebio/tragicforce68/info.json similarity index 100% rename from keyboards/tragicforce68/info.json rename to keyboards/keebio/tragicforce68/info.json diff --git a/keyboards/tragicforce68/keymaps/buswerks/keymap.c b/keyboards/keebio/tragicforce68/keymaps/buswerks/keymap.c similarity index 100% rename from keyboards/tragicforce68/keymaps/buswerks/keymap.c rename to keyboards/keebio/tragicforce68/keymaps/buswerks/keymap.c diff --git a/keyboards/tragicforce68/keymaps/default/keymap.c b/keyboards/keebio/tragicforce68/keymaps/default/keymap.c similarity index 100% rename from keyboards/tragicforce68/keymaps/default/keymap.c rename to keyboards/keebio/tragicforce68/keymaps/default/keymap.c diff --git a/keyboards/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk similarity index 100% rename from keyboards/tragicforce68/rules.mk rename to keyboards/keebio/tragicforce68/rules.mk diff --git a/keyboards/tragicforce68/tragicforce68.c b/keyboards/keebio/tragicforce68/tragicforce68.c similarity index 100% rename from keyboards/tragicforce68/tragicforce68.c rename to keyboards/keebio/tragicforce68/tragicforce68.c diff --git a/keyboards/tragicforce68/tragicforce68.h b/keyboards/keebio/tragicforce68/tragicforce68.h similarity index 100% rename from keyboards/tragicforce68/tragicforce68.h rename to keyboards/keebio/tragicforce68/tragicforce68.h diff --git a/keyboards/viterbi/config.h b/keyboards/keebio/viterbi/config.h similarity index 92% rename from keyboards/viterbi/config.h rename to keyboards/keebio/viterbi/config.h index 27a7d9e1a572..b628c83c8553 100644 --- a/keyboards/viterbi/config.h +++ b/keyboards/keebio/viterbi/config.h @@ -15,9 +15,6 @@ 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 +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/viterbi/keymaps/hexwire/README.md b/keyboards/keebio/viterbi/keymaps/bakingpy/README.md similarity index 100% rename from keyboards/viterbi/keymaps/hexwire/README.md rename to keyboards/keebio/viterbi/keymaps/bakingpy/README.md diff --git a/keyboards/nyquist/keymaps/mtdjr/config.h b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h similarity index 92% rename from keyboards/nyquist/keymaps/mtdjr/config.h rename to keyboards/keebio/viterbi/keymaps/bakingpy/config.h index 0fa606f29653..7d01468e8deb 100644 --- a/keyboards/nyquist/keymaps/mtdjr/config.h +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h @@ -17,17 +17,14 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS +#define TAPPING_TERM 150 + #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 diff --git a/keyboards/viterbi/keymaps/hexwire/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/hexwire/keymap.c rename to keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c index 2050c037933f..f0122bef05a8 100644 --- a/keyboards/viterbi/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c @@ -1,6 +1,4 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -25,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/fido/rules.mk rename to keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk diff --git a/keyboards/viterbi/keymaps/default/config.h b/keyboards/keebio/viterbi/keymaps/default/config.h similarity index 100% rename from keyboards/viterbi/keymaps/default/config.h rename to keyboards/keebio/viterbi/keymaps/default/config.h diff --git a/keyboards/viterbi/keymaps/default/keymap.c b/keyboards/keebio/viterbi/keymaps/default/keymap.c similarity index 60% rename from keyboards/viterbi/keymaps/default/keymap.c rename to keyboards/keebio/viterbi/keymaps/default/keymap.c index 3db912f6ae28..c4ae0a5987d6 100644 --- a/keyboards/viterbi/keymaps/default/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/default/keymap.c @@ -18,13 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define KC_AJST ADJUST -#define KC_LOWR LOWER -#define KC_RASE RAISE const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -41,18 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Pg Dn|Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up | Right| \ | * `------------------------------------------------' `------------------------------------------------' */ - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - INS, GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,DEL , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - MINS,TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - EQL, ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,ENT , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PGUP,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,HOME,END , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PGDN,AJST,LCTL,LALT,LGUI,LOWR,SPC , SPC ,RASE,LEFT,DOWN, UP ,RGHT,BSLS - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_QWERTY] = LAYOUT_ortho_5x14( + KC_INS, 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_MINS, 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_EQL, KC_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, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_HOME, KC_END , + KC_PGDN, ADJUST , KC_LCTL, KC_LALT, KC_LGUI, LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS ), /* Lower @@ -68,18 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | * `------------------------------------------------' `------------------------------------------------' */ - [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ,TILD, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - UNDS, ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,LCBR,RCBR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , F7 , F8 , F9 ,F10 ,F11 , F12 , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,MNXT,VOLD,VOLU,MPLY,MUTE - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_LOWER] = LAYOUT_ortho_5x14( + _______, KC_TILD, 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_UNDS, _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE ), /* Raise @@ -95,47 +76,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | * `------------------------------------------------' `------------------------------------------------' */ - [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ,TILD, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - UNDS, , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,LCBR,RCBR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,MNXT,VOLD,VOLU,MPLY,MUTE - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_RAISE] = LAYOUT_ortho_5x14( + _______, KC_TILD, 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_UNDS, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE ), - [_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, _______, \ - _______, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, \ - _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + [_ADJUST] = LAYOUT_ortho_5x14( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, + _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; diff --git a/keyboards/viterbi/keymaps/hexwire/rules.mk b/keyboards/keebio/viterbi/keymaps/default/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/hexwire/rules.mk rename to keyboards/keebio/viterbi/keymaps/default/rules.mk diff --git a/keyboards/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h similarity index 100% rename from keyboards/viterbi/keymaps/drashna/config.h rename to keyboards/keebio/viterbi/keymaps/drashna/config.h diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c similarity index 97% rename from keyboards/viterbi/keymaps/drashna/keymap.c rename to keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 9ca14961be56..12f7fe25ea4f 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -8,11 +8,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LMACRO OSL(_MACROS) #define DIABLO TG(_DIABLO) #define GAMEPAD TG(_GAMEPAD) diff --git a/keyboards/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/drashna/rules.mk rename to keyboards/keebio/viterbi/keymaps/drashna/rules.mk diff --git a/keyboards/viterbi/keymaps/drashna_old/config.h b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h similarity index 100% rename from keyboards/viterbi/keymaps/drashna_old/config.h rename to keyboards/keebio/viterbi/keymaps/drashna_old/config.h diff --git a/keyboards/viterbi/keymaps/drashna_old/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c similarity index 100% rename from keyboards/viterbi/keymaps/drashna_old/keymap.c rename to keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c diff --git a/keyboards/viterbi/keymaps/drashna_old/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/drashna_old/rules.mk rename to keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk diff --git a/keyboards/viterbi/keymaps/dwallace/config.h b/keyboards/keebio/viterbi/keymaps/dwallace/config.h similarity index 100% rename from keyboards/viterbi/keymaps/dwallace/config.h rename to keyboards/keebio/viterbi/keymaps/dwallace/config.h diff --git a/keyboards/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/dwallace/keymap.c rename to keyboards/keebio/viterbi/keymaps/dwallace/keymap.c index 24102448287f..5a797cb0bd0c 100644 --- a/keyboards/viterbi/keymaps/dwallace/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_SWIN LGUI(KC_TILD) // Switch between windows #define KC_SAPP LGUI(KC_TAB) // Switch between applications diff --git a/keyboards/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/mike808/rules.mk rename to keyboards/keebio/viterbi/keymaps/dwallace/rules.mk diff --git a/keyboards/viterbi/keymaps/fido/config.h b/keyboards/keebio/viterbi/keymaps/fido/config.h similarity index 100% rename from keyboards/viterbi/keymaps/fido/config.h rename to keyboards/keebio/viterbi/keymaps/fido/config.h diff --git a/keyboards/viterbi/keymaps/fido/keymap.c b/keyboards/keebio/viterbi/keymaps/fido/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/fido/keymap.c rename to keyboards/keebio/viterbi/keymaps/fido/keymap.c index b8ef4600824c..cd6c8d087f1a 100644 --- a/keyboards/viterbi/keymaps/fido/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/fido/keymap.c @@ -11,7 +11,6 @@ extern keymap_config_t keymap_config; #define _FN 1 #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_FN1 MO(_FN) #define KC_WD_L LCTL(KC_LEFT) diff --git a/keyboards/keebio/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/fido/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/fido/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/keymaps/mike808/config.h b/keyboards/keebio/viterbi/keymaps/mike808/config.h similarity index 100% rename from keyboards/viterbi/keymaps/mike808/config.h rename to keyboards/keebio/viterbi/keymaps/mike808/config.h diff --git a/keyboards/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/mike808/keymap.c rename to keyboards/keebio/viterbi/keymaps/mike808/keymap.c index c7e48b135c50..e1dc91d2b2b2 100644 --- a/keyboards/viterbi/keymaps/mike808/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c @@ -11,7 +11,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_DVOR DVORAK #define KC_QWER QWERTY @@ -84,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,PDOT, P0 ,EQL , , + , , , , , , , , ,PDOT, P0 ,EQL , , //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ), @@ -98,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , , , , , , , , , , , , , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , ,BTN1,BTN2, , , , , , , , + , , , ,BTN1,BTN2, , , , , , , , //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ) }; diff --git a/keyboards/keebio/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/readme.md b/keyboards/keebio/viterbi/readme.md similarity index 88% rename from keyboards/viterbi/readme.md rename to keyboards/keebio/viterbi/readme.md index 9aad7896b70c..2e475100b6fb 100644 --- a/keyboards/viterbi/readme.md +++ b/keyboards/keebio/viterbi/readme.md @@ -9,12 +9,12 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make viterbi/rev1:default + make keebio/viterbi/rev1:default Example of flashing this keyboard: - make viterbi/rev1:default:avrdude + make keebio/viterbi/rev1:default:avrdude 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/viterbi/rev1/config.h b/keyboards/keebio/viterbi/rev1/config.h similarity index 96% rename from keyboards/viterbi/rev1/config.h rename to keyboards/keebio/viterbi/rev1/config.h index 3b5e8fe665e1..e6fc13abdacb 100644 --- a/keyboards/viterbi/rev1/config.h +++ b/keyboards/keebio/viterbi/rev1/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -52,5 +51,3 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 14 - -#endif diff --git a/keyboards/viterbi/rev2/rev2.c b/keyboards/keebio/viterbi/rev1/rev1.c similarity index 100% rename from keyboards/viterbi/rev2/rev2.c rename to keyboards/keebio/viterbi/rev1/rev1.c diff --git a/keyboards/viterbi/rev1/rev1.h b/keyboards/keebio/viterbi/rev1/rev1.h similarity index 95% rename from keyboards/viterbi/rev1/rev1.h rename to keyboards/keebio/viterbi/rev1/rev1.h index 9c03e495a9f0..f31373f02e05 100644 --- a/keyboards/viterbi/rev1/rev1.h +++ b/keyboards/keebio/viterbi/rev1/rev1.h @@ -1,9 +1,6 @@ -#ifndef REV1_H -#define REV1_H +#pragma once -#include "../viterbi.h" - -//void promicro_bootloader_jmp(bool program); +#include "viterbi.h" #include "quantum.h" @@ -64,5 +61,3 @@ #endif #define LAYOUT_ortho_5x14 LAYOUT - -#endif diff --git a/keyboards/viterbi/rev1/rules.mk b/keyboards/keebio/viterbi/rev1/rules.mk similarity index 100% rename from keyboards/viterbi/rev1/rules.mk rename to keyboards/keebio/viterbi/rev1/rules.mk diff --git a/keyboards/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h similarity index 99% rename from keyboards/viterbi/rev2/config.h rename to keyboards/keebio/viterbi/rev2/config.h index 01a0bfa047ac..b2970610e2b3 100644 --- a/keyboards/viterbi/rev2/config.h +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -17,7 +17,6 @@ along with this program. If not, see . #pragma once - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1157 diff --git a/keyboards/viterbi/viterbi.c b/keyboards/keebio/viterbi/rev2/rev2.c similarity index 100% rename from keyboards/viterbi/viterbi.c rename to keyboards/keebio/viterbi/rev2/rev2.c diff --git a/keyboards/viterbi/rev2/rev2.h b/keyboards/keebio/viterbi/rev2/rev2.h similarity index 100% rename from keyboards/viterbi/rev2/rev2.h rename to keyboards/keebio/viterbi/rev2/rev2.h diff --git a/keyboards/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk similarity index 100% rename from keyboards/viterbi/rev2/rules.mk rename to keyboards/keebio/viterbi/rev2/rules.mk diff --git a/keyboards/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk similarity index 97% rename from keyboards/viterbi/rules.mk rename to keyboards/keebio/viterbi/rules.mk index 1aa4314f490d..811f57fdbcb0 100644 --- a/keyboards/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -28,5 +28,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = viterbi/rev2 +DEFAULT_FOLDER = keebio/viterbi/rev2 LAYOUTS = ortho_5x14 diff --git a/keyboards/keebio/viterbi/viterbi.c b/keyboards/keebio/viterbi/viterbi.c new file mode 100644 index 000000000000..509e42dc515d --- /dev/null +++ b/keyboards/keebio/viterbi/viterbi.c @@ -0,0 +1 @@ +#include "viterbi.h" diff --git a/keyboards/viterbi/viterbi.h b/keyboards/keebio/viterbi/viterbi.h similarity index 95% rename from keyboards/viterbi/viterbi.h rename to keyboards/keebio/viterbi/viterbi.h index b19f33154bb8..186892d57a9f 100644 --- a/keyboards/viterbi/viterbi.h +++ b/keyboards/keebio/viterbi/viterbi.h @@ -2,9 +2,9 @@ #include "quantum.h" -#ifdef KEYBOARD_viterbi_rev1 +#ifdef KEYBOARD_keebio_viterbi_rev1 #include "rev1.h" -#elif KEYBOARD_viterbi_rev2 +#elif KEYBOARD_keebio_viterbi_rev2 #include "rev2.h" #endif diff --git a/keyboards/wavelet/config.h b/keyboards/keebio/wavelet/config.h similarity index 97% rename from keyboards/wavelet/config.h rename to keyboards/keebio/wavelet/config.h index eed2b7944de1..5610bba17b1a 100644 --- a/keyboards/wavelet/config.h +++ b/keyboards/keebio/wavelet/config.h @@ -17,8 +17,7 @@ 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 +#pragma once #include "config_common.h" @@ -48,11 +47,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs /* Backlight LEDs */ #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 7 - -#endif diff --git a/keyboards/wavelet/info.json b/keyboards/keebio/wavelet/info.json similarity index 100% rename from keyboards/wavelet/info.json rename to keyboards/keebio/wavelet/info.json diff --git a/keyboards/levinson/keymaps/default/keymap.c b/keyboards/keebio/wavelet/keymaps/default/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/default/keymap.c rename to keyboards/keebio/wavelet/keymaps/default/keymap.c index dac8068a42a3..abf253380b2e 100644 --- a/keyboards/levinson/keymaps/default/keymap.c +++ b/keyboards/keebio/wavelet/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/wavelet/keymaps/default/rules.mk b/keyboards/keebio/wavelet/keymaps/default/rules.mk similarity index 100% rename from keyboards/wavelet/keymaps/default/rules.mk rename to keyboards/keebio/wavelet/keymaps/default/rules.mk diff --git a/keyboards/wavelet/readme.md b/keyboards/keebio/wavelet/readme.md similarity index 90% rename from keyboards/wavelet/readme.md rename to keyboards/keebio/wavelet/readme.md index 90c5ac808995..a107289bb418 100644 --- a/keyboards/wavelet/readme.md +++ b/keyboards/keebio/wavelet/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make wavelet:default + make keebio/wavelet:default Example of flashing this keyboard: - make wavelet:default:avrdude + make keebio/wavelet:default:avrdude 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/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk similarity index 100% rename from keyboards/wavelet/rules.mk rename to keyboards/keebio/wavelet/rules.mk diff --git a/keyboards/wavelet/wavelet.c b/keyboards/keebio/wavelet/wavelet.c similarity index 100% rename from keyboards/wavelet/wavelet.c rename to keyboards/keebio/wavelet/wavelet.c diff --git a/keyboards/wavelet/wavelet.h b/keyboards/keebio/wavelet/wavelet.h similarity index 100% rename from keyboards/wavelet/wavelet.h rename to keyboards/keebio/wavelet/wavelet.h diff --git a/keyboards/quefrency/config.h b/keyboards/quefrency/config.h deleted file mode 100644 index 8f0524f97262..000000000000 --- a/keyboards/quefrency/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -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_H -#define CONFIG_H - -#include "config_common.h" - -#ifdef SUBPROJECT_rev1 - #include "rev1/config.h" -#endif - -#endif diff --git a/keyboards/quefrency/rev1/rules.mk b/keyboards/quefrency/rev1/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/viterbi/rev1/rev1.c b/keyboards/viterbi/rev1/rev1.c deleted file mode 100644 index 5848375331e8..000000000000 --- a/keyboards/viterbi/rev1/rev1.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "viterbi.h" - - -#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 - -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(); -}; diff --git a/layouts/community/ortho_4x12/buswerks/keymap.c b/layouts/community/ortho_4x12/buswerks/keymap.c index bea18f8f488e..95d9e7019a90 100644 --- a/layouts/community/ortho_4x12/buswerks/keymap.c +++ b/layouts/community/ortho_4x12/buswerks/keymap.c @@ -78,10 +78,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN, KC_BSPC, \ ESC_CMD, 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, \ - xxxxxxx, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ ), - [_ADJUST] = LAYOUT_planck_grid( + [_ADJUST] = LAYOUT_ortho_4x12( _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, GAME, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, diff --git a/layouts/community/ortho_4x12/xyverz/config.h b/layouts/community/ortho_4x12/xyverz/config.h index 0fa89d6c7bbc..287f4cc2b731 100644 --- a/layouts/community/ortho_4x12/xyverz/config.h +++ b/layouts/community/ortho_4x12/xyverz/config.h @@ -11,7 +11,7 @@ #if defined(KEYBOARD_planck_rev5) #define RGBLED_NUM 10 #define RGB_DI_PIN D1 -#elif defined(KEYBOARD_levinson_rev2) +#elif defined(KEYBOARD_keebio_levinson_rev2) #define RGBLED_NUM 12 #elif defined(KEYBOARD_lets_split_rev2) #define RGBLED_NUM 8 diff --git a/layouts/community/ortho_5x12/rs/keymap.c b/layouts/community/ortho_5x12/rs/keymap.c index f33dcc253632..e4e590669f2f 100644 --- a/layouts/community/ortho_5x12/rs/keymap.c +++ b/layouts/community/ortho_5x12/rs/keymap.c @@ -16,6 +16,7 @@ enum layers { #define KC_BRDN KC_SLCK // Used to create a keymap using only KC_ prefixed keys +#ifndef LAYOUT_kc #define LAYOUT_kc( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ @@ -30,6 +31,7 @@ enum layers { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, \ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k46, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b \ ) +#endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/layouts/community/ortho_5x12/xyverz/config.h b/layouts/community/ortho_5x12/xyverz/config.h index 4489c6e5f545..5f9f6e5c11c0 100644 --- a/layouts/community/ortho_5x12/xyverz/config.h +++ b/layouts/community/ortho_5x12/xyverz/config.h @@ -6,7 +6,9 @@ #define BACKLIGHT_LEVELS 8 /* ws2812 RGB LED */ +#ifndef RGBLIGHT_ENABLE #undef RGB_DI_PIN +#endif #if defined(KEYBOARD_preonic_rev2) #define RGB_DI_PIN B3 #undef RGBLED_NUM From 6fcc6538c71abd649ff8c8ac60b190ebd26f3b61 Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 13 Feb 2019 01:04:47 +0000 Subject: [PATCH 073/445] [Keyboard] Refactor jj4x4 to enable ortho_4x4 LAYOUT (#5112) * Correct configurator info.json * Refactor to support ortho_4x4 * Refactor to support ortho_4x4 - remove commented out code --- keyboards/jj4x4/config.h | 6 ++-- keyboards/jj4x4/info.json | 39 ++++++++++++++---------- keyboards/jj4x4/jj4x4.h | 15 ++------- keyboards/jj4x4/keymaps/default/keymap.c | 2 +- keyboards/jj4x4/rules.mk | 2 +- 5 files changed, 29 insertions(+), 35 deletions(-) diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index d48df5f1dbbe..3ecdc06eaeec 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -15,10 +15,10 @@ 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" -#ifndef CONFIG_H -#define CONFIG_H #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D @@ -49,5 +49,3 @@ along with this program. If not, see . #define RGBLED_NUM 5 #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/jj4x4/info.json b/keyboards/jj4x4/info.json index c6416ce16814..602fdc90a37e 100644 --- a/keyboards/jj4x4/info.json +++ b/keyboards/jj4x4/info.json @@ -1,23 +1,30 @@ { - "keyboard_name": "jj40", + "keyboard_name": "jj4x4", "url": "", "maintainer": "qmk", - "width": 12, + "width": 4, "height": 4, "layouts": { - "LAYOUT_planck_mit": { - "key_count": 47, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - }, - - "LAYOUT_ortho_4x12": { - "key_count": 48, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - }, - - "LAYOUT_planck_1x2uR": { - "key_count": 47, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3, "w":2}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + "LAYOUT_ortho_4x4": { + "key_count": 16, + "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} + ] } } -} +} \ No newline at end of file diff --git a/keyboards/jj4x4/jj4x4.h b/keyboards/jj4x4/jj4x4.h index 03cf5d8a62ca..5a24b90333dc 100644 --- a/keyboards/jj4x4/jj4x4.h +++ b/keyboards/jj4x4/jj4x4.h @@ -15,20 +15,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - -#define XXX KC_NO - -#define LAYOUT( \ +#define LAYOUT_ortho_4x4( \ K01, K02, K03, K04, \ K11, K12, K13, K14, \ K21, K22, K23, K24, \ @@ -40,7 +33,3 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { K21, K22, K23, K24 }, \ { K31, K32, K33, K34 } \ } - - - -#endif diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c index d4130e809063..51d4e7d6186b 100644 --- a/keyboards/jj4x4/keymaps/default/keymap.c +++ b/keyboards/jj4x4/keymaps/default/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | M | N | O | P | * ----------------------------' */ -[_QWERTY] = LAYOUT( \ +[_QWERTY] = LAYOUT_ortho_4x4( \ KC_A, KC_B, KC_C, KC_D, \ KC_E, KC_F, KC_G, KC_H, \ KC_I, KC_J, KC_K, KC_L, \ diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index 3e222c620da6..d99aebbd20d9 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -55,4 +55,4 @@ SRC = i2c.c backlight.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - +LAYOUTS = ortho_4x4 From 9cb4c5c092b8d0b4f23f873384e13cf4c2c375a3 Mon Sep 17 00:00:00 2001 From: Wilba Date: Wed, 13 Feb 2019 12:05:34 +1100 Subject: [PATCH 074/445] [Keyboard] Added aeboards/aegis (#5099) * Added aeboards/aegis * PR changes --- keyboards/aeboards/aegis/aegis.c | 17 +++++ keyboards/aeboards/aegis/aegis.h | 43 +++++++++++ keyboards/aeboards/aegis/config.h | 71 ++++++++++++++++++ .../aeboards/aegis/keymaps/default/keymap.c | 72 +++++++++++++++++++ .../aeboards/aegis/keymaps/default/readme.md | 2 + keyboards/aeboards/aegis/keymaps/via/keymap.c | 72 +++++++++++++++++++ .../aeboards/aegis/keymaps/via/readme.md | 2 + keyboards/aeboards/aegis/keymaps/via/rules.mk | 68 ++++++++++++++++++ keyboards/aeboards/aegis/readme.md | 14 ++++ keyboards/aeboards/aegis/rules.mk | 65 +++++++++++++++++ 10 files changed, 426 insertions(+) create mode 100644 keyboards/aeboards/aegis/aegis.c create mode 100644 keyboards/aeboards/aegis/aegis.h create mode 100644 keyboards/aeboards/aegis/config.h create mode 100644 keyboards/aeboards/aegis/keymaps/default/keymap.c create mode 100644 keyboards/aeboards/aegis/keymaps/default/readme.md create mode 100644 keyboards/aeboards/aegis/keymaps/via/keymap.c create mode 100644 keyboards/aeboards/aegis/keymaps/via/readme.md create mode 100644 keyboards/aeboards/aegis/keymaps/via/rules.mk create mode 100644 keyboards/aeboards/aegis/readme.md create mode 100644 keyboards/aeboards/aegis/rules.mk diff --git a/keyboards/aeboards/aegis/aegis.c b/keyboards/aeboards/aegis/aegis.c new file mode 100644 index 000000000000..ccff6d62c94b --- /dev/null +++ b/keyboards/aeboards/aegis/aegis.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/aeboards/aegis/aegis.h b/keyboards/aeboards/aegis/aegis.h new file mode 100644 index 000000000000..95ffb73dde00 --- /dev/null +++ b/keyboards/aeboards/aegis/aegis.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define _____ KC_NO + +#define LAYOUT_aegis( \ + K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, \ + K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0108, \ + K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, \ + K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0606, K0706, K0607, K0707, K0608, \ + K0800, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0905, K0806, K0906, K0807, K0907, K0808, K0908, \ + K1000, K1100, K1001, K1101, K1002, K1102, K1003, K1103, K1105, K1107, K1008, K1108 \ +) { \ + { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008 }, \ + { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108 }, \ + { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208 }, \ + { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308 }, \ + { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408 }, \ + { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508 }, \ + { K0600, K0601, K0602, K0603, K0604, K0605, K0606, K0607, K0608 }, \ + { K0700, K0701, K0702, K0703, K0704, K0705, K0706, K0707, _____ }, \ + { K0800, K0801, K0802, K0803, K0804, K0805, K0806, K0807, K0808 }, \ + { K0900, K0901, K0902, K0903, K0904, K0905, K0906, K0907, K0908 }, \ + { K1000, K1001, K1002, K1003, _____, _____, _____, _____, K1008 }, \ + { K1100, K1101, K1102, K1103, _____, K1105, _____, K1107, K1108 } \ +} diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h new file mode 100644 index 000000000000..787c0f485063 --- /dev/null +++ b/keyboards/aeboards/aegis/config.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 0x4145 // "AE" +#define PRODUCT_ID 0x0807 // 1800 -> 0x0708 -> 0x0807 ;-) +#define DEVICE_VER 0x0001 +#define MANUFACTURER AEboards +#define PRODUCT Aegis +#define DESCRIPTION 1800 Left Handed Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F6, E6, F7, D1, D0, D6, D4, B4, D7, B6, B5 } +#define MATRIX_COL_PINS { C7, C6, B7, D2, D3, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +//#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// 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 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + diff --git a/keyboards/aeboards/aegis/keymaps/default/keymap.c b/keyboards/aeboards/aegis/keymaps/default/keymap.c new file mode 100644 index 000000000000..8437ffeb4ed5 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------. + * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| + * `-------------------' `-------------------------------------------------------------' + * + * |-------------------| ,-------------------------------------------------------------. + * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del| + * |-------------------| |-------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | + * | + |--------------| |-------------------------------------------------------------| + * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-------------------| |-------------------------------------------------------------| + * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN | + * | ENT|-------------------------------------------------------------------------------| + * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| | + * `------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_aegis( + KC_END , KC_HOME, KC_PGDN, KC_PGUP, 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_PMNS, KC_PAST, KC_PSLS, 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_BSLS, KC_DEL, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , 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_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP , KC_PGDN, KC_BSPC, KC_TRNS, KC_TRNS, KC_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_RGHT, KC_ENT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, 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 + ), + + [2] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/aeboards/aegis/keymaps/default/readme.md b/keyboards/aeboards/aegis/keymaps/default/readme.md new file mode 100644 index 000000000000..e6b24245634a --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Aegis Layout + diff --git a/keyboards/aeboards/aegis/keymaps/via/keymap.c b/keyboards/aeboards/aegis/keymaps/via/keymap.c new file mode 100644 index 000000000000..8437ffeb4ed5 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------. + * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| + * `-------------------' `-------------------------------------------------------------' + * + * |-------------------| ,-------------------------------------------------------------. + * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del| + * |-------------------| |-------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | + * | + |--------------| |-------------------------------------------------------------| + * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-------------------| |-------------------------------------------------------------| + * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN | + * | ENT|-------------------------------------------------------------------------------| + * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| | + * `------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_aegis( + KC_END , KC_HOME, KC_PGDN, KC_PGUP, 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_PMNS, KC_PAST, KC_PSLS, 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_BSLS, KC_DEL, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , 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_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP , KC_PGDN, KC_BSPC, KC_TRNS, KC_TRNS, KC_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_RGHT, KC_ENT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, 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 + ), + + [2] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/aeboards/aegis/keymaps/via/readme.md b/keyboards/aeboards/aegis/keymaps/via/readme.md new file mode 100644 index 000000000000..a80671bd9435 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Aegis Layout + diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk new file mode 100644 index 000000000000..f072c67198c2 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/aeboards/aegis/readme.md b/keyboards/aeboards/aegis/readme.md new file mode 100644 index 000000000000..1b8fc124e5b4 --- /dev/null +++ b/keyboards/aeboards/aegis/readme.md @@ -0,0 +1,14 @@ +AEGIS +=== + +A left handed g80-1800-esque keyboard by [aeboards](https://aeboards.com/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: AEGIS +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make aeboards/aegis: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/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk new file mode 100644 index 000000000000..f1c632289cca --- /dev/null +++ b/keyboards/aeboards/aegis/rules.mk @@ -0,0 +1,65 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# 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 + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 From 824aa06c3cecf518cfea9cddd97446c869757c02 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 12 Feb 2019 21:01:58 -0800 Subject: [PATCH 075/445] Fix travis_compiled_push.sh script issue (#5114) * Fix travis_compiled_push.sh script issue * fix typo * properly fix push script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 155a9a8d2bb5..c05b842a0b58 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -70,7 +70,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then # ignore errors here # In theory, this is more flexible, and will allow for additional expansion of additional types of files and other names - mv -t compiled ../qmk_firmware/*_default.*(hex|bin) || true + mv ../qmk_firmware/*_default.*[hb][ei][xn] ./compiled/ || true bash _util/generate_keyboard_page.sh git add -A From 6b4549da8ceed736c85195f3bd16ded40131a29c Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Wed, 13 Feb 2019 11:03:26 -0500 Subject: [PATCH 076/445] Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (#5094) * Add stm32f072 base ck4x4 to handwired * add prints * Save these tries * Save changes again * Working hadron oled * OLEd working but ws2812b still iffy: * save another try * Encoder feature + OLED * RTC code * Implement clock setting mode * Whitespace * Encoder hooked up to working LED PWM code * Add missing files * eeprom changes * Save changes * Move i2c master * Move satisfaction75 under cannonkeys * Set proper default folder * Revert some core changes * Undo paved iris changes * Reorganize code for maintainability and prep for new features * Add starting code for clock OLED mode * Clock set mode finished * Add custom encoder modes * Actually add VIA keymap * Gate to only 072 * fix gate for only 072 * Update header guards and includes * Update i2c selection strategy * Update board.c to handle software reset to DFU --- .gitignore | 1 + drivers/qwiic/micro_oled.c | 4 +- .../boards/ST_STM32F072B_DISCOVERY/board.c | 111 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ .../satisfaction75/bootloader_defs.h | 7 + keyboards/cannonkeys/satisfaction75/chconf.h | 524 ++++++++++ keyboards/cannonkeys/satisfaction75/config.h | 107 ++ keyboards/cannonkeys/satisfaction75/halconf.h | 354 +++++++ .../cannonkeys/satisfaction75/i2c_master.c | 116 +++ .../satisfaction75/keymaps/default/keymap.c | 37 + .../satisfaction75/keymaps/via/keymap.c | 49 + .../satisfaction75/keymaps/via/rules.mk | 5 + keyboards/cannonkeys/satisfaction75/led.c | 240 +++++ .../cannonkeys/satisfaction75/led_custom.h | 5 + keyboards/cannonkeys/satisfaction75/mcuconf.h | 176 ++++ keyboards/cannonkeys/satisfaction75/readme.md | 12 + keyboards/cannonkeys/satisfaction75/rules.mk | 57 ++ .../satisfaction75/satisfaction75.c | 382 ++++++++ .../satisfaction75/satisfaction75.h | 118 +++ .../satisfaction75/satisfaction_encoder.c | 174 ++++ .../satisfaction75/satisfaction_oled.c | 269 +++++ keyboards/handwired/ck4x4/bootloader_defs.h | 7 + keyboards/handwired/ck4x4/chconf.h | 524 ++++++++++ keyboards/handwired/ck4x4/ck4x4.c | 1 + keyboards/handwired/ck4x4/ck4x4.h | 15 + keyboards/handwired/ck4x4/config.h | 70 ++ keyboards/handwired/ck4x4/halconf.h | 353 +++++++ .../handwired/ck4x4/keymaps/default/keymap.c | 29 + keyboards/handwired/ck4x4/mcuconf.h | 171 ++++ keyboards/handwired/ck4x4/readme.md | 3 + keyboards/handwired/ck4x4/rules.mk | 49 + keyboards/zeal60/zeal60_keycodes.h | 19 + tmk_core/common.mk | 5 + tmk_core/common/chibios/eeprom_stm32.h | 6 +- tmk_core/common/chibios/flash_stm32.c | 5 +- 37 files changed, 5630 insertions(+), 5 deletions(-) create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/satisfaction75/bootloader_defs.h create mode 100644 keyboards/cannonkeys/satisfaction75/chconf.h create mode 100644 keyboards/cannonkeys/satisfaction75/config.h create mode 100644 keyboards/cannonkeys/satisfaction75/halconf.h create mode 100644 keyboards/cannonkeys/satisfaction75/i2c_master.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/led.c create mode 100644 keyboards/cannonkeys/satisfaction75/led_custom.h create mode 100644 keyboards/cannonkeys/satisfaction75/mcuconf.h create mode 100644 keyboards/cannonkeys/satisfaction75/readme.md create mode 100644 keyboards/cannonkeys/satisfaction75/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction75.c create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction75.h create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction_oled.c create mode 100644 keyboards/handwired/ck4x4/bootloader_defs.h create mode 100644 keyboards/handwired/ck4x4/chconf.h create mode 100644 keyboards/handwired/ck4x4/ck4x4.c create mode 100644 keyboards/handwired/ck4x4/ck4x4.h create mode 100644 keyboards/handwired/ck4x4/config.h create mode 100644 keyboards/handwired/ck4x4/halconf.h create mode 100644 keyboards/handwired/ck4x4/keymaps/default/keymap.c create mode 100644 keyboards/handwired/ck4x4/mcuconf.h create mode 100644 keyboards/handwired/ck4x4/readme.md create mode 100644 keyboards/handwired/ck4x4/rules.mk diff --git a/.gitignore b/.gitignore index 799fb54def9b..b1f9277078af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.history/ .dep *.o *.bin diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c index 35c5d6ee1d93..092dd551e386 100644 --- a/drivers/qwiic/micro_oled.c +++ b/drivers/qwiic/micro_oled.c @@ -28,6 +28,7 @@ * along with this program. If not, see . */ #include "micro_oled.h" +#include #include #include "util/font5x7.h" #include "util/font8x16.h" @@ -309,12 +310,11 @@ static uint8_t micro_oled_screen_buffer[] = { #else //catchall for custom screen szies static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0}; -#endif +#endif void micro_oled_init(void) { - i2c_init(); i2c_start(I2C_ADDRESS_SA0_1); diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..d9f7bc329e6d --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,111 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/satisfaction75/bootloader_defs.h b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h new file mode 100644 index 000000000000..dd2d9bc574f9 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -0,0 +1,107 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x57F5 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER QMK +#define PRODUCT Satisfaction75 +#define DESCRIPTION Satisfaction 75 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B1, B2, B10, B11, B12, B13, B14, A8, A9, A10, B0, A7, A5, B5, A15, A1 } +#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 } +#define DIODE_DIRECTION COL2ROW + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B9 } +#define ENCODERS_PAD_B { B8 } + +//LEDS A6, RGB B15 +#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#ifdef QWIIC_MICRO_OLED_ENABLE + +#undef I2C_ADDRESS_SA0_1 +#define I2C_ADDRESS_SA0_1 0b0111100 +#define LCDWIDTH 128 +#define LCDHEIGHT 32 + +#endif + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// 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 0x02 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 803 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 221 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + + + +/* + * 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 diff --git a/keyboards/cannonkeys/satisfaction75/halconf.h b/keyboards/cannonkeys/satisfaction75/halconf.h new file mode 100644 index 000000000000..9a9ab838e64e --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC TRUE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c new file mode 100644 index 000000000000..a19dbcc9f5bf --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c @@ -0,0 +1,116 @@ +/* Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* This library is only valid for STM32 processors. + * This library follows the convention of the AVR i2c_master library. + * As a result addresses are expected to be already shifted (addr << 1). + * I2CD1 is the default driver which corresponds to pins B6 and B7. This + * can be changed. + * Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that + * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used + * but using any other I2C pins should be trivial. + */ + +#include "i2c_master.h" +#include "quantum.h" +#include +#include +#include "chtypes.h" +#include "ch.h" + +static uint8_t i2c_address; + +// This configures the I2C clock to 400khz assuming a 48Mhz clock +// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html +static const I2CConfig i2cconfig = { + STM32_TIMINGR_PRESC(0x00U) | + STM32_TIMINGR_SCLDEL(0x03U) | STM32_TIMINGR_SDADEL(0x01U) | + STM32_TIMINGR_SCLH(0x03U) | STM32_TIMINGR_SCLL(0x09U), + 0, + 0 +}; + +__attribute__ ((weak)) +void i2c_init(void) +{ + // Try releasing special pins for a short time + palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); + palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); + + chThdSleepMilliseconds(10); + + palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN); + + //i2cInit(); //This is invoked by halInit() so no need to redo it. +} + +// This is usually not needed +uint8_t i2c_start(uint8_t address) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + return 0; +} + +uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +{ + msg_t status = MSG_OK; + + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + i2cAcquireBus(&I2C_DRIVER); + status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + i2cReleaseBus(&I2C_DRIVER); + return status; +} + +uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + return i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); +} + +uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + + uint8_t complete_packet[length + 1]; + for(uint8_t i = 0; i < length; i++) + { + complete_packet[i+1] = data[i]; + } + complete_packet[0] = regaddr; + + return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); +} + +uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); +} + +// This is usually not needed. It releases the driver to allow pins to become GPIO again. +uint8_t i2c_stop(uint16_t timeout) +{ + i2cStop(&I2C_DRIVER); + return 0; +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c new file mode 100644 index 000000000000..5e87c73dcc56 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2012,2013 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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_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, ENC_PRESS, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c new file mode 100644 index 000000000000..e76c79a71b34 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2012,2013 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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_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, ENC_PRESS, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/satisfaction75/led.c b/keyboards/cannonkeys/satisfaction75/led.c new file mode 100644 index 000000000000..3ddcec2028bd --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/led.c @@ -0,0 +1,240 @@ +/* +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "satisfaction75.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// 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 backlight_init_ports(void) { + palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1)); + pwmStart(&PWMD3, &pwmCFG); + if(kb_backlight_config.enable){ + if(kb_backlight_config.breathing){ + breathing_enable(); + } else{ + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } +} + +void backlight_set(uint8_t level) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD3, 0); + } else { + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#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; + +bool is_breathing(void) { + return PWMD3.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD3); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (kb_backlight_config.level == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(kb_backlight_config.level); +} + +void breathing_self_disable(void) +{ + if (kb_backlight_config.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] = {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 * kb_backlight_config.level; +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + 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(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/cannonkeys/satisfaction75/led_custom.h b/keyboards/cannonkeys/satisfaction75/led_custom.h new file mode 100644 index 000000000000..fe5c9e5dcfae --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/led_custom.h @@ -0,0 +1,5 @@ +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); diff --git a/keyboards/cannonkeys/satisfaction75/mcuconf.h b/keyboards/cannonkeys/satisfaction75/mcuconf.h new file mode 100644 index 000000000000..6d8985796286 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSE + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/satisfaction75/readme.md b/keyboards/cannonkeys/satisfaction75/readme.md new file mode 100644 index 000000000000..361d1eb0f1aa --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/readme.md @@ -0,0 +1,12 @@ +# Satisfaction75 + +Satisfaction75 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/Satisfaction75: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/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk new file mode 100644 index 000000000000..88ab45920445 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -0,0 +1,57 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +SRC += led.c \ + satisfaction_encoder.c \ + satisfaction_oled.c + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +ENCODER_ENABLE = yes +QWIIC_ENABLE += MICRO_OLED +#BACKLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + +DEFAULT_FOLDER = cannonkeys/satisfaction75 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c new file mode 100644 index 000000000000..1423b11b0525 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -0,0 +1,382 @@ +#include "satisfaction75.h" +#include "print.h" +#include "debug.h" + +#include "ch.h" +#include "hal.h" + +// #ifdef QWIIC_MICRO_OLED_ENABLE +#include "micro_oled.h" +#include "qwiic.h" + +#include "timer.h" + +#include "raw_hid.h" +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +// HACK +#include "keyboards/zeal60/zeal60_api.h" // Temporary hack +#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack + + +/* Artificial delay added to get media keys to work in the encoder*/ +#define MEDIA_KEY_DELAY 10 + +uint16_t last_flush; + +volatile uint8_t led_numlock = false; +volatile uint8_t led_capslock = false; +volatile uint8_t led_scrolllock = false; + +uint8_t layer; + +bool queue_for_send = false; +bool clock_set_mode = false; +uint8_t oled_mode = OLED_DEFAULT; +bool oled_sleeping = false; + +uint8_t encoder_value = 32; +uint8_t encoder_mode = ENC_MODE_VOLUME; +uint8_t enabled_encoder_modes = 0x1F; + +RTCDateTime last_timespec; +uint16_t last_minute = 0; + +uint8_t time_config_idx = 0; +int8_t hour_config = 0; +int16_t minute_config = 0; +int8_t year_config = 0; +int8_t month_config = 0; +int8_t day_config = 0; +uint8_t previous_encoder_mode = 0; + +backlight_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + +bool eeprom_is_valid(void) +{ + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) +{ + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) +{ + // Set the Zeal60 specific EEPROM state as invalid. + eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + case id_get_protocol_version: + { + command_data[0] = PROTOCOL_VERSION >> 8; + command_data[1] = PROTOCOL_VERSION & 0xFF; + break; + } + case id_get_keyboard_value: + { + if ( command_data[0] == id_uptime ) + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + } + else + { + *command_id = id_unhandled; + } + break; + } +#ifdef DYNAMIC_KEYMAP_ENABLE + case id_dynamic_keymap_get_keycode: + { + uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); + command_data[3] = keycode >> 8; + command_data[4] = keycode & 0xFF; + break; + } + case id_dynamic_keymap_set_keycode: + { + dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); + break; + } + case id_dynamic_keymap_reset: + { + dynamic_keymap_reset(); + break; + } + case id_dynamic_keymap_macro_get_count: + { + command_data[0] = dynamic_keymap_macro_get_count(); + break; + } + case id_dynamic_keymap_macro_get_buffer_size: + { + uint16_t size = dynamic_keymap_macro_get_buffer_size(); + command_data[0] = size >> 8; + command_data[1] = size & 0xFF; + break; + } + case id_dynamic_keymap_macro_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_reset: + { + dynamic_keymap_macro_reset(); + break; + } + case id_dynamic_keymap_get_layer_count: + { + command_data[0] = dynamic_keymap_get_layer_count(); + break; + } + case id_dynamic_keymap_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_set_buffer( offset, size, &command_data[3] ); + break; + } +#endif // DYNAMIC_KEYMAP_ENABLE + case id_eeprom_reset: + { + eeprom_reset(); + break; + } + case id_bootloader_jump: + { + // Need to send data back before the jump + // Informs host that the command is handled + raw_hid_send( data, length ); + // Give host time to read it + wait_ms(100); + bootloader_jump(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif + + +void read_host_led_state(void) { + uint8_t leds = host_keyboard_leds(); + if (leds & (1 << USB_LED_NUM_LOCK)) { + if (led_numlock == false){ + led_numlock = true;} + } else { + if (led_numlock == true){ + led_numlock = false;} + } + if (leds & (1 << USB_LED_CAPS_LOCK)) { + if (led_capslock == false){ + led_capslock = true;} + } else { + if (led_capslock == true){ + led_capslock = false;} + } + if (leds & (1 << USB_LED_SCROLL_LOCK)) { + if (led_scrolllock == false){ + led_scrolllock = true;} + } else { + if (led_scrolllock == true){ + led_scrolllock = false;} + } +} + +uint32_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + layer = biton32(state); + queue_for_send = true; + return state; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + queue_for_send = true; + switch (keycode) { + case OLED_TOGG: + if (record->event.pressed) { + oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; + draw_ui(); + } + return false; + case CLOCK_SET: + if (record->event.pressed) { + if(clock_set_mode){ + pre_encoder_mode_change(); + clock_set_mode = false; + encoder_mode = previous_encoder_mode; + post_encoder_mode_change(); + + }else{ + previous_encoder_mode = encoder_mode; + pre_encoder_mode_change(); + clock_set_mode = true; + encoder_mode = ENC_MODE_CLOCK_SET; + post_encoder_mode_change(); + } + } + return false; + case ENC_PRESS: + if (record->event.pressed) { + uint16_t mapped_code = handle_encoder_press(); + uint16_t held_keycode_timer = timer_read(); + if(mapped_code != 0){ + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } + } else { + // Do something else when release + } + return false; + default: + break; + } + +#ifdef DYNAMIC_KEYMAP_ENABLE + // Handle macros + if (record->event.pressed) { + if ( keycode >= MACRO00 && keycode <= MACRO15 ) + { + uint8_t id = keycode - MACRO00; + dynamic_keymap_macro_send(id); + return false; + } + } +#endif //DYNAMIC_KEYMAP_ENABLE + + return process_record_user(keycode, record); +} + + +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; + queue_for_send = true; + if (index == 0) { + if (layer == 0){ + uint16_t mapped_code = 0; + if (clockwise) { + mapped_code = handle_encoder_clockwise(); + } else { + mapped_code = handle_encoder_ccw(); + } + uint16_t held_keycode_timer = timer_read(); + if(mapped_code != 0){ + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } + } else { + if(clockwise){ + change_encoder_mode(false); + } else { + change_encoder_mode(true); + } + } + } +} + +void eeprom_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (eeprom_is_valid()) { + //backlight_config_load(); + } 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(); +#ifdef DYNAMIC_KEYMAP_ENABLE + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); +#endif + // Save the magic number last, in case saving was interrupted + eeprom_set_valid(true); + } +} + +void matrix_init_kb(void) +{ + eeprom_init_kb(); + rtcGetTime(&RTCD1, &last_timespec); + queue_for_send = true; + backlight_init_ports(); + matrix_init_user(); +} + + +void matrix_scan_kb(void) { + rtcGetTime(&RTCD1, &last_timespec); + uint16_t minutes_since_midnight = last_timespec.millisecond / 1000 / 60; + + if (minutes_since_midnight != last_minute){ + last_minute = minutes_since_midnight; + if(!oled_sleeping){ + queue_for_send = true; + } + } + + if (queue_for_send && oled_mode != OLED_OFF) { + oled_sleeping = false; + read_host_led_state(); + draw_ui(); + queue_for_send = false; + } + if (timer_elapsed(last_flush) > ScreenOffInterval && !oled_sleeping) { + send_command(DISPLAYOFF); /* 0xAE */ + oled_sleeping = true; + } +} + diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h new file mode 100644 index 000000000000..5f9a1e48bad4 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -0,0 +1,118 @@ +#pragma once + +#include "quantum.h" + +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array + #define LAYOUT_default( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, 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, K312, KC_NO, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + +/* screen off after this many milliseconds */ +#define ScreenOffInterval 60000 /* milliseconds */ + +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_config_t; + +// Start these at the USER code range in VIA +enum my_keycodes { + ENC_PRESS = 0x5F80, + CLOCK_SET, + OLED_TOGG +}; + +enum encoder_modes { + ENC_MODE_VOLUME, + ENC_MODE_MEDIA, + ENC_MODE_SCROLL, + ENC_MODE_BRIGHTNESS, + ENC_MODE_BACKLIGHT, + ENC_MODE_CUSTOM0, + ENC_MODE_CUSTOM1, + ENC_MODE_CUSTOM2, + _NUM_ENCODER_MODES, + ENC_MODE_CLOCK_SET // This shouldn't be included in the default modes, so we put it after NUM_ENCODER_MODES +}; + +enum oled_modes { + OLED_DEFAULT, + OLED_TIME, + OLED_OFF, + _NUM_OLED_MODES +}; + + +// Keyboard Information +extern volatile uint8_t led_numlock; +extern volatile uint8_t led_capslock; +extern volatile uint8_t led_scrolllock; +extern uint8_t layer; + +// OLED Behavior +extern uint16_t last_flush; +extern bool queue_for_send; +extern uint8_t oled_mode; +extern bool oled_sleeping; + +// Encoder Behavior +extern uint8_t encoder_value; +extern uint8_t encoder_mode; +extern uint8_t enabled_encoder_modes; + +// RTC +extern RTCDateTime last_timespec; +extern uint16_t last_minute; + +// RTC Configuration +extern bool clock_set_mode; +extern uint8_t time_config_idx; +extern int8_t hour_config; +extern int16_t minute_config; +extern int8_t year_config; +extern int8_t month_config; +extern int8_t day_config; +extern uint8_t previous_encoder_mode; + +// Backlighting +extern backlight_config_t kb_backlight_config; +extern bool kb_backlight_breathing; + +void pre_encoder_mode_change(void); +void post_encoder_mode_change(void); +void change_encoder_mode(bool negative); +uint16_t handle_encoder_clockwise(void); +uint16_t handle_encoder_ccw(void); +uint16_t handle_encoder_press(void); + +void update_time_config(int8_t increment); + +__attribute__ ((weak)) +void draw_ui(void); +void draw_default(void); +void draw_clock(void); + +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); +// void backlight_save_to_eeprom(uint8_t level); +// uint8_t backlight_config_load(); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c new file mode 100644 index 000000000000..88996f829d94 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -0,0 +1,174 @@ +#include "satisfaction75.h" + +void pre_encoder_mode_change(){ + if(encoder_mode == ENC_MODE_CLOCK_SET){ + RTCDateTime timespec; + timespec.year = year_config; + timespec.month = month_config; + timespec.day = day_config; + // timespec.dayofweek = last_timespec.dayofweek; + // timespec.dstflag = last_timespec.dstflag; + timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; + rtcSetTime(&RTCD1, ×pec); + } +} + +void post_encoder_mode_change(){ + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour_config = (last_minute / 60); + minute_config = last_minute % 60; + year_config = last_timespec.year; + month_config = last_timespec.month; + day_config = last_timespec.day; + time_config_idx = 0; + } +} + +void change_encoder_mode(bool negative){ + pre_encoder_mode_change(); + do { + if(negative){ + if (encoder_mode == 0){ + encoder_mode = _NUM_ENCODER_MODES - 1; + } else{ + encoder_mode = encoder_mode - 1; + } + } else { + encoder_mode = (encoder_mode + 1) % _NUM_ENCODER_MODES; + } + } while(((1 << encoder_mode) & enabled_encoder_modes) == 0); + post_encoder_mode_change(); +} + +void update_time_config(int8_t increment){ + uint8_t day_limit = 31; + uint16_t adjusted_year = 1980 + year_config; + switch(time_config_idx){ + case 0: // hour + default: + hour_config = (hour_config + increment) % 24; + if (hour_config < 0){ + hour_config += 24; + } + break; + case 1: // minute + minute_config = (minute_config + increment) % 60; + if (minute_config < 0){ + minute_config += 60; + } + break; + case 2: // year + year_config += increment; + break; + case 3: // month + month_config = (month_config % 12) + increment; + if (month_config <= 0){ + month_config += 12; + } + break; + case 4: //day + if (month_config == 9 || month_config == 4 || month_config == 6 || month_config == 11){ + day_limit = 30; + } else if(month_config == 2){ + day_limit = adjusted_year % 4 == 0 && !(adjusted_year % 100 == 0 && adjusted_year % 400 != 0) ? 29 : 28; + } + day_config = (day_config % day_limit) + increment; + if(day_config <= 0){ + day_config += day_limit; + } + break; + } +} + +uint16_t handle_encoder_clockwise(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mapped_code = KC_VOLU; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_NEXT_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_D; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_INC; + kb_backlight_config.level = kb_backlight_config.level + 1; + if(kb_backlight_config.level > BACKLIGHT_LEVELS){ + kb_backlight_config.level = BACKLIGHT_LEVELS; + } + backlight_set(kb_backlight_config.level); + break; + case ENC_MODE_BRIGHTNESS: + mapped_code = KC_BRIGHTNESS_UP; + break; + case ENC_MODE_CLOCK_SET: + update_time_config(1); + queue_for_send = true; + break; + } + return mapped_code; +} + +uint16_t handle_encoder_ccw(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mapped_code = KC_VOLD; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PREV_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_U; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_DEC; + if(kb_backlight_config.level != 0){ + kb_backlight_config.level = kb_backlight_config.level - 1; + } + backlight_set(kb_backlight_config.level); + break; + case ENC_MODE_BRIGHTNESS: + mapped_code = KC_BRIGHTNESS_DOWN; + break; + case ENC_MODE_CLOCK_SET: + update_time_config(-1); + queue_for_send = true; + break; + } + return mapped_code; +} + +uint16_t handle_encoder_press(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + case ENC_MODE_VOLUME: + mapped_code = KC_MUTE; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PLAY_PAUSE; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_BTN3; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_TOGG; + kb_backlight_config.breathing = !kb_backlight_config.breathing; + if(!kb_backlight_config.breathing){ + breathing_disable(); + } else{ + breathing_enable(); + } + break; + case ENC_MODE_CLOCK_SET: + time_config_idx = (time_config_idx + 1) % 5; + default: + case ENC_MODE_BRIGHTNESS: + break; + } + return mapped_code; +} diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c new file mode 100644 index 000000000000..a92d61c568b8 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -0,0 +1,269 @@ +#include "satisfaction75.h" +#include "micro_oled.h" + +__attribute__ ((weak)) +void draw_ui() { + clear_buffer(); + last_flush = timer_read(); + send_command(DISPLAYON); + if(clock_set_mode){ + draw_clock(); + return; + } + switch (oled_mode){ + default: + case OLED_DEFAULT: + draw_default(); + break; + case OLED_TIME: + draw_clock(); + break; + case OLED_OFF: + send_command(DISPLAYOFF); + break; + } +} + +void draw_encoder(int8_t startX, int8_t startY, bool show_legend){ + if(show_legend){ + draw_string(startX + 1, startY + 2, "ENC", PIXEL_ON, NORM, 0); + } else { + startX -= 22; + } + draw_rect_filled_soft(startX + 22, startY + 1, 3 + (3 * 6), 9, PIXEL_ON, NORM); + char* mode_string = ""; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mode_string = "VOL"; + break; + case ENC_MODE_MEDIA: + mode_string = "MED"; + break; + case ENC_MODE_SCROLL: + mode_string = "SCR"; + break; + case ENC_MODE_BRIGHTNESS: + mode_string = "BRT"; + break; + case ENC_MODE_BACKLIGHT: + mode_string = "BKL"; + break; + case ENC_MODE_CLOCK_SET: + mode_string = "CLK"; + break; + case ENC_MODE_CUSTOM0: + mode_string = "CS0"; + break; + case ENC_MODE_CUSTOM1: + mode_string = "CS1"; + break; + case ENC_MODE_CUSTOM2: + mode_string = "CS2"; + break; + } + draw_string(startX + 24, startY + 2, mode_string, PIXEL_ON, XOR, 0); +} + +void draw_layer_section(int8_t startX, int8_t startY, bool show_legend){ + if(show_legend){ + draw_string(startX + 1, startY + 2, "LAYER", PIXEL_ON, NORM, 0); + } else { + startX -= 32; + } + draw_rect_filled_soft(startX + 32, startY + 1, 9, 9, PIXEL_ON, NORM); + draw_char(startX + 34, startY + 2, layer + 0x30, PIXEL_ON, XOR, 0); +} + +void draw_default(){ + uint8_t hour = last_minute / 60; + uint16_t minute = last_minute % 60; + + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour = hour_config; + minute = minute_config; + } + + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0){ + hour = 12; + } + char hour_str[2] = ""; + char min_str[2] = ""; + + sprintf(hour_str, "%02d", hour); + sprintf(min_str, "%02d", minute); + + uint8_t mods = get_mods(); + +/* Layer indicator is 41 x 10 pixels */ + draw_layer_section(0,0,true); + +#define ENCODER_INDICATOR_X 45 +#define ENCODER_INDICATOR_Y 0 + draw_encoder(ENCODER_INDICATOR_X, ENCODER_INDICATOR_Y, true); +/* Matrix display is 19 x 9 pixels */ +#define MATRIX_DISPLAY_X 0 +#define MATRIX_DISPLAY_Y 18 + + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); + } + } + draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); + /* hadron oled location on thumbnail */ + draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); + +/* Mod display is 41 x 16 pixels */ +#define MOD_DISPLAY_X 30 +#define MOD_DISPLAY_Y 18 + + if (mods & MOD_LSFT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LCTL) { + draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LALT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LGUI) { + draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); + } + +/* Lock display is 23 x 21 */ +#define LOCK_DISPLAY_X 100 +#define LOCK_DISPLAY_Y 0 + + if (led_capslock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_ON, NORM, 0); + } + + if (led_scrolllock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_OFF, NORM, 0); + } else if (led_scrolllock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_ON, NORM, 0); + } + +#define TIME_DISPLAY_X 82 +#define TIME_DISPLAY_Y 22 + draw_string(TIME_DISPLAY_X, TIME_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 0); + draw_string(TIME_DISPLAY_X + 11, TIME_DISPLAY_Y, ":", PIXEL_ON, NORM, 0); + draw_string(TIME_DISPLAY_X + 15, TIME_DISPLAY_Y, min_str, PIXEL_ON, NORM, 0); + if(is_pm){ + draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "pm", PIXEL_ON, NORM, 0); + } else{ + draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "am", PIXEL_ON, NORM, 0); + } + + send_buffer(); +} + +void draw_clock(){ + int8_t hour = last_minute / 60; + int16_t minute = last_minute % 60; + int16_t year = last_timespec.year + 1980; + int8_t month = last_timespec.month; + int8_t day = last_timespec.day; + + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour = hour_config; + minute = minute_config; + year = year_config + 1980; + month = month_config; + day = day_config; + } + + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0){ + hour = 12; + } + char hour_str[2] = ""; + char min_str[2] = ""; + char year_str[4] = ""; + char month_str[2] = ""; + char day_str[2] = ""; + + sprintf(hour_str, "%02d", hour); + sprintf(min_str, "%02d", minute); + sprintf(year_str, "%d", year); + sprintf(month_str, "%02d", month); + sprintf(day_str, "%02d", day); + + +#define DATE_DISPLAY_X 6 +#define DATE_DISPLAY_Y 0 + draw_string(DATE_DISPLAY_X, DATE_DISPLAY_Y, year_str, PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 25, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y, month_str, PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 44, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y, day_str, PIXEL_ON, NORM, 0); + +#define CLOCK_DISPLAY_X 6 +#define CLOCK_DISPLAY_Y 14 + draw_string(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 1); + draw_string(CLOCK_DISPLAY_X + 17, CLOCK_DISPLAY_Y, ":", PIXEL_ON, NORM, 1); + draw_string(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y, min_str, PIXEL_ON, NORM, 1); + if(is_pm){ + draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "pm", PIXEL_ON, NORM, 1); + } else{ + draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "am", PIXEL_ON, NORM, 1); + } + + if(clock_set_mode){ + switch(time_config_idx){ + case 0: // hour + default: + draw_line(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 16, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); + break; + case 1: // minute + draw_line(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); + break; + case 2: // year + draw_line(DATE_DISPLAY_X, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 23, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); + break; + case 3: // month + draw_line(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 43, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); + break; + case 4: //day + draw_line(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 61, DATE_DISPLAY_Y + 9,PIXEL_ON, NORM); + break; + } + } + + draw_encoder(80, 0, true); + draw_layer_section(80, 11, true); + +#define CAPS_DISPLAY_X 86 +#define CAPS_DISPLAY_Y 22 + + if (led_capslock == true) { + draw_rect_filled_soft(CAPS_DISPLAY_X, CAPS_DISPLAY_Y, 5 + (4 * 6), 9, PIXEL_ON, NORM); + draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_ON, NORM, 0); + } + + + send_buffer(); + +} diff --git a/keyboards/handwired/ck4x4/bootloader_defs.h b/keyboards/handwired/ck4x4/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/handwired/ck4x4/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/handwired/ck4x4/chconf.h b/keyboards/handwired/ck4x4/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/handwired/ck4x4/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/ck4x4/ck4x4.c b/keyboards/handwired/ck4x4/ck4x4.c new file mode 100644 index 000000000000..3091ce9c0153 --- /dev/null +++ b/keyboards/handwired/ck4x4/ck4x4.c @@ -0,0 +1 @@ +#include "ck4x4.h" diff --git a/keyboards/handwired/ck4x4/ck4x4.h b/keyboards/handwired/ck4x4/ck4x4.h new file mode 100644 index 000000000000..33c1b8dd9940 --- /dev/null +++ b/keyboards/handwired/ck4x4/ck4x4.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + 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 }, \ +} diff --git a/keyboards/handwired/ck4x4/config.h b/keyboards/handwired/ck4x4/config.h new file mode 100644 index 000000000000..4ee5e8f4a83f --- /dev/null +++ b/keyboards/handwired/ck4x4/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER QMK +#define PRODUCT CK4x4 +#define DESCRIPTION Cannon Keys 4x4 MacroPad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +#define MATRIX_COL_PINS { B7, B8, B9, B10 } +#define MATRIX_ROW_PINS { B3, B4, B5, B6 } +#define DIODE_DIRECTION COL2ROW + +//LEDS A6, RGB B15 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* + * 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 + diff --git a/keyboards/handwired/ck4x4/halconf.h b/keyboards/handwired/ck4x4/halconf.h new file mode 100644 index 000000000000..8b9724b1a30e --- /dev/null +++ b/keyboards/handwired/ck4x4/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/handwired/ck4x4/keymaps/default/keymap.c b/keyboards/handwired/ck4x4/keymaps/default/keymap.c new file mode 100644 index 000000000000..d3717754d89d --- /dev/null +++ b/keyboards/handwired/ck4x4/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2012,2013 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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_7, KC_8, KC_9, KC_MINUS, \ + KC_4, KC_5, KC_6, KC_PLUS, \ + KC_1, KC_2, KC_3, KC_ENTER, \ + RESET, KC_NO, KC_NO, KC_NO \ + ), // test with KC_CAPS, KC_A, RESET +}; + +const uint16_t fn_actions[] = { +}; diff --git a/keyboards/handwired/ck4x4/mcuconf.h b/keyboards/handwired/ck4x4/mcuconf.h new file mode 100644 index 000000000000..faca3defdf0e --- /dev/null +++ b/keyboards/handwired/ck4x4/mcuconf.h @@ -0,0 +1,171 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/ck4x4/readme.md b/keyboards/handwired/ck4x4/readme.md new file mode 100644 index 000000000000..d25a9c4df3e6 --- /dev/null +++ b/keyboards/handwired/ck4x4/readme.md @@ -0,0 +1,3 @@ +# CK4x4 + +Cannon Keys 4x4 Macro Pad diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk new file mode 100644 index 000000000000..7ed9022e656d --- /dev/null +++ b/keyboards/handwired/ck4x4/rules.mk @@ -0,0 +1,49 @@ +# project specific files +# SRC = matrix.c \ +# led.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file + +DEFAULT_FOLDER = handwired/ck4x4 diff --git a/keyboards/zeal60/zeal60_keycodes.h b/keyboards/zeal60/zeal60_keycodes.h index d9abf602b6bb..7114a5efcdde 100644 --- a/keyboards/zeal60/zeal60_keycodes.h +++ b/keyboards/zeal60/zeal60_keycodes.h @@ -41,6 +41,25 @@ enum zeal60_keycodes { MACRO15, }; +enum user_keycodes { + USER00 = 0x5F80, + USER01, + USER02, + USER03, + USER04, + USER05, + USER06, + USER07, + USER08, + USER09, + USER10, + USER11, + USER12, + USER13, + USER14, + USER15, +}; + // Zeal60 specific "action functions" // These are only valid IDs in action_function() // Use FN_TT13, FN_TT23, etc. in keymaps diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 063115acb1ab..94f3c2380dc2 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -41,6 +41,11 @@ ifeq ($(PLATFORM),CHIBIOS) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE + else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F072xB + TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE else TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c endif diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 892e417b7e6e..083eb16ee6b6 100755 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -34,6 +34,8 @@ #define MCU_STM32F303CC #elif defined(EEPROM_EMU_STM32F103xB) #define MCU_STM32F103RB +#elif defined(EEPROM_EMU_STM32F072xB) + #define MCU_STM32F072CB #else #error "not implemented." #endif @@ -42,7 +44,7 @@ #if defined (MCU_STM32F103RB) #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) + #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) || defined(MCU_STM32F072CB) #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte #define FEE_DENSITY_PAGES 4 // How many pages are used #else @@ -51,7 +53,7 @@ #endif #ifndef EEPROM_START_ADDRESS - #if defined (MCU_STM32F103RB) + #if defined (MCU_STM32F103RB) || defined(MCU_STM32F072CB) #define FEE_MCU_FLASH_SIZE 128 // Size in Kb #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) #define FEE_MCU_FLASH_SIZE 512 // Size in Kb diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 164654a15eae..832bf3908fed 100755 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c @@ -22,6 +22,9 @@ #elif defined(EEPROM_EMU_STM32F103xB) #define STM32F103xB #include "stm32f1xx.h" +#elif defined(EEPROM_EMU_STM32F072xB) + #define STM32F072xB + #include "stm32f0xx.h" #else #error "not implemented." #endif @@ -193,7 +196,7 @@ void FLASH_Lock(void) * 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 + * @arg FLASH_FLAG_EOP: FLASH End of Programming flag * @retval None */ void FLASH_ClearFlag(uint32_t FLASH_FLAG) From 9a05c5d7876c81ac0f074366fa1790de31fd44e0 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 13 Feb 2019 08:59:38 -0800 Subject: [PATCH 077/445] [Keyboard] New Keyboard: Doro67 Regular PCB (#5115) * initial commit with edits to vanilla code * Add QMK Configurator support * add an appropriately generated keymap * pins, matrices, and features added in * moved it all to a regular directory. It's called regular as that's what it's called in the group buy. In the future we will have other directories for the other PCBs that are delivered to customers. * forgot caps lock led support * Update keyboards/doro67/regular/keymaps/default/config.h Use the NAME Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/doro67/regular/readme.md Be more explicit Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> --- keyboards/doro67/readme.md | 0 keyboards/doro67/regular/config.h | 31 ++++ keyboards/doro67/regular/info.json | 82 +++++++++++ .../doro67/regular/keymaps/default/config.h | 19 +++ .../doro67/regular/keymaps/default/keymap.c | 134 ++++++++++++++++++ .../doro67/regular/keymaps/default/readme.md | 1 + keyboards/doro67/regular/readme.md | 15 ++ keyboards/doro67/regular/regular.c | 47 ++++++ keyboards/doro67/regular/regular.h | 41 ++++++ keyboards/doro67/regular/rules.mk | 81 +++++++++++ 10 files changed, 451 insertions(+) create mode 100644 keyboards/doro67/readme.md create mode 100644 keyboards/doro67/regular/config.h create mode 100644 keyboards/doro67/regular/info.json create mode 100644 keyboards/doro67/regular/keymaps/default/config.h create mode 100644 keyboards/doro67/regular/keymaps/default/keymap.c create mode 100644 keyboards/doro67/regular/keymaps/default/readme.md create mode 100644 keyboards/doro67/regular/readme.md create mode 100644 keyboards/doro67/regular/regular.c create mode 100644 keyboards/doro67/regular/regular.h create mode 100644 keyboards/doro67/regular/rules.mk diff --git a/keyboards/doro67/readme.md b/keyboards/doro67/readme.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/doro67/regular/config.h b/keyboards/doro67/regular/config.h new file mode 100644 index 000000000000..9ba591cdd94f --- /dev/null +++ b/keyboards/doro67/regular/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 80ultraman +#define PRODUCT doro67 +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } + +#define DIODE_DIRECTION COL2ROW + diff --git a/keyboards/doro67/regular/info.json b/keyboards/doro67/regular/info.json new file mode 100644 index 000000000000..68c9f5dbdf36 --- /dev/null +++ b/keyboards/doro67/regular/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "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":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0, "w":2}, + {"label":"K0E", "x":15, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K11", "x":1.5, "y":1}, + {"label":"K12", "x":2.5, "y":1}, + {"label":"K13", "x":3.5, "y":1}, + {"label":"K14", "x":4.5, "y":1}, + {"label":"K15", "x":5.5, "y":1}, + {"label":"K16", "x":6.5, "y":1}, + {"label":"K17", "x":7.5, "y":1}, + {"label":"K18", "x":8.5, "y":1}, + {"label":"K19", "x":9.5, "y":1}, + {"label":"K1A", "x":10.5, "y":1}, + {"label":"K1B", "x":11.5, "y":1}, + {"label":"K1C", "x":12.5, "y":1}, + {"label":"K1D", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E", "x":15, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2A", "x":10.75, "y":2}, + {"label":"K2B", "x":11.75, "y":2}, + {"label":"K2D", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E", "x":15, "y":2}, + {"label":"K30", "x":0, "y":3, "w":2.25}, + {"label":"K32", "x":2.25, "y":3}, + {"label":"K33", "x":3.25, "y":3}, + {"label":"K34", "x":4.25, "y":3}, + {"label":"K35", "x":5.25, "y":3}, + {"label":"K36", "x":6.25, "y":3}, + {"label":"K37", "x":7.25, "y":3}, + {"label":"K38", "x":8.25, "y":3}, + {"label":"K39", "x":9.25, "y":3}, + {"label":"K3A", "x":10.25, "y":3}, + {"label":"K3B", "x":11.25, "y":3}, + {"label":"K3C", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D", "x":14, "y":3}, + {"label":"K3E", "x":15, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.25}, + {"label":"K41", "x":1.25, "y":4, "w":1.25}, + {"label":"K42", "x":2.5, "y":4, "w":1.25}, + {"label":"K43", "x":3.75, "y":4, "w":6.25}, + {"label":"K49", "x":10, "y":4, "w":1.25}, + {"label":"K4A", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C", "x":13, "y":4}, + {"label":"K4D", "x":14, "y":4}, + {"label":"K4E", "x":15, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/doro67/regular/keymaps/default/config.h b/keyboards/doro67/regular/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/doro67/regular/keymaps/default/keymap.c b/keyboards/doro67/regular/keymaps/default/keymap.c new file mode 100644 index 000000000000..5271d42c15ab --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/keymap.c @@ -0,0 +1,134 @@ +/* Copyright 2019 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 + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( \ + 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_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_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_LSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, \ + KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [2] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [5] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [6] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [7] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [8] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [9] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [10] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [11] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [12] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [13] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [14] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [15] = 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_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/doro67/regular/keymaps/default/readme.md b/keyboards/doro67/regular/keymaps/default/readme.md new file mode 100644 index 000000000000..7443a357f3c8 --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for doro67 diff --git a/keyboards/doro67/regular/readme.md b/keyboards/doro67/regular/readme.md new file mode 100644 index 000000000000..71d27ceb5276 --- /dev/null +++ b/keyboards/doro67/regular/readme.md @@ -0,0 +1,15 @@ +# Regular PCB for the Doro67 + +Regular PCB for the Doro67 having ONLY one layout. This is not the PCB with RGB support. + +Do not flash RGB firmware for this board. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Doro67 Regular PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) + +Make example for this keyboard (after setting up your build environment): + + make doro67/regular: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/doro67/regular/regular.c b/keyboards/doro67/regular/regular.c new file mode 100644 index 000000000000..ad4cc279c3a3 --- /dev/null +++ b/keyboards/doro67/regular/regular.c @@ -0,0 +1,47 @@ +/* Copyright 2019 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 "regular.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 + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(E6); + } else { + writePinLow(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/doro67/regular/regular.h b/keyboards/doro67/regular/regular.h new file mode 100644 index 000000000000..76d606b13a01 --- /dev/null +++ b/keyboards/doro67/regular/regular.h @@ -0,0 +1,41 @@ +/* Copyright 2019 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 . + */ +#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( \ + 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, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K49, K4A, K4C, K4D, K4E \ +) { \ + { 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, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk new file mode 100644 index 000000000000..831bd0e616ae --- /dev/null +++ b/keyboards/doro67/regular/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 = lite # 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 918a52da61f8db245d6389e0ff574f41d4d17ccf Mon Sep 17 00:00:00 2001 From: buhearns <47539568+buhearns@users.noreply.github.com> Date: Wed, 13 Feb 2019 18:16:04 +0100 Subject: [PATCH 078/445] [Keymap] Adding buhearns keymap (#5105) * [Keymap] Adding buhearns keymap * Removing deprecated function with fauxpark's help * Update readme.md * Switching to UNICODE_ENABLE with drashna's help * Update rules.mk * Update config.h * Update config.h Tidying up * Update keymap.c Tidying up * Update readme.md Tidying up * Update rules.mk Tidying up * Removing GESC and adding TILD --- keyboards/planck/keymaps/buhearns/config.h | 15 ++++ keyboards/planck/keymaps/buhearns/keymap.c | 99 +++++++++++++++++++++ keyboards/planck/keymaps/buhearns/readme.md | 20 +++++ keyboards/planck/keymaps/buhearns/rules.mk | 13 +++ 4 files changed, 147 insertions(+) create mode 100644 keyboards/planck/keymaps/buhearns/config.h create mode 100644 keyboards/planck/keymaps/buhearns/keymap.c create mode 100644 keyboards/planck/keymaps/buhearns/readme.md create mode 100644 keyboards/planck/keymaps/buhearns/rules.mk diff --git a/keyboards/planck/keymaps/buhearns/config.h b/keyboards/planck/keymaps/buhearns/config.h new file mode 100644 index 000000000000..b8f3c18430fb --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/config.h @@ -0,0 +1,15 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(MARIO_MUSHROOM) + #define UNICODE_SONG_OSX SONG(COIN_SOUND) + #define UNICODE_SONG_LNX SONG(UNICODE_LINUX) + #define UNICODE_SONG_WIN SONG(UNICODE_WINDOWS) + #define UNICODE_SONG_WINC SONG(UNICODE_WINDOWS) +#endif + +#define ENCODER_RESOLUTION 4 +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 8 +#define MOUSEKEY_TIME_TO_MAX 20 diff --git a/keyboards/planck/keymaps/buhearns/keymap.c b/keyboards/planck/keymaps/buhearns/keymap.c new file mode 100644 index 000000000000..4821ece5713a --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/keymap.c @@ -0,0 +1,99 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum custom_keycodes { + B_UPD = SAFE_RANGE, + B_SSH, + B_SSHK, + B_USR, + B_X11, + B_X12, + B_X13 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = 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, + LT(5,KC_TAB),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(4,KC_BSLS), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT,KC_ENT), + KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[1] = LAYOUT_planck_grid( + KC_TRNS, B_UPD, B_USR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_DEL, + KC_TRNS, B_SSH, B_SSHK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_TRNS, + KC_TRNS, B_X11, B_X12, B_X13, KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_PDOT, KC_PPLS, KC_PMNS +), + +[2] = 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_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLSH, KC_QUOT, KC_MINS, KC_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DQUO, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LT, KC_GT, KC_NO +), + +[3] = LAYOUT_planck_grid( + KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_HOME, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_BTN3, KC_END +), + +[4] = LAYOUT_planck_grid( + KC_TRNS, RESET, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, MU_MOD, MUV_IN, MU_ON, AU_ON, KC_EJCT, + KC_TRNS, EEP_RST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MUV_DE, MU_OFF, AU_OFF, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_MPRV, KC_MNXT, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_VOLD, KC_VOLU, KC_MPLY +), + +[5] = LAYOUT_planck_grid( + UC(0xB0), UC(0xB9), UC(0xB2), UC(0xB3), UC(0xDF), UC(0x20AC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, UC(0xC4), UC(0xD6), UC(0xDC), UC(0xBB), UC(0xAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, UC(0xE4), UC(0xF6), UC(0xFC), UC(0x2022), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_WC +)}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case B_UPD: + if (record->event.pressed) { + SEND_STRING("sudo apt update && sudo apt full-upgrade -yyy" SS_TAP(X_ENTER)); + } + break; + case B_SSH: + if (record->event.pressed) { + SEND_STRING("cd /etc/ssh" SS_TAP(X_ENTER) "sudo shasum ssh_host_*" SS_TAP(X_ENTER) "sudo rm ssh_host_*" SS_TAP(X_ENTER) "sudo dpkg-reconfigure openssh-server" SS_TAP(X_ENTER)); + } + break; + case B_SSHK: + if (record->event.pressed) { + SEND_STRING("ssh-keygen -t ed25519" SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_ENTER)); + } + break; + case B_USR: + if (record->event.pressed) { + SEND_STRING("useradd -m user" SS_TAP(X_ENTER) "usermod -a -G sudo user" SS_TAP(X_ENTER) "chsh -s /bin/bash user" SS_TAP(X_ENTER) "passwd user" SS_TAP(X_ENTER)); + } + break; + case B_X11: + if (record->event.pressed) { + SEND_STRING("sudo x11vnc -storepasswd /etc/x11vnc.pass" SS_TAP(X_ENTER)); + } + break; + case B_X12: + if (record->event.pressed) { + SEND_STRING("sudo nano /lib/systemd/system/x11vnc.service" SS_TAP(X_ENTER) "[Unit]" SS_TAP(X_ENTER) "Description=Start X11VNC" SS_TAP(X_ENTER) "After=multi-user.target" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "[Service]" SS_TAP(X_ENTER) "Type=simple" SS_TAP(X_ENTER) "ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared -localhost -o /var/log/x11vnc.log" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "[Install]" SS_TAP(X_ENTER) "WantedBy=multi-user.target"); + } + break; + case B_X13: + if (record->event.pressed) { + SEND_STRING("sudo systemctl enable x11vnc.service" SS_TAP(X_ENTER)); + } + break; + } + return true; +}; diff --git a/keyboards/planck/keymaps/buhearns/readme.md b/keyboards/planck/keymaps/buhearns/readme.md new file mode 100644 index 000000000000..4dcf4f05dbb6 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/readme.md @@ -0,0 +1,20 @@ +Buhearns Keymap (February 12th, 2019) +===================================== + +Simple QWERTY keymap with german Unicode umlauts, special characters and several Linux commands. Intended to be working with ENGLISH layout. + + +## Buhearns base layer +``` + ,-----------------------------------------------------------------------------------. + | GESC | Q | W | E | R | T | Y | U | I | O | P | BKSP | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M5/TAB| A | S | D | F | G | H | J | K | L | ; |M4/BSL| hold: M5, tap: TAB // hold: M4, tap: Backslash + |------+------+------+------+------+------|------+------+------+------+------+------| + |LSHIFT| Z | X | C | V | B | N | M | , | . | / |ST/ENT| hold: RSHIFT, tap: Enter + |------+------+------+------+------+------+------+------+------+------+------+------| + | CTRL | LGUI | LALT | M3 | M2 | SPACE | M1 | LEFT | DOWN | UP | RIGHT| + `-----------------------------------------------------------------------------------' +``` + +## Other layers are a WIP and being tested (DON'T WAIT FOR UPDATES!) diff --git a/keyboards/planck/keymaps/buhearns/rules.mk b/keyboards/planck/keymaps/buhearns/rules.mk new file mode 100644 index 000000000000..5c11b51a28e9 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/rules.mk @@ -0,0 +1,13 @@ +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = yes # 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 From 8cd6cfcb77b5e90c1ad77486171049c436183175 Mon Sep 17 00:00:00 2001 From: Daniel H Klein Date: Wed, 13 Feb 2019 11:03:10 -0800 Subject: [PATCH 079/445] [Keyboard] Unigo66 beta pcb added, bug fixes for flashing (#5108) * UniGo66 keyboard added * UniGo66 keyboard added * case correction of unigo66 files * create sirius folder * Update keyboards/sirius/unigo66/rules.mk Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/default/config.h Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/config.h Co-Authored-By: danielhklein * debugging * correct keymap to layout * readme * remove common config * suggested changes to config.h * default keymap cleanup * bug fixes * beta user pcb added, flashing fixed * syntax fix * updated info.json * fix spelling * fix readme --- keyboards/sirius/unigo66/README.md | 17 ------- keyboards/sirius/unigo66/config.h | 7 ++- keyboards/sirius/unigo66/info.json | 72 +++++++++++++++++++++++++++++- keyboards/sirius/unigo66/main.c | 9 +--- keyboards/sirius/unigo66/readme.md | 2 +- keyboards/sirius/unigo66/rules.mk | 5 ++- keyboards/sirius/unigo66/unigo66.h | 20 ++++++++- 7 files changed, 98 insertions(+), 34 deletions(-) delete mode 100644 keyboards/sirius/unigo66/README.md diff --git a/keyboards/sirius/unigo66/README.md b/keyboards/sirius/unigo66/README.md deleted file mode 100644 index 78a02ed09e29..000000000000 --- a/keyboards/sirius/unigo66/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# UniGo66 - -![UniGo66](https://i.imgur.com/ZKlcncg.png) - -The UniGo66 is an ergonomic wireless keyboard designed by Sirius and manufactured by ALF Studios. - -Join ALF Studios on [Discord](https://discord.gg/GJ8bdM) - -Make example: - - make sirius/unigo66: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). - -To get the U2U into DFU flashing mode, insert the U2U into the computer and press the button in the red circle shown below - -![U2U](https://i.imgur.com/WKwgDjZ.png) \ No newline at end of file diff --git a/keyboards/sirius/unigo66/config.h b/keyboards/sirius/unigo66/config.h index 883de44a2a3c..e5e45f90572a 100644 --- a/keyboards/sirius/unigo66/config.h +++ b/keyboards/sirius/unigo66/config.h @@ -20,14 +20,13 @@ along with this program. If not, see . #define CUSTOM_MATRIX 2 /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5369 -#define PRODUCT_ID 0x005B -#define DEVICE_VER 0x0814 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1001 +#define DEVICE_VER 0x1901 #define MANUFACTURER Sirius #define PRODUCT UniGo66 #define DESCRIPTION UniGo66 Wireless Split keyboard - /* size of virtual matrix */ #define MATRIX_ROWS 16 #define MATRIX_COLS 16 diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json index f343cc3ead06..956972de34fc 100644 --- a/keyboards/sirius/unigo66/info.json +++ b/keyboards/sirius/unigo66/info.json @@ -76,6 +76,76 @@ {"label":"Space", "x":10.5, "y":5}, {"label":"Space", "x":10.5, "y":6} ] + }, + "LAYOUT_beta_pcb": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"label":"1", "x":1.5, "y":0}, + {"label":"2", "x":2.5, "y":0}, + {"label":"3", "x":3.5, "y":0}, + {"label":"4", "x":4.5, "y":0}, + {"label":"5", "x":5.5, "y":0}, + {"label":"-", "x":6.5, "y":0}, + {"label":"=", "x":9.5, "y":0}, + {"label":"6", "x":10.5, "y":0}, + {"label":"7", "x":11.5, "y":0}, + {"label":"8", "x":12.5, "y":0}, + {"label":"9", "x":13.5, "y":0}, + {"label":"0", "x":14.5, "y":0}, + {"label":"Bspc", "x":15.5, "y":0, "w":1.5}, + {"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":"PgUp", "x":6.5, "y":1, "h":1.5}, + {"label":"[", "x":9.5, "y":1, "h":1.5}, + {"label":"Y", "x":10.5, "y":1}, + {"label":"U", "x":11.5, "y":1}, + {"label":"I", "x":12.5, "y":1}, + {"label":"O", "x":13.5, "y":1}, + {"label":"P", "x":14.5, "y":1}, + {"label":"\\", "x":15.5, "y":1, "w":1.5}, + {"label":"Caps", "x":0, "y":2, "w":1.5}, + {"label":"A", "x":1.5, "y":2}, + {"label":"S", "x":2.5, "y":2}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2}, + {"label":"G", "x":5.5, "y":2}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, + {"label":"H", "x":10.5, "y":2}, + {"label":"J", "x":11.5, "y":2}, + {"label":"K", "x":12.5, "y":2}, + {"label":"L", "x":13.5, "y":2}, + {"label":";", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2, "w":1.5}, + {"label":"Shift", "x":0, "y":3, "w":1.5}, + {"label":"Z", "x":1.5, "y":3}, + {"label":"X", "x":2.5, "y":3}, + {"label":"C", "x":3.5, "y":3}, + {"label":"V", "x":4.5, "y":3}, + {"label":"B", "x":5.5, "y":3}, + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.5}, + {"label":"Ctrl", "x":0.5, "y":4}, + {"label":"Super", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4}, + {"label":"Space", "x":5.5, "y":5, "H":2}, + {"label":"Ins", "x":6.5, "y":5}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"Home", "x":9.5, "y":5}, + {"label":"End", "x":9.5, "y":6}, + {"label":"Space", "x":10.5, "y":5, "H":2} + ] } } -} +} \ No newline at end of file diff --git a/keyboards/sirius/unigo66/main.c b/keyboards/sirius/unigo66/main.c index 4d167d9f7e6c..b4f2a91e49dd 100644 --- a/keyboards/sirius/unigo66/main.c +++ b/keyboards/sirius/unigo66/main.c @@ -78,19 +78,12 @@ int main(void) */ sei(); -/* Some keyboards bootup quickly and cannot be initialized with this startup wait. +/* Some keyboards bootup quickly and cannot be initialized with this startup wait.*/ // wait for startup of sendchar routine while (USB_DeviceState != DEVICE_STATE_Configured) ; if (debug_enable) { _delay_ms(1000); } -*/ - - /* wait for USB startup to get ready for debug output */ - uint8_t timeout = 255; // timeout when USB is not available(Bluetooth) - while (timeout-- && USB_DeviceState != DEVICE_STATE_Configured) { - _delay_ms(4); - } debug("init: done\n"); diff --git a/keyboards/sirius/unigo66/readme.md b/keyboards/sirius/unigo66/readme.md index 78a02ed09e29..1dae0f994969 100644 --- a/keyboards/sirius/unigo66/readme.md +++ b/keyboards/sirius/unigo66/readme.md @@ -14,4 +14,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to To get the U2U into DFU flashing mode, insert the U2U into the computer and press the button in the red circle shown below -![U2U](https://i.imgur.com/WKwgDjZ.png) \ No newline at end of file +![U2U](https://i.imgur.com/WKwgDjZ.png) diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index 7cdb3839ac60..c35487b18c3e 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -15,7 +15,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Build Options # comment out to disable the options. # -# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # 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) @@ -26,4 +26,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) USB_HID_ENABLE = yes CUSTOM_MATRIX = yes -SRC = custom_matrix.cpp +SRC += custom_matrix.cpp\ + main.c diff --git a/keyboards/sirius/unigo66/unigo66.h b/keyboards/sirius/unigo66/unigo66.h index cc7f3faece22..186aa2b633a2 100644 --- a/keyboards/sirius/unigo66/unigo66.h +++ b/keyboards/sirius/unigo66/unigo66.h @@ -120,4 +120,22 @@ along with this program. If not, see . KE1,KC_NO,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,KC_NO, KC_NO,KE5, K52, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ KE0,KE3,KE2,KC_NO,KC_NO, K2C, KC_NO,KC_NO,KC_NO,KE6,KC_NO,KC_NO,KE4, K50,K51,K4F, KC_NO, KC_NO,KC_NO, KC_NO,KC_NO \ ) -#endif + +#define LAYOUT_beta_pcb( \ + K1E, K1F, K30, K2F, K45, K3B, KE6, KE2, K3A, K39, K14, K04, K09, K07, \ + K29, K15, K3C, K3D, K3E, K3F, K58, K50, K2C, K11, K05, K55, K10, K06, \ + K31, K5F, K5E, K61, K2A, K38, K4C, K57, K53, K5B, K5A, K08, \ + K35, K5D, K17, K1B, K1A, K52, K56, K51, K4D, K23, K1C, K13, K2E, K0C, \ + K5C, K0A, K0F, K36, K0E, K37, \ + KE4, K49, K4B, KE0, \ + KE5, KE1\ +) LAYOUT_all( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,K45, KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,KC_NO,KC_NO,KC_NO,K23,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,K2E,KC_NO, K2A, K49,KC_NO,K4B, K53,KC_NO,K55,K56, KC_NO, KC_NO, \ + KC_NO,K14,K1A,K08,K15,K17,K1C,KC_NO,K0C,KC_NO,K13,K2F,K30, K31, K4C,K4D,KC_NO, K5F,KC_NO,K61,K57, KC_NO, KC_NO, \ + K39,K04,KC_NO,K07,K09,K0A,KC_NO,KC_NO,K0E,K0F,KC_NO,KC_NO, KC_NO, KC_NO, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, KC_NO,K1B,K06,KC_NO,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, KC_NO,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KC_NO,KE2,KC_NO,KC_NO,K2C,KC_NO,KC_NO,KC_NO,KE6,KC_NO,KC_NO, KE4, K50,K51,KC_NO, KC_NO, KC_NO,K58, KC_NO, KC_NO \ +) +#endif \ No newline at end of file From 31b75c75fd0408c7ef15d15892a369f8a271e551 Mon Sep 17 00:00:00 2001 From: Frederick Hirsch Date: Thu, 14 Feb 2019 02:51:16 +0100 Subject: [PATCH 080/445] [Keymap] Add fsck keymaps for eco, planck and preonic (#5106) * Add the fsck keymaps for eco, planck and preonic * Review changes for fsck layout --- keyboards/eco/keymaps/fsck/config.h | 19 ++ keyboards/eco/keymaps/fsck/keymap.c | 76 +++++++ keyboards/eco/keymaps/fsck/readme.md | 5 + keyboards/eco/keymaps/fsck/rules.mk | 19 ++ keyboards/planck/keymaps/fsck/config.h | 28 +++ keyboards/planck/keymaps/fsck/keymap.c | 154 ++++++++++++++ keyboards/planck/keymaps/fsck/readme.md | 5 + keyboards/planck/keymaps/fsck/rules.mk | 3 + keyboards/preonic/keymaps/fsck/config.h | 26 +++ keyboards/preonic/keymaps/fsck/keymap.c | 249 +++++++++++++++++++++++ keyboards/preonic/keymaps/fsck/readme.md | 5 + keyboards/preonic/keymaps/fsck/rules.mk | 1 + 12 files changed, 590 insertions(+) create mode 100644 keyboards/eco/keymaps/fsck/config.h create mode 100644 keyboards/eco/keymaps/fsck/keymap.c create mode 100644 keyboards/eco/keymaps/fsck/readme.md create mode 100644 keyboards/eco/keymaps/fsck/rules.mk create mode 100644 keyboards/planck/keymaps/fsck/config.h create mode 100644 keyboards/planck/keymaps/fsck/keymap.c create mode 100644 keyboards/planck/keymaps/fsck/readme.md create mode 100644 keyboards/planck/keymaps/fsck/rules.mk create mode 100644 keyboards/preonic/keymaps/fsck/config.h create mode 100644 keyboards/preonic/keymaps/fsck/keymap.c create mode 100644 keyboards/preonic/keymaps/fsck/readme.md create mode 100644 keyboards/preonic/keymaps/fsck/rules.mk diff --git a/keyboards/eco/keymaps/fsck/config.h b/keyboards/eco/keymaps/fsck/config.h new file mode 100644 index 000000000000..b0a7901b2d6c --- /dev/null +++ b/keyboards/eco/keymaps/fsck/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Frederick Hirsch + * + * 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 USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/eco/keymaps/fsck/keymap.c b/keyboards/eco/keymaps/fsck/keymap.c new file mode 100644 index 000000000000..8d7cb89c1758 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2019 Frederick Hirsch + * + * 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 + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _RAISE 3 + +enum eco_keycodes { + QWERTY = SAFE_RANGE, + RAISE +}; + +#define JC_Z CTL_T(KC_Z) +#define JC_X ALT_T(KC_X) +#define JC_C GUI_T(KC_C) +#define JC_COMM GUI_T(KC_COMM) +#define JC_DOT ALT_T(KC_DOT) +#define JC_SLSH CTL_T(KC_SLSH) + +#define JC_CAPS LT(_RAISE,KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 10 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | Home | PgUp | Y | U | I | O | P | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Raise| A | S | D | F | G | End | PgDn | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | Space | N | M | , | . | / | Shift| + * | | Ctrl | Alt | GUI | | | | GUI | Alt | Ctrl | | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + JC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_END, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, JC_Z, JC_X, JC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, JC_COMM, JC_DOT, JC_SLSH, KC_RSFT +), + + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | | Up | | | | |PrntSc| | | | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | |ScrLck|Pause | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |Insert| + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS +) +}; \ No newline at end of file diff --git a/keyboards/eco/keymaps/fsck/readme.md b/keyboards/eco/keymaps/fsck/readme.md new file mode 100644 index 000000000000..1f3678daf116 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![eco:fsck Layout Image](https://i.imgur.com/Sb8n8B0.png) + +# ECO Layout by fsck + +This is the fsck layout for the eco keyboard. The bottom row of the default layer are dual function tap/hold keys. \ No newline at end of file diff --git a/keyboards/eco/keymaps/fsck/rules.mk b/keyboards/eco/keymaps/fsck/rules.mk new file mode 100644 index 000000000000..8fb2adf38380 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/rules.mk @@ -0,0 +1,19 @@ +# 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 = 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 +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 = 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 diff --git a/keyboards/planck/keymaps/fsck/config.h b/keyboards/planck/keymaps/fsck/config.h new file mode 100644 index 000000000000..bf25da3a6fcc --- /dev/null +++ b/keyboards/planck/keymaps/fsck/config.h @@ -0,0 +1,28 @@ +#pragma once + +#define USB_MAX_POWER_CONSUMPTION 100 + +#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 + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 diff --git a/keyboards/planck/keymaps/fsck/keymap.c b/keyboards/planck/keymaps/fsck/keymap.c new file mode 100644 index 000000000000..cac5d554ec4a --- /dev/null +++ b/keyboards/planck/keymaps/fsck/keymap.c @@ -0,0 +1,154 @@ +/* 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 + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + 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_ESC, 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_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_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_DEL, + 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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* 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 / | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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; + 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; + 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; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + } + return true; +} diff --git a/keyboards/planck/keymaps/fsck/readme.md b/keyboards/planck/keymaps/fsck/readme.md new file mode 100644 index 000000000000..755da3e219c0 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![preonic:fsck Layout Image](https://i.imgur.com/GOLyPGP.png) + +# fsck's Planck Layout + +This is largely based on the default planck layout. \ No newline at end of file diff --git a/keyboards/planck/keymaps/fsck/rules.mk b/keyboards/planck/keymaps/fsck/rules.mk new file mode 100644 index 000000000000..bd0181d620e2 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/rules.mk @@ -0,0 +1,3 @@ +#pragma once +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 \ No newline at end of file diff --git a/keyboards/preonic/keymaps/fsck/config.h b/keyboards/preonic/keymaps/fsck/config.h new file mode 100644 index 000000000000..b06980c5b0d5 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/config.h @@ -0,0 +1,26 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c new file mode 100644 index 000000000000..97a0ed608977 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/keymap.c @@ -0,0 +1,249 @@ +/* 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" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_ESC, 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_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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_VOLD,KC_VOLU,_______, \ + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* 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 / | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* 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_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +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 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + 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_user(uint8_t index, 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) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + 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/preonic/keymaps/fsck/readme.md b/keyboards/preonic/keymaps/fsck/readme.md new file mode 100644 index 000000000000..e459884eb6a9 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![preonic:fsck Layout Image](https://i.imgur.com/nI8fBco.png) + +# fsck's Preonic Layout + +This is based on the fsck layout for the Planck keyboard and similar to the Preonic default layout. \ No newline at end of file diff --git a/keyboards/preonic/keymaps/fsck/rules.mk b/keyboards/preonic/keymaps/fsck/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 64712731495b241dcab29c96c2ccb650a3aa39fd Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 13 Feb 2019 19:49:04 -0800 Subject: [PATCH 081/445] [Keyboard] KBD19x Bootmagic Enable (lite) and other fixes (#5126) * set bootmagic from no to lite and put in a note in the readme * use pragma once * discovered a compile error when testing with default keymap. The inlined led functions need to be externed in the .c file * might as well turn on mouse keys as well --- keyboards/kbdfans/kbd19x/kbd19x.c | 9 +++++++++ keyboards/kbdfans/kbd19x/kbd19x.h | 4 +--- keyboards/kbdfans/kbd19x/readme.md | 2 ++ keyboards/kbdfans/kbd19x/rules.mk | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/keyboards/kbdfans/kbd19x/kbd19x.c b/keyboards/kbdfans/kbd19x/kbd19x.c index 360345600d02..e6cd77d656bf 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.c +++ b/keyboards/kbdfans/kbd19x/kbd19x.c @@ -17,6 +17,15 @@ along with this program. If not, see . #include "kbd19x.h" +extern inline void kbd19x_caps_led_on(void); +extern inline void kbd19x_caps_led_off(void); + +extern inline void kbd19x_sclk_led_on(void); +extern inline void kbd19x_sclk_led_off(void); + +extern inline void kbd19x_nmlk_led_on(void); +extern inline void kbd19x_nmlk_led_off(void); + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up diff --git a/keyboards/kbdfans/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h index 728c7ca5ca8b..73f3cbe16c84 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.h +++ b/keyboards/kbdfans/kbd19x/kbd19x.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KBD19X_H -#define KBD19X_H +#pragma once #include "quantum.h" #include "led.h" @@ -100,4 +99,3 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ } -#endif diff --git a/keyboards/kbdfans/kbd19x/readme.md b/keyboards/kbdfans/kbd19x/readme.md index 80b84b5f75f5..50adfb77f0a1 100644 --- a/keyboards/kbdfans/kbd19x/readme.md +++ b/keyboards/kbdfans/kbd19x/readme.md @@ -8,6 +8,8 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number of layout options. +**Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. + Keyboard Maintainer: [jshuf](https://github.com/jshuf) Hardware Supported: KBD19x PCB Hardware Availability: [KBDfans](https://kbdfans.cn) diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index 8e50962afafb..b7a08f241c86 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -61,8 +61,8 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BOOTMAGIC_ENABLE = lite # 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 From 9841c64de98a0d993e791137d5db482ee96e06ae Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu, 14 Feb 2019 00:08:22 -0500 Subject: [PATCH 082/445] Fix ESC on Default ANSI layer (#5125) --- layouts/community/60_ansi/stanrc85-ansi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index ddda4fcd8a28..d8d79a581c80 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL), [1] = LAYOUT_60_ansi( - 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_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, From 54f18ce0f71efbcb1306cbfe620ed2ad42ee31bc Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 13 Feb 2019 21:11:56 -0800 Subject: [PATCH 083/445] [Keymap] Update to Drashna keymaps and Userspace (#5122) * Proper rules include * Minor tweaks * Minor tweaks * Add Desitny 2 Swapped layout support * Add keycode to keylogger * Convert my viterbi keymaps * Fix Orthodox keyboard * Add more default layers * Make default layer keycodes more optimized * Update gitlab CI yaml file * Rev6 Cleanup * Fix KC_MAKE macro * Update GitLab CI yaml file * More GitLab CI changes * One final GitLab CI change * Optimize KC_MAKE * Reformatting of config * Feature creeeeeeep * Planck Rev6 updates --- keyboards/crkbd/keymaps/drashna/keymap.c | 24 +++ .../keebio/iris/keymaps/drashna/keymap.c | 24 +++ .../keebio/iris/keymaps/drashna/rules.mk | 2 +- .../keebio/viterbi/keymaps/drashna/config.h | 21 +- .../keebio/viterbi/keymaps/drashna/keymap.c | 2 + .../keebio/viterbi/keymaps/drashna/rules.mk | 2 +- .../viterbi/keymaps/drashna_old/config.h | 65 +------ .../viterbi/keymaps/drashna_old/rules.mk | 26 +-- keyboards/orthodox/keymaps/drashna/config.h | 1 + keyboards/orthodox/keymaps/drashna/keymap.c | 120 +++++++----- keyboards/orthodox/keymaps/drashna/rules.mk | 2 +- layouts/community/ergodox/drashna/config.h | 2 - layouts/community/ergodox/drashna/keymap.c | 72 ++++++- .../community/ergodox/drashna_glow/rules.mk | 4 +- layouts/community/ortho_4x12/drashna/config.h | 2 + layouts/community/ortho_4x12/drashna/keymap.c | 182 +++++++++++++----- users/drashna/config.h | 63 +++--- users/drashna/drashna.h | 7 +- users/drashna/process_records.c | 24 +-- users/drashna/process_records.h | 4 + users/drashna/rgb_stuff.c | 8 + users/drashna/wrappers.h | 4 +- 22 files changed, 398 insertions(+), 263 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 678fd33b5757..0a9ff24ff8be 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -58,6 +58,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_crkbd_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_crkbd_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_crkbd_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_crkbd_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index d89656b7ea66..0c3b0d6d443b 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -44,6 +44,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_iris_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_iris_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_iris_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_iris_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index ccc33c06f3d0..e8035176efb5 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -12,6 +12,6 @@ SWAP_HANDS_ENABLE = no INDICATOR_LIGHTS = yes MACROS_ENABLED = no -RGBLIGHT_TWINKLE = yes +RGBLIGHT_TWINKLE = no BOOTLOADER = qmk-dfu diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h index 6eb871a50fa3..c0a50cc04b20 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -17,6 +17,9 @@ along with this program. If not, see . #pragma once +#undef MATRIX_ROWS +#define MATRIX_ROWS 5 + #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM #define RGBLED_NUM 16 @@ -44,15 +47,11 @@ along with this program. If not, see . #undef PRODUCT #define PRODUCT Drashnas Viterbi Macro Pad -#define USE_I2C - #ifdef AUDIO_ENABLE #define C6_AUDIO #define NO_MUSIC_MODE #endif -#define STRICT_LAYER_RELEASE - #define LAYOUT_ortho_5x7( \ L00, L01, L02, L03, L04, L05, L06, \ L10, L11, L12, L13, L14, L15, L16, \ @@ -60,13 +59,13 @@ along with this program. If not, see . L30, L31, L32, L33, L34, L35, L36, \ L40, L41, L42, L43, L44, L45, L46 \ ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) + { \ + { 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 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + } #define QMK_ESC_OUTPUT F5 // usually COL #define QMK_ESC_INPUT D4 // usually ROW diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 12f7fe25ea4f..1afc59fb90d9 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -8,6 +8,8 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. + +// Fillers to make layering more clear #define LMACRO OSL(_MACROS) #define DIABLO TG(_DIABLO) #define GAMEPAD TG(_GAMEPAD) diff --git a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk index ec3befc0b73d..f28ecc5332aa 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk @@ -7,12 +7,12 @@ TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes AUDIO_ENABLE = yes NKRO_ENABLE = yes +SPLIT_KEYBOARD = no NO_SECRETS = yes MACROS_ENABLED = yes INDICATOR_LIGHTS = no RGBLIGHT_TWINKLE = no - LAYOUTS = ortho_5x7 # SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h index ddf9d1a40f43..b36a4edd4f9d 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h @@ -15,72 +15,11 @@ 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 QMK_KEYBOARD_CONFIG_H +#pragma once +#include "../drashna/config.h" #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#endif // RGBLIGHT_ENABLE - - -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#ifndef NO_PRINT -#define NO_PRINT -#endif // !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 - -#undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad - -#define USE_I2C - -#ifdef AUDIO_ENABLE -#define C6_AUDIO -#define NO_MUSIC_MODE -#endif - -#define LAYOUT_ortho_5x7( \ - 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, \ - L40, L41, L42, L43, L44, L45, L46 \ - ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) - #endif - -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW -#define QMK_LED B0 -#define QMK_SPEAKER C6 diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk index 14ac6a6b3c0b..73f37c6c558b 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk @@ -1,28 +1,4 @@ -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 -RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes -NKRO_ENABLE = yes - -NO_SECRETS = yes -MACROS_ENABLED = yes -INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no - -LAYOUTS = ortho_5x7 - -# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) -# SRC := $(filter-out serial.c,$(SRC)) -# SRC := $(filter-out matrix.c,$(SRC)) -# SRC := $(filter-out i2c.c,$(SRC)) -# SRC := $(filter-out split_util.c,$(SRC)) -# SRC += quantum/matrix.c - USER_NAME := drashna SRC += ../drashna/keymap.c -BOOTLOADER = qmk-dfu +include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index eed1cbe89fb4..a2eaf63c3021 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -33,6 +33,7 @@ along with this program. If not, see . #define EE_HANDS /* key combination for magic key command */ +#undef IS_COMMAND #define IS_COMMAND() ( \ get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ ) diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 9373d851dcf8..0f23bd9aa0ca 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -47,53 +47,79 @@ uint8_t last_osm; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT_orthodox_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), - -[_COLEMAK] = LAYOUT_orthodox_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), - -[_DVORAK] = LAYOUT_orthodox_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_orthodox_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), - -[_MODS] = LAYOUT_wrapper(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -[_LOWER] = LAYOUT_wrapper(\ - KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, - KC_F11, _________________LOWER_L2__________________, _______, _______, _______, _______, _________________LOWER_R2__________________, KC_PIPE, - KC_F12, _________________LOWER_L3__________________, _______, _______, _______, _______, _______, _______, _________________LOWER_R3__________________, _______ -), - -[_RAISE] = LAYOUT_wrapper(\ - KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, - _______, _________________RAISE_L2__________________, _______, _______, _______, _______, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________, _______ -), - -[_ADJUST] = LAYOUT_wrapper(\ - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, - VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, - TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY -) + [_QWERTY] = LAYOUT_orthodox_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_orthodox_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_orthodox_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_orthodox_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_orthodox_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_orthodox_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_orthodox_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_orthodox_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + + [_MODS] = LAYOUT_wrapper(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper(\ + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, + KC_F11, _________________LOWER_L2__________________, _______, _______, _______, _______, _________________LOWER_R2__________________, KC_PIPE, + KC_F12, _________________LOWER_L3__________________, _______, _______, _______, _______, _______, _______, _________________LOWER_R3__________________, _______ + ), + + [_RAISE] = LAYOUT_wrapper(\ + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, + _______, _________________RAISE_L2__________________, _______, _______, _______, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________, _______ + ), + + [_ADJUST] = LAYOUT_wrapper(\ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, + TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY + ) + }; void matrix_init_keymap(void) { diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index f870c3a7d654..a826c664a7bf 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk @@ -10,6 +10,6 @@ NKRO_ENABLE = yes INDICATOR_LIGHTS = yes MACROS_ENABLED = no -RGBLIGHT_TWINKLE = yes +RGBLIGHT_TWINKLE = no BOOTLOADER = qmk-dfu diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index fee954d17945..089441e52c2c 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -1,7 +1,5 @@ #pragma once -#include QMK_KEYBOARD_CONFIG_H - #ifdef RGBLIGHT_ENABLE #undef RGBLIGHT_SAT_STEP #define RGBLIGHT_SAT_STEP 12 diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 45860b8740e5..e0100de8f126 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -27,9 +27,9 @@ extern rgb_config_t rgb_matrix_config; #endif extern userspace_config_t userspace_config; -//enum more_custom_keycodes { -// KC_P00 = NEW_SAFE_RANGE -//}; +enum more_custom_keycodes { + KC_SWAP_NUM = NEW_SAFE_RANGE +}; //define layer change stuff for underglow indicator bool skip_leds = false; @@ -166,6 +166,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_ergodox_pretty_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_ergodox_pretty_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + // Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) [_MODS] = LAYOUT_ergodox_pretty_wrapper( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -206,9 +231,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, - KC_O, KC_P, KC_HYPR, MAGIC_TOGGLE_NKRO, - KC_LGUI, KC_NO, - KC_V, KC_SPC, KC_H, KC_PGDN, KC_DEL, KC_ENTER + KC_O, KC_P, MAGIC_TOGGLE_NKRO, LALT(KC_PSCR), + KC_LGUI, KC_HYPR, + KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM ), /* Keymap 3: @@ -280,6 +305,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_1: + if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) { + if (record->event.pressed) { + register_code(KC_2); + } else { + unregister_code(KC_2); + } + return false; + } + break; + case KC_2: + if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) { + if (record->event.pressed) { + register_code(KC_1); + } else { + unregister_code(KC_1); + } + return false; + } + break; + case KC_SWAP_NUM: + if (record->event.pressed) { + userspace_config.swapped_numbers ^= 1; + eeconfig_update_user(userspace_config.raw); + } + } //switch (keycode) { // case KC_P00: // if (!record->event.pressed) { @@ -401,6 +453,14 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; case _WORKMAN: rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break; } } #if 0 diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index c8941391ea14..e152fa01f0d5 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk @@ -1,11 +1,9 @@ USER_NAME := drashna SRC += ../drashna/keymap.c --include $$(LAYOUT_KEYMAP_PATH)/../drashna/rules.mk +-include $(LAYOUT_KEYMAP_PATH)/../drashna/rules.mk 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 0b0110dfa9f0..55862aec36e1 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -60,3 +60,5 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#define TAP_CODE_DELAY 10 diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 5d32189342d9..f5ead81da2ad 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -45,58 +45,81 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), - -[_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), - -[_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), - -[_MODS] = LAYOUT_ortho_4x12_wrapper( - _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -[_LOWER] = LAYOUT_ortho_4x12_wrapper( - KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, - KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, - _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -[_RAISE] = LAYOUT_ortho_4x12_wrapper( - KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, - KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ -), - -[_ADJUST] = LAYOUT_ortho_4x12_wrapper( - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, - VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE -) + [_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + [_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_ortho_4x12_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_ortho_4x12_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_ortho_4x12_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_ortho_4x12_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MODS] = LAYOUT_ortho_4x12_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_ortho_4x12_wrapper( + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, + KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_RAISE] = LAYOUT_ortho_4x12_wrapper( + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, + KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ + ), + + [_ADJUST] = LAYOUT_ortho_4x12_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE + ) }; @@ -183,6 +206,14 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break; case _WORKMAN: rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, true); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, true); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, true); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, true); break; } } } @@ -222,7 +253,7 @@ void matrix_init_keymap(void) { #else //RGB_MATRIX_INIT void matrix_init_keymap(void) { - #ifndef CONVERT_TO_PROTON_C + #if !defined(CONVERT_TO_PROTON_C) && !defined(KEYBOARD_planck) setPinOutput(D5); writePinHigh(D5); @@ -231,3 +262,50 @@ void matrix_init_keymap(void) { #endif } #endif //RGB_MATRIX_INIT + +#ifdef ENCODER_ENABLE +void encoder_update(bool clockwise) { + switch (biton32(layer_state)) { + case _RAISE: + clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); + break; + case _LOWER: + #ifdef RGB_MATRIX_ENABLE + clockwise ? rgb_matrix_step() : rgblight_step_reverse(); + #else + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + #endif + case _ADJUST: + #ifdef AUDIO_CLICKY + clockwise ? clicky_freq_up() : clicky_freq_down(); + #endif + break; + default: + clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP); + } + #ifdef AUDIO_CLICKY + clicky_play(); + #endif +} +#endif // ENCODER_ENABLE + +#ifdef KEYBOARD_planck_rev6 +extern audio_config_t audio_config; + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + audio_config.enable = active; + break; + case 1: + audio_config.clicky_enable = active; + break; + case 2: + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active; + break; + case 3: + userspace_config.nuke_switch = active; + break; + } +} +#endif // KEYBOARD_planck_rev6 diff --git a/users/drashna/config.h b/users/drashna/config.h index 827b1b8acedf..20e58fd0bb54 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -2,43 +2,50 @@ #ifdef AUDIO_ENABLE -#define AUDIO_CLICKY -#define STARTUP_SONG SONG(RICK_ROLL) -#define GOODBYE_SONG SONG(SONIC_RING) -#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND), \ - SONG(OVERWATCH_THEME) \ - } - -#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f -// #ifdef RGBLIGHT_ENABLE -// #define NO_MUSIC_MODE -// #endif //RGBLIGHT_ENABLE/ -#ifndef __arm__ -#undef NOTE_REST -#define NOTE_REST 1.00f -#endif // !__arm__ + #define AUDIO_CLICKY + #define STARTUP_SONG SONG(RICK_ROLL) + #define GOODBYE_SONG SONG(SONIC_RING) + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(OVERWATCH_THEME) \ + } + + #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f + // #ifdef RGBLIGHT_ENABLE + // #define NO_MUSIC_MODE + // #endif //RGBLIGHT_ENABLE/ + #ifndef __arm__ + #undef NOTE_REST + #define NOTE_REST 1.00f + #endif // !__arm__ + +#define UNICODE_SONG_OSX SONG(RICK_ROLL) +#define UNICODE_SONG_LNX SONG(RICK_ROLL) +#define UNICODE_SONG_WIN SONG(RICK_ROLL) +#define UNICODE_SONG_BSD SONG(RICK_ROLL) +#define UNICODE_SONG_WINC SONG(RICK_ROLL) + #endif // !AUDIO_ENABLE #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP -#undef RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHING -#define RGBLIGHT_EFFECT_SNAKE -#define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_SLEEP + #undef RGBLIGHT_ANIMATIONS + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT #endif // RGBLIGHT_ENABLE #ifndef ONESHOT_TAP_TOGGLE -#define ONESHOT_TAP_TOGGLE 2 + #define ONESHOT_TAP_TOGGLE 2 #endif // !ONESHOT_TAP_TOGGLE #ifndef ONESHOT_TIMEOUT -#define ONESHOT_TIMEOUT 3000 + #define ONESHOT_TIMEOUT 3000 #endif// !ONESHOT_TIMEOUT #ifndef QMK_KEYS_PER_SCAN -#define QMK_KEYS_PER_SCAN 4 + #define QMK_KEYS_PER_SCAN 4 #endif // !QMK_KEYS_PER_SCAN @@ -48,18 +55,18 @@ // and when this option isn't enabled, z rapidly followed by x // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT -#undef PERMISSIVE_HOLD +// #define PERMISSIVE_HOLD //#define TAPPING_FORCE_HOLD //#define RETRO_TAPPING #define FORCE_NKRO #ifndef TAPPING_TOGGLE -#define TAPPING_TOGGLE 1 + #define TAPPING_TOGGLE 1 #endif #ifdef TAPPING_TERM -#undef TAPPING_TERM + #undef TAPPING_TERM #endif // TAPPING_TERM #if defined(KEYBOARD_ergodox_ez) #define TAPPING_TERM 185 diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0a3d0f632709..ca55198e3eb1 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -36,7 +36,11 @@ enum userspace_layers { _COLEMAK, _DVORAK, _WORKMAN, - _MODS, + _NORMAN, + _MALTRON, + _EUCALYN, + _CARPLAX, + _MODS, /* layer 8 */ _GAMEPAD, _DIABLO, _MACROS, @@ -76,6 +80,7 @@ typedef union { bool is_overwatch :1; bool nuke_switch :1; uint8_t unicode_mod :4; + bool swapped_numbers :1; }; } userspace_config_t; diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 17d7dc01c52a..73cad92f60e7 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -20,34 +20,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed #ifdef KEYLOGGER_ENABLE #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_iris_rev2) - xprintf("KL: col: %u, row: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed); + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); #else - xprintf("KL: col: %u, row: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); #endif #endif //KEYLOGGER_ENABLE switch (keycode) { - case KC_QWERTY: + case KC_QWERTY ... KC_CARPLAX: if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); + set_single_persistent_default_layer(keycode - KC_QWERTY); } break; - case KC_COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - break; - case KC_DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - break; - case KC_WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); - } - break; - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index 620997addffe..f7f2193ec6b1 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -13,6 +13,10 @@ enum userspace_custom_keycodes { KC_COLEMAK, // Sets default layer to COLEMAK KC_DVORAK, // Sets default layer to DVORAK KC_WORKMAN, // Sets default layer to WORKMAN + KC_NORMAN, // Sets default layer to NORMAN + KC_MALTRON, // Sets default layer to MALTRON + KC_EUCALYN, // Sets default layer to EUCALYN + KC_CARPLAX, // Sets default layer to CARPLAX KC_DIABLO_CLEAR, // Clears all Diablo Timers KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat) KC_SALT, // See drashna.c for details diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 7d00604b4e7f..37076ce99044 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -315,6 +315,14 @@ uint32_t layer_state_set_rgb(uint32_t state) { rgblight_sethsv_noeeprom_springgreen(); break; case _WORKMAN: rgblight_sethsv_noeeprom_goldenrod(); break; + case _NORMAN: + rgblight_sethsv_noeeprom_coral(); break; + case _MALTRON: + rgblight_sethsv_noeeprom_yellow(); break; + case _EUCALYN: + rgblight_sethsv_noeeprom_pink(); break; + case _CARPLAX: + rgblight_sethsv_noeeprom_blue(); break; default: rgblight_sethsv_noeeprom_cyan(); break; } diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index 070a5a0a4a6f..3260c58ae2d2 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -91,11 +91,11 @@ NOTE: These are all the same length. If you do a search/replace #define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B #define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F -#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J KC_G, KC_COMM +#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM #define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L #define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R -#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X +#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X #define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q From ce465c084bfdfb3dbd24414397b2542176da423d Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 14 Feb 2019 07:07:32 -0800 Subject: [PATCH 084/445] Updates to noroadsleft keymap for KC60 (#5127) * NUBS_Z: initial version Create a keycode that is normally Z, but KC_NUBS when tapped while Alt is being held. This removes the possibility of using an Alt+Z shortcut. * NUBS_Z: modification Modify NUBS_Z macro to only use alternate operation if Right Alt is being held, rather than responding to either Alt key. Also add QMK version keycode to System layer, Equals key. * Remove unneeded breaks from process_record_user * Macro refactoring - removed G_RST and G_C10R macros - updated G_BRCH macro - outputs `master` if used while Shift is held down; or my git alias for the current branch otherwise - updated G_FTCH macro - outputs `git pull upstream ` if used with Shift; `git fetch upstream ` otherwise - swapped `modifiers` variable for `get_mods()` function directly for checking modifier state - swapped keymap-level modifier mask macros for QMK-core mod mask macros (thanks vomindoraan #4337) - renamed MODS_RALT_MASK to MOD_MASK_RALT (more consistent with the above change) * Update readme files --- keyboards/kc60/keymaps/noroadsleft/keymap.c | 83 +++++++++--------- keyboards/kc60/keymaps/noroadsleft/readme.md | 2 +- .../kc60/keymaps/noroadsleft/readme_ch1.md | 2 - .../kc60/keymaps/noroadsleft/readme_ch2.md | 2 - .../kc60/keymaps/noroadsleft/readme_ch3.md | 6 +- .../kc60/keymaps/noroadsleft/readme_ch4.md | 4 +- .../kc60/keymaps/noroadsleft/readme_ch5.md | 84 ++++++++++++++----- .../kc60/keymaps/noroadsleft/readme_git.md | 62 +++++++++----- 8 files changed, 147 insertions(+), 98 deletions(-) diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c index f28f2144f0c6..ee1f69e914c5 100644 --- a/keyboards/kc60/keymaps/noroadsleft/keymap.c +++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c @@ -1,4 +1,5 @@ #include QMK_KEYBOARD_H +#include "version.h" #include //#include #include @@ -84,19 +85,19 @@ enum custom_keycodes { Q2_ESC, Q2_GRV, MC_UNDO, - MC_PSTE + MC_PSTE, + NUBS_Z, + VRSN }; -// define 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)) +/******************* +** MODIFIER MASKS ** +*******************/ +#define MOD_MASK_RALT (MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint8_t modifiers = get_mods(); switch(keycode) { // these are our macros! case F_CAPS: @@ -118,60 +119,49 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } }; return false; - break; case T_L3DED: if (record->event.pressed) { SEND_STRING("lavak3DED "); }; return false; - break; case G_PUSH: if (record->event.pressed) { SEND_STRING("git push origin "); }; return false; - break; case G_FTCH: if (record->event.pressed) { - SEND_STRING("git fetch upstream"); + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING("git pull upstream "); + } else { + SEND_STRING("git fetch upstream "); + } }; return false; - break; case G_COMM: if (record->event.pressed) { SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT)); layer_off(_MACROS); }; return false; - break; - case G_RST: - if (record->event.pressed) { - SEND_STRING("git histt -n 10" SS_TAP(X_ENTER) "git reset --soft "); - layer_off(_MACROS); - }; - return false; - break; - case G_C10R: - if (record->event.pressed) { - SEND_STRING("cf/"); - layer_off(_MACROS); - }; - return false; - break; case G_BRCH: if (record->event.pressed) { - SEND_STRING("$(git branch-name)"); + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING("master"); + } else { + SEND_STRING("$(git branch-name)"); + } layer_off(_MACROS); }; return false; - break; case SIGNA: if (record->event.pressed) { SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER)); layer_off(_MACROS); }; return false; - break; case GO_Q2: if (record->event.pressed) { //default_layer_set(_QWERTY); @@ -180,7 +170,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //layer_off(_SYSTEM); }; return false; - break; case Q2_ON: if (record->event.pressed) { SEND_STRING(SS_TAP(X_ENTER)); @@ -188,7 +177,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2_DVORAK); }; return false; - break; case Q2_OFF: if (record->event.pressed) { SEND_STRING(SS_TAP(X_ENTER)); @@ -196,7 +184,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2); }; return false; - break; case Q2_ESC: if (record->event.pressed) { SEND_STRING(SS_TAP(X_ESCAPE)); @@ -204,7 +191,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2); }; return false; - break; case Q2_GRV: if (record->event.pressed) { SEND_STRING(SS_TAP(X_GRAVE)); @@ -213,27 +199,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2_CONSOLE); }; return false; - break; case MC_UNDO: if (record->event.pressed) { - if ( modifiers & MODS_SHIFT_MASK ) { + if ( get_mods() & MOD_MASK_SHIFT ) { SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); } else { SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) ); } }; return false; - break; case MC_PSTE: if (record->event.pressed) { - if ( modifiers & MODS_SHIFT_MASK ) { + if ( get_mods() & MOD_MASK_SHIFT ) { SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); } else { SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) ); } }; return false; - break; + case NUBS_Z: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_RALT ) { + SEND_STRING( SS_TAP(X_NONUS_BSLASH) ); + } else { + SEND_STRING( SS_TAP(X_Z) ); + } + }; + return false; + case VRSN: + if (record->event.pressed) { + SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ); + } + return false; } // switch() return true; }; @@ -252,7 +249,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ FW_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LSFT, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ ), @@ -375,15 +372,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, G_RST, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ - _______, _______, _______, G_C10R, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ + _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ + _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ ), /* System layer */ [_SYSTEM] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, \ + TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \ XXXXXXX, XXXXXXX, TG(_MC), 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, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md index 737fdc06bbed..59fbfd246a4b 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme.md @@ -1,6 +1,6 @@ # @noroadsleft's KC60 keymap -### Last updated: September 2, 2018, 1:03 PM UTC-0700 +### Last updated: February 14, 2019, 3:50 AM UTC-0800 ![](https://i.imgur.com/tzhXQYI.jpg) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md index bee0709f4880..fff80760e5be 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md index 75a4fc524496..142fe302fda8 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md index 80549ba5ce69..ebcb3cca860a 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -18,9 +16,9 @@ These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method. -I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L386), is a [macro](./keymap.c#L175-183) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. +I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L383), is a [macro](./keymap.c#L165-172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. -When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L184-L191) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L192-L199) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L200-L207) that cancels the sending of the message, and undoes the layers. +When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers. I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md index f1b50846d9a1..00e6b781b47f 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md @@ -7,8 +7,6 @@ 4. **Function Layers** 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -44,7 +42,7 @@ Based on the Windows function layer, but removes some functions that are pointle Keycode(s) Sent | Notes :-------------------------------- | :---- -[`Q2_GRV`](./keymap.c#L208-L216) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. +[`Q2_GRV`](./keymap.c#L194-L201) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md index 64102eb88d2a..e5ee7cbdeb83 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. **Other Layers** -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -36,37 +34,79 @@ Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatical ### Macros -[![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0)](./keymap.c#L122-L127) -Inputs: `lavak3DED ` -Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). +#### [T_L3DED](./keymap.c#L122-L126) + +Output: `lavak3DED ` + +Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). +![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0) + +#### [G_PUSH](./keymap.c#L127-L131) + +Output: `git push origin ` -[G_PUSH](./keymap.c#L128-L133) -Inputs: `git push origin ` Everything from here down is related to Git or GitHub. -[G_FTCH](./keymap.c#L134-L139) -Inputs: `git fetch upstream` +#### [G_FTCH](./keymap.c#L132-L141) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | `git pull upstream ` | +| Otherwise | `git fetch upstream ` | + +#### [G_COMM](./keymap.c#L142-L147) + +Output: `git commit -m ""` Left -[G_COMM](./keymap.c#L140-L146) -Inputs: `git commit -m ""` `[Left]` Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer. -[G_RST](./keymap.c#L147-L153) -Inputs: `git histt -n 10`, Enter, `git reset --soft ` -Runs a [git alias](./readme_git.md) that shows my last ten commits, then readies a `git reset --soft`. For when I commit something too soon. Disables the Macro layer when complete. +#### [G_BRCH](./keymap.c#L148-158) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | `master` | +| Otherwise | `$(git branch-name)` | -[G_C10R](./keymap.c#L154-L160) -Inputs: `cf/` -A branch prefix I use for my current work in QMK. Disables the Macro layer when finished. +`$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch. This macro disables the Macro layer when finished. -[G_BRCH](./keymap.c#L161-L167) -Inputs: `$(git branch-name)` -A [git alias](./readme_git.md) that returns the name of the current branch. Disables the Macro layer when finished. +#### [SIGNA](./keymap.c#L159-L164) + +Output: `\- @noroadsleft` Enter -[SIGNA](./keymap.c#L168-L174) -Inputs: `\- @noroadsleft` `[Enter]` Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished. +#### [MC_UNDO](./keymap.c#L202-L210) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | Shift + Command + Z | +| Otherwise | Command + Z | + +An Undo shortcut that turns to Redo if Shift is being held. I'm not sure that part is required to get that behavior, but it works as desired, so I'm not messing with it. + +#### [MC_PSTE](./keymap.c#L211-L219) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | Shift + Command + Option + V | +| Otherwise | Command + V | + +The program I use this in uses Shift + Command + Option + V to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using Shift changes the behavior. + +#### [NUBS_Z](./keymap.c#L220-L228) + +| Condition | Output | +| :-------- | :----- | +| If Right Alt is active | `KC_NUBS` | +| Otherwise | `KC_Z` | + +Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z. + +#### [VRSN](./keymap.c#L229-L233) + +Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like: + + kc60/noroadsleft @ 0.6.240-20-ge91549-dirty ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md index 585d9c8909c8..b81bb9409dc5 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md @@ -4,46 +4,55 @@ ``` [alias] - # change branches + # Change branches co = checkout cob = checkout -b - # sync master - sync = "!f() { if [ $(git branch-name) != "master" ]; then git checkout master; fi; git pull upstream master; git push origin master; }; f" + # Cherry Pick + cp = cherry-pick + + # Check out a Pull Request + cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f" + + # Sync master branch + sync = !git checkout master && git fetch upstream 2> /dev/null && git pull -n upstream master && git push origin master + + # Return the abbreviated SHA-1 of the last three commits, oldest to newest + rl = rev-list -n 3 --abbrev-commit --reverse HEAD + + # Add remote repo (for sending PRs to other forks, or checking out someone else's developments) + ar = "!f() { git remote add $1 https://github.com/$2/qmk_firmware.git; }; f" # Return the last five commits on the branch, in a more compact format - hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset%n %w(100,0,3)%s%d [%an]%n\" --graph --date=iso-local -n 5 - histm = log --pretty=format:\"%C(yellow)%h%Creset %w(100,0,3)%s%d [%an]\" --graph --date=iso-local -n 5 - histt = log --pretty=format:\"%C(yellow)%h%Creset %<(88,trunc)%s [%an]\" --graph --date=iso-local -n 5 - histb = log --reverse --pretty=format:\"- %<(98,trunc)%s [%an]\" --date=iso-local -n 5 + hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset %Cblue[%an%Cgreen% GK%Cblue]%C(yellow)%d%Creset%n %w(100,0,2)%s%n\" --graph --date=iso-local -n 5 + histt = log --pretty=format:\"* %C(yellow)%h%Creset %<(58,trunc)%s %Cblue%>(18,trunc)%an%Cgreen% G?%Creset @ %Cgreen%ad%Creset\" --date=iso-local -n 5 + histb = log --reverse --pretty=format:\"- %Cblue%>(20,trunc)%an %Creset%<(97,trunc)%s\" --date=iso-local -n 5 + + # Follow a file's filename history + follow = log --follow --name-only --pretty=format:\"%C(yellow)commit %H%Creset%d\nAuthor: %an <%ae>\nDate: %ad%n%n %s%n\" --date=iso-local # compact diff df = "diff --compact-summary" + # List all the files changed in a commit + dt = "diff-tree --no-commit-id --name-only -r" + # Short-form status - st = "!git status --short" + st = "!git status --short --untracked-files=no" # Returns the name of the current branch branch-name = "!git rev-parse --abbrev-ref HEAD" + bn = "!git branch-name" # short-form of the above - # short-form of the above - bn = "!git branch-name" + # Compare commit counts between current branch and QMK master + cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. upstream/master\"; git rev-list --left-right --count $(git branch-name)...upstream/master; }; f" - po = "push origin ($(git branch-name))" + # Push to origin repo + po = "push origin $(git branch-name)" # List the stashes sl = "stash list" - # Show the contents of a numbered stash - # Syntax: - # git st-show - st-show = "!f() { git stash show stash@{$1} -p; }; f" - - # Apply a stash, without deleting it from the list of stashes - # Syntax: - # git st-copy - st-copy = "!f() { git stash apply stash@{$1}; }; f" - # Unstage a file unstage = "reset HEAD" @@ -53,4 +62,15 @@ # Compare local master repo to its upstream branch. If anything is returned, local branch has diverged from upstream. cm = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master --compact-summary; }; f" cml = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master; }; f" + + # Delete a branch from local and remote + del-branch = "!f() { git branch -d $1; git push origin :$1; git fetch -p origin; }; f" + + # Rebase with signatures + rbv = rebase --exec 'git commit --amend --no-edit -n -S' -i + + # Force push without overwriting established history + pushf = push --force-with-lease + + ``` From 1e6797b4e7d888f0c0449e3cd577dc83eb4c4525 Mon Sep 17 00:00:00 2001 From: Danilo Vulicevic Date: Thu, 14 Feb 2019 21:09:27 +0100 Subject: [PATCH 085/445] [Keymap] Add my personal userspace and update my keymaps (#5128) * Add billypython userspace and dz60 keymap * Disable Bootmagic in dz60:billypython keymap * Update whitefox:billypython keymap with userspace changes Also remove numpad layer --- keyboards/dz60/keymaps/billypython/config.h | 3 + keyboards/dz60/keymaps/billypython/keymap.c | 46 ++++++ keyboards/dz60/keymaps/billypython/rules.mk | 8 ++ .../whitefox/keymaps/billypython/config.h | 16 +-- .../whitefox/keymaps/billypython/keymap.c | 133 ++---------------- .../whitefox/keymaps/billypython/rules.mk | 9 -- users/billypython/billypython.c | 32 +++++ users/billypython/billypython.h | 34 +++++ users/billypython/config.h | 19 +++ users/billypython/rules.mk | 6 + users/billypython/tap_dance.c | 33 +++++ users/billypython/tap_dance.h | 9 ++ 12 files changed, 202 insertions(+), 146 deletions(-) create mode 100644 keyboards/dz60/keymaps/billypython/config.h create mode 100644 keyboards/dz60/keymaps/billypython/keymap.c create mode 100644 keyboards/dz60/keymaps/billypython/rules.mk create mode 100644 users/billypython/billypython.c create mode 100644 users/billypython/billypython.h create mode 100644 users/billypython/config.h create mode 100644 users/billypython/rules.mk create mode 100644 users/billypython/tap_dance.c create mode 100644 users/billypython/tap_dance.h diff --git a/keyboards/dz60/keymaps/billypython/config.h b/keyboards/dz60/keymaps/billypython/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/dz60/keymaps/billypython/keymap.c b/keyboards/dz60/keymaps/billypython/keymap.c new file mode 100644 index 000000000000..78fc55f6f953 --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "billypython.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + * │LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSC│ ↑ │Del│ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAl│FnL│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = LAYOUT_directional( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + FN_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, RSF_RCT, KC_UP, KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │PgU│ ↑ │PgD│Ply│Prv│Nxt│Clear│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │M← │M↓ │M→ │MW↑│ │Hom│ ← │ ↓ │ → │End│ │ │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + * │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│App│PgU│Ins│ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │ │ │ │ MW↓ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT_directional( \ + _______, 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_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, KC_INS, \ + _______, _______, _______, XXXXXXX, KC_WH_D, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), +}; diff --git a/keyboards/dz60/keymaps/billypython/rules.mk b/keyboards/dz60/keymaps/billypython/rules.mk new file mode 100644 index 000000000000..3326136043fd --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/rules.mk @@ -0,0 +1,8 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes diff --git a/keyboards/whitefox/keymaps/billypython/config.h b/keyboards/whitefox/keymaps/billypython/config.h index 275f8effba79..4b511eb8484f 100644 --- a/keyboards/whitefox/keymaps/billypython/config.h +++ b/keyboards/whitefox/keymaps/billypython/config.h @@ -1,17 +1,3 @@ #pragma once -#define FORCE_NKRO - -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 +#define LAYER_FN diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c index dfc7d6a967f0..79758de80732 100644 --- a/keyboards/whitefox/keymaps/billypython/keymap.c +++ b/keyboards/whitefox/keymaps/billypython/keymap.c @@ -1,95 +1,5 @@ #include QMK_KEYBOARD_H - -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) - -#define FN MO(L_FN) -#define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_FNLK TT(L_FN) - -#define RSF_RCT TD(TD_RSF_RCT) - -#define COMMA UC(0x002C) -#define L_PAREN UC(0x0028) -#define R_PAREN UC(0x0029) -#define EQUALS UC(0x003D) -#define TIMES UC(0x00D7) -#define DIVIDE UC(0x00F7) -#define MINUS UC(0x2212) - -void eeconfig_init_user(void) { - set_unicode_input_mode(UC_LNX); -} - -enum layers { - L_BASE, - L_FN, - L_NUMPAD, -}; - -enum custom_keycodes { - CLEAR = SAFE_RANGE, - NUMPAD, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case CLEAR: - if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - } - return false; - - case NUMPAD: - if (record->event.pressed) { - layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<count == 1 || state->count == 3) { - register_code(mods->kc1); - } else if (state->count == 2) { - unregister_code(mods->kc1); - register_code(mods->kc2); - } - // Prevent tap dance from sending kc1 and kc2 as weak mods - state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); -} - -void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - if (state->count == 1 || state->count > 2) { - unregister_code(mods->kc1); - } - if (state->count >= 2) { - unregister_code(mods->kc2); - } -} - -enum tap_dance { - TD_RSF_RCT, -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), -}; +#include "billypython.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base layer @@ -106,11 +16,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ - 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_DEL, \ - FN_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,RSF_RCT, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \ + 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_DEL, \ + FN_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, RSF_RCT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* Function layer @@ -127,31 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_FN] = LAYOUT_truefox( \ - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ - KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,KC_PGUP,KC_UP, KC_PGDN,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ - _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, _______, _______, TOP, \ - _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ - _______,_______,_______, KC_WH_D, _______,_______, KC_HOME,KC_PGDN,KC_END \ - ), - - /* Numpad layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Num│ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - */ - [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,MINUS, EQUALS, NUMPAD, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,L_PAREN,R_PAREN,_______, _______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,TIMES, KC_PENT, _______, \ - _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, COMMA, KC_PDOT,KC_PSLS,DIVIDE, _______,_______, \ - _______,_______,_______, _______, _______,_______, _______,_______,_______ \ + _______, 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_NLCK, KC_SLCK, KC_PAUS, \ + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, TOP, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ + _______, _______, _______, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), }; diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index 8fbc1f3af489..133c7af542f6 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,15 +1,6 @@ -AUDIO_ENABLE = no BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no -SLEEP_LED_ENABLE = no TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes VISUALIZER_ENABLE = no diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c new file mode 100644 index 000000000000..7bdfe33a43c4 --- /dev/null +++ b/users/billypython/billypython.c @@ -0,0 +1,32 @@ +#include "billypython.h" + +__attribute__((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keymap(keycode, record)) { + return false; + } + + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + + default: + return true; + } +} + +__attribute__((weak)) +uint32_t layer_state_set_keymap(uint32_t state) { + return state; +} + +uint32_t layer_state_set_user(uint32_t state) { + return layer_state_set_keymap(state); +} diff --git a/users/billypython/billypython.h b/users/billypython/billypython.h new file mode 100644 index 000000000000..4a444e978701 --- /dev/null +++ b/users/billypython/billypython.h @@ -0,0 +1,34 @@ +#pragma once + +#include "quantum.h" + +#ifdef TAP_DANCE_ENABLE + #include "tap_dance.h" +#endif + +#ifdef LAYER_FN + #define FN MO(L_FN) + #define FN_CAPS LT(L_FN, KC_CAPS) + #define FN_FNLK TT(L_FN) +#endif + +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) + +enum keycodes_user { + CLEAR = SAFE_RANGE, + + RANGE_KEYMAP, +}; + +enum layers_user { + L_BASE, +#ifdef LAYER_FN + L_FN, +#endif + + L_RANGE_KEYMAP, +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +uint32_t layer_state_set_keymap(uint32_t state); diff --git a/users/billypython/config.h b/users/billypython/config.h new file mode 100644 index 000000000000..705e6c934a0d --- /dev/null +++ b/users/billypython/config.h @@ -0,0 +1,19 @@ +#pragma once + +#define FORCE_NKRO + +#define MAGIC_KEY_BOOTLOADER B + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#define NO_ACTION_FUNCTION +#define NO_ACTION_MACRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 diff --git a/users/billypython/rules.mk b/users/billypython/rules.mk new file mode 100644 index 000000000000..915323b49989 --- /dev/null +++ b/users/billypython/rules.mk @@ -0,0 +1,6 @@ +SRC += billypython.c +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dance.c +endif + +EXTRAFLAGS += -flto diff --git a/users/billypython/tap_dance.c b/users/billypython/tap_dance.c new file mode 100644 index 000000000000..74ae166393fd --- /dev/null +++ b/users/billypython/tap_dance.c @@ -0,0 +1,33 @@ +#include "tap_dance.h" + +#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ + .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ + } + +void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 + if (state->count == 1 || state->count == 3) { + register_code(mods->kc1); + } else if (state->count == 2) { + unregister_code(mods->kc1); + register_code(mods->kc2); + } + // Prevent tap dance from sending kc1 and kc2 as weak mods + state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); +} + +void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + if (state->count == 1 || state->count >= 3) { + unregister_code(mods->kc1); + } + if (state->count >= 2) { + unregister_code(mods->kc2); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), +}; diff --git a/users/billypython/tap_dance.h b/users/billypython/tap_dance.h new file mode 100644 index 000000000000..25819814144d --- /dev/null +++ b/users/billypython/tap_dance.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define RSF_RCT TD(TD_RSF_RCT) + +enum tap_dance { + TD_RSF_RCT, +}; From a08be85780692021943bb11fb716d91994ddb223 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 14 Feb 2019 13:28:14 -0800 Subject: [PATCH 086/445] Add pin initializiation for KBD75 (#5129) So that the LED indicator actually works --- keyboards/kbdfans/kbd75/rev1/rev1.c | 5 +++++ keyboards/kbdfans/kbd75/rev2/rev2.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c index 9ed08602a477..d7d690381716 100644 --- a/keyboards/kbdfans/kbd75/rev1/rev1.c +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -10,3 +10,8 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +void matrix_init_kb(void) { + setPinOutput(B2); + matrix_init_user(); +} diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c index bec65d6a6c30..2168738fa301 100644 --- a/keyboards/kbdfans/kbd75/rev2/rev2.c +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -10,3 +10,8 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +void matrix_init_kb(void) { + setPinOutput(B2); + matrix_init_user(); +} From d5bc7fc1575543eb27cffcc465a8f0c4e11b7de7 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 15 Feb 2019 10:52:58 +0900 Subject: [PATCH 087/445] Add makefile target 'show_build_options' and 'show_all_features' (#5048) * Add makefile target 'show_build_options' and 'show_all_features' Example: ``` $ make planck:default:show_all_features QMK Firmware 0.6.266 Making planck/rev5 with keymap default and target show_all_features PLATFORM = AVR FIRMWARE_FORMAT = hex Build Options: BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = no SLEEP_LED_ENABLE = no NKRO_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no MIDI_ENABLE = no UNICODE_ENABLE = no BLUETOOTH_ENABLE = no AUDIO_ENABLE = yes FAUXCLICKY_ENABLE = HD44780_ENABLE = Other Features: API_SYSEX_ENABLE = no RGB_MATRIX_ENABLE = no ``` * remove duplicate 'SPLIT_KEYBOARD' * add .PHONY, change 'echo' -> '@echo' * update show_options.mk: useing variable BUILD_OPTION_NAMES, HARDWARE_OPTION_NAMES and OTHER_OPTION_NAMES * update show_options.mk: add KEYBOARD,KEYMAP * update show_options.mk: add sorting * update show_options.mk: add show_full_features, add $(origin XXX) * update show_options.mk: Macro names was collected from keyboards/. * update show_options.mk: add some Macro Names --- build_keyboard.mk | 1 + show_options.mk | 136 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 show_options.mk diff --git a/build_keyboard.mk b/build_keyboard.mk index 0239a58b79b4..71ba805236bc 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -371,4 +371,5 @@ all: build check-size build: elf cpfirmware check-size: build +include show_options.mk include $(TMK_PATH)/rules.mk diff --git a/show_options.mk b/show_options.mk new file mode 100644 index 000000000000..e72dd75cfaab --- /dev/null +++ b/show_options.mk @@ -0,0 +1,136 @@ +BUILD_OPTION_NAMES = \ + BOOTMAGIC_ENABLE \ + MOUSEKEY_ENABLE \ + EXTRAKEY_ENABLE \ + CONSOLE_ENABLE \ + COMMAND_ENABLE \ + NKRO_ENABLE \ + TERMINAL_ENABLE \ + CUSTOM_MATRIX \ + CUSTOM_DEBOUNCE \ + SPLIT_KEYBOARD \ + DYNAMIC_KEYMAP_ENABLE \ + USB_HID_ENABLE + +HARDWARE_OPTION_NAMES = \ + SLEEP_LED_ENABLE \ + BACKLIGHT_ENABLE \ + BACKLIGHT_CUSTOM_DRIVER \ + RGBLIGHT_ENABLE \ + RGBLIGHT_CUSTOM_DRIVER \ + RGB_MATRIX_ENABLE \ + SERIAL_LINK_ENABLE \ + CIE1931_CURVE \ + MIDI_ENABLE \ + BLUETOOTH_ENABLE \ + AUDIO_ENABLE \ + FAUXCLICKY_ENABLE \ + HD44780_ENABLE \ + ENCODER_ENABLE \ + LCD_ENABLE \ + LED_BREATHING_TABLE \ + LED_TABLES \ + POINTING_DEVICE_ENABLE \ + VISUALIZER_ENABLE + +OTHER_OPTION_NAMES = \ + UNICODE_ENABLE \ + UCIS_ENABLE \ + UNICODEMAP_ENABLE \ + UNICODE_COMMON \ + API_SYSEX_ENABLE \ + AUTO_SHIFT_ENABLE \ + AUTO_SHIFT_MODIFIERS \ + COMBO_ENABLE \ + KEY_LOCK_ENABLE \ + LEADER_ENABLE \ + PRINTING_ENABLE \ + STENO_ENABLE \ + TAP_DANCE_ENABLE \ + VIRTSER_ENABLE \ + OLED_ENABLE \ + LED_BACK_ENABLE \ + LED_UNDERGLOW_ENABLE \ + LED_ANIMATIONS \ + IOS_DEVICE_ENABLE \ + HELIX ZINC \ + ADAFRUIT_BLE_ENABLE \ + AUTOLOG_ENABLE \ + BREATHING_LED_ENABLE \ + DEBUG_ENABLE \ + ENCODER_ENABLE_CUSTOM \ + FADING_LED_ENABLE \ + GERMAN_ENABLE \ + HAPTIC_ENABLE \ + HHKB_RN42_ENABLE \ + ISSI_ENABLE \ + KEYBOARD_LOCK_ENABLE \ + KEYLOGGER_ENABLE \ + KEYMAP_IN_EEPROM_ENABLE \ + KEYMAP_SECTION_ENABLE \ + LCD_BACKLIGHT_ENABLE \ + LEDMAP_ENABLE \ + LEDMAP_IN_EEPROM_ENABLE \ + MACROS_ENABLED \ + ONEHAND_ENABLE \ + PS2_MOUSE_ENABLE \ + RAW_ENABLE \ + SOFTPWM_LED_ENABLE \ + SWAP_HANDS_ENABLE \ + USB_6KRO_ENABLE \ + WATCHDOG_ENABLE \ + XT_ENABLE \ + ERGOINU \ + NO_USB_STARTUP_CHECK \ + DISABLE_PROMICRO_LEDs \ + MITOSIS_DATAGROK_BOTTOMSPACE \ + MITOSIS_DATAGROK_SLOWUART \ + RGB_MATRIX_KEYPRESSES \ + LED_MIRRORED \ + RGBLIGHT_FULL_POWER \ + Link_Time_Optimization + +define NAME_ECHO + @echo " $1 = $($1) # $(origin $1)" + +endef + +.PHONY: show_build_options0 show_build_options +show_build_options0: + @echo " KEYBOARD = $(KEYBOARD)" + @echo " KEYMAP = $(KEYMAP)" + @echo " MCU = $(MCU)" + @echo " MCU_SERIES = $(MCU_SERIES)" + @echo " PLATFORM = $(PLATFORM)" + @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)" + @echo + @echo "Build Options:" + $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + +show_build_options: show_build_options0 + @echo + @echo "If you want to know more, please try 'show_all_features' or 'show_full_features'" + @echo + +.PHONY: show_all_features +show_all_features: show_build_options0 + @echo + @echo "Hardware Options:" + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) + @echo + @echo "Other Options:" + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) + +.PHONY: show_full_features +show_full_features: show_build_options0 + @echo + @echo "Hardware Options:" + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + @echo + @echo "Other Options:" + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) From 9e4ac6cf29e6b2ce950135c8f877c95f2d1f1d55 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Feb 2019 15:07:13 +1100 Subject: [PATCH 088/445] Migrate fn_actions for default keymaps (#4935) * Migrate fn_actions for default keymaps * Rename the Grave/Escape Shift masks * No need for shift_esc_shift_mask * Change breaks to return false * Right align pointers * Add default case * Separate cases with empty lines --- keyboards/acr60/keymaps/default/keymap.c | 34 ++++----- keyboards/amj40/keymaps/default/keymap.c | 20 +---- .../amj60/keymaps/iso_split_rshift/keymap.c | 14 +--- .../clueboard/card/keymaps/default/keymap.c | 56 ++++++++------ keyboards/do60/keymaps/default/keymap.c | 11 +-- keyboards/do60/keymaps/test/keymap.c | 9 +-- keyboards/ergodone/keymaps/default/keymap.c | 6 +- keyboards/ergodox_ez/keymaps/default/keymap.c | 6 +- .../ergodox_ez/keymaps/default_osx/keymap.c | 6 +- .../ergodox_infinity/keymaps/default/keymap.c | 6 +- keyboards/gh60/keymaps/default/keymap.c | 7 +- .../handwired/dactyl/keymaps/default/keymap.c | 6 +- .../handwired/dactyl/keymaps/dvorak/keymap.c | 6 +- .../gamenum/keymaps/default/keymap.c | 56 +++++++------- .../handwired/kbod/keymaps/default/keymap.c | 37 ++++----- .../space_oddity/keymaps/default/keymap.c | 2 - .../terminus_mini/keymaps/default/keymap.c | 15 +--- .../traveller/keymaps/default/keymap.c | 55 ++++---------- keyboards/kona_classic/keymaps/ansi/keymap.c | 38 ++++------ .../kona_classic/keymaps/ansi_arrows/keymap.c | 38 ++++------ .../keymaps/ansi_arrows_lcap/keymap.c | 38 ++++------ .../kona_classic/keymaps/ansi_split/keymap.c | 38 ++++------ .../keymaps/ansi_split_arrows/keymap.c | 38 ++++------ .../kona_classic/keymaps/default/keymap.c | 38 ++++------ keyboards/kona_classic/keymaps/iso/keymap.c | 38 ++++------ .../kona_classic/keymaps/iso_arrows/keymap.c | 38 ++++------ .../kona_classic/keymaps/iso_split/keymap.c | 38 ++++------ .../keymaps/iso_split_arrows/keymap.c | 38 ++++------ .../mechmini/v2/keymaps/default/keymap.c | 38 ++++------ keyboards/org60/keymaps/default/keymap.c | 11 +-- keyboards/satan/keymaps/colemak/keymap.c | 36 +++++---- keyboards/satan/keymaps/default/keymap.c | 34 ++++----- .../satan/keymaps/iso_split_rshift/keymap.c | 75 +------------------ keyboards/satan/keymaps/poker/keymap.c | 34 ++++----- .../sentraq/s60_x/keymaps/default/keymap.c | 8 +- .../s60_x/keymaps/default_rgb/keymap.c | 8 +- keyboards/sentraq/s60_x/keymaps/iso/keymap.c | 8 +- .../sentraq/s60_x/keymaps/iso_rgb/keymap.c | 8 +- .../vision_division/keymaps/default/keymap.c | 11 +-- keyboards/whitefox/keymaps/default/keymap.c | 6 +- keyboards/xd60/keymaps/default/keymap.c | 9 +-- keyboards/xd60/keymaps/iso/keymap.c | 9 +-- 42 files changed, 373 insertions(+), 654 deletions(-) diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c index a07e0ddc5920..aafc1dfe68fc 100644 --- a/keyboards/acr60/keymaps/default/keymap.c +++ b/keyboards/acr60/keymaps/default/keymap.c @@ -1,6 +1,10 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -13,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * via the function actions code at the bottom. */ LAYOUT( - F(0), 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_NO, KC_BSPC, + SFT_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_NO, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -34,21 +38,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -56,7 +50,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -64,6 +58,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index c81317b84425..406ea8d2563c 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -45,7 +45,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, KC_BSPC,\ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_LOWER, KC_SPC),LT(_RAISE, KC_SPC),LT(_ADJUST, KC_LGUI), KC_RALT, KC_RCTL \ ), /* Function Layer 1 HHKB style @@ -106,24 +106,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - - -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), - [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), - -}; - - - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index b5fd731ddd9b..ca5fa92beb95 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -111,21 +111,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_iso_splitrshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index 687343e1b7ac..0fa1d9d98911 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -1,12 +1,18 @@ #include QMK_KEYBOARD_H +enum custom_keycodes { + SONG_SU = SAFE_RANGE, + SONG_SC, + SONG_GB +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( RGB_TOG, RGB_SAI, RGB_VAI, \ RGB_HUD, RGB_HUI, \ RGB_MOD, RGB_SAD, RGB_VAD, \ BL_STEP, \ - F(0), F(1), F(2) \ + SONG_SU,SONG_SC,SONG_GB \ ) }; @@ -23,28 +29,6 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), - [1] = ACTION_FUNCTION(1), - [2] = ACTION_FUNCTION(2) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch (id) { - case 0: - PLAY_SONG(tone_startup); - break; - case 1: - PLAY_SONG(music_scale); - break; - case 2: - PLAY_SONG(tone_goodbye); - break; - } - } -}; - void matrix_init_user(void) { } @@ -53,7 +37,31 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + switch (keycode) { + case SONG_SU: + if (record->event.pressed) { + PLAY_SONG(tone_startup); + } + + return false; + + case SONG_SC: + if (record->event.pressed) { + PLAY_SONG(music_scale); + } + + return false; + + case SONG_GB: + if (record->event.pressed) { + PLAY_SONG(tone_goodbye); + } + + return false; + + default: + return true; + } } void led_set_user(uint8_t usb_led) { diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c index 7c66f0ac0b1f..75afb7a34098 100644 --- a/keyboards/do60/keymaps/default/keymap.c +++ b/keyboards/do60/keymaps/default/keymap.c @@ -9,7 +9,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, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_SLSH, KC_UP, KC_SLSH, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_TOGG,BL_ON, BL_INC, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, BL_STEP,BL_OFF, BL_DEC, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - }; - // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -44,4 +39,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/do60/keymaps/test/keymap.c b/keyboards/do60/keymaps/test/keymap.c index 6bac713fdafe..f145177b0fb9 100644 --- a/keyboards/do60/keymaps/test/keymap.c +++ b/keyboards/do60/keymaps/test/keymap.c @@ -9,7 +9,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, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, 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_SLSH, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - }; - // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c index cbc180d6a07f..92c140f26a84 100644 --- a/keyboards/ergodone/keymaps/default/keymap.c +++ b/keyboards/ergodone/keymaps/default/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index 5834fa43af76..40d0a1eaf03b 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { diff --git a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c index 038940772ace..864c62a470b3 100644 --- a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -138,10 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c index cbc180d6a07f..92c140f26a84 100644 --- a/keyboards/ergodox_infinity/keymaps/default/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/gh60/keymaps/default/keymap.c b/keyboards/gh60/keymaps/default/keymap.c index f8ca9a35c013..14a71af29973 100644 --- a/keyboards/gh60/keymaps/default/keymap.c +++ b/keyboards/gh60/keymaps/default/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, - KC_LSFT, F(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(0), KC_RSFT, + KC_LSFT, TG(2), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSLS, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* 1: fn */ @@ -33,11 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [1] = ACTION_LAYER_TOGGLE(2), // toggle arrow overlay -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/dactyl/keymaps/default/keymap.c b/keyboards/handwired/dactyl/keymaps/default/keymap.c index c4a638c2a461..db666f43feb1 100644 --- a/keyboards/handwired/dactyl/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/default/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_RALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c index 56762d1b67c2..7c44f78a656b 100644 --- a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), GUI_T(KC_SLSH), KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_RALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c index a18ffc89b91f..7d667cd39003 100644 --- a/keyboards/handwired/gamenum/keymaps/default/keymap.c +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -7,21 +7,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + TO(HDN), KC_SLSH, KC_ASTR, KC_MINS, \ KC_7, KC_8, KC_9, KC_PLUS, \ KC_4, KC_5, KC_6, \ KC_1, KC_2, KC_3, \ KC_0, KC_DOT, KC_ENT \ ), [HDN] = LAYOUT( - KC_FN1, KC_1, KC_2, KC_3, \ + TO(OSY), KC_1, KC_2, KC_3, \ KC_Q, KC_W, KC_E, KC_R, \ KC_A, KC_S, KC_D, \ KC_Z, KC_X, KC_C, \ KC_LSFT, KC_LALT, KC_SPC \ ), [OSY] = LAYOUT( - KC_A, KC_Q, KC_1, KC_FN2, \ + KC_A, KC_Q, KC_1, TO(DEF), \ KC_S, KC_W, KC_2, KC_LALT, \ KC_D, KC_E, KC_3, \ KC_F, KC_R, KC_4, \ @@ -29,36 +29,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_SET(HDN, ON_PRESS), - [1] = ACTION_LAYER_SET(OSY, ON_PRESS), - [2] = ACTION_LAYER_SET(DEF, ON_PRESS), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; -bool process_record_user (uint16_t keycode, keyrecord_t *record) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { - case KC_FN0: - if (record->event.pressed) { - PORTC |= (1 << 6); // PC6 goes high - } - break; - case KC_FN1: - if (record->event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes high - PORTD |= (1<<4); - } - break; - case KC_FN2: - if (record->event.pressed) { - PORTD &= ~(1 << 4); // PC6 goes high - } - break; + case TO(HDN): + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + + return true; + + case TO(OSY): + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + + return true; + + case TO(DEF): + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + + return true; + + default: + return true; } - return true; } diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 063a94b4d2a3..49083820ad2f 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -2,6 +2,11 @@ #define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn))) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE, + ALT_F4 +}; + #define SET_WHETHER(mask, btn1, btn2) \ if (record->event.pressed) { \ if (mask) { \ @@ -24,7 +29,7 @@ if (record->event.pressed) { \ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( /* Base */ - F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + SFT_ESC, KC_1, KC_2, KC_3, ALT_F4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT \ ), LAYOUT( /* Keypad layer */ - TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ + TO(0), KC_1, KC_2, KC_3, ALT_F4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_BTN1, KC_MS_U, KC_BTN2, \ @@ -53,24 +58,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), - [1] = ACTION_FUNCTION(1), -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: + SET_WHETHER(MODS_PRESSED(SHIFT), KC_ESC, KC_GRAVE); + + return false; + + case ALT_F4: + SET_WHETHER(MODS_PRESSED(ALT), KC_4, KC_F4); + return false; -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_mask; - static uint8_t alt_mask; - switch (id) { - case 0: - shift_esc_mask = MODS_PRESSED(SHIFT); - SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE); - break; - case 1: - alt_mask = MODS_PRESSED(ALT); - SET_WHETHER(alt_mask, KC_4, KC_F4); - break; + default: + return true; } } diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index 6e42a2815154..e7836353ecb6 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -38,8 +38,6 @@ enum { #include "dynamic_macro.h" -#define MOUSE_LAYER 2 - // Tap dance actions - double tap for Caps Lock. qk_tap_dance_action_t tap_dance_actions[] = { diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 1c4af5f46a52..556b96c889bb 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -53,17 +53,10 @@ enum custom_macros { R_POINT }; - // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, - [2] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function - [3] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE - }; -#define SPC_LW FUNC(0) -#define ENT_RS FUNC(1) -#define FNC FUNC(2) -#define MSE FUNC(3) +#define SPC_LW LT(_LOWER, KC_SPC) +#define ENT_RS LT(_RAISE, KC_ENT) +#define FNC MO(_FUNCTION) +#define MSE MO(_MOUSE) #define PIPE M(R_PIPE) #define POINT M(R_POINT) diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index f7f08268f0ba..1b1038fd79fd 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ [_QW] = KEYMAP( - F(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, - KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, - CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, + TG(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, + CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_DEL, KC_LGUI, MO(_LW), KC_BSPC, KC_ENTER, KC_SPC, MO(_HI), KC_RGUI, KC_RALT, KC_SLSH, KC_RSFT ), @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = KEYMAP( - F(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , + TG(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO, KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -81,11 +81,11 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_HI] = KEYMAP( - F(_FKEYS), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + TG(_FKEYS),KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END, - KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, F(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT -), + KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT +), /* NAV - mouse & navigation //gui left and right are line home/end, or fore & back in browser @@ -103,7 +103,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_NAV] = KEYMAP( - F(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, + TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT @@ -123,10 +123,10 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_FKEYS] = KEYMAP( - F(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , - F(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, - KC_TRNS, F(RGBLED_TOGGLE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + TG(_FKEYS),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , + TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -145,26 +145,14 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key [_TRNS] = { {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} } }; - -const uint16_t PROGMEM fn_actions[] = { - [_QW] = ACTION_LAYER_ON(_QW,ON_RELEASE), // return to QWERTY layer - [_LW] = ACTION_LAYER_TAP_TOGGLE(_LW), // Turn on LW when holding, or tap 3 times to switch - [_NAV] = ACTION_LAYER_TOGGLE(_NAV), - [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS), - - // Functions - [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE), - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -230,21 +218,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; - - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - } -} - - - void LayerLEDSet(uint8_t layr) { switch (layr) { diff --git a/keyboards/kona_classic/keymaps/ansi/keymap.c b/keyboards/kona_classic/keymaps/ansi/keymap.c index 3d2061e80d67..3eba76d63362 100644 --- a/keyboards/kona_classic/keymaps/ansi/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_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_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, \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c index 6e281f9511f8..43c27c5031f7 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_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_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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c index b74a6c3d709b..47f8d625b397 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_F5, KC_F6, KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_split/keymap.c b/keyboards/kona_classic/keymaps/ansi_split/keymap.c index d60e162f6bad..f3c0dd707a4f 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_split( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_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_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, \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c index 181f2f14cc21..9a6f7421c668 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_split_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_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_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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/default/keymap.c b/keyboards/kona_classic/keymaps/default/keymap.c index 84a2f9cbd73d..74f138d2cc6a 100644 --- a/keyboards/kona_classic/keymaps/default/keymap.c +++ b/keyboards/kona_classic/keymaps/default/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_all( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_F5, KC_F6, MO(_FN), 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_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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso/keymap.c b/keyboards/kona_classic/keymaps/iso/keymap.c index ff9d3dcb8f52..3ce8255e8fc7 100644 --- a/keyboards/kona_classic/keymaps/iso/keymap.c +++ b/keyboards/kona_classic/keymaps/iso/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_ENT, \ 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_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, \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c index 79e52360caeb..44fb94fd9ecf 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_ENT, \ 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_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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_split/keymap.c b/keyboards/kona_classic/keymaps/iso_split/keymap.c index 51d3297736ec..425a4c9808b1 100644 --- a/keyboards/kona_classic/keymaps/iso_split/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_split( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_ENT, \ 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_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, \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c index ea81de4bcc2d..ba74a25124b8 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_split_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_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_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_ENT, \ 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_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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ 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) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/mechmini/v2/keymaps/default/keymap.c b/keyboards/mechmini/v2/keymaps/default/keymap.c index e35f25ee401e..23f61f9184bc 100755 --- a/keyboards/mechmini/v2/keymaps/default/keymap.c +++ b/keyboards/mechmini/v2/keymaps/default/keymap.c @@ -4,11 +4,15 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +enum custom_keycodes { + SFT_ESC +}; + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_split_space( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + SFT_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_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)), @@ -42,10 +46,6 @@ 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)) { @@ -80,21 +80,11 @@ void led_set_user(uint8_t usb_led) { } -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -102,7 +92,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -110,6 +100,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c index ebb377d1dd8b..a15800497742 100644 --- a/keyboards/org60/keymaps/default/keymap.c +++ b/keyboards/org60/keymaps/default/keymap.c @@ -9,7 +9,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, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT ,KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -43,4 +38,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/satan/keymaps/colemak/keymap.c b/keyboards/satan/keymaps/colemak/keymap.c index d81ca08933bc..a772e92c7c33 100644 --- a/keyboards/satan/keymaps/colemak/keymap.c +++ b/keyboards/satan/keymaps/colemak/keymap.c @@ -3,7 +3,7 @@ // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -14,6 +14,10 @@ #define _______ KC_TRNS +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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, \ + SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_BSPC, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ @@ -40,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | RESET| * |-----------------------------------------------------------| * | | | | | | | | | | | |BL-|BL+|BL | - * |--------------------------------------------ΩΩ---------------| + * |-----------------------------------------------------------| * | | | | | | | | | | | | | * |-----------------------------------------------------------| * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | @@ -64,21 +68,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -86,7 +80,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -94,6 +88,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/satan/keymaps/default/keymap.c index 76bb8bfcf1fe..ac15dd55a135 100644 --- a/keyboards/satan/keymaps/default/keymap.c +++ b/keyboards/satan/keymaps/default/keymap.c @@ -1,9 +1,11 @@ #include QMK_KEYBOARD_H - +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -29,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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, \ + SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ @@ -64,21 +66,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -86,7 +78,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -94,6 +86,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index d73a01aea7b8..156515673cee 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -113,36 +113,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_60_iso_split_rshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [2] = ACTION_FUNCTION(RGBLED_TOGGLE), - [3] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -160,49 +135,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO_NONE; }; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - } -} diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index b908e8c4ae1c..e244aced14c2 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -2,7 +2,7 @@ // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -16,6 +16,10 @@ #define _______ KC_TRNS #define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -31,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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, \ + SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -89,21 +93,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -111,7 +105,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -119,6 +113,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/sentraq/s60_x/keymaps/default/keymap.c b/keyboards/sentraq/s60_x/keymaps/default/keymap.c index c730505cdb1c..5ea40bf89f8b 100644 --- a/keyboards/sentraq/s60_x/keymaps/default/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 0: ANSI qwerty */ @@ -25,7 +25,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, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL \ ), /* 1: Fn layer @@ -49,7 +49,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c index fdaa6065bd0f..8f10ad0469a7 100644 --- a/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 0: ANSI qwerty */ @@ -25,7 +25,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, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL \ ), /* 1: Fn layer @@ -51,7 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/keymaps/iso/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c index d10bfcc1365a..aec23f1aee22 100644 --- a/keyboards/sentraq/s60_x/keymaps/iso/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c @@ -10,7 +10,7 @@ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ -│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, NO, \ CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT , \ LSFT, BSLS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, RALT, FN0, APP, RCTL), + LCTL, LGUI, LALT, SPC, RALT, MO(1),APP, RCTL), /* 1: Fn layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -42,7 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c index d76055a82e7b..22651885d95b 100644 --- a/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c @@ -10,7 +10,7 @@ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ -│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ @@ -20,7 +20,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, KC_LBRC, KC_RBRC, KC_NO, \ 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_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_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), /* 1: Fn layer UG = Underglow = RGB Backlighting @@ -44,7 +44,3 @@ BL = Backlighting = In-Switch LED KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 31b1076611a1..314eaff98ee1 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -121,7 +121,7 @@ enum keyboard_macros { #define M_CP_CT M(MACRO_COPY_CUT) -#define M_COPY KC_FN1 +#define M_COPY MACROTAP(MACRO_COPY_CUT) #define SC_UNDO LCTL(KC_Z) #define SC_REDO LCTL(KC_Y) @@ -135,7 +135,7 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_LSFT) #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -305,11 +305,6 @@ void persistent_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), - [1] = ACTION_MACRO_TAP(MACRO_COPY_CUT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -619,4 +614,4 @@ void music_scale_user(void) PLAY_SONG(music_scale); } -#endif /* AUDIO_ENABLE */ \ No newline at end of file +#endif /* AUDIO_ENABLE */ diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index ad66ec103100..61cc4eca0f34 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t 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, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ 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_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,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = LAYOUT( \ 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_TRNS,KC_TRNS,KC_MUTE,\ @@ -45,7 +45,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), }; - -const uint16_t fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index f8b44dc0a73b..868ca632efb7 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -9,7 +9,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, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, 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_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index 2ca2ea807b0a..4ece241efbfb 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -12,7 +12,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, KC_LBRC, KC_RBRC, KC_NO, \ 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_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_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [_FL] = LAYOUT_all( @@ -20,15 +20,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY,KC_PASTE,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_HOME, KC_PGUP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_NO, KC_PGDOWN, KC_NO), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_NO, KC_PGDOWN, KC_NO), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { From 85022f8bb5129f7118b55556c1ce85bc7d721356 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 14 Feb 2019 20:12:37 -0800 Subject: [PATCH 089/445] Fix ARM Audio issues and its EEPROM persistence (#4936) * Don't click if turning audio off On ARM, playing the click when turning off audio causes the audio get stuck and continually play the tone * Fix Audio EEPROM support for ARM * Update touched files to conform to QMK Coding Conventions * Add better check for ARM EEPROM support --- quantum/audio/audio_arm.c | 612 ++++++++++++----------- quantum/process_keycode/process_clicky.c | 26 +- 2 files changed, 322 insertions(+), 316 deletions(-) diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index 989f7a64becd..f24ce4bd0108 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -273,19 +273,24 @@ static const DACConversionGroup dacgrpcfg2 = { .trigger = DAC_TRG(0) }; -void audio_init() -{ - - if (audio_initialized) - return; - - // Check EEPROM - // if (!eeconfig_is_enabled()) - // { - // eeconfig_init(); - // } - // audio_config.raw = eeconfig_read_audio(); +void audio_init() { + + if (audio_initialized) { + return; + } + + // Check EEPROM + #if defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + audio_config.raw = eeconfig_read_audio(); +#else // ARM EEPROM audio_config.enable = true; + #ifdef AUDIO_CLICKY_ON + audio_config.clicky_enable = true; + #endif +#endif // ARM EEPROM /* * Starting DAC1 driver, setting up the output pin as analog as suggested @@ -308,16 +313,15 @@ void audio_init() dacStartConversion(&DACD1, &dacgrpcfg1, (dacsample_t *)dac_buffer, DAC_BUFFER_SIZE); dacStartConversion(&DACD2, &dacgrpcfg2, (dacsample_t *)dac_buffer_2, DAC_BUFFER_SIZE); - audio_initialized = true; + audio_initialized = true; - if (audio_config.enable) { - PLAY_SONG(startup_song); - } + if (audio_config.enable) { + PLAY_SONG(startup_song); + } } -void stop_all_notes() -{ +void stop_all_notes() { dprintf("audio stop all notes"); if (!audio_initialized) { @@ -342,347 +346,347 @@ void stop_all_notes() } } -void stop_note(float freq) -{ - dprintf("audio stop note freq=%d", (int)freq); +void stop_note(float freq) { + dprintf("audio stop note freq=%d", (int)freq); - if (playing_note) { - if (!audio_initialized) { - audio_init(); - } - for (int i = 7; i >= 0; i--) { - if (frequencies[i] == freq) { - frequencies[i] = 0; - volumes[i] = 0; - for (int j = i; (j < 7); j++) { - frequencies[j] = frequencies[j+1]; - frequencies[j+1] = 0; - volumes[j] = volumes[j+1]; - volumes[j+1] = 0; - } - break; - } - } - voices--; - if (voices < 0) - voices = 0; - if (voice_place >= voices) { - voice_place = 0; - } - if (voices == 0) { - STOP_CHANNEL_1(); - STOP_CHANNEL_2(); - gptStopTimer(&GPTD8); - frequency = 0; - frequency_alt = 0; - volume = 0; - playing_note = false; + if (playing_note) { + if (!audio_initialized) { + audio_init(); + } + for (int i = 7; i >= 0; i--) { + if (frequencies[i] == freq) { + frequencies[i] = 0; + volumes[i] = 0; + for (int j = i; (j < 7); j++) { + frequencies[j] = frequencies[j+1]; + frequencies[j+1] = 0; + volumes[j] = volumes[j+1]; + volumes[j+1] = 0; } + break; + } + } + voices--; + if (voices < 0) { + voices = 0; + } + if (voice_place >= voices) { + voice_place = 0; + } + if (voices == 0) { + STOP_CHANNEL_1(); + STOP_CHANNEL_2(); + gptStopTimer(&GPTD8); + frequency = 0; + frequency_alt = 0; + volume = 0; + playing_note = false; } + } } #ifdef VIBRATO_ENABLE -float mod(float a, int b) -{ - float r = fmod(a, b); - return r < 0 ? r + b : r; +float mod(float a, int b) { + float r = fmod(a, b); + return r < 0 ? r + b : r; } float vibrato(float average_freq) { - #ifdef VIBRATO_STRENGTH_ENABLE - float vibrated_freq = average_freq * pow(vibrato_lut[(int)vibrato_counter], vibrato_strength); - #else - float vibrated_freq = average_freq * vibrato_lut[(int)vibrato_counter]; - #endif - vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH); - return vibrated_freq; + #ifdef VIBRATO_STRENGTH_ENABLE + float vibrated_freq = average_freq * pow(vibrato_lut[(int)vibrato_counter], vibrato_strength); + #else + float vibrated_freq = average_freq * vibrato_lut[(int)vibrato_counter]; + #endif + vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH); + return vibrated_freq; } #endif static void gpt_cb8(GPTDriver *gptp) { - float freq; - - if (playing_note) { - if (voices > 0) { - - float freq_alt = 0; - if (voices > 1) { - if (polyphony_rate == 0) { - if (glissando) { - if (frequency_alt != 0 && frequency_alt < frequencies[voices - 2] && frequency_alt < frequencies[voices - 2] * pow(2, -440/frequencies[voices - 2]/12/2)) { - frequency_alt = frequency_alt * pow(2, 440/frequency_alt/12/2); - } else if (frequency_alt != 0 && frequency_alt > frequencies[voices - 2] && frequency_alt > frequencies[voices - 2] * pow(2, 440/frequencies[voices - 2]/12/2)) { - frequency_alt = frequency_alt * pow(2, -440/frequency_alt/12/2); - } else { - frequency_alt = frequencies[voices - 2]; - } - } else { - frequency_alt = frequencies[voices - 2]; - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq_alt = vibrato(frequency_alt); - } else { - freq_alt = frequency_alt; - } - #else - freq_alt = frequency_alt; - #endif - } - - if (envelope_index < 65535) { - envelope_index++; - } - - freq_alt = voice_envelope(freq_alt); - - if (freq_alt < 30.517578125) { - freq_alt = 30.52; - } - - if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) { - UPDATE_CHANNEL_2_FREQ(freq_alt); - } else { - RESTART_CHANNEL_2(); - } - //note_timbre; - } - - if (polyphony_rate > 0) { - if (voices > 1) { - voice_place %= voices; - if (place++ > (frequencies[voice_place] / polyphony_rate)) { - voice_place = (voice_place + 1) % voices; - place = 0.0; - } - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(frequencies[voice_place]); - } else { - freq = frequencies[voice_place]; - } - #else - freq = frequencies[voice_place]; - #endif + float freq; + + if (playing_note) { + if (voices > 0) { + + float freq_alt = 0; + if (voices > 1) { + if (polyphony_rate == 0) { + if (glissando) { + if (frequency_alt != 0 && frequency_alt < frequencies[voices - 2] && frequency_alt < frequencies[voices - 2] * pow(2, -440/frequencies[voices - 2]/12/2)) { + frequency_alt = frequency_alt * pow(2, 440/frequency_alt/12/2); + } else if (frequency_alt != 0 && frequency_alt > frequencies[voices - 2] && frequency_alt > frequencies[voices - 2] * pow(2, 440/frequencies[voices - 2]/12/2)) { + frequency_alt = frequency_alt * pow(2, -440/frequency_alt/12/2); } else { - if (glissando) { - if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { - frequency = frequency * pow(2, 440/frequency/12/2); - } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { - frequency = frequency * pow(2, -440/frequency/12/2); - } else { - frequency = frequencies[voices - 1]; - } - } else { - frequency = frequencies[voices - 1]; - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(frequency); - } else { - freq = frequency; - } - #else - freq = frequency; - #endif + frequency_alt = frequencies[voices - 2]; } + } else { + frequency_alt = frequencies[voices - 2]; + } - if (envelope_index < 65535) { - envelope_index++; - } - - freq = voice_envelope(freq); - - if (freq < 30.517578125) { - freq = 30.52; - } - - - if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { - UPDATE_CHANNEL_1_FREQ(freq); + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq_alt = vibrato(frequency_alt); } else { - RESTART_CHANNEL_1(); + freq_alt = frequency_alt; } - //note_timbre; + #else + freq_alt = frequency_alt; + #endif } - } - if (playing_notes) { - if (note_frequency > 0) { - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(note_frequency); - } else { - freq = note_frequency; - } - #else - freq = note_frequency; - #endif - - if (envelope_index < 65535) { - envelope_index++; - } - freq = voice_envelope(freq); + if (envelope_index < 65535) { + envelope_index++; + } + freq_alt = voice_envelope(freq_alt); - if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { - UPDATE_CHANNEL_1_FREQ(freq); - UPDATE_CHANNEL_2_FREQ(freq); - } - //note_timbre; + if (freq_alt < 30.517578125) { + freq_alt = 30.52; + } + + if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) { + UPDATE_CHANNEL_2_FREQ(freq_alt); } else { - // gptStopTimer(&GPTD6); - // gptStopTimer(&GPTD7); + RESTART_CHANNEL_2(); + } + //note_timbre; + } + + if (polyphony_rate > 0) { + if (voices > 1) { + voice_place %= voices; + if (place++ > (frequencies[voice_place] / polyphony_rate)) { + voice_place = (voice_place + 1) % voices; + place = 0.0; + } } - note_position++; - bool end_of_note = false; - if (GET_CHANNEL_1_FREQ > 0) { - if (!note_resting) - end_of_note = (note_position >= (note_length*8 - 1)); - else - end_of_note = (note_position >= (note_length*8)); + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(frequencies[voice_place]); + } else { + freq = frequencies[voice_place]; + } + #else + freq = frequencies[voice_place]; + #endif + } else { + if (glissando) { + if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { + frequency = frequency * pow(2, 440/frequency/12/2); + } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { + frequency = frequency * pow(2, -440/frequency/12/2); + } else { + frequency = frequencies[voices - 1]; + } } else { - end_of_note = (note_position >= (note_length*8)); + frequency = frequencies[voices - 1]; } - if (end_of_note) { - current_note++; - if (current_note >= notes_count) { - if (notes_repeat) { - current_note = 0; - } else { - STOP_CHANNEL_1(); - STOP_CHANNEL_2(); - // gptStopTimer(&GPTD8); - playing_notes = false; - return; - } - } - if (!note_resting) { - note_resting = true; - current_note--; - if ((*notes_pointer)[current_note][0] == (*notes_pointer)[current_note + 1][0]) { - note_frequency = 0; - note_length = 1; - } else { - note_frequency = (*notes_pointer)[current_note][0]; - note_length = 1; - } - } else { - note_resting = false; - envelope_index = 0; - note_frequency = (*notes_pointer)[current_note][0]; - note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); - } + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(frequency); + } else { + freq = frequency; + } + #else + freq = frequency; + #endif + } - note_position = 0; - } - } + if (envelope_index < 65535) { + envelope_index++; + } - if (!audio_config.enable) { - playing_notes = false; - playing_note = false; - } -} + freq = voice_envelope(freq); -void play_note(float freq, int vol) { + if (freq < 30.517578125) { + freq = 30.52; + } - dprintf("audio play note freq=%d vol=%d", (int)freq, vol); - if (!audio_initialized) { - audio_init(); + if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { + UPDATE_CHANNEL_1_FREQ(freq); + } else { + RESTART_CHANNEL_1(); + } + //note_timbre; } + } - if (audio_config.enable && voices < 8) { + if (playing_notes) { + if (note_frequency > 0) { + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(note_frequency); + } else { + freq = note_frequency; + } + #else + freq = note_frequency; + #endif + if (envelope_index < 65535) { + envelope_index++; + } + freq = voice_envelope(freq); - // Cancel notes if notes are playing - if (playing_notes) - stop_all_notes(); - playing_note = true; + if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { + UPDATE_CHANNEL_1_FREQ(freq); + UPDATE_CHANNEL_2_FREQ(freq); + } + //note_timbre; + } else { + // gptStopTimer(&GPTD6); + // gptStopTimer(&GPTD7); + } - envelope_index = 0; + note_position++; + bool end_of_note = false; + if (GET_CHANNEL_1_FREQ > 0) { + if (!note_resting) + end_of_note = (note_position >= (note_length*8 - 1)); + else + end_of_note = (note_position >= (note_length*8)); + } else { + end_of_note = (note_position >= (note_length*8)); + } - if (freq > 0) { - frequencies[voices] = freq; - volumes[voices] = vol; - voices++; + if (end_of_note) { + current_note++; + if (current_note >= notes_count) { + if (notes_repeat) { + current_note = 0; + } else { + STOP_CHANNEL_1(); + STOP_CHANNEL_2(); + // gptStopTimer(&GPTD8); + playing_notes = false; + return; + } + } + if (!note_resting) { + note_resting = true; + current_note--; + if ((*notes_pointer)[current_note][0] == (*notes_pointer)[current_note + 1][0]) { + note_frequency = 0; + note_length = 1; + } else { + note_frequency = (*notes_pointer)[current_note][0]; + note_length = 1; } + } else { + note_resting = false; + envelope_index = 0; + note_frequency = (*notes_pointer)[current_note][0]; + note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); + } - gptStart(&GPTD8, &gpt8cfg1); - gptStartContinuous(&GPTD8, 2U); - RESTART_CHANNEL_1(); - RESTART_CHANNEL_2(); + note_position = 0; } + } + if (!audio_config.enable) { + playing_notes = false; + playing_note = false; + } } -void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat) -{ +void play_note(float freq, int vol) { - if (!audio_initialized) { - audio_init(); + dprintf("audio play note freq=%d vol=%d", (int)freq, vol); + + if (!audio_initialized) { + audio_init(); + } + + if (audio_config.enable && voices < 8) { + + // Cancel notes if notes are playing + if (playing_notes) { + stop_all_notes(); } - if (audio_config.enable) { + playing_note = true; - // Cancel note if a note is playing - if (playing_note) - stop_all_notes(); + envelope_index = 0; - playing_notes = true; + if (freq > 0) { + frequencies[voices] = freq; + volumes[voices] = vol; + voices++; + } - notes_pointer = np; - notes_count = n_count; - notes_repeat = n_repeat; + gptStart(&GPTD8, &gpt8cfg1); + gptStartContinuous(&GPTD8, 2U); + RESTART_CHANNEL_1(); + RESTART_CHANNEL_2(); + } - place = 0; - current_note = 0; +} - note_frequency = (*notes_pointer)[current_note][0]; - note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); - note_position = 0; +void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat) { - gptStart(&GPTD8, &gpt8cfg1); - gptStartContinuous(&GPTD8, 2U); - RESTART_CHANNEL_1(); - RESTART_CHANNEL_2(); + if (!audio_initialized) { + audio_init(); + } + + if (audio_config.enable) { + + // Cancel note if a note is playing + if (playing_note) { + stop_all_notes(); } + playing_notes = true; + + notes_pointer = np; + notes_count = n_count; + notes_repeat = n_repeat; + + place = 0; + current_note = 0; + + note_frequency = (*notes_pointer)[current_note][0]; + note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); + note_position = 0; + + gptStart(&GPTD8, &gpt8cfg1); + gptStartContinuous(&GPTD8, 2U); + RESTART_CHANNEL_1(); + RESTART_CHANNEL_2(); + } } bool is_playing_notes(void) { - return playing_notes; + return playing_notes; } bool is_audio_on(void) { - return (audio_config.enable != 0); + return (audio_config.enable != 0); } void audio_toggle(void) { - audio_config.enable ^= 1; - eeconfig_update_audio(audio_config.raw); - if (audio_config.enable) - audio_on_user(); + audio_config.enable ^= 1; + eeconfig_update_audio(audio_config.raw); + if (audio_config.enable) { + audio_on_user(); + } } void audio_on(void) { - audio_config.enable = 1; - eeconfig_update_audio(audio_config.raw); - audio_on_user(); + audio_config.enable = 1; + eeconfig_update_audio(audio_config.raw); + audio_on_user(); } void audio_off(void) { - audio_config.enable = 0; - eeconfig_update_audio(audio_config.raw); + stop_all_notes(); + audio_config.enable = 0; + eeconfig_update_audio(audio_config.raw); } #ifdef VIBRATO_ENABLE @@ -690,29 +694,29 @@ void audio_off(void) { // Vibrato rate functions void set_vibrato_rate(float rate) { - vibrato_rate = rate; + vibrato_rate = rate; } void increase_vibrato_rate(float change) { - vibrato_rate *= change; + vibrato_rate *= change; } void decrease_vibrato_rate(float change) { - vibrato_rate /= change; + vibrato_rate /= change; } #ifdef VIBRATO_STRENGTH_ENABLE void set_vibrato_strength(float strength) { - vibrato_strength = strength; + vibrato_strength = strength; } void increase_vibrato_strength(float change) { - vibrato_strength *= change; + vibrato_strength *= change; } void decrease_vibrato_strength(float change) { - vibrato_strength /= change; + vibrato_strength /= change; } #endif /* VIBRATO_STRENGTH_ENABLE */ @@ -722,45 +726,45 @@ void decrease_vibrato_strength(float change) { // Polyphony functions void set_polyphony_rate(float rate) { - polyphony_rate = rate; + polyphony_rate = rate; } void enable_polyphony() { - polyphony_rate = 5; + polyphony_rate = 5; } void disable_polyphony() { - polyphony_rate = 0; + polyphony_rate = 0; } void increase_polyphony_rate(float change) { - polyphony_rate *= change; + polyphony_rate *= change; } void decrease_polyphony_rate(float change) { - polyphony_rate /= change; + polyphony_rate /= change; } // Timbre function void set_timbre(float timbre) { - note_timbre = timbre; + note_timbre = timbre; } // Tempo functions void set_tempo(uint8_t tempo) { - note_tempo = tempo; + note_tempo = tempo; } void decrease_tempo(uint8_t tempo_change) { - note_tempo += tempo_change; + note_tempo += tempo_change; } void increase_tempo(uint8_t tempo_change) { - if (note_tempo - tempo_change < 10) { - note_tempo = 10; - } else { - note_tempo -= tempo_change; - } + if (note_tempo - tempo_change < 10) { + note_tempo = 10; + } else { + note_tempo -= tempo_change; + } } diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index 8238c263f91d..34c3f620b98a 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c @@ -32,7 +32,7 @@ extern bool midi_activated; void clicky_play(void) { #ifndef NO_MUSIC_MODE - if (music_activated || midi_activated) return; + if (music_activated || midi_activated || audio_config.enable) return; #endif // !NO_MUSIC_MODE clicky_song[0][0] = 2.0f * clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); clicky_song[1][0] = clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); @@ -73,27 +73,29 @@ void clicky_off(void) { } bool is_clicky_on(void) { - return (audio_config.clicky_enable != 0); + return (audio_config.clicky_enable != 0); } bool process_clicky(uint16_t keycode, keyrecord_t *record) { - if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_toggle(); } + if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_toggle(); } - if (keycode == CLICKY_ENABLE && record->event.pressed) { clicky_on(); } - if (keycode == CLICKY_DISABLE && record->event.pressed) { clicky_off(); } + if (keycode == CLICKY_ENABLE && record->event.pressed) { clicky_on(); } + if (keycode == CLICKY_DISABLE && record->event.pressed) { clicky_off(); } - if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq_reset(); } + if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq_reset(); } - if (keycode == CLICKY_UP && record->event.pressed) { clicky_freq_up(); } - if (keycode == CLICKY_DOWN && record->event.pressed) { clicky_freq_down(); } + if (keycode == CLICKY_UP && record->event.pressed) { clicky_freq_up(); } + if (keycode == CLICKY_DOWN && record->event.pressed) { clicky_freq_down(); } - if ( audio_config.clicky_enable ) { - if (record->event.pressed) { - clicky_play();; + if (audio_config.enable && audio_config.clicky_enable) { + if (record->event.pressed) { // Leave this separate so it's easier to add upstroke sound + if (keycode != AU_OFF && keycode != AU_TOG) { // DO NOT PLAY if audio will be disabled, and causes issuse on ARM + clicky_play(); } } - return true; + } + return true; } #endif //AUDIO_CLICKY From 40e67a3074293bc8e96574e7d603a943d3ca8d38 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 15 Feb 2019 04:14:26 +0000 Subject: [PATCH 090/445] Add a mechanism for force building a particular community layout (#5027) * Add a mechanism for force building a particular community layout * Add docs for FORCE_LAYOUT argument * Update output name when FORCE_LAYOUT is enabled --- build_keyboard.mk | 4 ++++ build_layout.mk | 9 +++++++++ docs/feature_layouts.md | 29 +++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/build_keyboard.mk b/build_keyboard.mk index 71ba805236bc..ee6a69fc79de 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -135,6 +135,10 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) OPT_DEFS += -DCONVERT_TO_PROTON_C endif +ifneq ($(FORCE_LAYOUT),) + TARGET := $(TARGET)_$(FORCE_LAYOUT) +endif + include quantum/mcu_selection.mk ifdef MCU_FAMILY diff --git a/build_layout.mk b/build_layout.mk index beb1cb66278a..6e9f97dae211 100644 --- a/build_layout.mk +++ b/build_layout.mk @@ -15,4 +15,13 @@ define SEARCH_LAYOUTS $$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO))) endef +ifneq ($(FORCE_LAYOUT),) + ifneq (,$(findstring $(FORCE_LAYOUT),$(LAYOUTS))) + $(info Forcing layout: $(FORCE_LAYOUT)) + LAYOUTS := $(FORCE_LAYOUT) + else + $(error Forced layout does not exist) + endif +endif + $(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) \ No newline at end of file diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index 1ee8b5e35c6e..b34fd442d5c2 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -51,6 +51,35 @@ The folder name must be added to the keyboard's `rules.mk`: but the `LAYOUT_` variable must be defined in `.h` as well. +## Building a Keymap + +You should be able to build the keyboard keymap with a command in this format: + + make : + +### Conflicting layouts +When a keyboard supports multiple layout options, + + LAYOUTS = ortho_4x4 ortho_4x12 + +And a layout exists for both options, +``` +layouts/ ++ community/ +| + ortho_4x4/ +| | + / +| | | + ... +| + ortho_4x12/ +| | + / +| | | + ... +| + ... +``` + +The FORCE_LAYOUT argument can be used to specify which layout to build + + make : FORCE_LAYOUT=ortho_4x4 + make : FORCE_LAYOUT=ortho_4x12 + ## Tips for Making Layouts Keyboard-Agnostic ### Includes From cc5c6b449a4a36fc56fa5896b2b8f120e4bb0b31 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 14 Feb 2019 20:18:54 -0800 Subject: [PATCH 091/445] Add kb and user level keyboard initialization functions (#3113) * Add suspend functions * Disable RGB code if it's disabled * Add keyboard_init functions * Change where references so it will compile * Wrong command chained in wake up kb function * Fix non-feature file changes * Add documentation * Re-add matrix init docs * add rgblight code to example * Remove suspend code * Clean up docs * Fix docs * Fix suspend code * more doc fixes * change function to startup_* rather than keyboard_init_ * fix spelling error * fix up docs to finish removing keyboard_init * Use Pre and Post init functions * Update Documenation * Remove changes to my keymap and userspace code * Cleanup * Revert changes to extra files * Forgot a semicolon * Make sure all protocols call keyboard_setup * Cleanup functions * Unset startup_user * Remove changes from division keyboard * Readd startup_user function * Remove all to startup_user * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Add suggestion line * Rebase fixes * Update documentation to be more useful/accurate * Cleanup of documentation * Fix spacing inconsistency * Revert unexpected change to keymap --- docs/custom_quantum_functions.md | 68 ++++++++++++++++++++++++++---- tmk_core/common/avr/suspend.c | 28 ++++++------ tmk_core/common/keyboard.c | 36 ++++++++++++++++ tmk_core/common/keyboard.h | 5 +++ tmk_core/protocol/bluefruit/main.c | 15 ++++--- tmk_core/protocol/chibios/main.c | 2 + tmk_core/protocol/vusb/main.c | 1 + 7 files changed, 126 insertions(+), 29 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index d44786e2d512..cc84e141f928 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -165,18 +165,35 @@ In addition, it is possible to specify the brightness level of all LEDs with `er Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). -# Matrix Initialization Code +# Keyboard Initialization Code -Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LEDs or i²c controllers you will need to set up that hardware before it can be used. +There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use. +These are the three main initialization functions, listed in the order that they're called. -### Example `matrix_init_user()` Implementation +* `keyboard_pre_init_*` - Happens before most anything is started. Good for hardware setup that you want running very early. +* `matrix_init_*` - Happens midway through the firmware's startup process. Hardware is initialized, but features may not be yet. +* `keyboard_post_init_*` - Happens at the end of the firmware's startup process. This is where you'd want to put "customization" code, for the most part. + +!> For most people, the `keyboard_post_init_user` function is what you want to call. For instance, this is where you want to set up things for RGB Underglow. + +## Keyboard Pre Initialization code + +This runs very early during startup, even before the USB has been started. + +Shortly after this, the matrix is initialized. + +For most users, this shouldn't be used, as it's primarily for hardware oriented initialization. + +However, if you have hardware stuff that you need initialized, this is the best place for it (such as initializing LED pins). + +### Example `keyboard_pre_init_user()` Implementation This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. ```c -void matrix_init_user(void) { - // Call the keymap level matrix init. +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. // Set our LED pins as output DDRB |= (1<<1); @@ -185,11 +202,47 @@ void matrix_init_user(void) { } ``` +### `keyboard_pre_init_*` Function Documentation + +* Keyboard/Revision: `void keyboard_pre_init_kb(void)` +* Keymap: `void keyboard_pre_init_user(void)` + +## Matrix Initialization Code + +This is called when the matrix is initialized, and after some of the hardware has been set up, but before many of the features have been initialized. + +This is useful for setting up stuff that you may need elsewhere, but isn't hardware related nor is dependant on where it's started. + + ### `matrix_init_*` Function Documentation * Keyboard/Revision: `void matrix_init_kb(void)` * Keymap: `void matrix_init_user(void)` + +## Keyboard Post Initialization code + +This is ran as the very last task in the keyboard initialization process. This is useful if you want to make changes to certain features, as they should be initialized by this point. + + +### Example `keyboard_post_init_user()` Implementation + +This example, running after everything else has initialized, sets up the rgb underglow configuration. + +```c +void keyboard_post_init_user(void) { + // Call the post init code. + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_sethsv_noeeprom(180, 255, 255): // sets the color to teal/cyan without saving + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving +} +``` + +### `keyboard_post_init_*` Function Documentation + +* Keyboard/Revision: `void keyboard_post_init_kb(void)` +* Keymap: `void keyboard_post_init_user(void)` + # Matrix Scanning Code Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second. @@ -229,10 +282,9 @@ void suspend_wakeup_init_user(void) { rgb_matrix_set_suspend_state(false); } - ``` -### `keyboard_init_*` Function Documentation +### Keyboard suspend/wake Function Documentation * Keyboard/Revision: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)` * Keymap: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)` @@ -285,7 +337,7 @@ Keep in mind that EEPROM has a limited number of writes. While this is very high * If you don't understand the example, then you may want to avoid using this feature, as it is rather complicated. -### Example Implementation +### Example Implementation This is an example of how to add settings, and read and write it. We're using the user keymap for the example here. This is a complex function, and has a lot going on. In fact, it uses a lot of the above functions to work! diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 1194a040ee77..b29447ac4e20 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -142,20 +142,20 @@ static void power_down(uint8_t wdto) { #endif suspend_power_down_kb(); - // TODO: more power saving - // See PicoPower application note - // - I/O port input with pullup - // - prescale clock - // - BOD disable - // - Power Reduction Register PRR - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sei(); - sleep_cpu(); - sleep_disable(); - - // Disable watchdog after sleep - wdt_disable(); + // TODO: more power saving + // See PicoPower application note + // - I/O port input with pullup + // - prescale clock + // - BOD disable + // - Power Reduction Register PRR + set_sleep_mode(SLEEP_MODE_PWR_DOWN); + sleep_enable(); + sei(); + sleep_cpu(); + sleep_disable(); + + // Disable watchdog after sleep + wdt_disable(); } #endif diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 6f659b2440a9..15652276b83c 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -139,6 +139,40 @@ __attribute__ ((weak)) void matrix_setup(void) { } +/** \brief keyboard_pre_init_user + * + * FIXME: needs doc + */ +__attribute__ ((weak)) +void keyboard_pre_init_user(void) { } + +/** \brief keyboard_pre_init_kb + * + * FIXME: needs doc + */ +__attribute__ ((weak)) +void keyboard_pre_init_kb(void) { + keyboard_pre_init_user(); +} + +/** \brief keyboard_post_init_user + * + * FIXME: needs doc + */ + +__attribute__ ((weak)) +void keyboard_post_init_user() {} + +/** \brief keyboard_post_init_kb + * + * FIXME: needs doc + */ + +__attribute__ ((weak)) +void keyboard_post_init_kb(void) { + keyboard_post_init_user(); +} + /** \brief keyboard_setup * * FIXME: needs doc @@ -146,6 +180,7 @@ void matrix_setup(void) { void keyboard_setup(void) { disable_jtag(); matrix_setup(); + keyboard_pre_init_kb(); } /** \brief is_keyboard_master @@ -199,6 +234,7 @@ void keyboard_init(void) { #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) keymap_config.nkro = 1; #endif + keyboard_post_init_kb(); /* Always keep this last */ } /** \brief Keyboard task: Do keyboard routine jobs diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index ea2f336e9dc5..bf8b71fb78f7 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h @@ -70,6 +70,11 @@ void keyboard_set_leds(uint8_t leds); /* it runs whenever code has to behave differently on a slave */ bool is_keyboard_master(void); +void keyboard_pre_init_kb(void); +void keyboard_pre_init_user(void); +void keyboard_post_init_kb(void); +void keyboard_post_init_user(void); + #ifdef __cplusplus } #endif diff --git a/tmk_core/protocol/bluefruit/main.c b/tmk_core/protocol/bluefruit/main.c index 0dbb637e2cfd..8a6386b4ebaa 100644 --- a/tmk_core/protocol/bluefruit/main.c +++ b/tmk_core/protocol/bluefruit/main.c @@ -42,13 +42,13 @@ along with this program. If not, see . int main(void) -{ +{ CPU_PRESCALE(0); // DDRD = _BV(PD5); // DDRB = _BV(PB0); - + // PORTD = _BV(PD5); // PORTB = _BV(PB0); @@ -59,22 +59,23 @@ int main(void) // while (!usb_configured()) /* wait */ + keyboard_setup(); dprintf("Initializing keyboard...\n"); keyboard_init(); - + // This implementation is pretty simplistic... if the USB connection // is not configured, choose the Bluefruit, otherwise use USB // Definitely would prefer to have this driven by an input pin and make // it switch dynamically - BCG // if (!usb_configured()) { - + // // Send power to Bluefruit... Adafruit says it takes 27 mA, I think - // // the pins should provide 40 mA, but just in case I switch the + // // the pins should provide 40 mA, but just in case I switch the // // Bluefruit using a transistor - BCG // DDRB = _BV(PB6); // PORTB |= _BV(PB6); - + dprintf("Setting host driver to bluefruit...\n"); host_set_driver(bluefruit_driver()); @@ -131,7 +132,7 @@ int main(void) // usb_remote_wakeup(); // } // } -// keyboard_task(); +// keyboard_task(); // } // } diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 5436d4909012..8de55bfe3fd2 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -119,6 +119,8 @@ int main(void) { // TESTING // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); + keyboard_setup(); + /* Init USB */ init_usb_driver(&USB_DRIVER); diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index f6a0c7e9a4d2..86c2188c878e 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -56,6 +56,7 @@ int main(void) #ifndef NO_UART uart_init(UART_BAUD_RATE); #endif + keyboard_setup(); keyboard_init(); host_set_driver(vusb_driver()); From 3a3de84e40262a6cb19767740a4620f821625377 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Feb 2019 15:44:27 +1100 Subject: [PATCH 092/445] Tweak issue templates (capitalisation mostly) (#5133) * Tweak issue templates (capitalisation mostly) * Consistent headings --- .github/ISSUE_TEMPLATE/bug_report.md | 31 ++++++++++++----------- .github/ISSUE_TEMPLATE/feature_request.md | 16 ++++++------ .github/ISSUE_TEMPLATE/other_issues.md | 6 ++--- .github/PULL_REQUEST_TEMPLATE.md | 28 ++++++++++---------- 4 files changed, 42 insertions(+), 39 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a4f90389b0f0..3c35416e043f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,30 +2,31 @@ name: Bug report about: Create a report to help us improve the QMK Firmware --- - + - - + + -**Describe the bug** +## Describe the Bug -**System Information** +## System Information + - Keyboard: - Revision (if applicable): - - Operating System: - - avr-gcc version: - - - arm gcc version: - + - Operating system: + - AVR GCC version: + + - ARM GCC version: + - QMK Firmware version: - + - Any keyboard related software installed? - - [ ] Auto Hot Key + - [ ] AutoHotKey - [ ] Karabiner - - [ ] Other + - [ ] Other: -**Additional context** +## Additional Context - + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c9198adff2fc..01aeb26cec30 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,18 +2,18 @@ name: Feature request about: Suggest a new feature or changes to existing features --- - + - - + + ## Feature Request Type -- [ ] Core Functionality -- [ ] Add-on hardware support (e.g. audio, RGB, OLED screen, etc.) -- [ ] Alteration (enhancement/optimization) of existing Feature(s) +- [ ] Core functionality +- [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.) +- [ ] Alteration (enhancement/optimization) of existing feature(s) - [ ] New behavior -## Description +## Description - + diff --git a/.github/ISSUE_TEMPLATE/other_issues.md b/.github/ISSUE_TEMPLATE/other_issues.md index 5f3e986cc413..7c4891ac31d7 100644 --- a/.github/ISSUE_TEMPLATE/other_issues.md +++ b/.github/ISSUE_TEMPLATE/other_issues.md @@ -2,8 +2,8 @@ name: Other issues about: Anything else that doesn't fall into the above categories. --- - + - + - + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 05223aa4f6b3..cbc018ea057f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,32 +1,34 @@ - + - - + + ## Description - -## Types of changes - + + +## Types of Changes + + - [ ] Core - [ ] Bugfix -- [ ] New Feature -- [ ] Enhancement/Optimization +- [ ] New feature +- [ ] Enhancement/optimization - [ ] Keyboard (addition or update) -- [ ] Keymap/Layout/Userspace (addition or update) +- [ ] Keymap/layout/userspace (addition or update) - [ ] Documentation - -## Issues Fixed or Closed by this PR +## Issues Fixed or Closed by This PR * -## Checklist: +## Checklist + - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. -- [ ] I have read the **CONTRIBUTING** document. (https://docs.qmk.fm/#/contributing) +- [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing). - [ ] I have added tests to cover my changes. - [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage). From d7754a19b97d65f878a3eaafe379db025bffd3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 15 Feb 2019 05:55:31 +0100 Subject: [PATCH 093/445] Remove problematic unicode_map stub definition in process_unicodemap.c (#5110) * Remove problematic unicode_map stub definition in process_unicodemap.c * Add unicode_map declaration to process_unicodemap.h * Disable UNICODEMAP on converter boards that don't use it --- keyboards/converter/ibm_terminal/keymaps/default/rules.mk | 3 +-- keyboards/converter/ibm_terminal/rules.mk | 1 - keyboards/converter/palm_usb/rules.mk | 1 - keyboards/converter/sun_usb/rules.mk | 1 - quantum/process_keycode/process_unicodemap.c | 3 --- quantum/process_keycode/process_unicodemap.h | 2 ++ 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk index 76d349920fc7..8ff095047200 100644 --- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk @@ -12,9 +12,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes API_SYSEX_ENABLE = no diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 3fa8792464c8..a48038ccde23 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -58,7 +58,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 8dfc2ca4d719..7374fd955f96 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -22,7 +22,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = no BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 22311c3d4c73..db6b5c7ee406 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -22,7 +22,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index cee9acb5fcc1..32740276130c 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -17,9 +17,6 @@ #include "process_unicodemap.h" #include "process_unicode_common.h" -__attribute__((weak)) -const uint32_t PROGMEM unicode_map[] = {}; - void register_hex32(uint32_t hex) { bool onzerostart = true; for(int i = 7; i >= 0; i--) { diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index 5764697f84ca..fe4f979155e3 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -19,5 +19,7 @@ #include "quantum.h" #include "process_unicode_common.h" +extern const uint32_t PROGMEM unicode_map[]; + void unicodemap_input_error(void); bool process_unicodemap(uint16_t keycode, keyrecord_t *record); From 1e1b55fbdf61c5a8b6aa8642e3743e4e193d9956 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 15 Feb 2019 06:00:57 +0100 Subject: [PATCH 094/445] Improve Encoder documentation (#5130) --- docs/feature_encoders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 6eab402ef94f..dd12c91ce34e 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -38,7 +38,7 @@ or `keymap.c`: } else { tap_code(KC_PGUP); } - } else if (index == 2) { + } else if (index == 1) { /* Second encoder if (clockwise) { tap_code(KC_UP); } else { From 7c2bee8b8848d2dbfb3ff1f9d5bdd7558fd74b26 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Feb 2019 16:01:40 +1100 Subject: [PATCH 095/445] Swap KBD75 caps lock LED pin levels (#5132) --- keyboards/kbdfans/kbd75/rev1/rev1.c | 8 ++++---- keyboards/kbdfans/kbd75/rev2/rev2.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c index d7d690381716..151e395e3c4b 100644 --- a/keyboards/kbdfans/kbd75/rev1/rev1.c +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -1,14 +1,14 @@ #include "rev1.h" void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B2); - } else { writePinLow(B2); + } else { + writePinHigh(B2); } - led_set_user(usb_led); + led_set_user(usb_led); } void matrix_init_kb(void) { diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c index 2168738fa301..bf91d4009218 100644 --- a/keyboards/kbdfans/kbd75/rev2/rev2.c +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -1,14 +1,14 @@ #include "rev2.h" void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B2); - } else { writePinLow(B2); + } else { + writePinHigh(B2); } - led_set_user(usb_led); + led_set_user(usb_led); } void matrix_init_kb(void) { From 68fad7b777e629b9837b1f60080a21386002c444 Mon Sep 17 00:00:00 2001 From: Shihpin Tseng Date: Sat, 9 Feb 2019 00:12:43 +0800 Subject: [PATCH 096/445] Enable custom chibios sub-platform --- tmk_core/chibios.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 0f665450ac56..01edebfd74c7 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -39,9 +39,13 @@ include $(STARTUP_MK) # HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/platform.mk +ifeq ("$(PLATFORM_NAME)","") + PLATFORM_NAME = platform +endif + +PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk ifeq ("$(wildcard $(PLATFORM_MK))","") -PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/platform.mk +PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk endif include $(PLATFORM_MK) From cc146e32dcc32c0213c501d734c8c9d61c974ee5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 15 Feb 2019 06:37:44 -0800 Subject: [PATCH 097/445] Improve RGB Light code (#4326) * Improve RGB Light code * Add is_rgblight_initialized as an externed value in rgblight.h * Use remander of hue --- quantum/rgblight.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- quantum/rgblight.h | 1 + 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 22dce963c97b..30f7d7528640 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -58,6 +58,7 @@ const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; #endif rgblight_config_t rgblight_config; +bool is_rgblight_initialized = false; LED_TYPE led[RGBLED_NUM]; bool rgblight_timer_enabled = false; @@ -123,6 +124,35 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { (*led1).b = b; } +void rgblight_check_config(void) { + /* Add some out of bound checks for RGB light config */ + + if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) { + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + } + else if (rgblight_config.mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } + + if (rgblight_config.hue < 0) { + rgblight_config.hue = 0; + } else if (rgblight_config.hue > 360) { + rgblight_config.hue %= 360; + } + + if (rgblight_config.sat < 0) { + rgblight_config.sat = 0; + } else if (rgblight_config.sat > 255) { + rgblight_config.sat = 255; + } + + if (rgblight_config.val < 0) { + rgblight_config.val = 0; + } else if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) { + rgblight_config.val = RGBLIGHT_LIMIT_VAL; + } + +} uint32_t eeconfig_read_rgblight(void) { #if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) @@ -131,13 +161,14 @@ uint32_t eeconfig_read_rgblight(void) { return 0; #endif } + void eeconfig_update_rgblight(uint32_t val) { #if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) - if (eeconfig_read_rgblight() != val) { + rgblight_check_config(); eeprom_update_dword(EECONFIG_RGBLIGHT, val); - } #endif } + void eeconfig_update_rgblight_default(void) { //dprintf("eeconfig_update_rgblight_default\n"); rgblight_config.enable = 1; @@ -148,6 +179,7 @@ void eeconfig_update_rgblight_default(void) { rgblight_config.speed = 0; eeconfig_update_rgblight(rgblight_config.raw); } + void eeconfig_debug_rgblight(void) { dprintf("rgblight_config eprom\n"); dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); @@ -159,6 +191,11 @@ void eeconfig_debug_rgblight(void) { } void rgblight_init(void) { + /* if already initialized, don't do it again. + If you must do it again, extern this and set to false, first. + This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */ + if (is_rgblight_initialized) { return; } + debug_enable = 1; // Debug ON! dprintf("rgblight_init called.\n"); dprintf("rgblight_init start!\n"); @@ -173,6 +210,8 @@ void rgblight_init(void) { eeconfig_update_rgblight_default(); rgblight_config.raw = eeconfig_read_rgblight(); } + rgblight_check_config(); + eeconfig_debug_rgblight(); // display current eeprom values #ifdef RGBLIGHT_USE_TIMER @@ -182,6 +221,9 @@ void rgblight_init(void) { if (rgblight_config.enable) { rgblight_mode_noeeprom(rgblight_config.mode); } + + is_rgblight_initialized = true; + } void rgblight_update_dword(uint32_t dword) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 65dda3f5215f..03534bd31117 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -146,6 +146,7 @@ extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; +extern bool is_rgblight_initialized; typedef union { uint32_t raw; From cd369b710796505fb0dbcfafed546597eee3786d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 15 Feb 2019 15:46:42 +0100 Subject: [PATCH 098/445] docker_build.sh: Run container in interactive mode (#5088) * docker_build.sh: Run container in interactive mode * Add message about QMK Toolbox * Update Docker docs --- docs/getting_started_build_tools.md | 8 ++++---- util/docker_build.sh | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index dbed200d1bdf..eb9f5b370fb2 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -129,12 +129,12 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch ## Docker -If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap: +If this is a bit complex for you, Docker might be the turnkey solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap: ```bash -util/docker_build.sh keyboard:keymap +util/docker_build.sh keyboard:keymap # For example: util/docker_build.sh ergodox_ez:steno ``` -This will compile the targeted keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`. +This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`. You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: ```bash @@ -147,7 +147,7 @@ There is also support for building _and_ flashing the keyboard straight from Doc util/docker_build.sh keyboard:keymap:target # For example: util/docker_build.sh planck/rev6:default:dfu-util ``` -If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use QMK Toolbox instead. +If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead. !> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**. diff --git a/util/docker_build.sh b/util/docker_build.sh index 26075cc90834..e7aeac8f3e5f 100755 --- a/util/docker_build.sh +++ b/util/docker_build.sh @@ -39,11 +39,12 @@ if [ -n "$target" ]; then else echo "Error: target requires docker-machine to work on your platform" >&2 echo "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" >&2 + echo "Consider flashing with QMK Toolbox (https://github.com/qmk/qmk_toolbox) instead" >&2 exit 3 fi fi dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows # Run container and build firmware -docker run --rm $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \ +docker run --rm -it $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \ make "$keyboard${keymap:+:$keymap}${target:+:$target}" From f61c99fdda6b05a64b06b718fbb0ff5db71d8bfd Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 15 Feb 2019 14:47:47 +0000 Subject: [PATCH 099/445] Remove duplication of ssh keys and fix usage on PR builds (#5013) --- util/travis_compiled_push.sh | 16 +--------------- util/travis_push.sh | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index c05b842a0b58..d76030f8310f 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -1,9 +1,6 @@ #!/bin/bash -TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" -TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" -TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" -TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" +source util/travis_push.sh set -o errexit -o nounset @@ -12,17 +9,6 @@ echo "Using git hash ${rev}" if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then -git config --global user.name "QMK Bot" -git config --global user.email "hello@qmk.fm" - -openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d -tar xvf secrets.tar - -chmod 600 id_rsa_qmk_firmware -chmod 600 id_rsa_qmk.fm -eval `ssh-agent -s` -ssh-add id_rsa_qmk_firmware - # convert to unix line-endings git checkout master git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix diff --git a/util/travis_push.sh b/util/travis_push.sh index 7eea88b14820..d100f9d48f7a 100755 --- a/util/travis_push.sh +++ b/util/travis_push.sh @@ -5,13 +5,15 @@ TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" -git config --global user.name "QMK Bot" -git config --global user.email "hello@qmk.fm" +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then + git config --global user.name "QMK Bot" + git config --global user.email "hello@qmk.fm" -openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d -tar xvf secrets.tar + openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d + tar xvf secrets.tar -chmod 600 id_rsa_qmk_firmware -chmod 600 id_rsa_qmk.fm -eval `ssh-agent -s` -ssh-add id_rsa_qmk_firmware + chmod 600 id_rsa_qmk_firmware + chmod 600 id_rsa_qmk.fm + eval `ssh-agent -s` + ssh-add id_rsa_qmk_firmware +fi From d04485e32c58503eae857a2b0b8b84ecc2d2880e Mon Sep 17 00:00:00 2001 From: Samuel Jahnke <118westmaine@gmail.com> Date: Fri, 15 Feb 2019 06:49:02 -0800 Subject: [PATCH 100/445] Add samuel's literate keymap file for planck (#4998) * added my own keymap * changed thing * updated keymap Samuel * updated laypout for better one handed use * updated stuff I want * happy with my lagout * formatting * Added new literate config * made everything nice * cleaned * fixed spelling and two small bugs in macros * Made press and lift function for modifiers --- keyboards/planck/keymaps/samuel/README.org | 431 +++++++++++++++++++++ keyboards/planck/keymaps/samuel/config.h | 1 + keyboards/planck/keymaps/samuel/keymap.c | 245 ++++++++++++ 3 files changed, 677 insertions(+) create mode 100644 keyboards/planck/keymaps/samuel/README.org create mode 100644 keyboards/planck/keymaps/samuel/config.h create mode 100644 keyboards/planck/keymaps/samuel/keymap.c diff --git a/keyboards/planck/keymaps/samuel/README.org b/keyboards/planck/keymaps/samuel/README.org new file mode 100644 index 000000000000..d0750ee03a38 --- /dev/null +++ b/keyboards/planck/keymaps/samuel/README.org @@ -0,0 +1,431 @@ +#+Title: Samuel's Literate QMK Config +#+PROPERTY: header-args :tangle ~/qmk_firmware/keyboards/planck/keymaps/samuel/keymap.c + +This is my qmk firmware for my keyboard. I grew tired of organizing the keycode +array in plain text so I made it a literate .org file. I've never done this +before, so bear with me. + +* Keymap + +#+BEGIN_COMMENT +#+NAME: empty-layer +| <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | +|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +| - | - | - | - | - | - | - | - | - | - | - | - | +| - | - | - | - | - | - | - | - | - | - | - | - | +| - | - | - | - | - | - | - | - | - | - | - | - | +| - | - | - | - | - | - | - | - | - | - | - | - | +|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +#+END_COMMENT + +This is my "pretty" org mode organized table for my main dvorak layer. If you +don't use org mode, it won't be that exiting, but if you enjoy working in org +mode, you can edit this table directly, and this file is tangled to the actual +keymap. No more organizing spaces or converting to and from comments. + +#+NAME: home-layer +|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| +| T_LRSE | QUOT | COMM | DOT | P | Y | F | G | C | R | L | T_RRSE | +| T_LSFT | A | O | E | U | I | D | H | T | N | S | T_RSFT | +| T_LCTL | SCLN | Q | J | K | X | B | M | W | V | Z | T_RCTL | +| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | T_RGUI | +|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| + +I tried to keep my layout bare bones, just what would be available on a normal +keyboard, minus some keys I never used. The bottom left copies a normal +keyboards symbols from shifted numbers, and the rest is placed where convenient, +with some considerations for one handed use, hence the shortcuts in the top +left. + +#+TODO: qwerty layer for ma friends + +#+NAME: secondary-layer +|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----| +| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | F11 | -- | +| -- | ESC | CAPS | PGUP | PGDN | F4 | ASTR | 4 | 5 | 6 | 0 | -- | +| -- | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | F12 | -- | +| -- | -- | EZUP | EZDOWN | -- | AMPR | PIPE | -- | EZLEFT | EZRGHT | -- | -- | +|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----| + +But wait, we are missing several important keys!? yes, well, the modifier keys +all do other keys when tapped. More about that in the keymap section. + +* Keymap Conversion in Python + +This python can convert that table into the array needed for the keymap file. It +simply prepends every key with "KC_". I used to use a dictionary to convert some +keys from the table into qmk keycodes, but the double convertion was +unneccessary so I simply prepended all my macros with KC and moved all the +implementation to the `process-user-input` function. + +#+NAME:layer-to-array +#+BEGIN_SRC python :var keys=secondary-layer :tangle no +results = "{" +row = 0 +while row < len(keys): + results += '{ ' + key = 0 + while key < len(keys[row]): + keyName = str(keys[row][key]) + if keyName == '--': + keyName = 'TRANSPARENT' + results += 'KC_' + keyName + if key != 11: + results += ', ' + key+=1 + results += '}' + if row != 3: + results += ',' + results += '\n' + row+=1 +results += '},\n' +return results +#+END_SRC + +* keymap.c + +Now that we have done all the hard work, lets layout our keymap file then define +our macros. + +** Headers And Layer Declaration + +#+BEGIN_SRC C :noweb yes +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +char last_mod = -1; + +enum planck_layers { + _DVORAK, + _RISE +}; + +// where the 'T_' communicates how the key does something different when tapped. +enum planck_keycodes { + DVORAK = SAFE_RANGE, + KC_T_LALT, + KC_T_RALT, + KC_T_LGUI, + KC_T_RGUI, + KC_T_LCTL, + KC_T_RCTL, + KC_T_LSFT, + KC_T_RSFT, + KC_T_LRSE, + KC_T_RRSE, + KC_EZRGHT, + KC_EZLEFT, + KC_EZUP, + KC_EZDOWN, + KC_EZUNDO, + KC_EZCOPY, + KC_EZCUT, + KC_EZPSTE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#+END_SRC + +** Import Key table + +#+BEGIN_SRC C :noweb yes +[_DVORAK] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +[_RISE] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + +** Process User Input +*** Tap Key Functionality + +These methods define how I implemented the tap mechanic. Basically, I believe +that /pressing/ any other key should be grounds for the hold functionality to be +assumed. My natuaral typing style experiences no delays from my method. + +#+BEGIN_SRC C :noweb yes +}; + +void mod_press(uint16_t hold_code, int id) { + tap_timers[id] = timer_read(); + last_mod = id; + register_code(hold_code); +} + +void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { + unregister_code(hold_code); + if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) { + tap_code16(tap_code); + last_mod = -1; + } +} + +#+END_SRC + +*** Set DVORAK layout + +The function that filter's user inputs and applies macros, the begginning is +pretty basic, setting our main layer and configuring our secondary layer. + +#+BEGIN_SRC C :noweb yes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + +#+END_SRC + +*** Alt and () + +Left and right alt are ( and ) when tapped. I put them on alt instead of a more +conveniant key like control because parentheses do not need to be shift modified +ever, unlike some other tap keys seen in the next sections. + +#+BEGIN_SRC C :noweb yes +case KC_T_LALT: +if (record->event.pressed) { + mod_press(KC_LALT, 0); + } else { + mod_lift(S(KC_9), KC_LALT, 0); + } +return false; +break; +case KC_T_RALT: +if (record->event.pressed) { + mod_press(KC_RALT, 1); + } else { + mod_lift(S(KC_0), KC_RALT, 1); + } +return false; +break; + +#+END_SRC + +*** Gui and `\ + +I place gui in the bottom corner because I believe it is the hardest key to +reach, so gui seemed like a good fit for a dedicated key that I never want to +have to spam. For tap keys, I used equally unused keys that are not apart of the +number pad or shifted number keys. + +#+BEGIN_SRC C :noweb yes +case KC_T_LGUI: +if (record->event.pressed) { + mod_press(KC_LGUI, 2); + } else { + mod_lift(KC_GRAVE, KC_LGUI, 2); + } +return false; +break; +case KC_T_RGUI: +if (record->event.pressed) { + mod_press(KC_RGUI, 3); + } else { + mod_lift(KC_BSLASH, KC_RGUI, 3); + } +return false; +break; + +#+END_SRC + +*** Ctrl and [] + +Left and right control are [] respectively when they are tapped, making { and } +also very convenient. + +#+BEGIN_SRC C :noweb yes +case KC_T_LCTL: +if (record->event.pressed) { + mod_press(KC_LCTL, 4); + } else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); + } +return false; +break; +case KC_T_RCTL: +if (record->event.pressed) { + mod_press(KC_RCTL, 5); + } else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); + } +return false; +break; + +#+END_SRC + +*** Shft and =- + +I place shift on the home row, so having '-' right of my pinkie is standard, and +it only felt natural to put its opposite, '=/+' on the other side. I put an +extra one on the right side in the secondary layer for the num pad. + +#+BEGIN_SRC C :noweb yes +case KC_T_LSFT: +if (record->event.pressed) { + mod_press(KC_LSFT, 6); + } else { + mod_lift(KC_EQUAL, KC_LSFT, 6); + } +return false; +break; +case KC_T_RSFT: +if (record->event.pressed) { + mod_press(KC_RSFT, 7); + } else { + mod_lift(KC_MINUS, KC_RSFT, 7); + } +return false; +break; + +#+END_SRC + +*** Rise, DEL, and / + +I use the top corners as rise because I decided that I do not like using layers +with my thumbs. It feels uncomfortable to hold keys down with the side of my +thumb, and backspace, tab, enter, and spacebar keep them satisfied. My pinky is +for holding modifiers, so it makes sense to put the layer key with the other +modifiers. Both my left and right layer keys activate the same layer which also +makes sense to me. You wouldn't want left and right shift to do different things + +I used to have escape in the top left, but I use delete a lot more, and putting +escape under a layer has not been a problem at all. I put / in the top right +corner again mimicing a standard dvorak keyboard. + +#+BEGIN_SRC C :noweb yes +case KC_T_LRSE: +if (record->event.pressed) { + tap_timers[8] = timer_read(); + last_mod = 8; + layer_on(_RISE); + } else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = -1; + } + } +return false; +break; +case KC_T_RRSE: +if (record->event.pressed) { + tap_timers[9] = timer_read(); + last_mod = 9; + layer_on(_RISE); + } else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) { + tap_code16(KC_SLASH); + last_mod = -1; + } + } +return false; +break; + +#+END_SRC + +*** EZ keys + +I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became +lazy versions of themselves with control and shift already pressed. + +I also added undo, copy, paste, and cut to be easily available with only the +left hand like on a qwerty or colemek keyboard. + +#+BEGIN_SRC C :noweb yes +case KC_EZRGHT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZLEFT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZDOWN: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZUP: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZUNDO: +if (record->event.pressed) { + tap_code16(C(KC_Z)); + last_mod = -1; +} +return false; +break; +case KC_EZCOPY: +if (record->event.pressed) { + tap_code16(C(KC_C)); + last_mod = -1; +} +return false; +break; +case KC_EZCUT: +if (record->event.pressed) { + tap_code16(C(KC_X)); + last_mod = -1; +} +return false; +break; +case KC_EZPSTE: +if (record->event.pressed) { + tap_code16(C(KC_P)); + last_mod = -1; +} +return false; +break; +#+END_SRC + +*** Standard inputs interupt tap + +Finally, if just a standard key is tapped, set the interupted flag. + +#+BEGIN_SRC C :noweb yes + } + last_mod = -1; + return true; +} +#+END_SRC diff --git a/keyboards/planck/keymaps/samuel/config.h b/keyboards/planck/keymaps/samuel/config.h new file mode 100644 index 000000000000..95bfdd36fef0 --- /dev/null +++ b/keyboards/planck/keymaps/samuel/config.h @@ -0,0 +1 @@ +#define TAPPING_TERM 250 diff --git a/keyboards/planck/keymaps/samuel/keymap.c b/keyboards/planck/keymaps/samuel/keymap.c new file mode 100644 index 000000000000..53760da76715 --- /dev/null +++ b/keyboards/planck/keymaps/samuel/keymap.c @@ -0,0 +1,245 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +char last_mod = -1; + +enum planck_layers { + _DVORAK, + _RISE +}; + +// where the 'T_' communicates how the key does something different when tapped. +enum planck_keycodes { + DVORAK = SAFE_RANGE, + KC_T_LALT, + KC_T_RALT, + KC_T_LGUI, + KC_T_RGUI, + KC_T_LCTL, + KC_T_RCTL, + KC_T_LSFT, + KC_T_RSFT, + KC_T_LRSE, + KC_T_RRSE, + KC_EZRGHT, + KC_EZLEFT, + KC_EZUP, + KC_EZDOWN, + KC_EZUNDO, + KC_EZCOPY, + KC_EZCUT, + KC_EZPSTE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = + +{{ KC_T_LRSE, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_T_RRSE}, +{ KC_T_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_T_RSFT}, +{ KC_T_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_T_RCTL}, +{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI} +}, + +[_RISE] = + +{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_F11, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_F4, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_F12, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_TRANSPARENT, KC_EZUP, KC_EZDOWN, KC_TRANSPARENT, KC_AMPR, KC_PIPE, KC_TRANSPARENT, KC_EZLEFT, KC_EZRGHT, KC_TRANSPARENT, KC_TRANSPARENT} +}, + +}; + +void mod_press(uint16_t hold_code, int id) { + tap_timers[id] = timer_read(); + last_mod = id; + register_code(hold_code); +} + +void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { + unregister_code(hold_code); + if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) { + tap_code16(tap_code); + last_mod = -1; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + +case KC_T_LALT: +if (record->event.pressed) { + mod_press(KC_LALT, 0); + } else { + mod_lift(S(KC_9), KC_LALT, 0); + } +return false; +break; +case KC_T_RALT: +if (record->event.pressed) { + mod_press(KC_RALT, 1); + } else { + mod_lift(S(KC_0), KC_RALT, 1); + } +return false; +break; + +case KC_T_LGUI: +if (record->event.pressed) { + mod_press(KC_LGUI, 2); + } else { + mod_lift(KC_GRAVE, KC_LGUI, 2); + } +return false; +break; +case KC_T_RGUI: +if (record->event.pressed) { + mod_press(KC_RGUI, 3); + } else { + mod_lift(KC_BSLASH, KC_RGUI, 3); + } +return false; +break; + +case KC_T_LCTL: +if (record->event.pressed) { + mod_press(KC_LCTL, 4); + } else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); + } +return false; +break; +case KC_T_RCTL: +if (record->event.pressed) { + mod_press(KC_RCTL, 5); + } else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); + } +return false; +break; + +case KC_T_LSFT: +if (record->event.pressed) { + mod_press(KC_LSFT, 6); + } else { + mod_lift(KC_EQUAL, KC_LSFT, 6); + } +return false; +break; +case KC_T_RSFT: +if (record->event.pressed) { + mod_press(KC_RSFT, 7); + } else { + mod_lift(KC_MINUS, KC_RSFT, 7); + } +return false; +break; + +case KC_T_LRSE: +if (record->event.pressed) { + tap_timers[8] = timer_read(); + last_mod = 8; + layer_on(_RISE); + } else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = -1; + } + } +return false; +break; +case KC_T_RRSE: +if (record->event.pressed) { + tap_timers[9] = timer_read(); + last_mod = 9; + layer_on(_RISE); + } else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) { + tap_code16(KC_SLASH); + last_mod = -1; + } + } +return false; +break; + +case KC_EZRGHT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZLEFT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZDOWN: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZUP: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = -1; + } +return false; +break; +case KC_EZUNDO: +if (record->event.pressed) { + tap_code16(C(KC_Z)); + last_mod = -1; +} +return false; +break; +case KC_EZCOPY: +if (record->event.pressed) { + tap_code16(C(KC_C)); + last_mod = -1; +} +return false; +break; +case KC_EZCUT: +if (record->event.pressed) { + tap_code16(C(KC_X)); + last_mod = -1; +} +return false; +break; +case KC_EZPSTE: +if (record->event.pressed) { + tap_code16(C(KC_P)); + last_mod = -1; +} +return false; +break; + + } + last_mod = -1; + return true; +} From f3bdd436a3e8e37e274fcd1147eb13e05b24fe98 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Fri, 15 Feb 2019 06:50:28 -0800 Subject: [PATCH 101/445] Update KC_GESC documentation (#5053) * Update KC_GESC documentation - document caveats on OSX and expected behavior with KC_GESC and GUI - clarify documentation slightly - give examples of expected output in actual use * Update OSX -> macOS * Captilization * remove simply --- docs/feature_grave_esc.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index c6fa1602210c..a7261d2dc887 100644 --- a/docs/feature_grave_esc.md +++ b/docs/feature_grave_esc.md @@ -4,7 +4,11 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have ## Usage -Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. When pressed it will behave like `KC_ESC`, but with Shift or GUI held it will send `KC_GRAVE`. +Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead. + +## What Your OS Sees + +If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now if Mary holds Shift down and presses GESC it will output `~`, or a shifted backtick. Now if she holds GUI/CMD/WIN, it will output a simple ` character. ## Keycodes @@ -12,6 +16,10 @@ Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) w |---------|-----------|------------------------------------------------------------------| |`KC_GESC`|`GRAVE_ESC`|Escape when pressed, ` when Shift or GUI are held| +### Caveats + + * On macOS CMD/GUI + KC_GRV is actually mapped to a hot key so it will not output a backtick. + ## Configuration There are several possible key combinations this will break, among them Control+Shift+Escape on Windows and Command+Option+Escape on macOS. To work around this, you can `#define` these options in your `config.h`: From 642f6cf14f2bcc91af61b0d64b4ad0632622dc7a Mon Sep 17 00:00:00 2001 From: Erovia Date: Fri, 15 Feb 2019 15:52:04 +0100 Subject: [PATCH 102/445] Add support for using ranges for RGB (#4981) * Add support for using ranges for RGB This patch adds support for controlling continuous ranges of RGB LEDs. Helper functions for split boards are also available. * RGB Range: Use hardware-platform agnostic wait --- docs/feature_rgblight.md | 68 ++++++++++++++++++++++------------------ quantum/rgblight.c | 36 +++++++++++++++++++++ quantum/rgblight.h | 6 ++++ 3 files changed, 79 insertions(+), 31 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 52d5c5fe8a20..23b6f1c941db 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -148,37 +148,43 @@ const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include: -|Function |Description | -|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| -|`rgblight_enable()` |Turn LEDs on, based on their previous state | -|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) | -|`rgblight_disable()` |Turn LEDs off | -|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) | -|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled | -|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | -|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | -|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) | -|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 | -|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) | -|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)| -|`rgblight_toggle()` |Toggle all LEDs between on and off | -|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) | -|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | -|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | -|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue | -|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) | -|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue | -|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) | -|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation | -|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) | -|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation | -|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) | -|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value | -|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) | -|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value | -|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) | +|Function |Description | +|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`rgblight_enable()` |Turn LEDs on, based on their previous state | +|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) | +|`rgblight_disable()` |Turn LEDs off | +|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) | +|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled | +|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | +|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) | +|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| +|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 | +|`rgblight_sethsv_noeeprom(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)| +|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| +|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) | +|`rgblight_toggle()` |Toggle all LEDs between on and off | +|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) | +|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | +|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | +|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | +|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | +|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue | +|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) | +|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue | +|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) | +|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation | +|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) | +|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation | +|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) | +|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value | +|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) | +|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value | +|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) | Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list! diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 30f7d7528640..d42a1d2e5932 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -611,6 +611,42 @@ void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); } +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) { + if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { return; } + + for (uint8_t i = start; i < end; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; + } + rgblight_set(); + wait_ms(1); +} + +void rgblight_sethsv_range(uint16_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { + if (!rgblight_config.enable) { return; } + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); +} + +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { + rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2); +} + +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { + rgblight_setrgb_range(r, g, b, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM); +} + +void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_range(hue, sat, val, 0, (uint8_t) RGBLED_NUM/2); +} + +void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM); +} + #ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { if (rgblight_config.enable) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 03534bd31117..aa608d424084 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -187,6 +187,12 @@ uint8_t rgblight_get_val(void); void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); +void rgblight_sethsv_range(uint16_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); +void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val); uint32_t eeconfig_read_rgblight(void); void eeconfig_update_rgblight(uint32_t val); From ecdf14bb62c85a4d6a79de44283452d5707dd5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Fri, 15 Feb 2019 14:23:44 -0200 Subject: [PATCH 103/445] Update keymap.c (#5136) Fix minor bug on toggle layer code from Mac to Windows layer. --- keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c index 78a501ec4ece..7e715a767c8f 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [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_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(WINDOWS_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, From 9b3f397ab2aa62c2b8417fa62ff3a4650e3d35ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Fri, 15 Feb 2019 14:58:38 -0200 Subject: [PATCH 104/445] Update README.md (#5135) Update to new structure --- keyboards/kbdfans/kbd75/keymaps/edulpn/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md index 57989ff9b66b..e35eb983f376 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md @@ -10,4 +10,4 @@ ![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`. +To build the default keymap, simply run `make kbdfans/kbd75/rev2:edulpn`. From 222380c6364f9891b32e5b677e6cbf3c9e7cf801 Mon Sep 17 00:00:00 2001 From: Jayesh Vora <45797218+jayeshvora72@users.noreply.github.com> Date: Fri, 15 Feb 2019 11:35:48 +0530 Subject: [PATCH 105/445] Fix documentation about one shot tap toggle Based on conversation with Drashna on Discord, we know that if ONE_SHOT_TAP_TOGGLE is 5, then tapping a one shot mod key 5 times holds the one shot key permanently, but to come out of this, you need to press the same key only once. --- 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 95c47355ceb6..9edb9fcebccc 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -146,7 +146,7 @@ Additionally, hitting keys five times in a short period will lock that key. This You can control the behavior of one shot keys by defining these in `config.h`: ```c -#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ +#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */ #define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ ``` From 2ba54690e68892fe789a50bb1611af329ec2e438 Mon Sep 17 00:00:00 2001 From: Daniel H Klein Date: Fri, 15 Feb 2019 11:25:02 -0800 Subject: [PATCH 106/445] Fix height in info.json for Unigo66 (#5137) * UniGo66 keyboard added * UniGo66 keyboard added * case correction of unigo66 files * create sirius folder * Update keyboards/sirius/unigo66/rules.mk Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/default/config.h Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/config.h Co-Authored-By: danielhklein * debugging * correct keymap to layout * readme * remove common config * suggested changes to config.h * default keymap cleanup * bug fixes * fixed height in info.json --- keyboards/sirius/unigo66/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json index 956972de34fc..f80dbe3be70f 100644 --- a/keyboards/sirius/unigo66/info.json +++ b/keyboards/sirius/unigo66/info.json @@ -139,12 +139,12 @@ {"label":"Left", "x":13.5, "y":4}, {"label":"Down", "x":14.5, "y":4}, {"label":"Right", "x":15.5, "y":4}, - {"label":"Space", "x":5.5, "y":5, "H":2}, + {"label":"Space", "x":5.5, "y":5, "h":2}, {"label":"Ins", "x":6.5, "y":5}, {"label":"Del", "x":6.5, "y":6}, {"label":"Home", "x":9.5, "y":5}, {"label":"End", "x":9.5, "y":6}, - {"label":"Space", "x":10.5, "y":5, "H":2} + {"label":"Space", "x":10.5, "y":5, "h":2} ] } } From 6f50c7eba19c5b9e60387e70928300a86f0d4816 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Fri, 15 Feb 2019 20:32:31 +0100 Subject: [PATCH 107/445] Added APA102 support (#4940) * Fixed pin for RGB * Re-did apa102 stuff * changed to use pincontrol functions * Removed a newline? * Changed to comply with project style --- drivers/avr/apa102.c | 101 +++++++++++++++++++++++++++++++++++++++++++ drivers/avr/apa102.h | 46 ++++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100755 drivers/avr/apa102.c create mode 100755 drivers/avr/apa102.h diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c new file mode 100755 index 000000000000..55a0d5777885 --- /dev/null +++ b/drivers/avr/apa102.c @@ -0,0 +1,101 @@ +/* +* APA102 lib V1.0a +* +* Controls APA102 RGB-LEDs +* Author: Mikkel (Duckle29 on github) +* +* Dec 22th, 2017 v1.0a Initial Version +* +* 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 "apa102.h" +#include +#include +#include +#include "debug.h" + +// Setleds for standard RGB +void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds){ + apa102_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); +} + +void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK){ + pinMode(RGB_DI_PIN, PinDirectionOutput); + pinMode(RGB_CLK_PIN, PinDirectionOutput); + + apa102_send_array((uint8_t*)ledarray,leds) +} + +void apa102_send_array(uint8_t *data, uint16_t leds){ // Data is struct of 3 bytes. RGB - leds is number of leds in data + apa102_start_frame(); + while(leds--){ + apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r); + data++; + } + apa102_end_frame(leds); +} + +void apa102_send_frame(uint32_t frame){ + for(uint32_t i=0xFF; i>0;){ + apa102_send_byte(frame & i); + i = i << 8; + } +} + +void apa102_start_frame(){ + apa102_send_frame(0); +} + +void apa102_end_frame(uint16_t leds) +{ + // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h + // and adapted. The code is MIT licensed. I think thats compatible? + + // We need to send some more bytes to ensure that all the LEDs in the + // chain see their new color and start displaying it. + // + // The data stream seen by the last LED in the chain will be delayed by + // (count - 1) clock edges, because each LED before it inverts the clock + // line and delays the data by one clock edge. Therefore, to make sure + // the last LED actually receives the data we wrote, the number of extra + // edges we send at the end of the frame must be at least (count - 1). + // For the APA102C, that is sufficient. + // + // The SK9822 only updates after it sees 32 zero bits followed by one more + // rising edge. To avoid having the update time depend on the color of + // the last LED, we send a dummy 0xFF byte. (Unfortunately, this means + // that partial updates of the beginning of an LED strip are not possible; + // the LED after the last one you are trying to update will be black.) + // After that, to ensure that the last LED in the chain sees 32 zero bits + // and a rising edge, we need to send at least 65 + (count - 1) edges. It + // is sufficent and simpler to just send (5 + count/16) bytes of zeros. + // + // We are ignoring the specification for the end frame in the APA102/SK9822 + // datasheets because it does not actually ensure that all the LEDs will + // start displaying their new colors right away. + + apa102_send_byte(0xFF); + for (uint16_t i = 0; i < 5 + leds / 16; i++){ + apa102_send_byte(0); + } +} + +void apa102_send_byte(uint8_t byte){ + uint8_t i; + for (i = 0; i < 8; i++){ + digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i))); + digitalWrite(RGB_CLK_PIN, PinLevelHigh); + } +} diff --git a/drivers/avr/apa102.h b/drivers/avr/apa102.h new file mode 100755 index 000000000000..e7d7c3684f40 --- /dev/null +++ b/drivers/avr/apa102.h @@ -0,0 +1,46 @@ +/* + * light weight WS2812 lib include + * + * Version 2.3 - Nev 29th 2015 + * Author: Tim (cpldcpu@gmail.com) + * + * Please do not change this file! All configuration is handled in "ws2812_config.h" + * + * 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 +#include + +#include "rgblight_types.h" + + +/* User Interface + * + * Input: + * ledarray: An array of GRB data describing the LED colors + * number_of_leds: The number of LEDs to write + * pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0) + * + * The functions will perform the following actions: + * - Set the data-out pin as output + * - Send out the LED data + * - Wait 50�s to reset the LEDs + */ + +void apa102_setleds (LED_TYPE *ledarray, uint16_t number_of_leds); +void apa102_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask); +void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); From 83de3dff013f56cbdb66a1cc422f0e8d6bb7aebb Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Fri, 15 Feb 2019 22:40:56 +0000 Subject: [PATCH 108/445] [keymap] Add new keymap for TADA68 (#5120) * Add new layout for TADA68 * Remove unnecessary KC_TRNS defines from tada68/mattgemmell and tada68/rys --- keyboards/tada68/keymaps/mattgemmell/keymap.c | 48 +++++++++++++++++++ .../tada68/keymaps/mattgemmell/readme.md | 15 ++++++ keyboards/tada68/keymaps/mattgemmell/rules.mk | 16 +++++++ keyboards/tada68/keymaps/rys/keymap.c | 2 - 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 keyboards/tada68/keymaps/mattgemmell/keymap.c create mode 100644 keyboards/tada68/keymaps/mattgemmell/readme.md create mode 100644 keyboards/tada68/keymaps/mattgemmell/rules.mk diff --git a/keyboards/tada68/keymaps/mattgemmell/keymap.c b/keyboards/tada68/keymaps/mattgemmell/keymap.c new file mode 100644 index 000000000000..f446ddc5d2de --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del | + * |------------------------------------------------------- -----| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgUp| + * |----------------------------------------------------------------| + * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |LGUI| Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BL] = LAYOUT_iso( + 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_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, \ + 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_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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _FL1: Function Layer 1 + * ,----------------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | :D | + * |----------------------------------------------------------------| + * | |LMB| Up|RMB| | | | | | | | | | | | + * |------------------------------------------------------- -----| + * | |Lef|Dow|Rig| | | | | | | | | | |Home| + * |----------------------------------------------------------------| + * | | | | | L+|LED| L-| | V+| V-|Mut| | MsBtn|↑ | End| + * |----------------------------------------------------------------| + * | | | | Reset | | | | ← | ↓ | → | + * `----------------------------------------------------------------' + */ + [_FL] = LAYOUT_iso( + _______, 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_BTN1, KC_UP, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, \ + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_MS_U, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; diff --git a/keyboards/tada68/keymaps/mattgemmell/readme.md b/keyboards/tada68/keymaps/mattgemmell/readme.md new file mode 100644 index 000000000000..a67e25ae27bc --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/readme.md @@ -0,0 +1,15 @@ +# Custom Tada68 layout for ISO UK with Apple-y tweaks + +This layout is based on the [ISO UK](../iso-uk) layout, with the following +changes: + +Swap Win and Alt on the left side (Option and Command on macOS) + +## Installation + +Please see the [Tada68 readme](../../readme.md). Make the firmware wih the +following command: + +``` +make tada68:mattgemmell:flashbin +``` diff --git a/keyboards/tada68/keymaps/mattgemmell/rules.mk b/keyboards/tada68/keymaps/mattgemmell/rules.mk new file mode 100644 index 000000000000..020d12635d3b --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/rules.mk @@ -0,0 +1,16 @@ +# 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 = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # 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 +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. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/tada68/keymaps/rys/keymap.c b/keyboards/tada68/keymaps/rys/keymap.c index c37f03075027..012f2cc05c72 100644 --- a/keyboards/tada68/keymaps/rys/keymap.c +++ b/keyboards/tada68/keymaps/rys/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - enum rys_keycodes { PSTOKEN = SAFE_RANGE, QSTOKEN From e04e55c8720cf8fdd3d31ce07b4723042775a67d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 16 Feb 2019 11:18:13 +1100 Subject: [PATCH 109/445] Remove redundant KC_TRNS and KC_NO fillers in userspace (#5140) --- users/bbaserdem/bbaserdem.h | 2 -- users/bocaj/process_records.h | 2 -- users/gordon/gordon.h | 2 -- users/ishtob/ishtob.h | 5 +---- users/losinggeneration/losinggeneration-common.h | 3 --- users/mtdjr/mtdjr.h | 2 -- users/not-quite-neo/nqn-common.h | 5 ----- users/replicaJunction/replicaJunction.h | 1 - users/romus/romus.h | 2 -- users/talljoe/talljoe.h | 3 --- users/zer09/zer09.h | 1 - 11 files changed, 1 insertion(+), 27 deletions(-) diff --git a/users/bbaserdem/bbaserdem.h b/users/bbaserdem/bbaserdem.h index 86b781d788ee..3a405f2a47cf 100644 --- a/users/bbaserdem/bbaserdem.h +++ b/users/bbaserdem/bbaserdem.h @@ -3,8 +3,6 @@ #include "quantum.h" -// Use 7 wide characters for keymaps -#define _______ KC_TRNS #define XXX KC_NO // Layers diff --git a/users/bocaj/process_records.h b/users/bocaj/process_records.h index 248df13e1b67..5c55df35e85c 100644 --- a/users/bocaj/process_records.h +++ b/users/bocaj/process_records.h @@ -44,8 +44,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #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 diff --git a/users/gordon/gordon.h b/users/gordon/gordon.h index 92641a8aae11..49b4f0569fec 100644 --- a/users/gordon/gordon.h +++ b/users/gordon/gordon.h @@ -6,11 +6,9 @@ // Fillers to make layering more clear -#define _______ KC_TRNS #define ________ KC_TRNS #define _________ KC_TRNS #define _XXXXXX_ KC_TRNS -#define XXXXXXX KC_NO // KC codes that are too long #define DOLLAR KC_DOLLAR diff --git a/users/ishtob/ishtob.h b/users/ishtob/ishtob.h index ced78a09d820..29d6f250c439 100644 --- a/users/ishtob/ishtob.h +++ b/users/ishtob/ishtob.h @@ -43,9 +43,6 @@ enum userspace_keycodes { #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl @@ -237,4 +234,4 @@ NOTE: These are all the same length. If you do a search/replace -#endif // !USERSPACE \ No newline at end of file +#endif // !USERSPACE diff --git a/users/losinggeneration/losinggeneration-common.h b/users/losinggeneration/losinggeneration-common.h index c1d6724c5d22..857117ca1652 100644 --- a/users/losinggeneration/losinggeneration-common.h +++ b/users/losinggeneration/losinggeneration-common.h @@ -3,9 +3,6 @@ /* Custom keys & combinations to be shorter for keymaps */ #define KC_LCA LCA(KC_NO) -/* Fillers to make layering more clear */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define OSM_LSFT OSM(MOD_LSFT) #define TD_CTL TD(TD_CTL_CTLALT) diff --git a/users/mtdjr/mtdjr.h b/users/mtdjr/mtdjr.h index 85ca1596dce8..4d0b046fc323 100644 --- a/users/mtdjr/mtdjr.h +++ b/users/mtdjr/mtdjr.h @@ -55,8 +55,6 @@ enum user_tapdance { // Custom Keycodes #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_xxxx KC_NO #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/users/not-quite-neo/nqn-common.h b/users/not-quite-neo/nqn-common.h index a04dc7a18f15..bcd79505f751 100644 --- a/users/not-quite-neo/nqn-common.h +++ b/users/not-quite-neo/nqn-common.h @@ -6,9 +6,4 @@ This file holds some commen NQN definitions */ - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - #endif diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h index ab0e8ab3e3a5..9b5772543384 100644 --- a/users/replicaJunction/replicaJunction.h +++ b/users/replicaJunction/replicaJunction.h @@ -20,7 +20,6 @@ // #define L_LL_I 10 // Keyboard aliases -#define _______ KC_TRNS #define ooooooo KC_TRNS #define MO_FUNC MO(L_FUNC) diff --git a/users/romus/romus.h b/users/romus/romus.h index 265c942e9208..b65e32eb5b8a 100644 --- a/users/romus/romus.h +++ b/users/romus/romus.h @@ -4,8 +4,6 @@ #include "quantum.h" -// Use 7 wide characters for keymaps -#define _______ KC_TRNS #define XXX KC_NO // Layers diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index 4436c0a0440d..496a6222a92f 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -35,9 +35,6 @@ enum tap_dancers { TD_QUOTE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define MO_NAV MO(_NAV) #define MO_ADJ MO(_ADJUST) #define MO_RST MO(_RESET) diff --git a/users/zer09/zer09.h b/users/zer09/zer09.h index acac8ab09fcc..cc91cd6f287b 100644 --- a/users/zer09/zer09.h +++ b/users/zer09/zer09.h @@ -11,7 +11,6 @@ enum custom_keycodes { NEW_SAFE_RANGE }; -#define _______ KC_TRNS #define KC_RGUP RGUP #define KC_RGDWN RGDWN #define KC_YREG YREG From 3309e91e0b6c7edc0c164e25ff1638c4852b40e7 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sat, 16 Feb 2019 00:59:03 +0000 Subject: [PATCH 110/445] [Keymap] Add new layout for wilba_text WT8-A (#5141) --- .../wilba_tech/wt8_a/keymaps/rys/keymap.c | 84 +++++++++++++++++++ .../wilba_tech/wt8_a/keymaps/rys/rules.mk | 9 ++ 2 files changed, 93 insertions(+) create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c new file mode 100644 index 000000000000..bf0dda0fa8dc --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H + +#define _BL0 0 +#define _FL1 1 +#define _FL2 2 +#define _FL3 3 + +#define MACOSLK LCTL(LGUI(KC_Q)) // CTRL+CMD+Q == screen lock in macOS 10.13+ + +enum rys_keycodes { + STOKEN1 = SAFE_RANGE, + STOKEN2, + STOKEN3, + STOKEN4 +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case STOKEN1: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN1); + } + break; + case STOKEN2: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN2); + } + break; + case STOKEN3: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN3); + } + break; + case STOKEN4: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN4); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap base layer (_BL0) - default layer + * ,---------------------------. + * | ST1 | ST2 | ST3 | ST4 | + * |---------------------------| + * | | LOCK | VOL- | VOL+ | + * `---------------------------' + */ + [_BL0] = LAYOUT( + STOKEN1, STOKEN2, STOKEN3, STOKEN4, + _______, MACOSLK, KC__VOLDOWN, KC__VOLUP), + /* Keymap base layer (_FL1) - function layer 1 + * ,---------------------------. + * | | | | | + * |---------------------------| + * | | | | | + * `---------------------------' + */ + [_FL1] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______), + /* Keymap base layer (_FL2) - function layer 2 + * ,---------------------------. + * | | | | | + * |---------------------------| + * | | | | | + * `---------------------------' + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______), + /* Keymap base layer (_FL3) - function layer 3 + * ,---------------------------. + * | | | | | + * |---------------------------| + * | | | | | + * `---------------------------' + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______), +}; diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk new file mode 100644 index 000000000000..60cbf8bfc4b6 --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk @@ -0,0 +1,9 @@ +RYS_STOKEN1 = "$(shell security find-generic-password -a qmk -s wt8a-1 -w)" +RYS_STOKEN2 = "$(shell security find-generic-password -a qmk -s wt8a-2 -w)" +RYS_STOKEN3 = "$(shell security find-generic-password -a qmk -s wt8a-3 -w)" +RYS_STOKEN4 = "$(shell security find-generic-password -a qmk -s wt8a-4 -w)" + +CFLAGS += -DRYS_STOKEN1=\"$(RYS_STOKEN1)\" +CFLAGS += -DRYS_STOKEN2=\"$(RYS_STOKEN2)\" +CFLAGS += -DRYS_STOKEN3=\"$(RYS_STOKEN3)\" +CFLAGS += -DRYS_STOKEN4=\"$(RYS_STOKEN4)\" From bbd4b5eb887a9e5065765d2d6f2ac919d81a38c6 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 17 Feb 2019 03:11:15 +1100 Subject: [PATCH 111/445] Remove redundant KC_TRNS and KC_NO fillers in layouts (#5142) --- layouts/community/ergodox/adam/keymap.c | 3 --- layouts/community/ergodox/belak/keymap.c | 1 - layouts/community/ergodox/familiar/keymap.c | 4 ---- layouts/community/ergodox/haegin/keymap.c | 2 -- layouts/community/ergodox/meagerfindings/keymap.c | 1 - layouts/community/ergodox/xyverz/keymap.c | 5 ----- layouts/community/ortho_4x12/bakingpy/keymap.c | 1 - layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c | 4 ---- layouts/community/ortho_4x12/crs/keymap.c | 4 ---- layouts/community/ortho_4x12/ergodoxish/keymap.c | 6 +----- layouts/community/ortho_4x12/grahampheath/keymap.c | 4 ---- layouts/community/ortho_4x12/mindsound/keymap.c | 4 ---- layouts/community/ortho_4x12/symbolic/keymap.c | 6 ------ layouts/community/ortho_4x12/xyverz/keymap.c | 4 ---- layouts/community/ortho_5x12/xyverz/keymap.c | 4 ---- layouts/default/numpad_5x4/default_numpad_5x4/keymap.c | 3 --- layouts/default/ortho_5x4/default_ortho_5x4/keymap.c | 3 --- 17 files changed, 1 insertion(+), 58 deletions(-) diff --git a/layouts/community/ergodox/adam/keymap.c b/layouts/community/ergodox/adam/keymap.c index e99e5d45353e..100bb6819817 100644 --- a/layouts/community/ergodox/adam/keymap.c +++ b/layouts/community/ergodox/adam/keymap.c @@ -11,9 +11,6 @@ #define SFLOCK 11 // symbols arrows and F keys on F held down #define SJLOCK 12 // same as Flock but with fall thru J and mapped to J held down -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Sends macro when key is tapped, presses mod when key is held #define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \ ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \ diff --git a/layouts/community/ergodox/belak/keymap.c b/layouts/community/ergodox/belak/keymap.c index 016cf30b4b4b..bca0dec913fd 100644 --- a/layouts/community/ergodox/belak/keymap.c +++ b/layouts/community/ergodox/belak/keymap.c @@ -5,7 +5,6 @@ #include "eeprom.h" #define LAYER_ON(pos) ((layer_state) & (1<<(pos))) -#define _______ KC_TRNS #define EECONFIG_BELAK_MAGIC (uint16_t)0xBE42 diff --git a/layouts/community/ergodox/familiar/keymap.c b/layouts/community/ergodox/familiar/keymap.c index bc513c0cc43c..b359a91d3677 100644 --- a/layouts/community/ergodox/familiar/keymap.c +++ b/layouts/community/ergodox/familiar/keymap.c @@ -10,10 +10,6 @@ #define NUMP 3 // numpad #define ARRW 4 // function, media, arrow keys -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Tap Dancing void dance_lock (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { // Press once for NUMLOCK diff --git a/layouts/community/ergodox/haegin/keymap.c b/layouts/community/ergodox/haegin/keymap.c index aa017c8ea53b..fc6ec576221e 100644 --- a/layouts/community/ergodox/haegin/keymap.c +++ b/layouts/community/ergodox/haegin/keymap.c @@ -9,8 +9,6 @@ #define SYMBOLS 1 // symbols #define MEDIA 2 // media keys -#define _______ KC_TRNS - enum { TD_BSPC = 0 }; diff --git a/layouts/community/ergodox/meagerfindings/keymap.c b/layouts/community/ergodox/meagerfindings/keymap.c index 62504f9667a3..f4340b8e1b45 100644 --- a/layouts/community/ergodox/meagerfindings/keymap.c +++ b/layouts/community/ergodox/meagerfindings/keymap.c @@ -42,7 +42,6 @@ enum custom_keycodes { }; //Redefine Key Names for Readaibilty -#define XXXXXXX KC_NO #define SCRN_CLIPB LCTL(LGUI(LSFT(KC_4))) #define CHRM_L LALT(LGUI(KC_LEFT)) //Move left one tab in Chrome #define CHRM_R LALT(LGUI(KC_RIGHT)) //Move right one tab in Chrome diff --git a/layouts/community/ergodox/xyverz/keymap.c b/layouts/community/ergodox/xyverz/keymap.c index fe9080c2d645..eeeded47fcfd 100644 --- a/layouts/community/ergodox/xyverz/keymap.c +++ b/layouts/community/ergodox/xyverz/keymap.c @@ -31,11 +31,6 @@ extern keymap_config_t keymap_config; #define QWERTY M(_QW) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 : Dvorak diff --git a/layouts/community/ortho_4x12/bakingpy/keymap.c b/layouts/community/ortho_4x12/bakingpy/keymap.c index 06e4a589c5b8..71672d051347 100644 --- a/layouts/community/ortho_4x12/bakingpy/keymap.c +++ b/layouts/community/ortho_4x12/bakingpy/keymap.c @@ -21,7 +21,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c b/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c index 218ff93741fe..c8da7f589f53 100644 --- a/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c +++ b/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/layouts/community/ortho_4x12/crs/keymap.c b/layouts/community/ortho_4x12/crs/keymap.c index f9c72f25433b..2ec2ffba9f5d 100644 --- a/layouts/community/ortho_4x12/crs/keymap.c +++ b/layouts/community/ortho_4x12/crs/keymap.c @@ -33,10 +33,6 @@ enum custom_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/layouts/community/ortho_4x12/ergodoxish/keymap.c b/layouts/community/ortho_4x12/ergodoxish/keymap.c index 49600aa33e07..7c844c6b3a04 100644 --- a/layouts/community/ortho_4x12/ergodoxish/keymap.c +++ b/layouts/community/ortho_4x12/ergodoxish/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -211,4 +207,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/layouts/community/ortho_4x12/grahampheath/keymap.c b/layouts/community/ortho_4x12/grahampheath/keymap.c index 0b84b66eb889..7b35c52e718e 100644 --- a/layouts/community/ortho_4x12/grahampheath/keymap.c +++ b/layouts/community/ortho_4x12/grahampheath/keymap.c @@ -54,10 +54,6 @@ enum custom_keycodes { #define HYPR_1 HYPR(KC_EXLM) // Send Hyper + !. #define HYPR_2 HYPR(KC_AT) // Send Hyper + @. -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/layouts/community/ortho_4x12/mindsound/keymap.c b/layouts/community/ortho_4x12/mindsound/keymap.c index 2c9ceaf69071..03b0486c58f8 100644 --- a/layouts/community/ortho_4x12/mindsound/keymap.c +++ b/layouts/community/ortho_4x12/mindsound/keymap.c @@ -33,10 +33,6 @@ const uint8_t flicker_max_levels = 7; uint8_t flicker_restore_level = 0; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/layouts/community/ortho_4x12/symbolic/keymap.c b/layouts/community/ortho_4x12/symbolic/keymap.c index d4c08923685d..1e5494d96ef9 100644 --- a/layouts/community/ortho_4x12/symbolic/keymap.c +++ b/layouts/community/ortho_4x12/symbolic/keymap.c @@ -19,12 +19,6 @@ enum custom_keycodes { R_RAISE }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index 72ddbacf8202..681dafacd449 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to keep the keymap tidy #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index 23a456e6d6d4..bbf1d7bb0eae 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to keep the keymap tidy #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias diff --git a/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c b/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c index 1d68fb2f84d7..0e913248f2fd 100644 --- a/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c +++ b/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_numpad_5x4( TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ diff --git a/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c b/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c index 061f06c381d9..39d397d9096f 100644 --- a/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c +++ b/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { KC_P00 = SAFE_RANGE }; From f2d597d1d3b31ffd77b8fd0c143f9bb27d617f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Wilhelmsen?= <46304257+oeywil@users.noreply.github.com> Date: Sat, 16 Feb 2019 17:11:56 +0100 Subject: [PATCH 112/445] Planck Keymap for oeywil (#5145) * adding my keymap * fixed includes * removed comments * removed keymap_config_t --- keyboards/planck/keymaps/oeywil/.gitignore | 1 + keyboards/planck/keymaps/oeywil/config.h | 38 ++++ keyboards/planck/keymaps/oeywil/keymap.c | 196 +++++++++++++++++++++ keyboards/planck/keymaps/oeywil/readme.md | 9 + keyboards/planck/keymaps/oeywil/rules.mk | 9 + 5 files changed, 253 insertions(+) create mode 100644 keyboards/planck/keymaps/oeywil/.gitignore create mode 100644 keyboards/planck/keymaps/oeywil/config.h create mode 100644 keyboards/planck/keymaps/oeywil/keymap.c create mode 100644 keyboards/planck/keymaps/oeywil/readme.md create mode 100644 keyboards/planck/keymaps/oeywil/rules.mk diff --git a/keyboards/planck/keymaps/oeywil/.gitignore b/keyboards/planck/keymaps/oeywil/.gitignore new file mode 100644 index 000000000000..a7fbec474778 --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/.gitignore @@ -0,0 +1 @@ +secret.h diff --git a/keyboards/planck/keymaps/oeywil/config.h b/keyboards/planck/keymaps/oeywil/config.h new file mode 100644 index 000000000000..215ea9f75c9d --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/config.h @@ -0,0 +1,38 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_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 + +#endif diff --git a/keyboards/planck/keymaps/oeywil/keymap.c b/keyboards/planck/keymaps/oeywil/keymap.c new file mode 100644 index 000000000000..f718c8f6a7bf --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H +#include "secret.h" + +enum planck_layers { + _DEFAULT, + _LOWER, + _RAISE, + _FUNCTION, + _GAME, + _GAMERAISE +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FUNCTION MO(_FUNCTION) +#define GAMER MO(_GAMERAISE) + +#define NO_OE KC_SCLN +#define NO_AE KC_QUOT +#define NO_AA KC_LBRC +#define NO_EXCL LSFT(KC_1) +#define NO_QEST LSFT(KC_MINS) +#define NO_APOS KC_BSLS +#define NO_QUOT LSFT(KC_2) +#define NO_UMLA KC_RBRC +#define NO_HASH LSFT(KC_3) +#define NO_FSLS LSFT(KC_7) +#define NO_LPAR LSFT(KC_8) +#define NO_RPAR LSFT(KC_9) +#define NO_ALFA ALGR(KC_2) +#define NO_AMPE LSFT(KC_6) +#define NO_USDO ALGR(KC_4) +#define NO_PERC LSFT(KC_5) +#define NO_BSLS KC_EQL +#define NO_ASTE LSFT(KC_BSLS) +#define NO_LBRA ALGR(KC_7) +#define NO_RBRA ALGR(KC_0) +#define NO_LBRC ALGR(KC_8) +#define NO_RBRC ALGR(KC_9) +#define NO_ANBR KC_NUBS +#define NO_DASH KC_SLSH +#define NO_PLUS KC_MINS +#define NO_EQUA LSFT(KC_0) + +#define TSKMGR LCTL(LSFT(KC_ESC)) +#define STEAM LSFT(KC_F7) +#define WKILL LALT(KC_F4) +#define BWORD LCTL(KC_LEFT) +#define FWORD LCTL(KC_RIGHT) + +float onsong[][2] = SONG(MARIO_MUSHROOM); +float offsong[][2] = SONG(PLOVER_GOODBYE_SOUND); + +enum custom_keycodes { + PWD = SAFE_RANGE, + MAIL, + GAMEON, + GAMEOFF +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PWD: + if (record->event.pressed) { + SEND_STRING(pwd_str); + } + break; + case MAIL: + if (record->event.pressed) { + SEND_STRING(mail_str); + } + break; + case GAMEON: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(onsong); + #endif + layer_on(_GAME); + } + break; + case GAMEOFF: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(offsong); + #endif + layer_off(_GAME); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Å | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Win | Alt | Lower| Space | Enter | Raise| AltGr| Game | Fn | + * `-----------------------------------------------------------------------------------' + */ + [_DEFAULT] = LAYOUT_planck_grid( + 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_GESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_AA, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_NO, KC_SPC, KC_NO, KC_ENT, RAISE, KC_RALT, GAMEON, FUNCTION + ), + /* Lower + * ,-----------------------------------------------------------------------------------. + * | Tab | | PgUp | | | | F7 | F8 | F9 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | BkSp | Left | Down | Right| PgDn | | | | F4 | F5 | F6 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Win | Alt | Lower| Space | Enter | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_planck_grid( + KC_TRNS, BWORD, KC_UP, FWORD, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL, + KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO, + KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Raise + * ,-----------------------------------------------------------------------------------. + * | Tab | ! | ? | ' | " | ¨ | | / | 7 | 8 | 9 | Ins | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | BkSp | @ | & | # | $ | % | <> | \ | 4 | 5 | 6 | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ( | ) | { | } | [ | ] | 0 | 1 | 2 | 3 | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Win | Alt | | Space | Enter | Raise| - | + | = | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_grid( + KC_TRNS, NO_EXCL, NO_QEST, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, NO_FSLS, KC_7, KC_8, KC_9, KC_INS, + KC_BSPC, NO_ALFA, NO_AMPE, NO_HASH, NO_USDO, NO_PERC, NO_ANBR, NO_BSLS, KC_4, KC_5, KC_6, NO_ASTE, + KC_TRNS, NO_LPAR, NO_RPAR, NO_LBRA, NO_RBRA, NO_LBRC, NO_RBRC, KC_0, KC_1, KC_2, KC_3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, NO_DASH, NO_PLUS, NO_EQUA + ), + /* Function + * ,-----------------------------------------------------------------------------------. + * | | | | | |TskMgr| | | | | Pwd | Vol+ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Reset| | | | | | | | Wkill| | | Vol- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mail | | | | VolM | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Play/Pause | Next | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_FUNCTION] = LAYOUT_planck_grid( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TSKMGR, KC_NO, KC_NO, KC_NO, KC_NO, PWD, KC_VOLU, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, WKILL, KC_NO, KC_NO, KC_VOLD, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MAIL, KC_NO, KC_NO, KC_NO, KC_MUTE, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, KC_NO, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Game + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | Alt | Raise| Space | Enter | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_GAME] = LAYOUT_planck_grid( + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_NO, KC_LALT, GAMER, KC_NO, KC_SPC, KC_NO, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Game raise + * ,-----------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | 5 | | | | | | Vol+ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | F1 | F2 | F3 | F4 | F5 | | | | | | Vol- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | | | | | | | | | VolM | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | Alt | | Space | Enter | | | Def | Steam| + * `-----------------------------------------------------------------------------------' + */ + [_GAMERAISE] = LAYOUT_planck_grid( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, GAMEOFF, STEAM + ) +}; diff --git a/keyboards/planck/keymaps/oeywil/readme.md b/keyboards/planck/keymaps/oeywil/readme.md new file mode 100644 index 000000000000..e9e061be3a8f --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/readme.md @@ -0,0 +1,9 @@ +About +------ + +A simple Norwegian Layout. + +Layout +------- + +![Layout](https://i.imgur.com/GQ4iM6B.png "Keyboard Layout") diff --git a/keyboards/planck/keymaps/oeywil/rules.mk b/keyboards/planck/keymaps/oeywil/rules.mk new file mode 100644 index 000000000000..a0373a4d4e5e --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/rules.mk @@ -0,0 +1,9 @@ +SRC += muse.c + +# Build Options +AUDIO_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes + +DEFAULT_FOLDER = planck/rev6 From c8577a9a7320ee0f68378b63b39b649f92016857 Mon Sep 17 00:00:00 2001 From: VM Date: Sat, 16 Feb 2019 21:21:01 -0500 Subject: [PATCH 113/445] [omgvee:keymap] minor changes and fw size optimizations (#5150) - flags for the linker - added INSERT key as I kinda use it for work fairly often - turned on more things in rules.mk since I recovered space via linker flags and whatnot --- keyboards/crkbd/keymaps/omgvee/config.h | 3 +++ keyboards/crkbd/keymaps/omgvee/keymap.c | 2 +- keyboards/crkbd/keymaps/omgvee/rules.mk | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/keyboards/crkbd/keymaps/omgvee/config.h b/keyboards/crkbd/keymaps/omgvee/config.h index 95d5328adb8f..5699c3bebe57 100644 --- a/keyboards/crkbd/keymaps/omgvee/config.h +++ b/keyboards/crkbd/keymaps/omgvee/config.h @@ -46,3 +46,6 @@ along with this program. If not, see . #undef PRODUCT #define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb" + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/crkbd/keymaps/omgvee/keymap.c b/keyboards/crkbd/keymaps/omgvee/keymap.c index 5c4dd416e0e3..2f79250f81dd 100644 --- a/keyboards/crkbd/keymaps/omgvee/keymap.c +++ b/keyboards/crkbd/keymaps/omgvee/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------. ,-----------------------------------------. RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ + LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, INS,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| diff --git a/keyboards/crkbd/keymaps/omgvee/rules.mk b/keyboards/crkbd/keymaps/omgvee/rules.mk index 16deaf45d1de..88e43aa99f34 100644 --- a/keyboards/crkbd/keymaps/omgvee/rules.mk +++ b/keyboards/crkbd/keymaps/omgvee/rules.mk @@ -3,13 +3,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # +EXTRAFLAGS += -flto BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +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 +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode From cbb7e91851fea0174a5e950c22c35a4384eac8e7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 16 Feb 2019 18:28:04 -0800 Subject: [PATCH 114/445] Update Drashna user space code to support keyboard_init functions (#5138) * Update code to support keyboard_init functions * Get Minor tweaks --- .../community/ergodox/drashna_glow/rules.mk | 1 + users/drashna/config.h | 2 +- users/drashna/drashna.c | 14 +++++-- users/drashna/rgb_stuff.c | 38 ++++++++++--------- users/drashna/rgb_stuff.h | 2 +- 5 files changed, 34 insertions(+), 23 deletions(-) diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index e152fa01f0d5..5cb47dae4e37 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk @@ -6,4 +6,5 @@ SRC += ../drashna/keymap.c ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes + TAP_DANCE_ENABLE = no endif diff --git a/users/drashna/config.h b/users/drashna/config.h index 20e58fd0bb54..2e125d1e4ef0 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -55,7 +55,7 @@ // and when this option isn't enabled, z rapidly followed by x // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT -// #define PERMISSIVE_HOLD +#undef PERMISSIVE_HOLD //#define TAPPING_FORCE_HOLD //#define RETRO_TAPPING diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 222824837981..8019f26676f2 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -122,11 +122,17 @@ void matrix_init_user(void) { get_unicode_input_mode(); #endif //UNICODE_ENABLE matrix_init_keymap(); - #ifdef RGBLIGHT_ENABLE - matrix_init_rgb(); - #endif //RGBLIGHT_ENABLE } +__attribute__((weak)) +void keyboard_post_init_keymap(void){ } + +void keyboard_post_init_user(void){ +#ifdef RGBLIGHT_ENABLE + keyboard_post_init_rgb(); +#endif + keyboard_post_init_keymap(); +} __attribute__ ((weak)) void shutdown_keymap(void) {} @@ -208,9 +214,11 @@ uint32_t default_layer_state_set_keymap (uint32_t state) { // Runs state check and changes underglow color and animation uint32_t default_layer_state_set_user(uint32_t state) { state = default_layer_state_set_keymap(state); +#if 0 #ifdef RGBLIGHT_ENABLE state = default_layer_state_set_rgb(state); #endif // RGBLIGHT_ENABLE +#endif return state; } diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 37076ce99044..7eaa7e94918b 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -243,25 +243,25 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - void matrix_init_rgb(void) { +void keyboard_post_init_rgb(void) { -// #ifdef RGBLIGHT_ENABLE -// if (userspace_config.rgb_layer_change) { -// rgblight_enable_noeeprom(); -// switch (biton32(eeconfig_read_default_layer())) { -// case _COLEMAK: -// rgblight_sethsv_noeeprom_magenta(); break; -// case _DVORAK: -// rgblight_sethsv_noeeprom_springgreen(); break; -// case _WORKMAN: -// rgblight_sethsv_noeeprom_goldenrod(); break; -// default: -// rgblight_sethsv_noeeprom_cyan(); break; -// } -// rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); -// } -// #endif - } +#ifdef RGBLIGHT_ENABLE + if (userspace_config.rgb_layer_change) { + rgblight_enable_noeeprom(); + switch (biton32(eeconfig_read_default_layer())) { + case _COLEMAK: + rgblight_sethsv_noeeprom_magenta(); break; + case _DVORAK: + rgblight_sethsv_noeeprom_springgreen(); break; + case _WORKMAN: + rgblight_sethsv_noeeprom_goldenrod(); break; + default: + rgblight_sethsv_noeeprom_cyan(); break; + } + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + } +#endif +} void matrix_scan_rgb(void) { #ifdef RGBLIGHT_TWINKLE @@ -336,6 +336,7 @@ uint32_t layer_state_set_rgb(uint32_t state) { return state; } +#if 0 uint32_t default_layer_state_set_rgb(uint32_t state) { #ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { @@ -371,3 +372,4 @@ uint32_t default_layer_state_set_rgb(uint32_t state) { #endif // RGBLIGHT_ENABLE return state; } +#endif diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 065bda9f9ebd..886f20ffcca1 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -13,7 +13,7 @@ typedef struct { bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); void scan_rgblight_fadeout(void); -void matrix_init_rgb(void); +void keyboard_post_init_rgb(void); void matrix_scan_rgb(void); uint32_t layer_state_set_rgb(uint32_t state); uint32_t default_layer_state_set_rgb(uint32_t state); From 16226274c9d217ebca0fefdd957b1e07181d3b46 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 16 Feb 2019 18:30:14 -0800 Subject: [PATCH 115/445] Add numpad_5x6 layout support for Prime M keyboard (#5149) * Add numpad_5x6 layout support for Prime M keyboard * fix default layout --- keyboards/primekb/prime_m/info.json | 40 ++++++++++++++++++- .../primekb/prime_m/keymaps/default/keymap.c | 38 +++++++++--------- .../primekb/prime_m/keymaps/numpad/config.h | 19 +++++++++ .../primekb/prime_m/keymaps/numpad/keymap.c | 33 +++++++++++++++ .../primekb/prime_m/keymaps/numpad/readme.md | 1 + keyboards/primekb/prime_m/prime_m.h | 20 ++++++++-- keyboards/primekb/prime_m/rules.mk | 2 + .../numpad_5x6/default_numpad_5x6/keymap.c | 18 +++++++++ layouts/default/numpad_5x6/layout.json | 6 +++ layouts/default/numpad_5x6/readme.md | 3 ++ 10 files changed, 155 insertions(+), 25 deletions(-) create mode 100644 keyboards/primekb/prime_m/keymaps/numpad/config.h create mode 100644 keyboards/primekb/prime_m/keymaps/numpad/keymap.c create mode 100644 keyboards/primekb/prime_m/keymaps/numpad/readme.md create mode 100644 layouts/default/numpad_5x6/default_numpad_5x6/keymap.c create mode 100644 layouts/default/numpad_5x6/layout.json create mode 100644 layouts/default/numpad_5x6/readme.md diff --git a/keyboards/primekb/prime_m/info.json b/keyboards/primekb/prime_m/info.json index 5332522022a1..822823e62a90 100644 --- a/keyboards/primekb/prime_m/info.json +++ b/keyboards/primekb/prime_m/info.json @@ -1,3 +1,4 @@ + { "keyboard_name": "Prime_M", "url": "https://www.primekb.com", @@ -5,8 +6,43 @@ "width": 6, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_ortho_5x6": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}] + }, + "LAYOUT_numpad_5x6": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4, "y":4}, + {"x":5, "y":3, "h":2} + ] } - } +} } diff --git a/keyboards/primekb/prime_m/keymaps/default/keymap.c b/keyboards/primekb/prime_m/keymaps/default/keymap.c index d230439d08e6..6834624d83cb 100644 --- a/keyboards/primekb/prime_m/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_m/keymaps/default/keymap.c @@ -22,28 +22,28 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), - KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, - KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, - KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_ENT + [0] = LAYOUT_ortho_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), + KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, + KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_PENT ), - [1] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9), - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC + [1] = LAYOUT_ortho_5x6( + KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC ), - - [2] = LAYOUT( - 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_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD + + [2] = LAYOUT_ortho_5x6( + BL_TOGG, BL_STEP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, KC_MUTE, KC_VOLD ) }; diff --git a/keyboards/primekb/prime_m/keymaps/numpad/config.h b/keyboards/primekb/prime_m/keymaps/numpad/config.h new file mode 100644 index 000000000000..95917a65cd43 --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/numpad/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jumail Mundekkat + * + * 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/primekb/prime_m/keymaps/numpad/keymap.c b/keyboards/primekb/prime_m/keymaps/numpad/keymap.c new file mode 100644 index 000000000000..35ff30a0c84b --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/numpad/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2018 Jumail Mundekkat + * + * 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_numpad_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_P7, KC_P8, KC_P9, + KC_C, KC_D, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_E, KC_F, KC_P1, KC_P2, KC_P3, + KC_LCTL, TG(1), KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_5x6( + RESET, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_HOME, KC_UP, KC_PGUP, + KC_C, KC_D, KC_LEFT, KC_NO, KC_RGHT, KC_PPLS, + KC_E, KC_F, KC_END, KC_DOWN, KC_PGDN, + KC_LCTL, _______, KC_INS, KC_DEL, KC_PENT + ), +}; diff --git a/keyboards/primekb/prime_m/keymaps/numpad/readme.md b/keyboards/primekb/prime_m/keymaps/numpad/readme.md new file mode 100644 index 000000000000..5654918abb2e --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/numpad/readme.md @@ -0,0 +1 @@ +# The default keymap for prime_m \ No newline at end of file diff --git a/keyboards/primekb/prime_m/prime_m.h b/keyboards/primekb/prime_m/prime_m.h index 0449a66d9b96..58d17eb6f689 100644 --- a/keyboards/primekb/prime_m/prime_m.h +++ b/keyboards/primekb/prime_m/prime_m.h @@ -13,12 +13,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIME_M_H -#define PRIME_M_H +#pragma once #include "quantum.h" +#define ___ KC_NO -#define LAYOUT( \ +#define LAYOUT_ortho_5x6( \ K00, K01, K02, K03, K04, K05, \ K10, K11, K12, K13, K14, K15, \ K20, K21, K22, K23, K24, K25, \ @@ -32,4 +32,16 @@ { K40, K41, K42, K43, K44, K45 } \ } -#endif +#define LAYOUT_numpad_5x6( \ + K00, K01, K02, K03, K04, K05, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, K15, \ + K30, K31, K32, K33, K34, \ + K40, K41, K42, K44, K35 \ +) { \ + { K00, K01, K02, K03, K04, K05 }, \ + { K10, K11, K12, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, ___ }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K40, K41, K42, ___, K44, ___ } \ +} diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index 8d3b835f188c..72ad8325d303 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -78,3 +78,5 @@ 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) + +LAYOUTS = ortho_5x6 numpad_5x6 diff --git a/layouts/default/numpad_5x6/default_numpad_5x6/keymap.c b/layouts/default/numpad_5x6/default_numpad_5x6/keymap.c new file mode 100644 index 000000000000..527d08905295 --- /dev/null +++ b/layouts/default/numpad_5x6/default_numpad_5x6/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_P7, KC_P8, KC_P9, + KC_C, KC_D, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_E, KC_F, KC_P1, KC_P2, KC_P3, + KC_LCTL, TG(1), KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_5x6( + RESET, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_HOME, KC_UP, KC_PGUP, + KC_C, KC_D, KC_LEFT, KC_NO, KC_RGHT, KC_PPLS, + KC_E, KC_F, KC_END, KC_DOWN, KC_PGDN, + KC_LCTL, _______, KC_INS, KC_DEL, KC_PENT + ), +}; diff --git a/layouts/default/numpad_5x6/layout.json b/layouts/default/numpad_5x6/layout.json new file mode 100644 index 000000000000..7264cd5a6dc6 --- /dev/null +++ b/layouts/default/numpad_5x6/layout.json @@ -0,0 +1,6 @@ +["","","",""], +[{y:0.5},"","","",""], +["","","",{h:2},""], +["","",""], +["","","",{h:2},""], +[{w:2},"",""] diff --git a/layouts/default/numpad_5x6/readme.md b/layouts/default/numpad_5x6/readme.md new file mode 100644 index 000000000000..147097c8371c --- /dev/null +++ b/layouts/default/numpad_5x6/readme.md @@ -0,0 +1,3 @@ +# numpad_5x6 + + LAYOUT_numpad_5x6 From a7a647b7f6d707e9c952461beeca1f3637039d36 Mon Sep 17 00:00:00 2001 From: Rodrigo Feijao Date: Sun, 17 Feb 2019 02:34:07 +0000 Subject: [PATCH 116/445] Add support to XD60 Rev3 (#4938) * Add preliminary support to XD60 Rev3 PCB (Supports the 12 underglow LEDs, but split spacebar still not wired/implemented). * * xd60_rev3 folder removed * xd60 rev2 and rev3 added * ifndef replaced with pragma once at rev3 config.h * Readme updated * new updated statement at keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * * XXXXX removed and replaced with 7X * removed unecessary declarations * Update keyboards/xd60/keymaps/styr/keymap.c Co-Authored-By: rodrigofeijao * action_layer.h include removed * * action_get_macro removed * IS_COMMAND() removed * BOOTLOADER defined --- keyboards/xd60/keymaps/styr/keymap.c | 56 +++++++++++++++++++++ keyboards/xd60/keymaps/styr/readme.md | 7 +++ keyboards/xd60/readme.md | 13 +++-- keyboards/xd60/{ => rev2}/config.h | 0 keyboards/xd60/{ => rev2}/rules.mk | 0 keyboards/xd60/rev3/config.h | 71 +++++++++++++++++++++++++++ keyboards/xd60/rev3/rules.mk | 67 +++++++++++++++++++++++++ 7 files changed, 210 insertions(+), 4 deletions(-) create mode 100644 keyboards/xd60/keymaps/styr/keymap.c create mode 100644 keyboards/xd60/keymaps/styr/readme.md rename keyboards/xd60/{ => rev2}/config.h (100%) rename keyboards/xd60/{ => rev2}/rules.mk (100%) create mode 100644 keyboards/xd60/rev3/config.h create mode 100644 keyboards/xd60/rev3/rules.mk diff --git a/keyboards/xd60/keymaps/styr/keymap.c b/keyboards/xd60/keymaps/styr/keymap.c new file mode 100644 index 000000000000..2fbfe2563a63 --- /dev/null +++ b/keyboards/xd60/keymaps/styr/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 +#define _LL 2 + +enum custom_keycodes { + MACRO_STRING +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + [_BL] = LAYOUT_all( + 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_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + MO(_LL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, 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_DEL, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(_FL), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + [_FL] = LAYOUT_all( + XXXXXXX, 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_F14, \ + XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, RGB_VAI, RGB_VAD, 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, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, \ + XXXXXXX, XXXXXXX, XXXXXXX, MACRO_STRING, XXXXXXX, F(0), KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT), + + [_LL] = LAYOUT_all( + XXXXXXX, 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_F14, \ + XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC__MUTE, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MPLY, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(0), KC_MRWD, KC_VOLD, KC_MFFD), + + +}; + +// Macros +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MACRO_STRING: + if(record->event.pressed){ + SEND_STRING("My Custom String"); + } + return false; + break; + default: + return true; + } +} + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/xd60/keymaps/styr/readme.md b/keyboards/xd60/keymaps/styr/readme.md new file mode 100644 index 000000000000..8d9edf7c48ce --- /dev/null +++ b/keyboards/xd60/keymaps/styr/readme.md @@ -0,0 +1,7 @@ +# Keyboard Layout by Styr + +## Additional Notes +Default Keymap for XD60 as indicated on the original sale page. + +## Build +To build the default keymap, simply run `make xd60/rev3:styr`. diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index 24f07c47bc73..b9862428c777 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -6,11 +6,16 @@ Compact 60% with arrows. ![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) Keyboard Maintainer: QMK Community -Hardware Supported: XD60 PCB +Hardware Supported: XD60 PCB rev2 & rev3 Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open -Make example for this keyboard (after setting up your build environment): +With the implementation of Rev3 you need to specify the Rev you want to build. +To build for a Rev2 with a default keymap: - make xd60:default +```make xd60/rev2:default``` -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. +To build for a Rev3 with a default keymap: + +```make xd60/rev3: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/xd60/config.h b/keyboards/xd60/rev2/config.h similarity index 100% rename from keyboards/xd60/config.h rename to keyboards/xd60/rev2/config.h diff --git a/keyboards/xd60/rules.mk b/keyboards/xd60/rev2/rules.mk similarity index 100% rename from keyboards/xd60/rules.mk rename to keyboards/xd60/rev2/rules.mk diff --git a/keyboards/xd60/rev3/config.h b/keyboards/xd60/rev3/config.h new file mode 100644 index 000000000000..d88330cf7b36 --- /dev/null +++ b/keyboards/xd60/rev3/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2019 Rodrigo Feijao + +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 0x6363 +#define DEVICE_VER 0x0001 +#define MANUFACTURER XIUDI +#define PRODUCT XD60rev3 +#define DESCRIPTION XD60 rev3 Keyboard PCB by XIUDI + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* Backlight Setup */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* RGB Underglow + * F6 PIN for XD60v3 that has pre-soldered LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* 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 diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk new file mode 100644 index 000000000000..f33fff76cef0 --- /dev/null +++ b/keyboards/xd60/rev3/rules.mk @@ -0,0 +1,67 @@ +# MCU name +# MCU = at90usb1287 +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 + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + + +# Build 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 +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = 60_ansi From 2cee371bf125a6ec541dd7c5a809573facc7c456 Mon Sep 17 00:00:00 2001 From: ishtob Date: Sat, 16 Feb 2019 21:39:30 -0500 Subject: [PATCH 117/445] Haptic feedback generalized - DRV2605 and solenoids (#4939) * initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards * Haptic feedback enhancements: on/off toggle working, feedback order working todo: -work on modes switching -get modes switching to save to eeprom * haptic enhancement - eeprom and modes added * Added set and get functions for haptic feedback * initial implementation of solenoids under haptic feedback * changed eeprom to 32 bits to reserve blocks for future features * start documentation of haptic feedback * change keycode per comment from reviewers * typo fixes * added eeprom for solenoid configs * added solenoid and docs * Add/fix default parameters configs, improve docs * more doc cleanup * add in solenoid buzz toggle, clean up doc * some fixes for error in compiling solenoid * fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c * fixes for avr side issues * update keymap * fix keymap compile error * fix bugs found during solenoid testing * set pin that is not powered during bootloader * added warning about certain pins on the MCU may trip solenoid during DFU/bootloader --- common_features.mk | 10 + docs/feature_haptic_feedback.md | 147 +++++++++++ drivers/haptic/DRV2605L.c | 24 +- drivers/haptic/DRV2605L.h | 26 +- drivers/haptic/haptic.c | 248 ++++++++++++++++++ drivers/haptic/haptic.h | 82 ++++++ drivers/haptic/solenoid.c | 109 ++++++++ drivers/haptic/solenoid.h | 54 ++++ keyboards/hadron/ver3/config.h | 3 + .../hadron/ver3/keymaps/default/keymap.c | 4 +- keyboards/hadron/ver3/keymaps/ishtob/keymap.c | 2 +- keyboards/hadron/ver3/rules.mk | 2 +- keyboards/hadron/ver3/ver3.c | 10 +- quantum/quantum.c | 16 ++ quantum/quantum.h | 4 + quantum/quantum_keycodes.h | 49 ++-- tmk_core/common/eeconfig.c | 9 + tmk_core/common/eeconfig.h | 7 + 18 files changed, 754 insertions(+), 52 deletions(-) create mode 100644 docs/feature_haptic_feedback.md create mode 100644 drivers/haptic/haptic.c create mode 100644 drivers/haptic/haptic.h create mode 100644 drivers/haptic/solenoid.c create mode 100644 drivers/haptic/solenoid.h diff --git a/common_features.mk b/common_features.mk index 6f02dbac6298..3d3b8506e40e 100644 --- a/common_features.mk +++ b/common_features.mk @@ -246,11 +246,21 @@ endif ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L) COMMON_VPATH += $(DRIVER_PATH)/haptic + SRC += haptic.c SRC += DRV2605L.c SRC += i2c_master.c + OPT_DEFS += -DHAPTIC_ENABLE OPT_DEFS += -DDRV2605L endif +ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID) + COMMON_VPATH += $(DRIVER_PATH)/haptic + SRC += haptic.c + SRC += solenoid.c + OPT_DEFS += -DHAPTIC_ENABLE + OPT_DEFS += -DSOLENOID_ENABLE +endif + ifeq ($(strip $(HD44780_ENABLE)), yes) SRC += drivers/avr/hd44780.c OPT_DEFS += -DHD44780_ENABLE diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md new file mode 100644 index 000000000000..85fd4396402a --- /dev/null +++ b/docs/feature_haptic_feedback.md @@ -0,0 +1,147 @@ +# Haptic Feedback + +## Haptic feedback rules.mk options + +The following options are currently available for haptic feedback in `rule.mk`: + +`HAPTIC_ENABLE += DRV2605L` + +`HAPTIC_ENABLE += SOLENOID` + +## Known Supported Hardware + +| Name | Description | +|--------------------|-------------------------------------------------| +| [LV061228B-L65-A](https://www.digikey.com/product-detail/en/jinlong-machinery-electronics-inc/LV061228B-L65-A/1670-1050-ND/7732325) | z-axis 2v LRA | +| [Mini Motor Disc](https://www.adafruit.com/product/1201) | small 2-5v ERM | + +## Haptic Keycodes + +Not all keycodes below will work depending on which haptic mechanism you have chosen. + +| Name | Description | +|-----------|-------------------------------------------------------| +|`HPT_ON` | Turn haptic feedback on | +|`HPT_OFF` | Turn haptic feedback on | +|`HPT_TOG` | Toggle haptic feedback on/off | +|`HPT_RST` | Reset haptic feedback config to default | +|`HPT_FBK` | Toggle feedback to occur on keypress, release or both | +|`HPT_BUZ` | Toggle solenoid buzz on/off | +|`HPT_MODI` | Go to next DRV2605L waveform | +|`HPT_MODD` | Go to previous DRV2605L waveform | +|`HPT_DWLI` | Increase Solenoid dwell time | +|`HPT_DWLD` | Decrease Solenoid dwell time | + +### Solenoids + +First you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid. + +[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf) + +Select a pin that has PWM for the signal pin + +``` +#define SOLENOID_PIN *pin* +``` + +Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin. + +### DRV2605L + +DRV2605L is controlled over i2c protocol, and has to be connected to the SDA and SCL pins, these varies depending on the MCU in use. + +#### Feedback motor setup + +This driver supports 2 different feedback motors. Set the following in your `config.h` based on which motor you have selected. + +##### ERM + +Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations. + +``` +#define FB_ERM_LRA 0 +#define FB_BRAKEFACTOR 3 /* 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 */ + +/* Please refer to your datasheet for the optimal setting for your specific motor. */ +#define RATED_VOLTAGE 3 +#define V_PEAK 5 +``` +##### LRA + +Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency. + +``` +#define FB_ERM_LRA 1 +#define FB_BRAKEFACTOR 3 /* 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 */ + +/* Please refer to your datasheet for the optimal setting for your specific motor. */ +#define RATED_VOLTAGE 2 +#define V_PEAK 2.8 +#define V_RMS 2.0 +#define V_PEAK 2.1 +#define F_LRA 205 /* resonance freq */ +``` + +#### DRV2605L waveform library + +DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)` + +List of waveform sequences from the datasheet: + +|seq# | Sequence name |seq# | Sequence name |seq# |Sequence name | +|-----|---------------------|-----|-----------------------------------|-----|--------------------------------------| +| 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 | +| 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 | +| 3 | strong_click_30 | 45 | lg_dblsharp_tick_80 | 87 | transition_rampup_short_smooth2 | +| 4 | sharp_click | 46 | lg_dblsharp_tick_60 | 88 | transition_rampup_long_sharp1 | +| 5 | sharp_click_60 | 47 | buzz | 89 | transition_rampup_long_sharp2 | +| 6 | sharp_click_30 | 48 | buzz_80 | 90 | transition_rampup_med_sharp1 | +| 7 | soft_bump | 49 | buzz_60 | 91 | transition_rampup_med_sharp2 | +| 8 | soft_bump_60 | 50 | buzz_40 | 92 | transition_rampup_short_sharp1 | +| 9 | soft_bump_30 | 51 | buzz_20 | 93 | transition_rampup_short_sharp2 | +| 10 | dbl_click | 52 | pulsing_strong | 94 | transition_rampdown_long_smooth1_50 | +| 11 | dbl_click_60 | 53 | pulsing_strong_80 | 95 | transition_rampdown_long_smooth2_50 | +| 12 | trp_click | 54 | pulsing_medium | 96 | transition_rampdown_med_smooth1_50 | +| 13 | soft_fuzz | 55 | pulsing_medium_80 | 97 | transition_rampdown_med_smooth2_50 | +| 14 | strong_buzz | 56 | pulsing_sharp | 98 | transition_rampdown_short_smooth1_50 | +| 15 | alert_750ms | 57 | pulsing_sharp_80 | 99 | transition_rampdown_short_smooth2_50 | +| 16 | alert_1000ms | 58 | transition_click | 100 | transition_rampdown_long_sharp1_50 | +| 17 | strong_click1 | 59 | transition_click_80 | 101 | transition_rampdown_long_sharp2_50 | +| 18 | strong_click2_80 | 60 | transition_click_60 | 102 | transition_rampdown_med_sharp1_50 | +| 19 | strong_click3_60 | 61 | transition_click_40 | 103 | transition_rampdown_med_sharp2_50 | +| 20 | strong_click4_30 | 62 | transition_click_20 | 104 | transition_rampdown_short_sharp1_50 | +| 21 | medium_click1 | 63 | transition_click_10 | 105 | transition_rampdown_short_sharp2_50 | +| 22 | medium_click2_80 | 64 | transition_hum | 106 | transition_rampup_long_smooth1_50 | +| 23 | medium_click3_60 | 65 | transition_hum_80 | 107 | transition_rampup_long_smooth2_50 | +| 24 | sharp_tick1 | 66 | transition_hum_60 | 108 | transition_rampup_med_smooth1_50 | +| 25 | sharp_tick2_80 | 67 | transition_hum_40 | 109 | transition_rampup_med_smooth2_50 | +| 26 | sharp_tick3_60 | 68 | transition_hum_20 | 110 | transition_rampup_short_smooth1_50 | +| 27 | sh_dblclick_str | 69 | transition_hum_10 | 111 | transition_rampup_short_smooth2_50 | +| 28 | sh_dblclick_str_80 | 70 | transition_rampdown_long_smooth1 | 112 | transition_rampup_long_sharp1_50 | +| 29 | sh_dblclick_str_60 | 71 | transition_rampdown_long_smooth2 | 113 | transition_rampup_long_sharp2_50 | +| 30 | sh_dblclick_str_30 | 72 | transition_rampdown_med_smooth1 | 114 | transition_rampup_med_sharp1_50 | +| 31 | sh_dblclick_med | 73 | transition_rampdown_med_smooth2 | 115 | transition_rampup_med_sharp2_50 | +| 32 | sh_dblclick_med_80 | 74 | transition_rampdown_short_smooth1 | 116 | transition_rampup_short_sharp1_50 | +| 33 | sh_dblclick_med_60 | 75 | transition_rampdown_short_smooth2 | 117 | transition_rampup_short_sharp2_50 | +| 34 | sh_dblsharp_tick | 76 | transition_rampdown_long_sharp1 | 118 | long_buzz_for_programmatic_stopping | +| 35 | sh_dblsharp_tick_80 | 77 | transition_rampdown_long_sharp2 | 119 | smooth_hum1_50 | +| 36 | sh_dblsharp_tick_60 | 78 | transition_rampdown_med_sharp1 | 120 | smooth_hum2_40 | +| 37 | lg_dblclick_str | 79 | transition_rampdown_med_sharp2 | 121 | smooth_hum3_30 | +| 38 | lg_dblclick_str_80 | 80 | transition_rampdown_short_sharp1 | 122 | smooth_hum4_20 | +| 39 | lg_dblclick_str_60 | 81 | transition_rampdown_short_sharp2 | 123 | smooth_hum5_10 | +| 40 | lg_dblclick_str_30 | 82 | transition_rampup_long_smooth1 | | | +| 41 | lg_dblclick_med | 83 | transition_rampup_long_smooth2 | | | +| 42 | lg_dblclick_med_80 | 84 | transition_rampup_med_smooth1 | | | +### Optional DRV2605L defines + +``` +#define DRV_GREETING *sequence name or number* +``` +If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence during startup. That can be selected using the following define: + +``` +#define DRV_MODE_DEFAULT *sequence name or number* +``` +This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed. diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 97ca292b9b1a..215e6be3e7cb 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -21,7 +21,7 @@ #include -uint8_t DRV2605L_transfer_buffer[20]; +uint8_t DRV2605L_transfer_buffer[2]; uint8_t DRV2605L_tx_register[0]; uint8_t DRV2605L_read_buffer[0]; uint8_t DRV2605L_read_register; @@ -34,6 +34,11 @@ void DRV_write(uint8_t drv_register, uint8_t settings) { } uint8_t DRV_read(uint8_t regaddress) { +#ifdef __AVR__ + i2c_readReg(DRV2605L_BASE_ADDRESS << 1, + regaddress, DRV2605L_read_buffer, 1, 100); + DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; +#else DRV2605L_tx_register[0] = regaddress; if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, @@ -42,14 +47,13 @@ uint8_t DRV_read(uint8_t regaddress) { printf("err reading reg \n"); } DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; +#endif return DRV2605L_read_register; } void DRV_init(void) { i2c_init(); - i2c_start(DRV2605L_BASE_ADDRESS); - /* 0x07 sets DRV2605 into calibration mode */ DRV_write(DRV_MODE,0x07); @@ -104,21 +108,17 @@ void DRV_init(void) C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME; DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte); DRV_write(DRV_LIB_SELECTION,LIB_SELECTION); - //start autocalibration + DRV_write(DRV_GO, 0x01); /* 0x00 sets DRV2605 out of standby and to use internal trigger * 0x01 sets DRV2605 out of standby and to use external trigger */ DRV_write(DRV_MODE,0x00); - - /* 0x06: LRA library */ - DRV_write(DRV_WAVEFORM_SEQ_1, 0x01); - - /* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF - * 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */ - - /* TODO: setup auto-calibration as part of initiation */ +//Play greeting sequence + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING); + DRV_write(DRV_GO, 0x01); } void DRV_pulse(uint8_t sequence) diff --git a/drivers/haptic/DRV2605L.h b/drivers/haptic/DRV2605L.h index de9d294e9d13..836e9cbcd281 100644 --- a/drivers/haptic/DRV2605L.h +++ b/drivers/haptic/DRV2605L.h @@ -31,13 +31,6 @@ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ #endif -#ifndef RATED_VOLTAGE -#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ -#ifndef V_PEAK -#define V_PEAK 2.8 -#endif -#endif - /* LRA specific settings */ #if FB_ERM_LRA == 1 #ifndef V_RMS @@ -49,6 +42,16 @@ #ifndef F_LRA #define F_LRA 205 #endif +#ifndef RATED_VOLTAGE +#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ +#endif +#endif + +#ifndef RATED_VOLTAGE +#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ +#endif +#ifndef V_PEAK +#define V_PEAK 2.8 #endif /* Library Selection */ @@ -60,6 +63,13 @@ #endif #endif +#ifndef DRV_GREETING +#define DRV_GREETING alert_750ms +#endif +#ifndef DRV_MODE_DEFAULT +#define DRV_MODE_DEFAULT strong_click1 +#endif + /* Control 1 register settings */ #ifndef DRIVE_TIME #define DRIVE_TIME 25 @@ -162,7 +172,6 @@ void DRV_write(const uint8_t drv_register, const uint8_t settings); uint8_t DRV_read(const uint8_t regaddress); void DRV_pulse(const uint8_t sequence); - typedef enum DRV_EFFECT{ clear_sequence = 0, strong_click = 1, @@ -288,6 +297,7 @@ typedef enum DRV_EFFECT{ smooth_hum3_30 = 121, smooth_hum4_20 = 122, smooth_hum5_10 = 123, + drv_effect_max = 124, } DRV_EFFECT; /* Register bit array unions */ diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c new file mode 100644 index 000000000000..a94f05565c22 --- /dev/null +++ b/drivers/haptic/haptic.c @@ -0,0 +1,248 @@ +/* Copyright 2019 ishtob + * Driver for haptic feedback written for QMK + * + * 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 "haptic.h" +#include "eeconfig.h" +#include "progmem.h" +#include "debug.h" +#ifdef DRV2605L +#include "DRV2605L.h" +#endif +#ifdef SOLENOID_ENABLE +#include "solenoid.h" +#endif + +haptic_config_t haptic_config; + +void haptic_init(void) { + debug_enable = 1; //Debug is ON! + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + haptic_config.raw = eeconfig_read_haptic(); + if (haptic_config.mode < 1){ + haptic_config.mode = 1; + } + if (!haptic_config.mode){ + dprintf("No haptic config found in eeprom, setting default configs\n"); + haptic_reset(); + } + #ifdef SOLENOID_ENABLE + solenoid_setup(); + dprintf("Solenoid driver initialized\n"); + #endif + #ifdef DRV2605L + DRV_init(); + dprintf("DRV2605 driver initialized\n"); + #endif + eeconfig_debug_haptic(); +} + +void haptic_task(void) { + #ifdef SOLENOID_ENABLE + solenoid_check(); + #endif +} + +void eeconfig_debug_haptic(void) { + dprintf("haptic_config eprom\n"); + dprintf("haptic_config.enable = %d\n", haptic_config.enable); + dprintf("haptic_config.mode = %d\n", haptic_config.mode); +} + +void haptic_enable(void) { + haptic_config.enable = 1; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_disable(void) { + haptic_config.enable = 0; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_toggle(void) { +if (haptic_config.enable) { + haptic_disable(); + } else { + haptic_enable(); + } + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_feedback_toggle(void){ + haptic_config.feedback++; + if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) + haptic_config.feedback = KEY_PRESS; + xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_buzz_toggle(void) { + bool buzz_stat = !haptic_config.buzz; + haptic_config.buzz = buzz_stat; + haptic_set_buzz(buzz_stat); +} + +void haptic_mode_increase(void) { + uint8_t mode = haptic_config.mode + 1; + #ifdef DRV2605L + if (haptic_config.mode >= drv_effect_max) { + mode = 1; + } + #endif + haptic_set_mode(mode); +} + +void haptic_mode_decrease(void) { + uint8_t mode = haptic_config.mode -1; + #ifdef DRV2605L + if (haptic_config.mode < 1) { + mode = (drv_effect_max - 1); + } + #endif + haptic_set_mode(mode); +} + +void haptic_dwell_increase(void) { + uint8_t dwell = haptic_config.dwell + 1; + #ifdef SOLENOID_ENABLE + if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { + dwell = 1; + } + solenoid_set_dwell(dwell); + #endif + haptic_set_dwell(dwell); +} + +void haptic_dwell_decrease(void) { + uint8_t dwell = haptic_config.dwell -1; + #ifdef SOLENOID_ENABLE + if (haptic_config.dwell < SOLENOID_MIN_DWELL) { + dwell = SOLENOID_MAX_DWELL; + } + solenoid_set_dwell(dwell); + #endif + haptic_set_dwell(dwell); +} + +void haptic_reset(void){ + haptic_config.enable = true; + uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; + haptic_config.feedback = feedback; + #ifdef DRV2605L + uint8_t mode = HAPTIC_MODE_DEFAULT; + haptic_config.mode = mode; + #endif + #ifdef SOLENOID_ENABLE + uint8_t dwell = SOLENOID_DEFAULT_DWELL; + haptic_config.dwell = dwell; + #endif + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_feedback(uint8_t feedback) { + haptic_config.feedback = feedback; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); +} + +void haptic_set_mode(uint8_t mode) { + haptic_config.mode = mode; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_buzz(uint8_t buzz) { + haptic_config.buzz = buzz; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.buzz = %u\n", haptic_config.buzz); +} + +void haptic_set_dwell(uint8_t dwell) { + haptic_config.dwell = dwell; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.dwell = %u\n", haptic_config.dwell); +} + +uint8_t haptic_get_mode(void) { + if (!haptic_config.enable){ + return false; + } + return haptic_config.mode; +} + +uint8_t haptic_get_feedback(void) { + if (!haptic_config.enable){ + return false; + } + return haptic_config.feedback; +} + +uint8_t haptic_get_dwell(void) { + if (!haptic_config.enable){ + return false; + } + return haptic_config.dwell; +} + +void haptic_play(void) { + #ifdef DRV2605L + uint8_t play_eff = 0; + play_eff = haptic_config.mode; + DRV_pulse(play_eff); + #endif + #ifdef SOLENOID_ENABLE + solenoid_fire(); + #endif +} + +bool process_haptic(uint16_t keycode, keyrecord_t *record) { + if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); } + if (keycode == HPT_OFF && record->event.pressed) { haptic_disable(); } + if (keycode == HPT_TOG && record->event.pressed) { haptic_toggle(); } + if (keycode == HPT_RST && record->event.pressed) { haptic_reset(); } + if (keycode == HPT_FBK && record->event.pressed) { haptic_feedback_toggle(); } + if (keycode == HPT_BUZ && record->event.pressed) { haptic_buzz_toggle(); } + if (keycode == HPT_MODI && record->event.pressed) { haptic_mode_increase(); } + if (keycode == HPT_MODD && record->event.pressed) { haptic_mode_decrease(); } + if (keycode == HPT_DWLI && record->event.pressed) { haptic_dwell_increase(); } + if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); } + if (haptic_config.enable) { + if ( record->event.pressed ) { + // keypress + if (haptic_config.feedback < 2) { + haptic_play(); + } + } else { + //keyrelease + if (haptic_config.feedback > 0) { + haptic_play(); + } + } + } + return true; +} + +void haptic_shutdown(void) { + #ifdef SOLENOID_ENABLE + solenoid_shutdown(); + #endif + +} diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h new file mode 100644 index 000000000000..d39dc5c3b9d6 --- /dev/null +++ b/drivers/haptic/haptic.h @@ -0,0 +1,82 @@ +/* Copyright 2019 ishtob + * Driver for haptic feedback written for QMK + * + * 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 +#include +#include "quantum.h" +#ifdef DRV2605L +#include "DRV2605L.h" +#endif + + +#ifndef HAPTIC_FEEDBACK_DEFAULT +#define HAPTIC_FEEDBACK_DEFAULT 0 +#endif +#ifndef HAPTIC_MODE_DEFAULT +#define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT +#endif + +/* EEPROM config settings */ +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t feedback :2; + uint8_t mode :7; + bool buzz :1; + uint8_t dwell :7; + uint16_t reserved :16; + }; +} haptic_config_t; + +typedef enum HAPTIC_FEEDBACK{ + KEY_PRESS, + KEY_PRESS_RELEASE, + KEY_RELEASE, + HAPTIC_FEEDBACK_MAX, +} HAPTIC_FEEDBACK; + +bool process_haptic(uint16_t keycode, keyrecord_t *record); +void haptic_init(void); +void haptic_task(void); +void eeconfig_debug_haptic(void); +void haptic_enable(void); +void haptic_disable(void); +void haptic_toggle(void); +void haptic_feedback_toggle(void); +void haptic_mode_increase(void); +void haptic_mode_decrease(void); +void haptic_mode(uint8_t mode); +void haptic_reset(void); +void haptic_set_feedback(uint8_t feedback); +void haptic_set_mode(uint8_t mode); +void haptic_set_dwell(uint8_t dwell); +void haptic_set_buzz(uint8_t buzz); +void haptic_buzz_toggle(void); +uint8_t haptic_get_mode(void); +uint8_t haptic_get_feedback(void); +void haptic_dwell_increase(void); +void haptic_dwell_decrease(void); + +void haptic_play(void); +void haptic_shutdown(void); + + + + + diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c new file mode 100644 index 000000000000..2d39dbc1794c --- /dev/null +++ b/drivers/haptic/solenoid.c @@ -0,0 +1,109 @@ +/* Copyright 2018 mtdjr - modified by ishtob + * Driver for solenoid written for QMK + * + * 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 "solenoid.h" +#include "haptic.h" + +bool solenoid_on = false; +bool solenoid_buzzing = false; +uint16_t solenoid_start = 0; +uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; + +extern haptic_config_t haptic_config; + + +void solenoid_buzz_on(void) { + haptic_set_buzz(1); +} + +void solenoid_buzz_off(void) { + haptic_set_buzz(0); +} + +void solenoid_set_buzz(int buzz) { + haptic_set_buzz(buzz); +} + + +void solenoid_dwell_minus(uint8_t solenoid_dwell) { + if (solenoid_dwell > 0) solenoid_dwell--; +} + +void solenoid_dwell_plus(uint8_t solenoid_dwell) { + if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; +} + +void solenoid_set_dwell(uint8_t dwell) { + solenoid_dwell = dwell; +} + +void solenoid_stop(void) { + writePinLow(SOLENOID_PIN); + solenoid_on = false; + solenoid_buzzing = false; +} + +void solenoid_fire(void) { + if (!haptic_config.buzz && solenoid_on) return; + if (haptic_config.buzz && solenoid_buzzing) return; + + solenoid_on = true; + solenoid_buzzing = true; + solenoid_start = timer_read(); + writePinHigh(SOLENOID_PIN); +} + +void solenoid_check(void) { + uint16_t elapsed = 0; + + if (!solenoid_on) return; + + elapsed = timer_elapsed(solenoid_start); + + //Check if it's time to finish this solenoid click cycle + if (elapsed > solenoid_dwell) { + solenoid_stop(); + return; + } + + //Check whether to buzz the solenoid on and off + if (haptic_config.buzz) { + if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ + if (!solenoid_buzzing) { + solenoid_buzzing = true; + writePinHigh(SOLENOID_PIN); + } + } + else { + if (solenoid_buzzing) { + solenoid_buzzing = false; + writePinLow(SOLENOID_PIN); + } + } + } +} + +void solenoid_setup(void) { + setPinOutput(SOLENOID_PIN); + solenoid_fire(); +} + +void solenoid_shutdown(void) { + writePinLow(SOLENOID_PIN); + +} diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h new file mode 100644 index 000000000000..a08f62a11ee0 --- /dev/null +++ b/drivers/haptic/solenoid.h @@ -0,0 +1,54 @@ +/* Copyright 2018 mtdjr - modified by ishtob + * Driver for solenoid written for QMK + * + * 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 + +#ifndef SOLENOID_DEFAULT_DWELL +#define SOLENOID_DEFAULT_DWELL 12 +#endif + +#ifndef SOLENOID_MAX_DWELL +#define SOLENOID_MAX_DWELL 100 +#endif + +#ifndef SOLENOID_MIN_DWELL +#define SOLENOID_MIN_DWELL 4 +#endif + +#ifndef SOLENOID_ACTIVE +#define SOLENOID_ACTIVE false +#endif + +#ifndef SOLENOID_PIN +#define SOLENOID_PIN F6 +#endif + +void solenoid_buzz_on(void); +void solenoid_buzz_off(void); +void solenoid_set_buzz(int buzz); + +void solenoid_dwell_minus(uint8_t solenoid_dwell); +void solenoid_dwell_plus(uint8_t solenoid_dwell); +void solenoid_set_dwell(uint8_t dwell); + +void solenoid_stop(void); +void solenoid_fire(void); + +void solenoid_check(void); + +void solenoid_setup(void); +void solenoid_shutdown(void); diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index d6c3830dfd42..180492182515 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -192,4 +192,7 @@ //#define DRIVER_LED_TOTAL RGBLED_NUM //#define RGB_MATRIX_KEYPRESSES + +#define SOLENOID_PIN A14 + #endif diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c index 11761b3210bd..507c8314b6cc 100644 --- a/keyboards/hadron/ver3/keymaps/default/keymap.c +++ b/keyboards/hadron/ver3/keymaps/default/keymap.c @@ -190,8 +190,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------------------------------------------------------------------' */ [_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, \ - RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ + RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\ diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c index 641c0162473f..140d148b7ee8 100644 --- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c +++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c @@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_wrapper( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, _______, \ RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ _______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \ diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index 8375efdd359f..2a8662315795 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -52,6 +52,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no -HAPTIC_ENABLE = DRV2605L +HAPTIC_ENABLE += DRV2605L QWIIC_ENABLE += MICRO_OLED # SERIAL_LINK_ENABLE = yes diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index 5e5e3e009f83..37169fe2f387 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c @@ -17,7 +17,7 @@ #include "qwiic.h" #include "action_layer.h" #include "matrix.h" -#include "DRV2605L.h" +#include "haptic.h" #ifdef QWIIC_MICRO_OLED_ENABLE @@ -167,20 +167,12 @@ void encoder_update_kb(uint8_t index, bool clockwise) { #endif void matrix_init_kb(void) { -#ifdef DRV2605L - DRV_init(); -#endif queue_for_send = true; matrix_init_user(); } void matrix_scan_kb(void) { - if (queue_for_send) { - #ifdef DRV2605L - DRV_EFFECT play_eff = strong_click; - DRV_pulse(play_eff); - #endif #ifdef QWIIC_MICRO_OLED_ENABLE read_host_led_state(); draw_ui(); diff --git a/quantum/quantum.c b/quantum/quantum.c index 376578ade426..cb4d5ee806fc 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -47,6 +47,9 @@ extern backlight_config_t backlight_config; #include "process_midi.h" #endif +#ifdef HAPTIC_ENABLE + #include "haptic.h" +#endif #ifdef ENCODER_ENABLE #include "encoder.h" @@ -179,6 +182,9 @@ void reset_keyboard(void) { shutdown_user(); wait_ms(250); #endif +#ifdef HAPTIC_ENABLE + haptic_shutdown(); +#endif // this is also done later in bootloader.c - not sure if it's neccesary here #ifdef BOOTLOADER_CATERINA *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific @@ -257,6 +263,9 @@ bool process_record_quantum(keyrecord_t *record) { #if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) process_clicky(keycode, record) && #endif //AUDIO_CLICKY + #ifdef HAPTIC_ENABLE + process_haptic(keycode, record) && + #endif //HAPTIC_ENABLE process_record_kb(keycode, record) && #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES) process_rgb_matrix(keycode, record) && @@ -1049,6 +1058,9 @@ void matrix_init_quantum() { #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) unicode_input_mode_init(); #endif + #ifdef HAPTIC_ENABLE + haptic_init(); + #endif matrix_init_kb(); } @@ -1091,6 +1103,10 @@ void matrix_scan_quantum() { encoder_read(); #endif + #ifdef HAPTIC_ENABLE + haptic_task(); + #endif + matrix_scan_kb(); } #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) diff --git a/quantum/quantum.h b/quantum/quantum.h index c6acf83e5af4..d2c5862f881c 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -139,6 +139,10 @@ extern uint32_t default_layer_state; #include "hd44780.h" #endif +#ifdef HAPTIC_ENABLE + #include "haptic.h" +#endif + //Function substitutions to ease GPIO manipulation #ifdef __AVR__ #define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 0462291c2b17..00c84cbf537c 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -446,25 +446,36 @@ enum quantum_keycodes { KC_LOCK, #endif -#ifdef TERMINAL_ENABLE - TERM_ON, - TERM_OFF, -#endif - - EEPROM_RESET, - - UNICODE_MODE_FORWARD, - UNICODE_MODE_REVERSE, - - UNICODE_MODE_OSX, - UNICODE_MODE_LNX, - UNICODE_MODE_WIN, - UNICODE_MODE_BSD, - UNICODE_MODE_WINC, - - // always leave at the end - SAFE_RANGE -}; + #ifdef TERMINAL_ENABLE + TERM_ON, + TERM_OFF, + #endif + + EEPROM_RESET, + + UNICODE_MODE_FORWARD, + UNICODE_MODE_REVERSE, + + UNICODE_MODE_OSX, + UNICODE_MODE_LNX, + UNICODE_MODE_WIN, + UNICODE_MODE_BSD, + UNICODE_MODE_WINC, + + HPT_ON, + HPT_OFF, + HPT_TOG, + HPT_RST, + HPT_FBK, + HPT_BUZ, + HPT_MODI, + HPT_MODD, + HPT_DWLI, + HPT_DWLD, + + // always leave at the end + SAFE_RANGE + }; // Ability to use mods in layouts #define LCTL(kc) (QK_LCTL | (kc)) diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 59b2bffbc714..ded27e599f4a 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -45,6 +45,7 @@ void eeconfig_init_quantum(void) { eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default eeprom_update_dword(EECONFIG_RGBLIGHT, 0); eeprom_update_byte(EECONFIG_STENOMODE, 0); + eeprom_update_dword(EECONFIG_HAPTIC, 0); eeconfig_init_kb(); } @@ -177,3 +178,11 @@ uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER) void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); } +uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } +/** \brief eeconfig update user + * + * FIXME: needs doc + */ +void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); } + + diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index eedd67602c69..d576634f5799 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -41,6 +41,8 @@ along with this program. If not, see . #define EECONFIG_KEYBOARD (uint32_t *)15 #define EECONFIG_USER (uint32_t *)19 +#define EECONFIG_HAPTIC (uint32_t*)24 + /* debug bit */ #define EECONFIG_DEBUG_ENABLE (1<<0) #define EECONFIG_DEBUG_MATRIX (1<<1) @@ -94,4 +96,9 @@ void eeconfig_update_kb(uint32_t val); uint32_t eeconfig_read_user(void); void eeconfig_update_user(uint32_t val); +#ifdef HAPTIC_ENABLE +uint32_t eeconfig_read_haptic(void); +void eeconfig_update_haptic(uint32_t val); +#endif + #endif From 338ca3569ac5b76f55b0664cf9d6eef11211b6b2 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 17 Feb 2019 03:13:58 +0000 Subject: [PATCH 118/445] Add docs on using keyboard_post_init_user to enable debug modes --- docs/newbs_testing_debugging.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md index 45509110a557..d78311339d77 100644 --- a/docs/newbs_testing_debugging.md +++ b/docs/newbs_testing_debugging.md @@ -15,7 +15,17 @@ Note: These programs are not provided by or endorsed by QMK. ## Debugging With QMK Toolbox -[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode. +[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` From e2d3c92199d6cc42a39c5d8729dfff61d78dd7d1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 17 Feb 2019 16:36:02 +1100 Subject: [PATCH 119/445] Remove redundant KC_TRNS and KC_NO fillers in default keymaps (#5152) --- keyboards/amj40/keymaps/default/keymap.c | 8 -------- keyboards/amj60/keymaps/default/keymap.c | 4 ---- keyboards/amj60/keymaps/iso_split_rshift/keymap.c | 4 ---- keyboards/amjpad/keymaps/default/keymap.c | 2 -- keyboards/atom47/keymaps/default/keymap.c | 2 -- keyboards/atomic/keymaps/default/keymap.c | 2 -- keyboards/blockey/keymaps/default/keymap.c | 5 ----- keyboards/catch22/keymaps/default/keymap.c | 2 -- keyboards/chimera_ergo/keymaps/default/keymap.c | 4 ---- keyboards/christmas_tree/keymaps/default/keymap.c | 4 +--- keyboards/comet46/keymaps/default-rgbled/keymap.c | 3 --- keyboards/comet46/keymaps/default/keymap.c | 3 --- keyboards/cospad/keymaps/default/keymap.c | 2 -- keyboards/cu75/keymaps/default/keymap.c | 3 --- keyboards/cu75/keymaps/iso/keymap.c | 3 --- keyboards/dc01/numpad/keymaps/default/keymap.c | 3 --- keyboards/deltasplit75/keymaps/default/keymap.c | 5 ----- keyboards/dichotomy/keymaps/default/keymap.c | 4 ---- keyboards/diverge3/keymaps/default/keymap.c | 3 --- keyboards/dz60/keymaps/iso_split-spacebar/keymap.c | 5 ----- keyboards/dz60/keymaps/iso_uk/keymap.c | 6 ------ keyboards/eco/keymaps/default/keymap.c | 4 ---- keyboards/ergo42/keymaps/default-underglow/keymap.c | 4 ---- keyboards/ergo42/keymaps/default/keymap.c | 4 ---- keyboards/ergodash/mini/keymaps/default/keymap.c | 3 --- keyboards/ergodash/rev1/keymaps/default/keymap.c | 3 --- keyboards/ergodash/rev2/keymaps/default/keymap.c | 3 --- keyboards/ergotravel/keymaps/default/keymap.c | 2 -- keyboards/fleuron/keymaps/default/keymap.c | 3 --- keyboards/fortitude60/keymaps/default/keymap.c | 3 --- keyboards/gh60/keymaps/default/keymap.c | 3 --- keyboards/hadron/ver2/keymaps/default/keymap.c | 5 +---- keyboards/hadron/ver3/keymaps/default/keymap.c | 3 --- .../dactyl_manuform/5x6/keymaps/default/keymap.c | 4 ---- .../dactyl_manuform/5x7/keymaps/default/keymap.c | 4 ---- .../dactyl_manuform/6x6/keymaps/default/keymap.c | 2 -- keyboards/handwired/maartenwut/keymaps/default/keymap.c | 5 +---- .../handwired/not_so_minidox/keymaps/default/keymap.c | 4 ---- keyboards/handwired/promethium/keymaps/default/keymap.c | 3 --- .../handwired/terminus_mini/keymaps/default/keymap.c | 5 ----- keyboards/handwired/woodpad/keymaps/default/keymap.c | 4 ---- keyboards/handwired/xealous/keymaps/default/keymap.c | 3 --- keyboards/helix/pico/keymaps/default/keymap.c | 4 ---- keyboards/helix/rev1/keymaps/OLED_sample/keymap.c | 4 ---- keyboards/helix/rev1/keymaps/default/keymap.c | 4 ---- keyboards/helix/rev2/keymaps/default/keymap.c | 4 ---- keyboards/hid_liber/keymaps/default/keymap.c | 3 --- keyboards/jm60/keymaps/default/keymap.c | 2 -- keyboards/katana60/keymaps/default/keymap.c | 3 --- keyboards/kmac/keymaps/default/keymap.c | 3 --- keyboards/kmac/keymaps/winkeyless/keymap.c | 3 --- keyboards/kona_classic/keymaps/ansi/keymap.c | 4 ---- keyboards/kona_classic/keymaps/ansi_arrows/keymap.c | 4 ---- keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c | 4 ---- keyboards/kona_classic/keymaps/ansi_split/keymap.c | 4 ---- keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c | 4 ---- keyboards/kona_classic/keymaps/default/keymap.c | 4 ---- keyboards/kona_classic/keymaps/iso/keymap.c | 4 ---- keyboards/kona_classic/keymaps/iso_arrows/keymap.c | 4 ---- keyboards/kona_classic/keymaps/iso_split/keymap.c | 4 ---- keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c | 4 ---- keyboards/launchpad/keymaps/default/keymap.c | 4 ---- keyboards/lets_split/keymaps/OLED_sample/keymap.c | 4 ---- keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c | 4 ---- keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c | 4 ---- keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c | 4 ---- keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c | 4 ---- keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c | 4 ---- keyboards/lfkeyboards/smk65/keymaps/default/keymap.c | 4 ---- keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c | 4 ---- keyboards/m10a/keymaps/default/keymap.c | 4 ---- keyboards/minidox/keymaps/default/keymap.c | 4 ---- keyboards/mint60/keymaps/default/keymap.c | 4 ---- keyboards/mitosis/keymaps/default/keymap.c | 4 ---- keyboards/miuni32/keymaps/default/keymap.c | 3 --- keyboards/mt40/keymaps/default/keymap.c | 2 -- keyboards/mxss/templates/keymap.c | 5 +---- keyboards/newgame40/keymaps/default/keymap.c | 1 - keyboards/niu_mini/keymaps/default/keymap.c | 4 ---- keyboards/novelpad/keymaps/default/keymap.c | 2 -- keyboards/noxary/268/keymaps/ansi/keymap.c | 3 --- keyboards/noxary/268/keymaps/default/keymap.c | 3 --- keyboards/noxary/268/keymaps/iso/keymap.c | 3 --- keyboards/ok60/keymaps/default/keymap.c | 2 -- keyboards/orthodox/keymaps/default/keymap.c | 4 ---- keyboards/phantom/keymaps/default/keymap.c | 3 --- keyboards/phantom/keymaps/iso_uk/keymap.c | 3 --- keyboards/playkbtw/pk60/keymaps/default/keymap.c | 4 +--- keyboards/primekb/prime_r/keymaps/default/keymap.c | 4 ---- keyboards/satan/keymaps/default/keymap.c | 2 -- keyboards/satan/keymaps/isoHHKB/keymap.c | 3 --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 4 ---- keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c | 4 ---- keyboards/sentraq/s60_x/keymaps/default/keymap.c | 4 ---- keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c | 4 ---- keyboards/speedo/keymaps/default/keymap.c | 1 - keyboards/subatomic/keymaps/default/keymap.c | 4 ---- keyboards/tada68/keymaps/default/keymap.c | 2 -- keyboards/tada68/keymaps/iso-nor/keymap.c | 2 -- keyboards/tada68/keymaps/iso-uk/keymap.c | 2 -- keyboards/tada68/keymaps/isoish/keymap.c | 4 +--- keyboards/tada68/keymaps/rgb/keymap.c | 2 -- keyboards/telophase/keymaps/default/keymap.c | 4 ---- keyboards/tetris/keymaps/default/keymap.c | 4 ---- keyboards/the_ruler/keymaps/default/keymap.c | 4 ---- .../thevankeyboards/minivan/keymaps/default/keymap.c | 4 ---- .../thevankeyboards/roadkit/keymaps/default/keymap.c | 5 ----- keyboards/vision_division/keymaps/default/keymap.c | 2 -- keyboards/vitamins_included/keymaps/default/keymap.c | 4 ---- keyboards/zen/keymaps/default/keymap.c | 6 +----- 110 files changed, 7 insertions(+), 383 deletions(-) diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index 406ea8d2563c..884fb761d453 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -21,14 +21,6 @@ enum custom_keycodes { ADJUST, }; - - - - -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c index fd8e198f59c8..c5dc25018c8c 100644 --- a/keyboards/amj60/keymaps/default/keymap.c +++ b/keyboards/amj60/keymaps/default/keymap.c @@ -11,10 +11,6 @@ // dual-role shortcuts #define SPACEDUAL LT(_SPC, KC_SPACE) - -// increase readability -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index ca5fa92beb95..0c5dc6b880a0 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -30,10 +30,6 @@ #define GER_BRC_L RALT(KC_8) // [ #define GER_BRC_R RALT(KC_9) // ] -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c index 01621d54f62d..431537d25848 100644 --- a/keyboards/amjpad/keymaps/default/keymap.c +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c index a66961fba92e..dc87b5a52bea 100644 --- a/keyboards/atom47/keymaps/default/keymap.c +++ b/keyboards/atom47/keymaps/default/keymap.c @@ -10,8 +10,6 @@ #define _FN1 2 //Fn1 #define _PN 3 //Pn -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MA] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ diff --git a/keyboards/atomic/keymaps/default/keymap.c b/keyboards/atomic/keymaps/default/keymap.c index 6e8cd9f05c75..55de476d1a8f 100644 --- a/keyboards/atomic/keymaps/default/keymap.c +++ b/keyboards/atomic/keymaps/default/keymap.c @@ -1,9 +1,7 @@ #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/blockey/keymaps/default/keymap.c b/keyboards/blockey/keymaps/default/keymap.c index 5b1145482322..82366501aedf 100644 --- a/keyboards/blockey/keymaps/default/keymap.c +++ b/keyboards/blockey/keymaps/default/keymap.c @@ -20,11 +20,6 @@ extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( 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, \ diff --git a/keyboards/catch22/keymaps/default/keymap.c b/keyboards/catch22/keymaps/default/keymap.c index 790ae1eeb908..3216c02707fe 100644 --- a/keyboards/catch22/keymaps/default/keymap.c +++ b/keyboards/catch22/keymaps/default/keymap.c @@ -3,8 +3,6 @@ #define _BASE 0 #define _FN 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( /* Base */ KC_NLCK, KC_PSLS, KC_PAST, KC_BSPC, \ diff --git a/keyboards/chimera_ergo/keymaps/default/keymap.c b/keyboards/chimera_ergo/keymaps/default/keymap.c index 1b83877266ea..0b60b1dafaf1 100644 --- a/keyboards/chimera_ergo/keymaps/default/keymap.c +++ b/keyboards/chimera_ergo/keymaps/default/keymap.c @@ -36,10 +36,6 @@ enum chimera_ergo_layers #define LONGPRESS_DELAY 150 //#define LAYER_TOGGLE_DELAY 300 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( diff --git a/keyboards/christmas_tree/keymaps/default/keymap.c b/keyboards/christmas_tree/keymaps/default/keymap.c index 7880fd625478..6621201996b2 100644 --- a/keyboards/christmas_tree/keymaps/default/keymap.c +++ b/keyboards/christmas_tree/keymaps/default/keymap.c @@ -28,8 +28,6 @@ enum custom_keycodes { BACKLIT }; -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base @@ -82,4 +80,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/comet46/keymaps/default-rgbled/keymap.c b/keyboards/comet46/keymaps/default-rgbled/keymap.c index d446d50d0508..a576cc36b132 100644 --- a/keyboards/comet46/keymaps/default-rgbled/keymap.c +++ b/keyboards/comet46/keymaps/default-rgbled/keymap.c @@ -25,9 +25,6 @@ enum custom_keycodes { RAISE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/comet46/keymaps/default/keymap.c b/keyboards/comet46/keymaps/default/keymap.c index c87492e4b948..9ef967646576 100644 --- a/keyboards/comet46/keymaps/default/keymap.c +++ b/keyboards/comet46/keymaps/default/keymap.c @@ -29,9 +29,6 @@ enum custom_keycodes { RAISE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/cospad/keymaps/default/keymap.c index f066ad677da2..f782349b07c9 100644 --- a/keyboards/cospad/keymaps/default/keymap.c +++ b/keyboards/cospad/keymaps/default/keymap.c @@ -12,8 +12,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/cu75/keymaps/default/keymap.c b/keyboards/cu75/keymaps/default/keymap.c index e8abbb6f1fcd..0040473fba45 100644 --- a/keyboards/cu75/keymaps/default/keymap.c +++ b/keyboards/cu75/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -//Define a clearer 'transparent' key code -#define _______ KC_TRNS - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/cu75/keymaps/iso/keymap.c b/keyboards/cu75/keymaps/iso/keymap.c index 040029084685..358a1e11e5ef 100644 --- a/keyboards/cu75/keymaps/iso/keymap.c +++ b/keyboards/cu75/keymaps/iso/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -//Define a clearer 'transparent' key code -#define _______ KC_TRNS - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/dc01/numpad/keymaps/default/keymap.c b/keyboards/dc01/numpad/keymaps/default/keymap.c index a4461a7d4e5f..6c88d445fcb7 100644 --- a/keyboards/dc01/numpad/keymaps/default/keymap.c +++ b/keyboards/dc01/numpad/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_numpad_5x4( TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c index 8824986120c9..fc34d1cec9bf 100644 --- a/keyboards/deltasplit75/keymaps/default/keymap.c +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -7,11 +7,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear - -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_v2( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index f3417a3fcd71..3f034175741b 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -40,10 +40,6 @@ enum dichotomy_keycodes #define GREEN_BRIGHTNESS 2 #define BLUE_BRIGHTNESS 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BS] = LAYOUT( /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */ CK_TE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/diverge3/keymaps/default/keymap.c b/keyboards/diverge3/keymaps/default/keymap.c index 1b704e87ed27..29e5576fcde3 100644 --- a/keyboards/diverge3/keymaps/default/keymap.c +++ b/keyboards/diverge3/keymaps/default/keymap.c @@ -95,9 +95,6 @@ enum custom_keycodes { PSELF_MACRO }; -// Make layer undefined do nothing -#define _______ KC_TRNS - // Macros #define KC_PMAC PAREN_MACRO #define KC_AMAC ARROW_MACRO diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c index 7c17a6f5f812..a54c06f55783 100644 --- a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c +++ b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c @@ -9,11 +9,6 @@ #include QMK_KEYBOARD_H - -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* * Each layer gets a name for readability. * The underscores don't mean anything - you can diff --git a/keyboards/dz60/keymaps/iso_uk/keymap.c b/keyboards/dz60/keymaps/iso_uk/keymap.c index 13e6e185947f..b725907ec85f 100644 --- a/keyboards/dz60/keymaps/iso_uk/keymap.c +++ b/keyboards/dz60/keymaps/iso_uk/keymap.c @@ -10,12 +10,6 @@ #define _CONTROL 2 // Control layer #define _CN _CONTROL -// KEYCODES -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -#define MO_FN MO(1) -#define MO_FN MO(1) #define MO_FN MO(1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c index 7d714d9ad34e..ede68d59da66 100644 --- a/keyboards/eco/keymaps/default/keymap.c +++ b/keyboards/eco/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum eco_keycodes { QWERTY = SAFE_RANGE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/ergo42/keymaps/default-underglow/keymap.c b/keyboards/ergo42/keymaps/default-underglow/keymap.c index 4d7242579ac5..212d9138df08 100644 --- a/keyboards/ergo42/keymaps/default-underglow/keymap.c +++ b/keyboards/ergo42/keymaps/default-underglow/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define GAME 3 #define RGB 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; diff --git a/keyboards/ergo42/keymaps/default/keymap.c b/keyboards/ergo42/keymaps/default/keymap.c index 6c4cc1a620d3..f99ec5fb6676 100644 --- a/keyboards/ergo42/keymaps/default/keymap.c +++ b/keyboards/ergo42/keymaps/default/keymap.c @@ -7,10 +7,6 @@ extern keymap_config_t keymap_config; #define SYMB 2 #define GAME 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergodash/mini/keymaps/default/keymap.c b/keyboards/ergodash/mini/keymaps/default/keymap.c index ecf1f723f7a2..35cbd87a36a8 100644 --- a/keyboards/ergodash/mini/keymaps/default/keymap.c +++ b/keyboards/ergodash/mini/keymaps/default/keymap.c @@ -14,9 +14,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define EISU LALT(KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergodash/rev1/keymaps/default/keymap.c b/keyboards/ergodash/rev1/keymaps/default/keymap.c index 1464fd20e0c9..6f20908bc710 100644 --- a/keyboards/ergodash/rev1/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/default/keymap.c @@ -16,9 +16,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_JPN LALT(KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergodash/rev2/keymaps/default/keymap.c b/keyboards/ergodash/rev2/keymaps/default/keymap.c index 418089e1b036..399e22f77837 100644 --- a/keyboards/ergodash/rev2/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev2/keymaps/default/keymap.c @@ -16,9 +16,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define EISU LALT(KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c index fd0d75adef32..e472b7cde757 100644 --- a/keyboards/ergotravel/keymaps/default/keymap.c +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -14,8 +14,6 @@ enum custom_keycodes { ADJUST, }; -// #define KC_ KC_TRNS -#define _______ KC_TRNS #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/fleuron/keymaps/default/keymap.c b/keyboards/fleuron/keymaps/default/keymap.c index 3314013669c4..367ee4895077 100644 --- a/keyboards/fleuron/keymaps/default/keymap.c +++ b/keyboards/fleuron/keymaps/default/keymap.c @@ -34,9 +34,6 @@ enum custom_keycodes { #define _RAISE 2 */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ortho_6x16( /* Qwerty diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c index f0b9964ab5d7..5c3508b3d451 100644 --- a/keyboards/fortitude60/keymaps/default/keymap.c +++ b/keyboards/fortitude60/keymaps/default/keymap.c @@ -23,9 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/gh60/keymaps/default/keymap.c b/keyboards/gh60/keymaps/default/keymap.c index 14a71af29973..581ba7e6414f 100644 --- a/keyboards/gh60/keymaps/default/keymap.c +++ b/keyboards/gh60/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index cc79f52671ce..9b50abd401d4 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -46,9 +46,6 @@ enum macro_keycodes { KC_DEMOMACRO, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl @@ -445,4 +442,4 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c index 507c8314b6cc..ac1db2c2ac98 100644 --- a/keyboards/hadron/ver3/keymaps/default/keymap.c +++ b/keyboards/hadron/ver3/keymaps/default/keymap.c @@ -33,9 +33,6 @@ enum macro_keycodes { KC_DEMOMACRO, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c index 7be6a5bc71ee..0d1efde33bb3 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c @@ -11,10 +11,6 @@ extern keymap_config_t keymap_config; #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -#define _______ KC_TRNS - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_5x6( diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c index 8b83b538fee5..1378f8723247 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define _FN 1 #define _NUMPAD 2 - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Some basic macros #define TASK LCTL(LSFT(KC_ESC)) #define TAB_R LCTL(KC_TAB) diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c index 1b1cbd4aea2f..b78a56008677 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c @@ -9,8 +9,6 @@ extern keymap_config_t keymap_config; #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_6x6( diff --git a/keyboards/handwired/maartenwut/keymaps/default/keymap.c b/keyboards/handwired/maartenwut/keymaps/default/keymap.c index 9152d8ca220c..d318b04233bf 100755 --- a/keyboards/handwired/maartenwut/keymaps/default/keymap.c +++ b/keyboards/handwired/maartenwut/keymaps/default/keymap.c @@ -6,9 +6,6 @@ #define _GA 3 #define _AR 4 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LSHIFT OSM(MOD_LSFT) #define SPACE LT(_AR, KC_SPC) @@ -43,4 +40,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) -}; \ No newline at end of file +}; diff --git a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c index 8ea36198a1c6..9e89611631d4 100644 --- a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c +++ b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define KC_LOWR LOWER #define KC_RASE RAISE #define KC_RST RESET diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index faae89f935d7..179b411ee8f1 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -57,9 +57,6 @@ along with this program. If not, see . #include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) -// Fillers to make layering clearer -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 556b96c889bb..8d9cc1b0082b 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -60,11 +60,6 @@ enum custom_macros { #define PIPE M(R_PIPE) #define POINT M(R_POINT) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak - * ,----------------------------------------------------------------------------------. diff --git a/keyboards/handwired/woodpad/keymaps/default/keymap.c b/keyboards/handwired/woodpad/keymaps/default/keymap.c index 70c05fc27162..724230e45033 100644 --- a/keyboards/handwired/woodpad/keymaps/default/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/default/keymap.c @@ -24,10 +24,6 @@ #define _ALT 2 #define _ADJUST 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = KEYMAP( /* Base */ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ diff --git a/keyboards/handwired/xealous/keymaps/default/keymap.c b/keyboards/handwired/xealous/keymaps/default/keymap.c index a07e64fd707c..4e691a0a76d3 100644 --- a/keyboards/handwired/xealous/keymaps/default/keymap.c +++ b/keyboards/handwired/xealous/keymaps/default/keymap.c @@ -11,9 +11,6 @@ extern keymap_config_t keymap_config; #define _NUMPAD 1 #define _FN 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define FN MO(_FN) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index 5273bb4a0170..c5ab84abe89c 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -50,10 +50,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c index 9b81979ff426..637f1d169578 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c +++ b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c @@ -47,10 +47,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c index 7288cd752f63..43928a4185b3 100644 --- a/keyboards/helix/rev1/keymaps/default/keymap.c +++ b/keyboards/helix/rev1/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #if HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index 0fb821affbd4..5b8c5fae57b4 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -50,10 +50,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c index 337b4829d2d5..67d57d0622b5 100755 --- a/keyboards/hid_liber/keymaps/default/keymap.c +++ b/keyboards/hid_liber/keymaps/default/keymap.c @@ -16,9 +16,6 @@ */ #include "hid_liber.h" -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/jm60/keymaps/default/keymap.c b/keyboards/jm60/keymaps/default/keymap.c index 091a214f5b1b..6ca04c505674 100644 --- a/keyboards/jm60/keymaps/default/keymap.c +++ b/keyboards/jm60/keymaps/default/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/katana60/keymaps/default/keymap.c index d4e77e26da17..04ea6fbc6e2f 100644 --- a/keyboards/katana60/keymaps/default/keymap.c +++ b/keyboards/katana60/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Windows based definitions. #define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer #define K_PRVWD LCTL(KC_LEFT) // Previous word diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c index ca5975753944..3444f3cd5025 100644 --- a/keyboards/kmac/keymaps/default/keymap.c +++ b/keyboards/kmac/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c index d714e46d3274..0df0aaf42e31 100644 --- a/keyboards/kmac/keymaps/winkeyless/keymap.c +++ b/keyboards/kmac/keymaps/winkeyless/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/kona_classic/keymaps/ansi/keymap.c b/keyboards/kona_classic/keymaps/ansi/keymap.c index 3eba76d63362..5b53f21c6077 100644 --- a/keyboards/kona_classic/keymaps/ansi/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { SFT_ESC = SAFE_RANGE }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c index 43c27c5031f7..e9c0f326f3b8 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { SFT_ESC = SAFE_RANGE }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c index 47f8d625b397..2ca5b79208c1 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { SFT_ESC = SAFE_RANGE }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/ansi_split/keymap.c b/keyboards/kona_classic/keymaps/ansi_split/keymap.c index f3c0dd707a4f..79be4e911f9e 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split/keymap.c @@ -18,10 +18,6 @@ #define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c index 9a6f7421c668..1e39f4aae67f 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c @@ -18,10 +18,6 @@ #define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/default/keymap.c b/keyboards/kona_classic/keymaps/default/keymap.c index 74f138d2cc6a..ebfe0f248228 100644 --- a/keyboards/kona_classic/keymaps/default/keymap.c +++ b/keyboards/kona_classic/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { SFT_ESC = SAFE_RANGE }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/iso/keymap.c b/keyboards/kona_classic/keymaps/iso/keymap.c index 3ce8255e8fc7..0d37536039b8 100644 --- a/keyboards/kona_classic/keymaps/iso/keymap.c +++ b/keyboards/kona_classic/keymaps/iso/keymap.c @@ -18,10 +18,6 @@ #define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c index 44fb94fd9ecf..a7ab26a35d22 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c @@ -18,10 +18,6 @@ #define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/iso_split/keymap.c b/keyboards/kona_classic/keymaps/iso_split/keymap.c index 425a4c9808b1..14935e992e1f 100644 --- a/keyboards/kona_classic/keymaps/iso_split/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split/keymap.c @@ -18,10 +18,6 @@ #define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c index ba74a25124b8..4eb184bae94c 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c @@ -18,10 +18,6 @@ #define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c index 67103576d97a..da2ff292a7a0 100644 --- a/keyboards/launchpad/keymaps/default/keymap.c +++ b/keyboards/launchpad/keymaps/default/keymap.c @@ -13,10 +13,6 @@ extern keymap_config_t keymap_config; #define _FUNC 15 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 5eccbcf1ac3b..67a20971cea9 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -43,10 +43,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c index 06e2f344a53d..68cb4591599e 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c index 95399fef69fb..d0745382a00a 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c index 18d5d8cadce3..fee3f7586e3b 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x08 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c index a916f80f1a1a..a1236de2adbb 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c index e8fae1dde004..afd24ba6ef26 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_numpad_6x4( /* Base */ KC_ESC, KC_TAB, KC_PEQL, MO(1), \ diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c index 757217ddb2ea..1861dcc1adb0 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c index 40a7ee03f920..6e5e57112ed8 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c index bbf58302fc7a..0c2fb62b04b4 100644 --- a/keyboards/m10a/keymaps/default/keymap.c +++ b/keyboards/m10a/keymaps/default/keymap.c @@ -23,10 +23,6 @@ enum layers { _LAYER9 }; -// // Fillers to make layering more clear -// #define _______ KC_TRNS -// #define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}, [_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}, diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c index 521db63aab35..6cc78cce1d1c 100644 --- a/keyboards/minidox/keymaps/default/keymap.c +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/mint60/keymaps/default/keymap.c b/keyboards/mint60/keymaps/default/keymap.c index e07d199ea984..4a90bd57c777 100644 --- a/keyboards/mint60/keymaps/default/keymap.c +++ b/keyboards/mint60/keymaps/default/keymap.c @@ -26,10 +26,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { RGBRST = SAFE_RANGE }; diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c index 60ebdac60a23..ec440ed75900 100644 --- a/keyboards/mitosis/keymaps/default/keymap.c +++ b/keyboards/mitosis/keymaps/default/keymap.c @@ -33,10 +33,6 @@ enum mitosis_macros #define LONGPRESS_DELAY 150 #define LAYER_TOGGLE_DELAY 300 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MALT] = LAYOUT( /* Malt Layout, customised for reduced columns (ex: quote and shift locations) */ diff --git a/keyboards/miuni32/keymaps/default/keymap.c b/keyboards/miuni32/keymaps/default/keymap.c index e128b24b1d62..754c20f7d33a 100644 --- a/keyboards/miuni32/keymaps/default/keymap.c +++ b/keyboards/miuni32/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Level 0: Default Layer * ,---------------------------------------------------------------------------------------. diff --git a/keyboards/mt40/keymaps/default/keymap.c b/keyboards/mt40/keymaps/default/keymap.c index 645f58e8a63f..29a2b414b1bf 100644 --- a/keyboards/mt40/keymaps/default/keymap.c +++ b/keyboards/mt40/keymaps/default/keymap.c @@ -15,8 +15,6 @@ */ #include QMK_KEYBOARD_H - -#define _______ KC_TRNS #define OOOOOOO KC_TRNS #define C_LCTL MT(MOD_LCTL, KC_QUOT) diff --git a/keyboards/mxss/templates/keymap.c b/keyboards/mxss/templates/keymap.c index 86a0f231d8ba..13dbb7206c34 100644 --- a/keyboards/mxss/templates/keymap.c +++ b/keyboards/mxss/templates/keymap.c @@ -16,9 +16,6 @@ #include QMK_KEYBOARD_H #include "mxss_frontled.h" -// Helpful defines -#define _______ KC_TRNS - // Predefined colors for layers // Format: {hue, saturation} // {0, 0} to turn off the LED @@ -39,4 +36,4 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __KEYMAP_GOES_HERE__ -}; \ No newline at end of file +}; diff --git a/keyboards/newgame40/keymaps/default/keymap.c b/keyboards/newgame40/keymaps/default/keymap.c index b42fef00fe03..f3588751fa8e 100644 --- a/keyboards/newgame40/keymaps/default/keymap.c +++ b/keyboards/newgame40/keymaps/default/keymap.c @@ -38,7 +38,6 @@ enum layers { ADJUST, }; - // Fillers to make layering more clear #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c index 91f8bc8cde4b..5c7dc7fc0d43 100644 --- a/keyboards/niu_mini/keymaps/default/keymap.c +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 diff --git a/keyboards/novelpad/keymaps/default/keymap.c b/keyboards/novelpad/keymaps/default/keymap.c index 78cdff512e11..487a3778320d 100755 --- a/keyboards/novelpad/keymaps/default/keymap.c +++ b/keyboards/novelpad/keymaps/default/keymap.c @@ -16,8 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum custom_keycodes { BL = SAFE_RANGE, WK_RED, diff --git a/keyboards/noxary/268/keymaps/ansi/keymap.c b/keyboards/noxary/268/keymaps/ansi/keymap.c index 20dddd884d77..ffe376b4e86d 100644 --- a/keyboards/noxary/268/keymaps/ansi/keymap.c +++ b/keyboards/noxary/268/keymaps/ansi/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/noxary/268/keymaps/default/keymap.c b/keyboards/noxary/268/keymaps/default/keymap.c index 0a26d6313756..a76509db8b18 100644 --- a/keyboards/noxary/268/keymaps/default/keymap.c +++ b/keyboards/noxary/268/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/noxary/268/keymaps/iso/keymap.c b/keyboards/noxary/268/keymaps/iso/keymap.c index 5d6987ce76fa..3d9ca2352f84 100644 --- a/keyboards/noxary/268/keymaps/iso/keymap.c +++ b/keyboards/noxary/268/keymaps/iso/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/ok60/keymaps/default/keymap.c b/keyboards/ok60/keymaps/default/keymap.c index 1cc2232a1301..7c5a90856e8f 100644 --- a/keyboards/ok60/keymaps/default/keymap.c +++ b/keyboards/ok60/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( diff --git a/keyboards/orthodox/keymaps/default/keymap.c b/keyboards/orthodox/keymaps/default/keymap.c index c7a48d82d0bd..b1c86da6c0a3 100644 --- a/keyboards/orthodox/keymaps/default/keymap.c +++ b/keyboards/orthodox/keymaps/default/keymap.c @@ -38,10 +38,6 @@ enum custom_keycodes { DVORAK }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LS__SPC MT(MOD_LSFT, KC_SPC) #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/phantom/keymaps/default/keymap.c b/keyboards/phantom/keymaps/default/keymap.c index 618822816702..eb5db022d8c9 100644 --- a/keyboards/phantom/keymaps/default/keymap.c +++ b/keyboards/phantom/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/phantom/keymaps/iso_uk/keymap.c b/keyboards/phantom/keymaps/iso_uk/keymap.c index bcd23a7641e1..43a7e55fb378 100644 --- a/keyboards/phantom/keymaps/iso_uk/keymap.c +++ b/keyboards/phantom/keymaps/iso_uk/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/playkbtw/pk60/keymaps/default/keymap.c b/keyboards/playkbtw/pk60/keymaps/default/keymap.c index 67969b25deb7..d0fbc619f5bb 100644 --- a/keyboards/playkbtw/pk60/keymaps/default/keymap.c +++ b/keyboards/playkbtw/pk60/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( \ @@ -60,4 +58,4 @@ void led_set_user(uint8_t usb_led) { } -} \ No newline at end of file +} diff --git a/keyboards/primekb/prime_r/keymaps/default/keymap.c b/keyboards/primekb/prime_r/keymaps/default/keymap.c index a39d197e273d..2e620c9cb29e 100644 --- a/keyboards/primekb/prime_r/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_r/keymaps/default/keymap.c @@ -19,10 +19,6 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* (Base Layer) Default Layer * ,---------------------------------------------------------------. diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/satan/keymaps/default/keymap.c index ac15dd55a135..fc9d3b7ab76a 100644 --- a/keyboards/satan/keymaps/default/keymap.c +++ b/keyboards/satan/keymaps/default/keymap.c @@ -14,8 +14,6 @@ enum custom_keycodes { #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/isoHHKB/keymap.c b/keyboards/satan/keymaps/isoHHKB/keymap.c index e1d93a1c31e3..701095907e8a 100644 --- a/keyboards/satan/keymaps/isoHHKB/keymap.c +++ b/keyboards/satan/keymaps/isoHHKB/keymap.c @@ -13,9 +13,6 @@ #define KC_ENYE M(0) #define KC_CEDL M(1) -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 156515673cee..f05c46ff9120 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -32,10 +32,6 @@ #define GER_BRC_L RALT(KC_8) // [ #define GER_BRC_R RALT(KC_9) // ] -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index e4660e668876..08780a28c16e 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c @@ -16,10 +16,6 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -//make keymap a little easier to read -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define ONESHOT_TAP_TOGGLE 2 #define ONESHOT_TIMEOUT 1 diff --git a/keyboards/sentraq/s60_x/keymaps/default/keymap.c b/keyboards/sentraq/s60_x/keymaps/default/keymap.c index 5ea40bf89f8b..33789a569627 100644 --- a/keyboards/sentraq/s60_x/keymaps/default/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer diff --git a/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c index 8f10ad0469a7..e707a5d960d2 100644 --- a/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer diff --git a/keyboards/speedo/keymaps/default/keymap.c b/keyboards/speedo/keymaps/default/keymap.c index 7c9685d3d3a6..ccfc608565c9 100644 --- a/keyboards/speedo/keymaps/default/keymap.c +++ b/keyboards/speedo/keymaps/default/keymap.c @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS #define FN MO(_FN) #define TORST TO(_RESET) #define TODFT TO(_DEFAULT) diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c index c5041f6e1fd0..184df24d56a5 100644 --- a/keyboards/subatomic/keymaps/default/keymap.c +++ b/keyboards/subatomic/keymaps/default/keymap.c @@ -25,10 +25,6 @@ enum subatomic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c index 5a9a99794995..9a36e87a2a92 100755 --- a/keyboards/tada68/keymaps/default/keymap.c +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/iso-nor/keymap.c b/keyboards/tada68/keymaps/iso-nor/keymap.c index c26932b0e4e0..d8813acff066 100644 --- a/keyboards/tada68/keymaps/iso-nor/keymap.c +++ b/keyboards/tada68/keymaps/iso-nor/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/iso-uk/keymap.c b/keyboards/tada68/keymaps/iso-uk/keymap.c index c843595dc347..f4aa09f65b81 100644 --- a/keyboards/tada68/keymaps/iso-uk/keymap.c +++ b/keyboards/tada68/keymaps/iso-uk/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/isoish/keymap.c b/keyboards/tada68/keymaps/isoish/keymap.c index efe0063c7c99..adbf32251b7d 100644 --- a/keyboards/tada68/keymaps/isoish/keymap.c +++ b/keyboards/tada68/keymaps/isoish/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -48,4 +46,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -}; \ No newline at end of file +}; diff --git a/keyboards/tada68/keymaps/rgb/keymap.c b/keyboards/tada68/keymaps/rgb/keymap.c index 00a02e40ad91..dde3521f192e 100755 --- a/keyboards/tada68/keymaps/rgb/keymap.c +++ b/keyboards/tada68/keymaps/rgb/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/telophase/keymaps/default/keymap.c b/keyboards/telophase/keymaps/default/keymap.c index 1e692ba12dd5..d4afa65f9320 100644 --- a/keyboards/telophase/keymaps/default/keymap.c +++ b/keyboards/telophase/keymaps/default/keymap.c @@ -25,10 +25,6 @@ enum telophase_keycodes #define LONGPRESS_DELAY 150 #define LAYER_TOGGLE_DELAY 300 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { /*QWERTY*/ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c index 5f48bd07ab9c..6ce856178bf0 100644 --- a/keyboards/tetris/keymaps/default/keymap.c +++ b/keyboards/tetris/keymaps/default/keymap.c @@ -6,10 +6,6 @@ float tone_taps[][2] = SONG( E__NOTE( _A6 ) ); #endif -/* Fillers to make layering more clear */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _BASE 0 #define _CODE 1 #define _NAVI 2 diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c index e7af797b9dd0..cb8e8ece8c0d 100644 --- a/keyboards/the_ruler/keymaps/default/keymap.c +++ b/keyboards/the_ruler/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { FN_2 }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c index 13ef62406b48..bc6c213f05df 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c @@ -24,10 +24,6 @@ extern keymap_config_t keymap_config; #define L_CURBR LSFT(KC_LBRC) #define R_CURBR LSFT(KC_RBRC) -// Fillers to make layering more clear -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT( /* Qwerty */ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c index ecd25be48f63..7aa7bcafb2ac 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c @@ -12,11 +12,6 @@ extern keymap_config_t keymap_config; // Macro name shortcuts #define NUMPAD M(_NP) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NP] = LAYOUT_numpad_4x4( /* Numpad */ KC_P7, KC_P8, KC_P9, KC_PPLS, \ diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 314eaff98ee1..af60a8bd7f6b 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -137,8 +137,6 @@ enum keyboard_macros { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT OSM(MOD_LSFT) -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c index 13b48e7640b5..782490572031 100644 --- a/keyboards/vitamins_included/keymaps/default/keymap.c +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/zen/keymaps/default/keymap.c b/keyboards/zen/keymaps/default/keymap.c index e9e7d798ca84..b2adffd1e724 100644 --- a/keyboards/zen/keymaps/default/keymap.c +++ b/keyboards/zen/keymaps/default/keymap.c @@ -16,10 +16,6 @@ enum custom_keycodes { }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -98,4 +94,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //break; } return true; -} \ No newline at end of file +} From 39b5958ae8dbcf374ab68366838acb5cbd380d94 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 17 Feb 2019 05:38:26 +0000 Subject: [PATCH 120/445] convert to unix line-endings [skip ci] --- keyboards/ergotravel/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c index e472b7cde757..370ee2092f87 100644 --- a/keyboards/ergotravel/keymaps/default/keymap.c +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; From feabafd1f42138a4b31596dfa3b6eebe5a5f7605 Mon Sep 17 00:00:00 2001 From: takashiski Date: Sun, 17 Feb 2019 14:44:08 +0900 Subject: [PATCH 121/445] define new keyboard "Hecomi" (#5147) * update pinout for matrix * first commit * include split_common.h * change split_common.h to split_util.h * update config.h * update keymap & config * update * remove K70, add K77 * fixed test keymap * add Layer * define to HHKB pro 2 based keymap * change authoer name * define LAYOUT and LAYOUT_KC * replace from LAYOUT_KC to LAYOUT * change name hecomi_alpha to hecomi/alpha * fixed hecomi_alpha to hecomi/alpha * remove unnecessary files * update readme * add DEFAULT_FOLDER * remove hecomi_alpha because change name to hecomi * remove bad LAYOUT macro * remove IS_COMMAND macro * remove unnecessary RGB options * Update keyboards/hecomi/hecomi.h Co-Authored-By: takashiski * Update keyboards/hecomi/hecomi.h Co-Authored-By: takashiski * Update keyboards/hecomi/alpha/rules.mk Co-Authored-By: takashiski * Update keyboards/hecomi/alpha/rules.mk Co-Authored-By: takashiski * Update keyboards/hecomi/hecomi.h Co-Authored-By: takashiski * remove endif * update rule.mk with suggestions --- keyboards/hecomi/alpha/config.h | 246 +++++++++++++++++++++ keyboards/hecomi/alpha/readme.md | 17 ++ keyboards/hecomi/alpha/rules.mk | 82 +++++++ keyboards/hecomi/config.h | 246 +++++++++++++++++++++ keyboards/hecomi/hecomi.c | 44 ++++ keyboards/hecomi/hecomi.h | 89 ++++++++ keyboards/hecomi/info.json | 0 keyboards/hecomi/keymaps/default/config.h | 19 ++ keyboards/hecomi/keymaps/default/keymap.c | 89 ++++++++ keyboards/hecomi/keymaps/default/readme.md | 1 + keyboards/hecomi/readme.md | 17 ++ keyboards/hecomi/rules.mk | 85 +++++++ 12 files changed, 935 insertions(+) create mode 100644 keyboards/hecomi/alpha/config.h create mode 100644 keyboards/hecomi/alpha/readme.md create mode 100644 keyboards/hecomi/alpha/rules.mk create mode 100644 keyboards/hecomi/config.h create mode 100644 keyboards/hecomi/hecomi.c create mode 100644 keyboards/hecomi/hecomi.h create mode 100644 keyboards/hecomi/info.json create mode 100644 keyboards/hecomi/keymaps/default/config.h create mode 100644 keyboards/hecomi/keymaps/default/keymap.c create mode 100644 keyboards/hecomi/keymaps/default/readme.md create mode 100644 keyboards/hecomi/readme.md create mode 100644 keyboards/hecomi/rules.mk diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h new file mode 100644 index 000000000000..40bb8c2f05f8 --- /dev/null +++ b/keyboards/hecomi/alpha/config.h @@ -0,0 +1,246 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT hecomi_alpha +#define DESCRIPTION asymmetric split keyboard + +/* key matrix size */ +//#define MATRIX_ROWS 5 +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } +#define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } +#define UNUSED_PINS +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +//#define USE_I2C + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, an3 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 D4 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + /*== 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. + * + */ + + +/* 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 +// +/* +#define USE_I2C +#define MASTER_LEFT +#define EEHANDS +*/ diff --git a/keyboards/hecomi/alpha/readme.md b/keyboards/hecomi/alpha/readme.md new file mode 100644 index 000000000000..7ac7569f8475 --- /dev/null +++ b/keyboards/hecomi/alpha/readme.md @@ -0,0 +1,17 @@ +# hecomi_alpha + +![hecomi_alpha](imgur.com image replace me!) + +This keyboard based on HHKB pro 2 and physical layout designed by @hecomi and @takashiski. + +This keyboard use 2 pro micro's, but you can use USB type-c. There are a bit tricky implementation. + +Keyboard Maintainer: [takashiski](https://github.com/takashiski) +Hardware Supported: hecomi_alpha, promicro +Hardware Availability: booth(@skyhigh_works) + +Make example for this keyboard (after setting up your build environment): + + make hecomi_alpha: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/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk new file mode 100644 index 000000000000..ae9192be373a --- /dev/null +++ b/keyboards/hecomi/alpha/rules.mk @@ -0,0 +1,82 @@ +# 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 = yes # 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) +SPLIT_KEYBOARD = yes diff --git a/keyboards/hecomi/config.h b/keyboards/hecomi/config.h new file mode 100644 index 000000000000..40bb8c2f05f8 --- /dev/null +++ b/keyboards/hecomi/config.h @@ -0,0 +1,246 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT hecomi_alpha +#define DESCRIPTION asymmetric split keyboard + +/* key matrix size */ +//#define MATRIX_ROWS 5 +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } +#define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } +#define UNUSED_PINS +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +//#define USE_I2C + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, an3 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 D4 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + /*== 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. + * + */ + + +/* 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 +// +/* +#define USE_I2C +#define MASTER_LEFT +#define EEHANDS +*/ diff --git a/keyboards/hecomi/hecomi.c b/keyboards/hecomi/hecomi.c new file mode 100644 index 000000000000..9d0d93fa173e --- /dev/null +++ b/keyboards/hecomi/hecomi.c @@ -0,0 +1,44 @@ +/* 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 "hecomi.h" +#include "split_util.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/hecomi/hecomi.h b/keyboards/hecomi/hecomi.h new file mode 100644 index 000000000000..ef90a8ead904 --- /dev/null +++ b/keyboards/hecomi/hecomi.h @@ -0,0 +1,89 @@ +/* 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 + +#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. + */ + + + +/* +Left hand : +7 +7 +6 +6 +6 + +32 + +Right hand: + +8 +8 +7 +8 +6 + +37 +*/ + +#define LAYOUT(\ + K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, K57, \ + K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, K67, \ + K20, K21, K22, K23, K24, K25, K71, K72, K73, K74, K75, K76, K77,\ + K30, K31, K32, K33, K34, K35, K80, K81, K82, K83, K84, K85, K86, K87, \ + K40, K41, K42, K43, K44, K45, K92, K93, K94, K95, K96, K97\ +) {\ + {K00, K01, K02, K03, K04, K05, K06, KC_NO},\ + {K10, K11, K12, K13, K14, K15, K16, KC_NO},\ + {K20, K21, K22, K23, K24, K25, KC_NO, KC_NO},\ + {K30, K31, K32, K33, K34, K35, KC_NO, KC_NO},\ + {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO},\ + {K50, K51, K52, K53, K54, K55, K56, K57},\ + {K60, K61, K62, K63, K64, K65, K66, K67},\ + {KC_NO, K71, K72, K73, K74, K75, K76, K77},\ + {K80, K81, K82, K83, K84, K85, K86, K87},\ + {KC_NO, KC_NO, K92, K93, K94, K95, K96, K97}\ +} + +#define LAYOUT_kc(\ +K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, K57, \ +K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, K67, \ +K20, K21, K22, K23, K24, K25, K71, K72, K73, K74, K75, K76, K77,\ +K30, K31, K32, K33, K34, K35, K80, K81, K82, K83, K84, K85, K86, K87, \ + K40, K41, K42, K43, K44, K45, K92, K93, K94, K95, K96, K97\ +) {\ +{KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_NO},\ +{KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO},\ +{KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_NO, KC_NO},\ +{KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_NO, KC_NO},\ +{KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_NO, KC_NO},\ +{KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57},\ +{KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67},\ +{KC_NO, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77},\ +{KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_##K87},\ +{KC_NO, KC_NO, KC_##K92, KC_##K93, KC_##K94, KC_##K95, KC_##K96, KC_##K97}\ +} + diff --git a/keyboards/hecomi/info.json b/keyboards/hecomi/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/hecomi/keymaps/default/config.h b/keyboards/hecomi/keymaps/default/config.h new file mode 100644 index 000000000000..4496c5910061 --- /dev/null +++ b/keyboards/hecomi/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/hecomi/keymaps/default/keymap.c b/keyboards/hecomi/keymaps/default/keymap.c new file mode 100644 index 000000000000..299d9037a8a8 --- /dev/null +++ b/keyboards/hecomi/keymaps/default/keymap.c @@ -0,0 +1,89 @@ +/* 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 "hecomi.h" + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +//R1:7 + 8 = 15 +//R2:7 + 8 = 15 +//R3:6 + 7 = 13 +//R4:6 + 8 = 14 +//R5:6 + 6 = 12 +//total : 69 keys +// +enum layers{ + DF, + FN +}; + +#define KC_FN MO(FN) +#define KC_SFT(XXX) LSFT(XXX) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DF]=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_NUHS,KC_GRV,\ + KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_DEL,\ + KC_LCTRL ,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_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_FN,\ + KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\ + ), + [FN]=LAYOUT(\ + KC_ESC,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6, KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_INS,KC_DEL,\ + KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\ + KC_CAPS ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\ + KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_SFT(KC_EQL),KC_MINS,KC_END,KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS,\ + KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\ + ), +}; + +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/hecomi/keymaps/default/readme.md b/keyboards/hecomi/keymaps/default/readme.md new file mode 100644 index 000000000000..e44f3d6f6118 --- /dev/null +++ b/keyboards/hecomi/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hecomi_alpha \ No newline at end of file diff --git a/keyboards/hecomi/readme.md b/keyboards/hecomi/readme.md new file mode 100644 index 000000000000..79a80f35e53f --- /dev/null +++ b/keyboards/hecomi/readme.md @@ -0,0 +1,17 @@ +# hecomi + +![hecomi](https://imgur.com/a/5AwQw0r) + +This keyboard based on HHKB pro 2 and physical layout designed by @hecomi and @takashiski. + +This keyboard use 2 pro micro's, but you can use USB type-c. There are hand wiring . + +Keyboard Maintainer: [takashiski](https://github.com/takashiski) +Hardware Supported: hecomi_alpha, promicro +Hardware Availability: booth(@skyhigh_works) + +Make example for this keyboard (after setting up your build environment): + + make hecomi/alpha: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/hecomi/rules.mk b/keyboards/hecomi/rules.mk new file mode 100644 index 000000000000..19b763d43556 --- /dev/null +++ b/keyboards/hecomi/rules.mk @@ -0,0 +1,85 @@ +DEFAULT_FOLDER=hecomi/alpha +# +# +# 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 = yes # 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) +SPLIT_KEYBOARD = yes From 8911870b45325a6c5626dbe63fbc7daf4423adca Mon Sep 17 00:00:00 2001 From: Thomas Spurden Date: Sun, 17 Feb 2019 15:36:50 +0000 Subject: [PATCH 122/445] Add isolike iris layout (#5157) Keeps it simple and most keys in a similar position (at least relative to other keys) to a standard ISO layout. --- .../keebio/iris/keymaps/isolike/config.h | 36 ++++++++++++++++ .../keebio/iris/keymaps/isolike/keymap.c | 42 +++++++++++++++++++ .../keebio/iris/keymaps/isolike/readme.md | 5 +++ .../keebio/iris/keymaps/isolike/rules.mk | 2 + 4 files changed, 85 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/isolike/config.h create mode 100644 keyboards/keebio/iris/keymaps/isolike/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/isolike/readme.md create mode 100644 keyboards/keebio/iris/keymaps/isolike/rules.mk diff --git a/keyboards/keebio/iris/keymaps/isolike/config.h b/keyboards/keebio/iris/keymaps/isolike/config.h new file mode 100644 index 000000000000..7986b504162a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/isolike/config.h @@ -0,0 +1,36 @@ +/* +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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/isolike/keymap.c b/keyboards/keebio/iris/keymaps/isolike/keymap.c new file mode 100644 index 000000000000..912be5e39027 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/isolike/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _RAISE 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NUBS, 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_ENT, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LCTL, MO(_RAISE),KC_SPC, KC_SPC, MO(_RAISE),KC_LALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_INS, KC_HOME, KC_UP, KC_END, _______, KC_PGUP, KC_WH_U, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PGDN, KC_WH_D, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NUHS, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, KC_LCTL, KC_LALT, KC_RALT, KC_RGUI, KC_RCTL, KC_GRV, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, _______, _______, _______, _______, KC_APP + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/keebio/iris/keymaps/isolike/readme.md b/keyboards/keebio/iris/keymaps/isolike/readme.md new file mode 100644 index 000000000000..6e8244a0f255 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/isolike/readme.md @@ -0,0 +1,5 @@ +# isolike keymap + +Modelled on the ISO keyboard layout. Key positions should feel quite familiar to +ISO layout users. There is only two layers. The space, enter and raise keys are +mirrored on both hands to make it easier to remember and type on. diff --git a/keyboards/keebio/iris/keymaps/isolike/rules.mk b/keyboards/keebio/iris/keymaps/isolike/rules.mk new file mode 100644 index 000000000000..1d2d9e5a9c4b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/isolike/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no From 3b2a484a5b9b0ddc2e110d5bc40f249ee62352d6 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 18 Feb 2019 02:38:46 +1100 Subject: [PATCH 123/445] Remove redundant KC_TRNS and KC_NO fillers in remaining keymaps (#5154) --- keyboards/amj40/keymaps/fabian/keymap.c | 3 --- keyboards/amj40/keymaps/myee/keymap.c | 4 ---- keyboards/amj60/keymaps/maximized/keymap.c | 4 ---- keyboards/amjpad/keymaps/max/keymap.c | 2 -- keyboards/amjpad/keymaps/ortho_left/keymap.c | 2 -- keyboards/amjpad/keymaps/ortho_right/keymap.c | 2 -- keyboards/atom47/keymaps/LEdiodes/keymap.c | 2 -- keyboards/atom47/keymaps/maartenwut/keymap.c | 2 -- keyboards/atomic/keymaps/pvc/keymap.c | 4 +--- keyboards/atreus/keymaps/erlandsona/keymap.c | 5 ---- keyboards/atreus/keymaps/xk/keymap.c | 3 --- keyboards/atreus/keymaps/xyverz/keymap.c | 4 ---- keyboards/atreus/keymaps/yttyx/keymap.c | 19 +++++++-------- keyboards/atreus62/keymaps/pcewing/keymap.c | 1 - keyboards/atreus62/keymaps/xyverz/keymap.c | 4 ---- keyboards/blockey/keymaps/eucalyn/keymap.c | 5 ---- .../kitten_paw/keymaps/ickerwx/keymap.c | 2 -- .../clueboard/66/keymaps/magicmonty/keymap.c | 23 ++++++++----------- keyboards/clueboard/66/keymaps/smt/keymap.c | 3 --- .../clueboard/66/keymaps/xyverz/keymap.c | 2 -- keyboards/contra/keymaps/dana/keymap.c | 4 ---- keyboards/contra/keymaps/ryanm101/keymap.c | 3 --- keyboards/cospad/keymaps/detrus/keymap.c | 2 -- .../dc01/numpad/keymaps/ortho_5x4/keymap.c | 3 --- .../deltasplit75/keymaps/itsaferbie/keymap.c | 5 ---- .../deltasplit75/keymaps/mbsurfer/keymap.c | 3 --- .../deltasplit75/keymaps/protosplit/keymap.c | 5 ---- keyboards/diverge3/keymaps/workman/keymap.c | 4 +--- keyboards/dz60/keymaps/LEdiodes/keymap.c | 2 -- keyboards/dz60/keymaps/atlacat/keymap.c | 3 --- keyboards/dz60/keymaps/hailbreno/keymap.c | 1 - keyboards/dz60/keymaps/krusli/keymap.c | 2 -- .../dz60/keymaps/marianas/keyDefinitions.h | 1 - keyboards/dz60/keymaps/n0velty/keymap.c | 2 -- keyboards/dz60/keymaps/tailcall/keymap.c | 3 --- keyboards/eco/keymaps/hexwire/keymap.c | 2 -- keyboards/eco/keymaps/that_canadian/keymap.c | 4 ---- keyboards/eco/keymaps/xyverz/keymap.c | 4 ---- .../ergo42/keymaps/biacco-biacco/keymap.c | 4 ---- .../ergo42/keymaps/biacco-macOS/keymap.c | 4 ---- .../ergo42/keymaps/biacco-underglow/keymap.c | 4 ---- keyboards/ergo42/keymaps/biacco/keymap.c | 4 ---- .../keymaps/default-illustrator/keymap.c | 4 ---- keyboards/ergo42/keymaps/hdbx/keymap.c | 3 --- keyboards/ergo42/keymaps/ichi-t/keymap.c | 4 ---- keyboards/ergo42/keymaps/yshrsmz/keymap.c | 4 ---- .../ergodox_ez/keymaps/smurmann/keymap.c | 2 -- keyboards/ergodox_ez/keymaps/vim/keymap.c | 1 - .../ergodox_infinity/keymaps/narze/keymap.c | 4 ---- .../keymaps/nordic_ergo/keymap.c | 4 +--- keyboards/ergotravel/keymaps/ckofy/keymap.c | 1 - keyboards/ergotravel/keymaps/ian/keymap.c | 4 ---- .../keymaps/jpconstantineau/keymap.c | 1 - keyboards/ergotravel/keymaps/viet/keymap.c | 1 - .../fleuron/keymaps/dollartacos/keymap.c | 3 --- keyboards/gh60/keymaps/chaser/keymap.c | 4 ---- keyboards/gh60/keymaps/emiilsd/keymap.c | 3 --- keyboards/gh60/keymaps/xyverz/keymap.c | 4 ---- .../hadron/ver2/keymaps/side_numpad/keymap.c | 3 --- .../5x6/keymaps/impstyle/keymap.c | 4 ---- .../promethium/keymaps/priyadi/keymap.c | 3 --- .../woodpad/keymaps/drashna/keymap.c | 9 -------- keyboards/helix/pico/keymaps/biacco/keymap.c | 3 --- .../helix/rev2/keymaps/five_rows_jis/keymap.c | 4 ---- keyboards/helix/rev2/keymaps/froggy/keymap.c | 4 ---- keyboards/helix/rev2/keymaps/yshrsmz/keymap.c | 4 ---- keyboards/hhkb/keymaps/bakingpy/keymap.c | 2 -- keyboards/hhkb/keymaps/enoch_jp/keymap.c | 1 - keyboards/hhkb/keymaps/jp/keymap.c | 2 -- keyboards/hhkb/keymaps/jp_mac/keymap.c | 2 -- keyboards/hhkb/keymaps/rdg_jp/keymap.c | 2 -- keyboards/hhkb/keymaps/sh_jp/keymap.c | 2 -- keyboards/hhkb/keymaps/smt/keymap.c | 4 ---- keyboards/hid_liber/keymaps/bakageta/keymap.c | 1 - keyboards/jj40/keymaps/ajp10304/keymap.c | 4 ---- keyboards/jj40/keymaps/waples/keymap.c | 2 -- keyboards/jm60/keymaps/poker3/keymap.c | 2 -- keyboards/k_type/keymaps/belak/keymap.c | 2 -- keyboards/katana60/keymaps/colemak/keymap.c | 3 --- .../katana60/keymaps/rominronin/keymap.c | 3 --- keyboards/kc60/keymaps/dbroqua/keymap.c | 1 - keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c | 1 - keyboards/kinesis/keymaps/carpalx/keymap.c | 4 ---- .../keymaps/insertsnideremarks/keymap.c | 5 +--- keyboards/kinesis/keymaps/milestogo/keymap.c | 4 ---- keyboards/kinesis/keymaps/xyverz/keymap.c | 4 ---- .../lets_split/keymaps/DE_simple/keymap.c | 4 ---- keyboards/lets_split/keymaps/adam/keymap.c | 4 ---- .../lets_split/keymaps/cpeters1982/keymap.c | 6 ----- keyboards/lets_split/keymaps/dlaroe/keymap.c | 4 ---- keyboards/lets_split/keymaps/fabian/keymap.c | 3 --- keyboards/lets_split/keymaps/henxing/keymap.c | 4 ---- keyboards/lets_split/keymaps/khord/keymap.c | 4 ---- keyboards/lets_split/keymaps/kris/keymap.c | 4 ---- keyboards/lets_split/keymaps/krusli/keymap.c | 4 ---- .../lets_split/keymaps/mbsurfer/keymap.c | 4 ---- keyboards/lets_split/keymaps/mjt/keymap.c | 4 ---- .../lets_split/keymaps/normacos/keymap.c | 4 ---- keyboards/lets_split/keymaps/pitty/keymap.c | 5 ---- keyboards/lets_split/keymaps/poker/keymap.c | 4 ---- keyboards/lets_split/keymaps/pyrol/keymap.c | 4 ---- keyboards/lets_split/keymaps/smt/keymap.c | 4 ---- .../lets_split/keymaps/that_canadian/keymap.c | 6 +---- keyboards/lets_split/keymaps/waples/keymap.c | 2 -- keyboards/lets_split/keymaps/xk/keymap.c | 3 --- keyboards/lets_split/keymaps/yshrsmz/keymap.c | 4 ---- .../keymaps/that_canadian/keymap.c | 6 +---- .../lfk78/keymaps/ca178858/keymap.c | 4 ---- .../lfk78/keymaps/split_bs_osx/keymap.c | 4 ---- .../lfk87/keymaps/ca178858/keymap.c | 4 ---- .../lfkeyboards/lfk87/keymaps/gbchk/keymap.c | 4 ---- .../mini1800/keymaps/ca178858/keymap.c | 4 ---- keyboards/melody96/keymaps/crilith/keymap.c | 1 - keyboards/minidox/keymaps/alairock/keymap.c | 4 ---- .../minidox/keymaps/dustypomerleau/keymap.c | 1 - keyboards/minidox/keymaps/haegin/keymap.c | 4 ---- keyboards/minidox/keymaps/khitsule/keymap.c | 4 ---- .../minidox/keymaps/that_canadian/keymap.c | 4 ---- keyboards/minidox/keymaps/xyverz/keymap.c | 4 ---- keyboards/mint60/keymaps/eucalyn/keymap.c | 4 ---- keyboards/mitosis/keymaps/carvac_dv/keymap.c | 4 ---- keyboards/mitosis/keymaps/datagrok/keymap.c | 3 --- keyboards/mitosis/keymaps/mjt/keymap.c | 2 -- keyboards/mitosis/keymaps/nzen/keymap.c | 1 - keyboards/miuni32/keymaps/adam-lee/keymap.c | 3 --- keyboards/miuni32/keymaps/ht_156/keymap.c | 3 --- keyboards/miuni32/keymaps/ki/keymap.c | 3 --- .../noxary/268/keymaps/sixtyeight/keymap.c | 3 --- keyboards/ok60/keymaps/ebrowncross/keymap.c | 2 -- keyboards/orthodox/keymaps/oscillope/keymap.c | 4 ---- keyboards/orthodox/keymaps/rfvizarra/keymap.c | 4 ---- keyboards/orthodox/keymaps/xyverz/keymap.c | 4 ---- keyboards/phantom/keymaps/rgbmod/keymap.c | 3 --- keyboards/phantom/keymaps/xyverz/keymap.c | 4 ---- keyboards/planck/keymaps/altgr/keymap.c | 4 +--- keyboards/planck/keymaps/aviator/keymap.c | 1 - keyboards/planck/keymaps/basic/keymap.c | 4 ---- keyboards/planck/keymaps/bone2planck/keymap.c | 4 ---- keyboards/planck/keymaps/brandon/keymap.c | 1 - keyboards/planck/keymaps/callum/keymap.c | 2 -- keyboards/planck/keymaps/cbbrowne/config.h | 1 - keyboards/planck/keymaps/chance/keymap.c | 4 ---- keyboards/planck/keymaps/circuit/keymap.c | 2 -- .../planck/keymaps/danielhklein/keymap.c | 4 ---- keyboards/planck/keymaps/davidrambo/keymap.c | 2 -- keyboards/planck/keymaps/dbroqua/keymap.c | 4 ---- keyboards/planck/keymaps/dlaroe/keymap.c | 4 ---- .../planck/keymaps/dr_notsokind/keymap.c | 2 -- keyboards/planck/keymaps/emilyh/keymap.c | 4 ---- .../planck/keymaps/experimental/keymap.c | 3 --- keyboards/planck/keymaps/fabian/keymap.c | 3 --- .../keymaps/handwired_binaryplease/keymap.c | 4 ---- keyboards/planck/keymaps/hiea/keymap.c | 4 +--- keyboards/planck/keymaps/hieax/keymap.c | 4 +--- keyboards/planck/keymaps/impossible/keymap.c | 4 ---- keyboards/planck/keymaps/jeebak/keymap.c | 4 ---- keyboards/planck/keymaps/jhenahan/keymap.c | 4 ---- keyboards/planck/keymaps/jirgn/keymap.c | 1 - keyboards/planck/keymaps/johannes/keymap.c | 3 --- keyboards/planck/keymaps/lae3/keymap.c | 4 ---- keyboards/planck/keymaps/luke/keymap.c | 4 ---- keyboards/planck/keymaps/mitch/keymap.c | 3 --- keyboards/planck/keymaps/mjt/keymap.c | 4 ---- keyboards/planck/keymaps/mjtnumsym/keymap.c | 4 ---- keyboards/planck/keymaps/narze/keymap.c | 4 ---- keyboards/planck/keymaps/neo2planck/keymap.c | 4 ---- keyboards/planck/keymaps/originerd/keymap.c | 4 ---- keyboards/planck/keymaps/palleiko/keymap.c | 2 -- keyboards/planck/keymaps/pete/keymap.c | 4 ---- keyboards/planck/keymaps/premek/keymap.c | 4 ---- keyboards/planck/keymaps/pvc/keymap.c | 2 -- keyboards/planck/keymaps/rai-suta/keymap.c | 3 --- keyboards/planck/keymaps/sdothum/keymap.c | 4 +--- keyboards/planck/keymaps/sean/mymappings.h | 4 ---- keyboards/planck/keymaps/sgoodwin/keymap.c | 4 ---- keyboards/planck/keymaps/smt/keymap.c | 4 ---- .../planck/keymaps/that_canadian/keymap.c | 4 ---- .../planck/keymaps/thermal_printer/keymap.c | 4 ---- keyboards/planck/keymaps/tong92/keymap.c | 3 --- keyboards/planck/keymaps/unicode/keymap.c | 5 ---- keyboards/planck/keymaps/yale/keymap.c | 4 ---- .../keymaps/zach/zach_common_functions.c | 3 --- keyboards/planck/keymaps/zrichard/keymap.c | 2 -- .../playkbtw/ca66/keymaps/kelorean/keymap.c | 3 --- keyboards/preonic/keymaps/0xdec/keymap.c | 4 ---- .../preonic/keymaps/CMD-Preonic/keymap.c | 4 ---- keyboards/preonic/keymaps/bucktooth/keymap.c | 4 ---- keyboards/preonic/keymaps/dlaroe/keymap.c | 4 ---- keyboards/preonic/keymaps/jacwib/keymap.c | 4 ---- keyboards/preonic/keymaps/kinesis/keymap.c | 3 --- keyboards/preonic/keymaps/nikchi/keymap.c | 4 ---- keyboards/preonic/keymaps/seph/keymap.c | 3 --- keyboards/preonic/keymaps/smt/keymap.c | 4 ---- .../preonic/keymaps/that_canadian/keymap.c | 4 ---- .../keymaps/zach/zach_common_functions.c | 3 --- .../primekb/prime_r/keymaps/rooski/keymap.c | 4 ---- keyboards/rama/m6_a/keymaps/krusli/keymap.c | 3 --- keyboards/satan/keymaps/ben_iso/keymap.c | 1 - keyboards/satan/keymaps/bri/keymap.c | 1 - keyboards/satan/keymaps/chaser/keymap.c | 2 -- keyboards/satan/keymaps/colemak/keymap.c | 2 -- keyboards/satan/keymaps/dende_iso/keymap.c | 3 --- keyboards/satan/keymaps/fakb/keymap.c | 3 --- keyboards/satan/keymaps/midi/keymap.c | 4 ---- .../satan/keymaps/olligranlund_iso/keymap.c | 4 ---- keyboards/satan/keymaps/poker/keymap.c | 4 ---- keyboards/satan/keymaps/sethbc/keymap.c | 3 --- keyboards/satan/keymaps/smt/keymap.c | 3 --- .../satan/keymaps/spacemanspiff/keymap.c | 2 -- keyboards/satan/keymaps/stanleylai/keymap.c | 4 ---- keyboards/satan/keymaps/unxmaal/keymap.c | 2 -- keyboards/staryu/keymaps/krusli/keymap.c | 3 --- keyboards/tada68/keymaps/amnesia0287/keymap.c | 2 -- keyboards/tada68/keymaps/ardakilic/keymap.c | 2 -- keyboards/tada68/keymaps/bazooka/keymap.c | 1 - keyboards/tada68/keymaps/fakb/keymap.c | 2 -- keyboards/tada68/keymaps/fezzant/keymap.c | 3 --- keyboards/tada68/keymaps/laas/keymap.c | 1 - keyboards/tada68/keymaps/mattdicarlo/keymap.c | 2 -- keyboards/tada68/keymaps/mlechner/keymap.c | 2 -- keyboards/tada68/keymaps/pascamel/keymap.c | 2 -- keyboards/tada68/keymaps/raylas/keymap.c | 2 -- keyboards/tada68/keymaps/rbong/keymap.c | 1 - .../tada68/keymaps/stephengrier/keymap.c | 2 -- keyboards/tada68/keymaps/trashcat/keymap.c | 2 -- keyboards/tada68/keymaps/tshack/keymap.c | 2 -- keyboards/tada68/keymaps/unix/keymap.c | 2 -- keyboards/tada68/keymaps/wamsm_tada/keymap.c | 4 +--- .../minivan/keymaps/belak/keymap.c | 3 --- .../minivan/keymaps/budi/keymap.c | 4 ---- .../minivan/keymaps/core/keymap.c | 3 --- .../minivan/keymaps/jeebak/keymap.c | 4 ---- .../minivan/keymaps/mjt/keymap.c | 3 --- .../minivan/keymaps/smt/keymap.c | 4 ---- .../minivan/keymaps/tong92/keymap.c | 3 --- .../minivan/keymaps/xyverz/keymap.c | 4 ---- .../roadkit/keymaps/flipphone/keymap.c | 4 ---- .../roadkit/keymaps/khord/keymap.c | 4 ---- .../roadkit/keymaps/mjt/keymap.c | 5 ---- .../roadkit/keymaps/singles/keymap.c | 5 ---- .../roadkit/keymaps/singlesBrent/keymap.c | 4 ---- .../v60_type_r/keymaps/xtonhasvim/keymap.c | 1 - keyboards/whitefox/keymaps/kim-kim/keymap.c | 2 -- keyboards/xd60/keymaps/krusli/keymap.c | 2 -- keyboards/xd60/keymaps/rooski/keymap.c | 5 +--- keyboards/xd75/keymaps/adi/keymap.c | 2 -- keyboards/xd75/keymaps/atomic_style/keymap.c | 2 -- keyboards/xd75/keymaps/bramver/keymap.c | 4 ---- keyboards/xd75/keymaps/cbbrowne/config.h | 1 - keyboards/xd75/keymaps/cbbrowne/keymap.c | 2 -- keyboards/xd75/keymaps/davidrambo/keymap.c | 2 -- keyboards/xd75/keymaps/emilyh/keymap.c | 2 -- keyboards/xd75/keymaps/fabian/keymap.c | 3 --- keyboards/xd75/keymaps/kim-kim-xd73/keymap.c | 2 -- keyboards/xd75/keymaps/kim-kim/keymap.c | 2 -- keyboards/zeal60/keymaps/tusing/keymap.c | 1 - keyboards/zen/keymaps/jwlawrence/keymap.c | 6 +---- keyboards/zen/keymaps/xyverz/keymap.c | 4 ---- 258 files changed, 31 insertions(+), 823 deletions(-) diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 5055771ff86e..360424f300d7 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -50,9 +50,6 @@ enum custom_keycodes { EXT_PLV }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c index baddea72d539..7642ede34da7 100644 --- a/keyboards/amj40/keymaps/myee/keymap.c +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c index fd8e198f59c8..c5dc25018c8c 100644 --- a/keyboards/amj60/keymaps/maximized/keymap.c +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -11,10 +11,6 @@ // dual-role shortcuts #define SPACEDUAL LT(_SPC, KC_SPACE) - -// increase readability -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c index 463a265de134..eb50567e987c 100644 --- a/keyboards/amjpad/keymaps/max/keymap.c +++ b/keyboards/amjpad/keymaps/max/keymap.c @@ -14,8 +14,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c index 5245138bd16a..815ac2a6818f 100644 --- a/keyboards/amjpad/keymaps/ortho_left/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_left/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c index 52e93524b554..cbb81a2eabf4 100644 --- a/keyboards/amjpad/keymaps/ortho_right/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_right/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c index 15343ab33541..87e1244214a5 100644 --- a/keyboards/atom47/keymaps/LEdiodes/keymap.c +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -6,8 +6,6 @@ #define _L2 2 #define _L3 3 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L0] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ diff --git a/keyboards/atom47/keymaps/maartenwut/keymap.c b/keyboards/atom47/keymaps/maartenwut/keymap.c index 33ed0936a0a8..c01ace92a96f 100644 --- a/keyboards/atom47/keymaps/maartenwut/keymap.c +++ b/keyboards/atom47/keymaps/maartenwut/keymap.c @@ -9,8 +9,6 @@ #define _LO 1 //FN1 #define _RA 2 //FN -#define _______ KC_TRNS - enum custom_keycodes { CTRLZ = SAFE_RANGE, CTRLX, diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 4ccac63f6cb1..33b3a9d824b8 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -104,8 +104,6 @@ enum keyboard_macros { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -608,4 +606,4 @@ void music_scale_user(void) PLAY_SONG(music_scale); } -#endif /* AUDIO_ENABLE */ \ No newline at end of file +#endif /* AUDIO_ENABLE */ diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 232c700e948b..e890e7f52812 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -11,11 +11,6 @@ #define NUMS 1 #define MOUS 2 -// Some quick aliases, just to make it look pretty -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Qwerty */ KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , diff --git a/keyboards/atreus/keymaps/xk/keymap.c b/keyboards/atreus/keymaps/xk/keymap.c index ed1f634cebe8..a03dee9ca9d5 100644 --- a/keyboards/atreus/keymaps/xk/keymap.c +++ b/keyboards/atreus/keymaps/xk/keymap.c @@ -57,9 +57,6 @@ WINSH, OSX, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // action-TAP for key/mod behavior LT(layer, KC) #define XK_TAB LT(_KAMELOC, KC_TAB) #define XK_BSP LT(_KAMELOC, KC_BSPC) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index dc9c308c3894..fe1ca295d86f 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -38,10 +38,6 @@ enum planck_keycodes { #define ESCTRL CTL_T(KC_ESC) #define TABALT ALT_T(KC_TAB) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak Layer ,----------------------------------. ,----------------------------------. diff --git a/keyboards/atreus/keymaps/yttyx/keymap.c b/keyboards/atreus/keymaps/yttyx/keymap.c index 8773a9734bdb..210bfd36bae7 100644 --- a/keyboards/atreus/keymaps/yttyx/keymap.c +++ b/keyboards/atreus/keymaps/yttyx/keymap.c @@ -9,9 +9,6 @@ enum layers { R3 // (momentary) }; -#define xxxxxxx KC_NO -#define _______ KC_TRNS - // Aliases from replicaJunction's atreus layout #define KCX_LST LSFT(KC_TAB) #define KX_COPY LCTL(KC_C) @@ -58,7 +55,7 @@ const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = { [L1] = LAYOUT( KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT, - KC_ESC, KC_EXLM, KC_AMPR, xxxxxxx, xxxxxxx, _______, _______, _______, xxxxxxx, _______, + KC_ESC, KC_EXLM, KC_AMPR, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -74,9 +71,9 @@ const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = { '---------------------------------------------------------------------------' */ [R1] = LAYOUT( - KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, xxxxxxx, xxxxxxx, MO(R3), + KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, XXXXXXX, XXXXXXX, MO(R3), KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS, - KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, xxxxxxx, KC_PSCR, + KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, XXXXXXX, KC_PSCR, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -94,7 +91,7 @@ const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = { [R2] = LAYOUT( KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS, KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT, - KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, xxxxxxx, KC_TAB, xxxxxxx, xxxxxxx, + KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, XXXXXXX, KC_TAB, XXXXXXX, XXXXXXX, _______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR ), @@ -110,10 +107,10 @@ const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = { '---------------------------------------------------------------' */ [R3] = LAYOUT( - RESET, 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 + RESET, 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 ) }; diff --git a/keyboards/atreus62/keymaps/pcewing/keymap.c b/keyboards/atreus62/keymaps/pcewing/keymap.c index 46ec3d548ea1..eee22271f48b 100644 --- a/keyboards/atreus62/keymaps/pcewing/keymap.c +++ b/keyboards/atreus62/keymaps/pcewing/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS #define FN MO(_FN) #define TODO KC_NO diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index cc45e25fa402..a7c33ce9eabe 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -63,10 +63,6 @@ enum atreus52_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make the keymap clearer. #define CTL_ENT CTL_T(KC_ENT) diff --git a/keyboards/blockey/keymaps/eucalyn/keymap.c b/keyboards/blockey/keymaps/eucalyn/keymap.c index 33d1051a11e6..99564cae165b 100644 --- a/keyboards/blockey/keymaps/eucalyn/keymap.c +++ b/keyboards/blockey/keymaps/eucalyn/keymap.c @@ -20,11 +20,6 @@ extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( 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, \ diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c index c0549c424eae..b7675dcb7d5d 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c @@ -1,8 +1,6 @@ #include QMK_KEYBOARD_H #include "mousekey.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO #undef C #undef S #define C(kc) LCTL(KC_##kc) diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index 8d93715676af..cd9ae01188e9 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define xxxxxxx KC_NO - // 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 @@ -90,19 +87,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) /* Keymap _MI: MIDI layer (Advanced)*/ [_MI] = LAYOUT( - TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, - MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, xxxxxxx, - MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx,xxxxxxx, MI_ALLOFF, MI_ALLOFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), + TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, MI_Cs, MI_Ds, XXXXXXX, MI_Fs, MI_Gs, MI_As, XXXXXXX, MI_Cs_1, MI_Ds_1, XXXXXXX, MI_Fs_1, XXXXXXX, XXXXXXX, + MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, XXXXXXX, + MI_SUS, XXXXXXX, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, MI_ALLOFF, MI_ALLOFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), #elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) /* Keymap _MI: MIDI layer (Basic)*/ [_MI] = LAYOUT( - TO_BASE, 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, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), + TO_BASE, 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, MI_ON, MI_OFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), #endif }; diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c index c1e3756909aa..89fc495919eb 100644 --- a/keyboards/clueboard/66/keymaps/smt/keymap.c +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -16,9 +16,6 @@ enum planck_keycodes { DVORAK }; -// Helpful defines -#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) diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index 916a448e26ca..3341ced918ab 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -24,8 +24,6 @@ enum planck_keycodes { }; // Useful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer diff --git a/keyboards/contra/keymaps/dana/keymap.c b/keyboards/contra/keymaps/dana/keymap.c index f296805b0b9c..51fa9f75fb48 100644 --- a/keyboards/contra/keymaps/dana/keymap.c +++ b/keyboards/contra/keymaps/dana/keymap.c @@ -5,10 +5,6 @@ extern keymap_config_t keymap_config; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/contra/keymaps/ryanm101/keymap.c b/keyboards/contra/keymaps/ryanm101/keymap.c index 70082a5a4f52..721a9a06eaf2 100644 --- a/keyboards/contra/keymaps/ryanm101/keymap.c +++ b/keyboards/contra/keymaps/ryanm101/keymap.c @@ -3,9 +3,6 @@ extern keymap_config_t keymap_config; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom Key Combos #define LCKSCR LCTL(LGUI(KC_Q)) //#define KC_CAD LCTL(LALT(KC_DEL)) // CTL+ALT+DEL (windows) diff --git a/keyboards/cospad/keymaps/detrus/keymap.c b/keyboards/cospad/keymaps/detrus/keymap.c index f9eddc2a87ad..93f95bb01eff 100644 --- a/keyboards/cospad/keymaps/detrus/keymap.c +++ b/keyboards/cospad/keymaps/detrus/keymap.c @@ -6,8 +6,6 @@ #include "rgblight.h" #endif -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. enum cospad_layers { _QWERTY_LAYER, diff --git a/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c b/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c index cde2b26e21f4..133f33cb0052 100644 --- a/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c +++ b/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { KC_P00 = SAFE_RANGE }; diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c index d7857294fb4f..8eadc7aee12e 100644 --- a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c +++ b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c @@ -7,11 +7,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear - -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer *,-----------------------------------------------------------------------. diff --git a/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c b/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c index d42d15da0471..cba17015de9c 100644 --- a/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c +++ b/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c @@ -9,9 +9,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,---------------------------- ----------------------------------------. diff --git a/keyboards/deltasplit75/keymaps/protosplit/keymap.c b/keyboards/deltasplit75/keymaps/protosplit/keymap.c index 5505f9780293..7d6cb33949ab 100644 --- a/keyboards/deltasplit75/keymaps/protosplit/keymap.c +++ b/keyboards/deltasplit75/keymaps/protosplit/keymap.c @@ -7,11 +7,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear - -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_protosplit( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, diff --git a/keyboards/diverge3/keymaps/workman/keymap.c b/keyboards/diverge3/keymaps/workman/keymap.c index 5e681f4188d6..415df2eead52 100644 --- a/keyboards/diverge3/keymaps/workman/keymap.c +++ b/keyboards/diverge3/keymaps/workman/keymap.c @@ -22,8 +22,6 @@ extern keymap_config_t keymap_config; #define _GAME 1 #define _RAISE 2 -#define _______ KC_TRNS - #define SHIFT_MOD MOD_BIT(KC_LSFT) #define SPACE_RAISE LT(_RAISE, KC_SPC) #define ENT_RAISE LT(_RAISE, KC_ENT) @@ -209,4 +207,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, BL_BRTG, KC_MUTE, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______), -}; \ No newline at end of file +}; diff --git a/keyboards/dz60/keymaps/LEdiodes/keymap.c b/keyboards/dz60/keymaps/LEdiodes/keymap.c index 8149b255bc6f..c6a9214a0136 100644 --- a/keyboards/dz60/keymaps/LEdiodes/keymap.c +++ b/keyboards/dz60/keymaps/LEdiodes/keymap.c @@ -6,8 +6,6 @@ #define _L3 3 #define _L4 4 -#define _______ KC_TRNS - enum { TD_SPC_ENT = 0, TD_KC_LSFT_CAPS, diff --git a/keyboards/dz60/keymaps/atlacat/keymap.c b/keyboards/dz60/keymaps/atlacat/keymap.c index 72d6b04a4de0..606698b75515 100644 --- a/keyboards/dz60/keymaps/atlacat/keymap.c +++ b/keyboards/dz60/keymaps/atlacat/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define RGB_STA RGB_M_P //rgb static #define RGB_BRE RGB_M_B //rgb breathe #define RGB_RAI RGB_M_R //rgb rainbow diff --git a/keyboards/dz60/keymaps/hailbreno/keymap.c b/keyboards/dz60/keymaps/hailbreno/keymap.c index edc22a5a2454..130927e1267f 100644 --- a/keyboards/dz60/keymaps/hailbreno/keymap.c +++ b/keyboards/dz60/keymaps/hailbreno/keymap.c @@ -8,7 +8,6 @@ #include QMK_KEYBOARD_H #define X KC_NO -#define _______ KC_TRNS extern keymap_config_t keymap_config; diff --git a/keyboards/dz60/keymaps/krusli/keymap.c b/keyboards/dz60/keymaps/krusli/keymap.c index 0ad6f1b2b540..59162675dda9 100644 --- a/keyboards/dz60/keymaps/krusli/keymap.c +++ b/keyboards/dz60/keymaps/krusli/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/dz60/keymaps/marianas/keyDefinitions.h b/keyboards/dz60/keymaps/marianas/keyDefinitions.h index 010ace769473..d3aac3dcbf45 100644 --- a/keyboards/dz60/keymaps/marianas/keyDefinitions.h +++ b/keyboards/dz60/keymaps/marianas/keyDefinitions.h @@ -70,7 +70,6 @@ #define ____ KC_TRNS #define _____ KC_TRNS #define ______ KC_TRNS -#define _______ KC_TRNS #define ________ KC_TRNS #define ___________ KC_TRNS #define _________________ KC_TRNS diff --git a/keyboards/dz60/keymaps/n0velty/keymap.c b/keyboards/dz60/keymaps/n0velty/keymap.c index 7f532b7beb75..1b9c73eb9596 100644 --- a/keyboards/dz60/keymaps/n0velty/keymap.c +++ b/keyboards/dz60/keymaps/n0velty/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS //readability - #define _DL 0 //default #define _F1 1 //function 1 #define _F2 2 //function 2 diff --git a/keyboards/dz60/keymaps/tailcall/keymap.c b/keyboards/dz60/keymaps/tailcall/keymap.c index f824e9de380d..3835b1f646eb 100644 --- a/keyboards/dz60/keymaps/tailcall/keymap.c +++ b/keyboards/dz60/keymaps/tailcall/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/eco/keymaps/hexwire/keymap.c b/keyboards/eco/keymaps/hexwire/keymap.c index 7c6616aac878..3f21eacd3b29 100644 --- a/keyboards/eco/keymaps/hexwire/keymap.c +++ b/keyboards/eco/keymaps/hexwire/keymap.c @@ -23,8 +23,6 @@ enum eco_keycodes { // Fillers to make layering more clear #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_RST RESET #define KC_DBUG DEBUG diff --git a/keyboards/eco/keymaps/that_canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c index 444bc48f8045..f9696c77e5f7 100644 --- a/keyboards/eco/keymaps/that_canadian/keymap.c +++ b/keyboards/eco/keymaps/that_canadian/keymap.c @@ -25,10 +25,6 @@ enum eco_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index b4ca0f1a5f1e..395a014acb36 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -28,10 +28,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make reading the keymap easier #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. diff --git a/keyboards/ergo42/keymaps/biacco-biacco/keymap.c b/keyboards/ergo42/keymaps/biacco-biacco/keymap.c index ee471b3a51c3..9eaba22099f5 100644 --- a/keyboards/ergo42/keymaps/biacco-biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-biacco/keymap.c @@ -12,10 +12,6 @@ extern keymap_config_t keymap_config; #define BMETA 5 #define BSYMB 6 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c index 7d897abbf8eb..8299eb701104 100644 --- a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c @@ -7,10 +7,6 @@ extern keymap_config_t keymap_config; #define SYMB 2 #define GAME 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/biacco-underglow/keymap.c b/keyboards/ergo42/keymaps/biacco-underglow/keymap.c index 7722eb0068e6..3449192802ae 100644 --- a/keyboards/ergo42/keymaps/biacco-underglow/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-underglow/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define GAME 3 #define RGB 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; diff --git a/keyboards/ergo42/keymaps/biacco/keymap.c b/keyboards/ergo42/keymaps/biacco/keymap.c index c567e5c758b6..a6cc610529a6 100644 --- a/keyboards/ergo42/keymaps/biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco/keymap.c @@ -7,10 +7,6 @@ extern keymap_config_t keymap_config; #define SYMB 2 #define GAME 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/default-illustrator/keymap.c b/keyboards/ergo42/keymaps/default-illustrator/keymap.c index 9e0f7fb2e960..62af6b2ab112 100644 --- a/keyboards/ergo42/keymaps/default-illustrator/keymap.c +++ b/keyboards/ergo42/keymaps/default-illustrator/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define GAME 3 #define ILLUST 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c index b7bddd553124..da579de01a9a 100644 --- a/keyboards/ergo42/keymaps/hdbx/keymap.c +++ b/keyboards/ergo42/keymaps/hdbx/keymap.c @@ -26,9 +26,6 @@ enum custom_keycodes { // Use Dynamic macro #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_LOWR LT(_LOWER, KC_MHEN) // タップで無変換 ホールドでLower #define KC_RASE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise #define KC_LSLB MT(MOD_LSFT, JP_LBRC) // タップで[ ホールドで左Shift diff --git a/keyboards/ergo42/keymaps/ichi-t/keymap.c b/keyboards/ergo42/keymaps/ichi-t/keymap.c index 82cda6df1dd2..94d57936ed5c 100644 --- a/keyboards/ergo42/keymaps/ichi-t/keymap.c +++ b/keyboards/ergo42/keymaps/ichi-t/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define _CMOVE 3 #define _WIN 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY diff --git a/keyboards/ergo42/keymaps/yshrsmz/keymap.c b/keyboards/ergo42/keymaps/yshrsmz/keymap.c index a4a83a2e1b3d..55fe30e89b64 100644 --- a/keyboards/ergo42/keymaps/yshrsmz/keymap.c +++ b/keyboards/ergo42/keymaps/yshrsmz/keymap.c @@ -17,10 +17,6 @@ enum custom_keycodes { KANA }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c index eec8ef8753cf..bad8dcf5e89a 100644 --- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -6,8 +6,6 @@ #define BASE 0 // default layer #define MDIA 1 // media keys -#define _______ KC_TRNS - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, diff --git a/keyboards/ergodox_ez/keymaps/vim/keymap.c b/keyboards/ergodox_ez/keymaps/vim/keymap.c index 5ebe0c8475b9..9102a7a0a90e 100644 --- a/keyboards/ergodox_ez/keymaps/vim/keymap.c +++ b/keyboards/ergodox_ez/keymaps/vim/keymap.c @@ -5,7 +5,6 @@ #include "vim.h" #define VERSION_STRING QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION -#define _______ KC_TRNS #define X_____X KC_TRNS #define KC_ATM LGUI(LSFT(KC_P)) #define KC_ATP LGUI(LCTL(KC_P)) diff --git a/keyboards/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/ergodox_infinity/keymaps/narze/keymap.c index 3fd3b6971446..d562c4a9deb7 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/narze/keymap.c @@ -55,10 +55,6 @@ static uint16_t m_gui_unds_timer; static uint16_t m_sft_po_timer; static uint16_t m_sft_pc_timer; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Narze : Custom Macros #define HPR_ESC ALL_T(KC_ESC) #define SFT_ENT SFT_T(KC_ENT) diff --git a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c index 72ee2bc6fe50..f1fedb56242b 100644 --- a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c @@ -13,8 +13,6 @@ #define SYMB 2 // symbol layer #define MDIA 3 // media keys -#define _______ KC_TRNS - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -272,4 +270,4 @@ void matrix_scan_user(void) { // none break; } -}; \ No newline at end of file +}; diff --git a/keyboards/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c index 7b3b333a5d87..24f88ba54179 100644 --- a/keyboards/ergotravel/keymaps/ckofy/keymap.c +++ b/keyboards/ergotravel/keymaps/ckofy/keymap.c @@ -31,7 +31,6 @@ enum { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_XXXX KC_NO #define KC_CMK COLEMAK diff --git a/keyboards/ergotravel/keymaps/ian/keymap.c b/keyboards/ergotravel/keymaps/ian/keymap.c index fd4006d51d61..f763d6bcdcf2 100644 --- a/keyboards/ergotravel/keymaps/ian/keymap.c +++ b/keyboards/ergotravel/keymaps/ian/keymap.c @@ -10,10 +10,6 @@ enum custom_layers { _QWERTY }; - - -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define BASELYR TO(_COLEMAK) // base layer #define LOWER MO(_LOWER) // momentary lower layer #define RAISE MO(_RAISE) // momentary raise layer diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c index b2374b71155c..8bdaf4faf3fe 100644 --- a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c +++ b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c @@ -15,7 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/ergotravel/keymaps/viet/keymap.c b/keyboards/ergotravel/keymaps/viet/keymap.c index 0e3ec074c774..5e266ff4e08c 100644 --- a/keyboards/ergotravel/keymaps/viet/keymap.c +++ b/keyboards/ergotravel/keymaps/viet/keymap.c @@ -26,7 +26,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_ADJT MO(_ADJUST) #define KC_RST RESET diff --git a/keyboards/fleuron/keymaps/dollartacos/keymap.c b/keyboards/fleuron/keymaps/dollartacos/keymap.c index e38dd8bd5727..f8535fdc788e 100644 --- a/keyboards/fleuron/keymaps/dollartacos/keymap.c +++ b/keyboards/fleuron/keymaps/dollartacos/keymap.c @@ -34,9 +34,6 @@ enum custom_keycodes { #define _RAISE 2 */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_fleuron_grid( /* Qwerty diff --git a/keyboards/gh60/keymaps/chaser/keymap.c b/keyboards/gh60/keymaps/chaser/keymap.c index bff29428bb5c..29228eec2de7 100644 --- a/keyboards/gh60/keymaps/chaser/keymap.c +++ b/keyboards/gh60/keymaps/chaser/keymap.c @@ -13,10 +13,6 @@ extern keymap_config_t keymap_config; #define _FL 1 #define _MC 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - bool git_duet = false; bool backlight_arrows = false; bool backlight_gaming = false; diff --git a/keyboards/gh60/keymaps/emiilsd/keymap.c b/keyboards/gh60/keymaps/emiilsd/keymap.c index 0fbfe38c2357..a863511d6091 100644 --- a/keyboards/gh60/keymaps/emiilsd/keymap.c +++ b/keyboards/gh60/keymaps/emiilsd/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ISO HHKB layout: diff --git a/keyboards/gh60/keymaps/xyverz/keymap.c b/keyboards/gh60/keymaps/xyverz/keymap.c index 6179ce386be2..e47fcc2f9436 100644 --- a/keyboards/gh60/keymaps/xyverz/keymap.c +++ b/keyboards/gh60/keymaps/xyverz/keymap.c @@ -18,10 +18,6 @@ extern keymap_config_t keymap_config; #define DVORAK M(_DV) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c index 248bb7ca6638..0e5ab74533f0 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c @@ -47,9 +47,6 @@ enum macro_keycodes { KC_DEMOMACRO, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c index 9a89212fec56..179b4486648f 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c @@ -12,10 +12,6 @@ extern keymap_config_t keymap_config; #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -#define _______ KC_TRNS - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index faae89f935d7..179b411ee8f1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -57,9 +57,6 @@ along with this program. If not, see . #include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) -// Fillers to make layering clearer -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD diff --git a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c index f7df5eac7929..20b4e064eb3e 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c @@ -21,15 +21,6 @@ // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - - - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = KEYMAP( /* Base */ TG(_NAV), TG(_DIABLO), TG(_MACROS), KC_PSLS,\ diff --git a/keyboards/helix/pico/keymaps/biacco/keymap.c b/keyboards/helix/pico/keymaps/biacco/keymap.c index b4ee4fcaa9db..36ef4394dd83 100644 --- a/keyboards/helix/pico/keymaps/biacco/keymap.c +++ b/keyboards/helix/pico/keymaps/biacco/keymap.c @@ -31,9 +31,6 @@ enum layer_number { GAME }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c index 8c2040d5beee..be76dffbe401 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c @@ -46,10 +46,6 @@ enum custom_keycodes { #endif }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Layer Mode aliases #define DL_BAS DF(_BASE) #define DL_BASE DF(_BAS_E) diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c index efd8a2916029..c27c1320c4e8 100644 --- a/keyboards/helix/rev2/keymaps/froggy/keymap.c +++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c @@ -61,10 +61,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c index 1bde66e8856e..5240ac800cbe 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -46,10 +46,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/keymaps/bakingpy/keymap.c index 969f4fc4f19e..04d79f9247a0 100644 --- a/keyboards/hhkb/keymaps/bakingpy/keymap.c +++ b/keyboards/hhkb/keymaps/bakingpy/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_JP( 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_DEL, KC_BSPC, diff --git a/keyboards/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/keymaps/enoch_jp/keymap.c index b685300a76bc..15dc29773bf6 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/keymap.c +++ b/keyboards/hhkb/keymaps/enoch_jp/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS /* Layer 0: HHKB JP * ,-----------------------------------------------------------. diff --git a/keyboards/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/keymaps/jp/keymap.c index fefe61452e87..6fd06638cec4 100644 --- a/keyboards/hhkb/keymaps/jp/keymap.c +++ b/keyboards/hhkb/keymaps/jp/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - /* Layer 0: HHKB JP * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/keymaps/jp_mac/keymap.c index 80fa14e7a876..f3ef3d6af6de 100644 --- a/keyboards/hhkb/keymaps/jp_mac/keymap.c +++ b/keyboards/hhkb/keymaps/jp_mac/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - /* Layer 0: HHKB JP * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| diff --git a/keyboards/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/keymaps/rdg_jp/keymap.c index f7df543abe96..f40df74e8766 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/keymap.c +++ b/keyboards/hhkb/keymaps/rdg_jp/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum { ZER, diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/keymaps/sh_jp/keymap.c index 5dbbea8c8c37..79515c5a6ef0 100644 --- a/keyboards/hhkb/keymaps/sh_jp/keymap.c +++ b/keyboards/hhkb/keymaps/sh_jp/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum { DVOR, diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/keymaps/smt/keymap.c index d6cbaac4b7d9..e1d8bae2e49f 100644 --- a/keyboards/hhkb/keymaps/smt/keymap.c +++ b/keyboards/hhkb/keymaps/smt/keymap.c @@ -16,10 +16,6 @@ enum planck_keycodes HHKB }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/hid_liber/keymaps/bakageta/keymap.c b/keyboards/hid_liber/keymaps/bakageta/keymap.c index 9754a70dfc3c..dab702e1072c 100755 --- a/keyboards/hid_liber/keymaps/bakageta/keymap.c +++ b/keyboards/hid_liber/keymaps/bakageta/keymap.c @@ -17,7 +17,6 @@ #include "hid_liber.h" // Helpful defines -#define _______ KC_TRNS #define FN_CAPS LT(_FL, KC_CAPSLOCK) // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c index c0d0062c7bd5..c34a7c292999 100644 --- a/keyboards/jj40/keymaps/ajp10304/keymap.c +++ b/keyboards/jj40/keymaps/ajp10304/keymap.c @@ -35,10 +35,6 @@ enum jj40_keycodes { #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/jj40/keymaps/waples/keymap.c b/keyboards/jj40/keymaps/waples/keymap.c index 81416f982086..79acada28c01 100644 --- a/keyboards/jj40/keymaps/waples/keymap.c +++ b/keyboards/jj40/keymaps/waples/keymap.c @@ -21,8 +21,6 @@ enum jj40_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO #define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc #define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter -#define _______ KC_TRNS -#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/jm60/keymaps/poker3/keymap.c b/keyboards/jm60/keymaps/poker3/keymap.c index 422ab3023670..07f432dcd883 100644 --- a/keyboards/jm60/keymaps/poker3/keymap.c +++ b/keyboards/jm60/keymaps/poker3/keymap.c @@ -10,8 +10,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer */ diff --git a/keyboards/k_type/keymaps/belak/keymap.c b/keyboards/k_type/keymaps/belak/keymap.c index 1f59630b1e2b..ed9392a2a594 100644 --- a/keyboards/k_type/keymaps/belak/keymap.c +++ b/keyboards/k_type/keymaps/belak/keymap.c @@ -1,7 +1,5 @@ #include "k_type.h" -#define _______ KC_TRNS - #define _QW 0 #define _L1 1 diff --git a/keyboards/katana60/keymaps/colemak/keymap.c b/keyboards/katana60/keymaps/colemak/keymap.c index 63768f9372a8..b0ed04185435 100644 --- a/keyboards/katana60/keymaps/colemak/keymap.c +++ b/keyboards/katana60/keymaps/colemak/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Windows based definitions. #define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer #define K_PRVWD LCTL(KC_LEFT) // Previous word diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/katana60/keymaps/rominronin/keymap.c index cb8427f10c89..7af9ab87f333 100644 --- a/keyboards/katana60/keymaps/rominronin/keymap.c +++ b/keyboards/katana60/keymaps/rominronin/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // MacOS based definitions. #define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer #define K_PRVWD LALT(KC_LEFT) // Previous word diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index f28e441b0af2..a70e1017e260 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -7,7 +7,6 @@ // Fillers to make layering more clear #define ______ KC_TRNS -#define XXXXXXX KC_NO // Func macro definitions. #define S_LED FUNC(0) diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c index 10e00650d1bb..af758ae16ad0 100644 --- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c @@ -6,7 +6,6 @@ // Fillers to make layering more clear #define ______ KC_TRNS -#define XXXXXXX KC_NO // Func macro definitions. #define S_LED FUNC(0) diff --git a/keyboards/kinesis/keymaps/carpalx/keymap.c b/keyboards/kinesis/keymaps/carpalx/keymap.c index 922e8e7615b8..2e56946e766e 100644 --- a/keyboards/kinesis/keymaps/carpalx/keymap.c +++ b/keyboards/kinesis/keymaps/carpalx/keymap.c @@ -11,10 +11,6 @@ extern keymap_config_t keymap_config; #define QWERTY M(_QW) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* Function Keys on All Layers (Keypad toggles): diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c index 78defea2375b..7f328b4f0e96 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c @@ -32,9 +32,6 @@ enum kinesis_keycodes { NKROTG = MAGIC_TOGGLE_NKRO }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Tap Dance Declarations enum { ADJ = 0, @@ -482,4 +479,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index 1ae7d9082a82..c790e3ca3e41 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -7,10 +7,6 @@ #define _TRANS 3// #define _SYMB2 4// old symbol level, more ergodox like -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* Macros */ enum { NONE = 0, diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index 3c697f8f075a..842645d90501 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -16,10 +16,6 @@ enum custom_keycodes { KEYPAD }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make the keymap more uniform #define GUI_END GUI_T(KC_END) #define MED_DEL LT(_MEDIA, KC_DEL) diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c index e801c241e1f1..32383ec67b34 100644 --- a/keyboards/lets_split/keymaps/DE_simple/keymap.c +++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c @@ -19,10 +19,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwertz diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c index b986ab780bd7..a5ad8e32e8bb 100644 --- a/keyboards/lets_split/keymaps/adam/keymap.c +++ b/keyboards/lets_split/keymaps/adam/keymap.c @@ -11,10 +11,6 @@ extern keymap_config_t keymap_config; #define FLOCK 1 // symbols arrows and F keys on F held down #define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c index 9c3eb9475217..8fa2bf6c042a 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/keymap.c +++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c @@ -37,12 +37,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; */ - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/dlaroe/keymap.c b/keyboards/lets_split/keymaps/dlaroe/keymap.c index b2282e0fe8c1..65dad2d3d818 100644 --- a/keyboards/lets_split/keymaps/dlaroe/keymap.c +++ b/keyboards/lets_split/keymaps/dlaroe/keymap.c @@ -31,10 +31,6 @@ enum custom_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index 37053a8e4bfe..518eb0e73119 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -40,9 +40,6 @@ enum custom_keycodes { EXT_PLV, }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/lets_split/keymaps/henxing/keymap.c b/keyboards/lets_split/keymaps/henxing/keymap.c index aab75dc543a8..e3d7885cb87c 100644 --- a/keyboards/lets_split/keymaps/henxing/keymap.c +++ b/keyboards/lets_split/keymaps/henxing/keymap.c @@ -17,10 +17,6 @@ enum custom_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c index 41042065d639..4209efabed7a 100644 --- a/keyboards/lets_split/keymaps/khord/keymap.c +++ b/keyboards/lets_split/keymaps/khord/keymap.c @@ -17,10 +17,6 @@ enum custom_keycodes { SMSPC1 }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Tap Dance Declarations enum { SFT_CAP = 0 diff --git a/keyboards/lets_split/keymaps/kris/keymap.c b/keyboards/lets_split/keymaps/kris/keymap.c index 34d2e86da03c..ee47d7999a06 100644 --- a/keyboards/lets_split/keymaps/kris/keymap.c +++ b/keyboards/lets_split/keymaps/kris/keymap.c @@ -23,10 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/krusli/keymap.c b/keyboards/lets_split/keymaps/krusli/keymap.c index 9b49bab3b41d..002d22d302d5 100644 --- a/keyboards/lets_split/keymaps/krusli/keymap.c +++ b/keyboards/lets_split/keymaps/krusli/keymap.c @@ -25,10 +25,6 @@ enum custom_keycodes { NUMPAD }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/mbsurfer/keymap.c b/keyboards/lets_split/keymaps/mbsurfer/keymap.c index 5f6589337f8a..da49f0c7aaf4 100644 --- a/keyboards/lets_split/keymaps/mbsurfer/keymap.c +++ b/keyboards/lets_split/keymaps/mbsurfer/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Tap Dance Declarations enum { SFT_CAP = 0, diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c index 2c61cce3bc2c..b0394659cc57 100644 --- a/keyboards/lets_split/keymaps/mjt/keymap.c +++ b/keyboards/lets_split/keymaps/mjt/keymap.c @@ -23,10 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/normacos/keymap.c b/keyboards/lets_split/keymaps/normacos/keymap.c index 8902b7b56f5a..b6b6b1c141b9 100644 --- a/keyboards/lets_split/keymaps/normacos/keymap.c +++ b/keyboards/lets_split/keymaps/normacos/keymap.c @@ -26,10 +26,6 @@ enum custom_keycodes { CHROME }; -// Fillers (to make layering more clear) -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Mod taps #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control diff --git a/keyboards/lets_split/keymaps/pitty/keymap.c b/keyboards/lets_split/keymaps/pitty/keymap.c index 0fd4c1384f1c..d723e0c026d7 100644 --- a/keyboards/lets_split/keymaps/pitty/keymap.c +++ b/keyboards/lets_split/keymaps/pitty/keymap.c @@ -20,11 +20,6 @@ enum custom_keycodes { VIM, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/poker/keymap.c b/keyboards/lets_split/keymaps/poker/keymap.c index cce0ca47411f..7b202409e307 100644 --- a/keyboards/lets_split/keymaps/poker/keymap.c +++ b/keyboards/lets_split/keymaps/poker/keymap.c @@ -25,10 +25,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/pyrol/keymap.c b/keyboards/lets_split/keymaps/pyrol/keymap.c index c5227f5afaa2..1a6cd7586639 100644 --- a/keyboards/lets_split/keymaps/pyrol/keymap.c +++ b/keyboards/lets_split/keymaps/pyrol/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { GAME, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index 090cf78b7cb6..1b9b448008e2 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -23,10 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/lets_split/keymaps/that_canadian/keymap.c b/keyboards/lets_split/keymaps/that_canadian/keymap.c index 239a8d3beee2..07a165ad89f9 100644 --- a/keyboards/lets_split/keymaps/that_canadian/keymap.c +++ b/keyboards/lets_split/keymaps/that_canadian/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -160,4 +156,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lets_split/keymaps/waples/keymap.c b/keyboards/lets_split/keymaps/waples/keymap.c index 7b25bc51f545..42b86aad2a3c 100644 --- a/keyboards/lets_split/keymaps/waples/keymap.c +++ b/keyboards/lets_split/keymaps/waples/keymap.c @@ -25,8 +25,6 @@ enum letssplit_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO #define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc #define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter -#define _______ KC_TRNS -#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c index c032b865aac3..89197beb07c7 100755 --- a/keyboards/lets_split/keymaps/xk/keymap.c +++ b/keyboards/lets_split/keymaps/xk/keymap.c @@ -60,9 +60,6 @@ WINSH, OSX, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // action-TAP for key/mod behavior LT(layer, KC) #define XK_TAB LT(_FNCTION, KC_TAB) #define XK_BSP LT(_KAMELOC, KC_BSPC) diff --git a/keyboards/lets_split/keymaps/yshrsmz/keymap.c b/keyboards/lets_split/keymaps/yshrsmz/keymap.c index 52a0d2b83419..ccb3557b4a90 100644 --- a/keyboards/lets_split/keymaps/yshrsmz/keymap.c +++ b/keyboards/lets_split/keymaps/yshrsmz/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c b/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c index 8ef973574957..bba9a02c8ce4 100644 --- a/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c +++ b/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) @@ -167,4 +163,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c index 5bb50afaffab..5461f718c80c 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout CS_GO, // 0x08 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c index cf1949190ac2..d4fcb88548c2 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c index 99757ac724fe..59ee51c25ed4 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout DEFAULT_WKL, // 0x02 Function in CapsLock location, gui key disabled diff --git a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c index 5e3310c0d720..89c5d8f8dbfa 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x08 diff --git a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c index 16cc93e40c26..eadc6eb59605 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c +++ b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x08 diff --git a/keyboards/melody96/keymaps/crilith/keymap.c b/keyboards/melody96/keymaps/crilith/keymap.c index ca65b5ad1b2d..a1a1843ae30b 100644 --- a/keyboards/melody96/keymaps/crilith/keymap.c +++ b/keyboards/melody96/keymaps/crilith/keymap.c @@ -7,7 +7,6 @@ enum custom_keycodes { #include "dynamic_macro.h" -#define _______ KC_TRNS #define KC_REC DYN_REC_START1 #define KC_DONE DYN_REC_STOP #define KC_PLAY DYN_MACRO_PLAY1 diff --git a/keyboards/minidox/keymaps/alairock/keymap.c b/keyboards/minidox/keymaps/alairock/keymap.c index 9faf6309688f..c592b1a6a91a 100644 --- a/keyboards/minidox/keymaps/alairock/keymap.c +++ b/keyboards/minidox/keymaps/alairock/keymap.c @@ -21,10 +21,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c index 13b84d64d1e5..e8b1ca1b53bb 100644 --- a/keyboards/minidox/keymaps/dustypomerleau/keymap.c +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -56,7 +56,6 @@ void sftocb_reset (qk_tap_dance_state_t *state, void *user_data); void sftpls_finished (qk_tap_dance_state_t *state, void *user_data); void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); -#define _______ KC_TRNS #define ALT_2 LALT_T(KC_2) #define ALT_3 LALT_T(KC_3) #define ALT_8 LALT_T(KC_8) diff --git a/keyboards/minidox/keymaps/haegin/keymap.c b/keyboards/minidox/keymaps/haegin/keymap.c index 221427b28af3..d95243f10bb3 100644 --- a/keyboards/minidox/keymaps/haegin/keymap.c +++ b/keyboards/minidox/keymaps/haegin/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define SYMBOLS 1 #define MEDIA 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/minidox/keymaps/khitsule/keymap.c b/keyboards/minidox/keymaps/khitsule/keymap.c index 750510579cf9..1c6b6749f300 100644 --- a/keyboards/minidox/keymaps/khitsule/keymap.c +++ b/keyboards/minidox/keymaps/khitsule/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/that_canadian/keymap.c b/keyboards/minidox/keymaps/that_canadian/keymap.c index 9d81283b675f..78ddca30e80d 100644 --- a/keyboards/minidox/keymaps/that_canadian/keymap.c +++ b/keyboards/minidox/keymaps/that_canadian/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c index 3e62815655c8..4863f4f922bd 100644 --- a/keyboards/minidox/keymaps/xyverz/keymap.c +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -39,10 +39,6 @@ enum planck_keycodes { #define ALTCOMM ALT_T(KC_COMM) //#define GUIBSPC GUI_T(KC_BSPC) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak diff --git a/keyboards/mint60/keymaps/eucalyn/keymap.c b/keyboards/mint60/keymaps/eucalyn/keymap.c index c26dd38d31c1..93979a131247 100644 --- a/keyboards/mint60/keymaps/eucalyn/keymap.c +++ b/keyboards/mint60/keymaps/eucalyn/keymap.c @@ -26,10 +26,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { RGBRST = SAFE_RANGE }; diff --git a/keyboards/mitosis/keymaps/carvac_dv/keymap.c b/keyboards/mitosis/keymaps/carvac_dv/keymap.c index d97cb600eeae..c67f2e387cbf 100644 --- a/keyboards/mitosis/keymaps/carvac_dv/keymap.c +++ b/keyboards/mitosis/keymaps/carvac_dv/keymap.c @@ -21,10 +21,6 @@ enum mitosis_layers #define MOUSEKEY_WHEEL_MAX_SPEED 8 #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY diff --git a/keyboards/mitosis/keymaps/datagrok/keymap.c b/keyboards/mitosis/keymaps/datagrok/keymap.c index d8c20bc4391d..220c140af077 100644 --- a/keyboards/mitosis/keymaps/datagrok/keymap.c +++ b/keyboards/mitosis/keymaps/datagrok/keymap.c @@ -30,9 +30,6 @@ enum mitosis_keycodes #define LAYOUT LAYOUT_bottomspace #endif -// Fillers to make layering more clear -#define _______ KC_TRNS // Transparent - // I don't use Japanese myself, but I've placed henkan 変換 and muhenkan 無変換 // in my layout to act as left and right HYPER diff --git a/keyboards/mitosis/keymaps/mjt/keymap.c b/keyboards/mitosis/keymaps/mjt/keymap.c index 379738951a7b..f00bf59556bd 100644 --- a/keyboards/mitosis/keymaps/mjt/keymap.c +++ b/keyboards/mitosis/keymaps/mjt/keymap.c @@ -47,9 +47,7 @@ enum mitosis_macros #define LAYER_TOGGLE_DELAY 900 // Fillers to make layering more clear -#define _______ KC_TRNS #define __MOD__ KC_TRNS -#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( /* QWERTY adapted to this crazy thing */ diff --git a/keyboards/mitosis/keymaps/nzen/keymap.c b/keyboards/mitosis/keymaps/nzen/keymap.c index 7a276cade44c..d9fd3641bc6f 100644 --- a/keyboards/mitosis/keymaps/nzen/keymap.c +++ b/keyboards/mitosis/keymaps/nzen/keymap.c @@ -25,7 +25,6 @@ enum mitosis_layers #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 // Fillers to make layering more clear -#define _______ KC_TRNS #define XXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/miuni32/keymaps/adam-lee/keymap.c b/keyboards/miuni32/keymaps/adam-lee/keymap.c index e128b24b1d62..754c20f7d33a 100644 --- a/keyboards/miuni32/keymaps/adam-lee/keymap.c +++ b/keyboards/miuni32/keymaps/adam-lee/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Level 0: Default Layer * ,---------------------------------------------------------------------------------------. diff --git a/keyboards/miuni32/keymaps/ht_156/keymap.c b/keyboards/miuni32/keymaps/ht_156/keymap.c index d68edad85974..54e4bcf52d6d 100644 --- a/keyboards/miuni32/keymaps/ht_156/keymap.c +++ b/keyboards/miuni32/keymaps/ht_156/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Keyboard layer definitions #define BASE 0 #define NUMBERS 1 diff --git a/keyboards/miuni32/keymaps/ki/keymap.c b/keyboards/miuni32/keymaps/ki/keymap.c index 77140d6a9a0f..59d2e285cbc0 100644 --- a/keyboards/miuni32/keymaps/ki/keymap.c +++ b/keyboards/miuni32/keymaps/ki/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum miuni32_layers { _BEAKL, _LOWER, diff --git a/keyboards/noxary/268/keymaps/sixtyeight/keymap.c b/keyboards/noxary/268/keymaps/sixtyeight/keymap.c index 34dd3a6fa191..151ac1f73d40 100644 --- a/keyboards/noxary/268/keymaps/sixtyeight/keymap.c +++ b/keyboards/noxary/268/keymaps/sixtyeight/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/ok60/keymaps/ebrowncross/keymap.c b/keyboards/ok60/keymaps/ebrowncross/keymap.c index 87921791077c..e2dbc8429a79 100644 --- a/keyboards/ok60/keymaps/ebrowncross/keymap.c +++ b/keyboards/ok60/keymaps/ebrowncross/keymap.c @@ -2,8 +2,6 @@ // An ISO UK keymap -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_iso( diff --git a/keyboards/orthodox/keymaps/oscillope/keymap.c b/keyboards/orthodox/keymaps/oscillope/keymap.c index ad07b3ed431c..1f4aefca9023 100644 --- a/keyboards/orthodox/keymaps/oscillope/keymap.c +++ b/keyboards/orthodox/keymaps/oscillope/keymap.c @@ -42,10 +42,6 @@ enum custom_keycodes { CC_CBR, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define NAV_TAP LT(_NAV, KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/orthodox/keymaps/rfvizarra/keymap.c b/keyboards/orthodox/keymaps/rfvizarra/keymap.c index 55f0fa016bf4..4de7e39509fc 100644 --- a/keyboards/orthodox/keymaps/rfvizarra/keymap.c +++ b/keyboards/orthodox/keymaps/rfvizarra/keymap.c @@ -43,10 +43,6 @@ enum custom_keycodes { DVORAK }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c index 2b6551e199ca..df66e0fc5583 100644 --- a/keyboards/orthodox/keymaps/xyverz/keymap.c +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -45,10 +45,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( \ diff --git a/keyboards/phantom/keymaps/rgbmod/keymap.c b/keyboards/phantom/keymaps/rgbmod/keymap.c index 372590772f5a..e3a6792394dc 100644 --- a/keyboards/phantom/keymaps/rgbmod/keymap.c +++ b/keyboards/phantom/keymaps/rgbmod/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c index ac38e5524317..07a743c164f7 100644 --- a/keyboards/phantom/keymaps/xyverz/keymap.c +++ b/keyboards/phantom/keymaps/xyverz/keymap.c @@ -20,10 +20,6 @@ extern keymap_config_t keymap_config; #define DVORAK M(_DV) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \ diff --git a/keyboards/planck/keymaps/altgr/keymap.c b/keyboards/planck/keymaps/altgr/keymap.c index c4eacbd47fa9..5f4d1fdfdbe0 100644 --- a/keyboards/planck/keymaps/altgr/keymap.c +++ b/keyboards/planck/keymaps/altgr/keymap.c @@ -188,9 +188,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c index faece94381ca..ca11be8255ac 100644 --- a/keyboards/planck/keymaps/aviator/keymap.c +++ b/keyboards/planck/keymaps/aviator/keymap.c @@ -26,7 +26,6 @@ BACKLIT }; -#define _______ KC_TRNS #define ___x___ KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c index cc70aeea3bce..748d9acbe4ce 100644 --- a/keyboards/planck/keymaps/basic/keymap.c +++ b/keyboards/planck/keymaps/basic/keymap.c @@ -6,10 +6,6 @@ // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index e26aff07e729..263c4102df59 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -11,10 +11,6 @@ #include "..\..\..\..\tmk_core\common\keycode.h" */ - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. My favourite features are the placement of the special characters often used for programming right on the home row diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index 2d5e05affc23..47eb338a6e41 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c @@ -20,7 +20,6 @@ enum planck_layers { }; // Key aliases for legibility -#define _______ KC_TRNS #define ___x___ KC_NO // Macros diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 039e8024823f..eca83d832025 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -6,8 +6,6 @@ extern keymap_config_t keymap_config; #define AC(X) A(C(X)) #define SC(X) S(C(X)) -#define _______ KC_TRNS -#define XXXXXXX KC_NO enum planck_layers { _COLEMAK, diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 0bb508385c69..4ec7d081ba8e 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -41,7 +41,6 @@ /* Filler to make layering a bit clearer * * borrowed from basic keymap */ -#define _______ KC_TRNS #define _____ KC_NO #endif diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index e769ed84eb1c..df57d5828b28 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -38,10 +38,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 35f41c3872be..c2399bf3053e 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -32,8 +32,6 @@ enum planck_keycodes { #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift #define LOCK FUNC(1) #define KC_PSTE KC_PASTE -#define _______ KC_TRNS -#define XXXXXXX KC_NO #ifdef TAP_DANCE_ENABLE #define SFT_CAP TD(0) // Left shift, double tap for caps diff --git a/keyboards/planck/keymaps/danielhklein/keymap.c b/keyboards/planck/keymaps/danielhklein/keymap.c index b5ab1354c57b..25463cf17c8f 100644 --- a/keyboards/planck/keymaps/danielhklein/keymap.c +++ b/keyboards/planck/keymaps/danielhklein/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ARROW }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY diff --git a/keyboards/planck/keymaps/davidrambo/keymap.c b/keyboards/planck/keymaps/davidrambo/keymap.c index 5ce808aa445c..2bf13f24ab9d 100644 --- a/keyboards/planck/keymaps/davidrambo/keymap.c +++ b/keyboards/planck/keymaps/davidrambo/keymap.c @@ -1,8 +1,6 @@ #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" #include "planck.h" -//alias for clarity in layering -#define _______ KC_TRNS #define A_BSPC LALT(KC_BSPC) #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 8bfd7d022a54..256e6c4a0f16 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c @@ -26,10 +26,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Func macro definitions. #define SFT_TAB FUNC(0) // Tap for Enter, hold for Shift diff --git a/keyboards/planck/keymaps/dlaroe/keymap.c b/keyboards/planck/keymaps/dlaroe/keymap.c index d9dab4f527f0..28d2ec1f6264 100644 --- a/keyboards/planck/keymaps/dlaroe/keymap.c +++ b/keyboards/planck/keymaps/dlaroe/keymap.c @@ -34,10 +34,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index 64650aaa82f9..a244da2e4225 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c @@ -37,8 +37,6 @@ enum planck_keycodes { #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift #define LOCK FUNC(1) #define KC_PSTE KC_PASTE -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ZOOM_IN LCTL(KC_EQL) #define ZOOM_OUT LCTL(KC_MINS) #define ZOOM_NML LCTL(KC_0) diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index 28bee6243c65..e8a1d437a99b 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -37,10 +37,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 86ce3a29342a..0c592ce6e603 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -43,9 +43,6 @@ enum planck_keycodes { RGBLED_DECREASE_VAL, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define SW_SPC SH_T(KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/fabian/keymap.c b/keyboards/planck/keymaps/fabian/keymap.c index 50bade14da30..5be91772d76d 100644 --- a/keyboards/planck/keymaps/fabian/keymap.c +++ b/keyboards/planck/keymaps/fabian/keymap.c @@ -38,9 +38,6 @@ enum planck_keycodes { EXT_PLV }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index 704c65638c61..a4d1f7cb09bc 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c @@ -35,10 +35,6 @@ enum planck_keycodes { /*EXT_PLV*/ }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/hiea/keymap.c b/keyboards/planck/keymaps/hiea/keymap.c index 2bc54b7a6daf..c09fd41f20b9 100644 --- a/keyboards/planck/keymaps/hiea/keymap.c +++ b/keyboards/planck/keymaps/hiea/keymap.c @@ -171,9 +171,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/hieax/keymap.c b/keyboards/planck/keymaps/hieax/keymap.c index 3f86695875e4..2b08506f25f4 100644 --- a/keyboards/planck/keymaps/hieax/keymap.c +++ b/keyboards/planck/keymaps/hieax/keymap.c @@ -176,9 +176,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 119e547da4ec..b53023dd96ff 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -27,10 +27,6 @@ enum planck_keycodes { PLOVER }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Workman Alpha-numeric diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c index d035728355e8..86a2c4c76ad2 100644 --- a/keyboards/planck/keymaps/jeebak/keymap.c +++ b/keyboards/planck/keymaps/jeebak/keymap.c @@ -53,10 +53,6 @@ enum macro_keycodes { KC_AG_TAB_R, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index 3e0e185d33c4..ea7a536102d6 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { TOG_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/jirgn/keymap.c b/keyboards/planck/keymaps/jirgn/keymap.c index 13c673799e35..3917355a8713 100644 --- a/keyboards/planck/keymaps/jirgn/keymap.c +++ b/keyboards/planck/keymaps/jirgn/keymap.c @@ -38,7 +38,6 @@ enum planck_keycodes { }; // keycode aliases -#define _______ KC_TRNS #define ___x___ KC_NO #define KC_EUR LALT(S(KC_2)) #define KC_SEC LALT(KC_6) diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index 2432a8673587..b0636d3147dd 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -6,9 +6,6 @@ // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define QWERTY 0 #define LOWER 1 #define RAISE 2 diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c index d43c682c6c1d..59bb36038bd7 100644 --- a/keyboards/planck/keymaps/lae3/keymap.c +++ b/keyboards/planck/keymaps/lae3/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { RAISE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define KC_MUP KC_MS_UP #define KC_MDN KC_MS_DOWN #define KC_MLFT KC_MS_LEFT diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c index 121e5314852f..2ee8a5072e37 100644 --- a/keyboards/planck/keymaps/luke/keymap.c +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -44,10 +44,6 @@ #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" #include "planck.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - // Layers #define _COLEMAK 0 #define _QWERTY 1 diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c index 79b5204f0723..3887881a9ce6 100644 --- a/keyboards/planck/keymaps/mitch/keymap.c +++ b/keyboards/planck/keymaps/mitch/keymap.c @@ -5,9 +5,6 @@ #define LOWER 1 #define RAISE 2 -// Alias to make layering more clear -#define _______ KC_TRNS - // In MacOS, switch between windows within an application #define GUI_GRV LGUI(KC_GRV) diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c index 00251b82fa3b..8179f4ab6483 100644 --- a/keyboards/planck/keymaps/mjt/keymap.c +++ b/keyboards/planck/keymaps/mjt/keymap.c @@ -37,10 +37,6 @@ enum planck_keycodes { #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c index 30e6e5304f3f..af72699a5013 100644 --- a/keyboards/planck/keymaps/mjtnumsym/keymap.c +++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c @@ -36,10 +36,6 @@ enum planck_keycodes { #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index 71e9cccb2da2..8f6cb0626303 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -52,10 +52,6 @@ enum functions { static uint16_t m_gui_unds_timer; static uint16_t m_sft_po_timer; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Narze : Custom Macros #define HPR_ESC ALL_T(KC_ESC) #define SFT_ENT SFT_T(KC_ENT) diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c index a8c4f93066fe..7b9d459fa27f 100644 --- a/keyboards/planck/keymaps/neo2planck/keymap.c +++ b/keyboards/planck/keymaps/neo2planck/keymap.c @@ -11,10 +11,6 @@ #include "..\..\..\..\tmk_core\common\keycode.h" */ - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* This layout tries to emulate Neo2, and is intended to be used with a German QWERTZ softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index 4248ad9e7b7e..27aa9d93cbb2 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c @@ -27,10 +27,6 @@ enum planck_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* NERD diff --git a/keyboards/planck/keymaps/palleiko/keymap.c b/keyboards/planck/keymaps/palleiko/keymap.c index c844191d1d9c..a980939388d8 100644 --- a/keyboards/planck/keymaps/palleiko/keymap.c +++ b/keyboards/planck/keymaps/palleiko/keymap.c @@ -57,8 +57,6 @@ enum planck_keycodes { #define WM_9 LALT(KC_9) #define WM_0 LALT(KC_0) -// Transparent Key -#define _______ KC_TRNS // NOP #define ___x___ KC_NO diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index faf41302eb82..2a9b66c42d8e 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -48,10 +48,6 @@ extern keymap_config_t keymap_config; #define MACSLEEP LSFT(LCTL(KC_POWER)) #define WINSLEEP KC_SLEP -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index e5a73ba7ec44..28fc8f3ad1ff 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 14e1041f49e4..a6ecf16115f5 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -105,8 +105,6 @@ enum keyboard_macros { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c index 97da0e80689d..e4934dbc4599 100644 --- a/keyboards/planck/keymaps/rai-suta/keymap.c +++ b/keyboards/planck/keymaps/rai-suta/keymap.c @@ -6,9 +6,6 @@ #include "sendstring_jis.h" -// Keycode defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO // JIS keyboard #define JK_CIRC KC_EQL // ^ #define JK_AT KC_LBRC // @ diff --git a/keyboards/planck/keymaps/sdothum/keymap.c b/keyboards/planck/keymaps/sdothum/keymap.c index 1b8a7b717b7b..59a4a25e32af 100644 --- a/keyboards/planck/keymaps/sdothum/keymap.c +++ b/keyboards/planck/keymaps/sdothum/keymap.c @@ -186,9 +186,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/sean/mymappings.h b/keyboards/planck/keymaps/sean/mymappings.h index cbb016e38dcc..676cf018ebb8 100644 --- a/keyboards/planck/keymaps/sean/mymappings.h +++ b/keyboards/planck/keymaps/sean/mymappings.h @@ -33,7 +33,3 @@ #define KC_MB5 KC_MS_BTN5 #define KC_MWUP KC_MS_WH_UP #define KC_MWDN KC_MS_WH_DOWN - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c index a7f9c6c1d342..f5efeef4597f 100644 --- a/keyboards/planck/keymaps/sgoodwin/keymap.c +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c @@ -30,10 +30,6 @@ enum planck_keycodes { BACKLIT, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 895a4bf05982..1426b62a6879 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -28,10 +28,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 512fc6bd4a50..131bf4108a2a 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c @@ -29,10 +29,6 @@ enum planck_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c index 2b05f2b08e84..e43e13cd2781 100644 --- a/keyboards/planck/keymaps/thermal_printer/keymap.c +++ b/keyboards/planck/keymaps/thermal_printer/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c index b9cd24c01152..d85bd6e88218 100644 --- a/keyboards/planck/keymaps/tong92/keymap.c +++ b/keyboards/planck/keymaps/tong92/keymap.c @@ -23,9 +23,6 @@ enum planck_keycodes { EXT_MOUSE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER M(1) #define RAISE M(2) #define WINDOW_SHORTCUT MO(_WINDOW_SHORTCUT) diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index 749aaa8682e3..bc9e5326a3eb 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -54,11 +54,6 @@ extern keymap_config_t keymap_config; #define EXT_PLV M(13) #define TOG_OUT M(14) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 89be16f5fd73..f6ece4d1e787 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -15,10 +15,6 @@ #define _FUNC 6 #define _NAV 7 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* _QWERTY diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index e9866883b4b2..5de64de955d3 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -5,9 +5,6 @@ #include "keymap_colemak.h" extern keymap_config_t keymap_config; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #undef C #define C(n) RCTL(n) #define CADKEY RCTL(RALT(KC_DEL)) diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index 151ec877b2b5..a792560bd4ee 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -113,8 +113,6 @@ enum { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX diff --git a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c index 3506efe80491..a3450118a153 100644 --- a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c +++ b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c @@ -11,9 +11,6 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Base Layer [0] = LAYOUT( diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c index 5f82087b0173..28277bd5f4ca 100644 --- a/keyboards/preonic/keymaps/0xdec/keymap.c +++ b/keyboards/preonic/keymaps/0xdec/keymap.c @@ -11,10 +11,6 @@ enum preonic_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index ba703a2080b3..a5727707885d 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c @@ -25,10 +25,6 @@ #define RAISE M(_RAISE) #define M_BL 5 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/bucktooth/keymap.c b/keyboards/preonic/keymaps/bucktooth/keymap.c index d3bcf66efa50..6d4843ff3ee5 100644 --- a/keyboards/preonic/keymaps/bucktooth/keymap.c +++ b/keyboards/preonic/keymaps/bucktooth/keymap.c @@ -4,10 +4,6 @@ #define L_QWERTSPLITLY 0 #define L_FN 1 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for Mac specific key accelerators used in map. Some of these are very awkward to type. // These are the default bindings for Mac, some of which may be turned off or changed, check your // settings in System Preferences diff --git a/keyboards/preonic/keymaps/dlaroe/keymap.c b/keyboards/preonic/keymaps/dlaroe/keymap.c index 77a2a44cfb87..888a21c063ff 100644 --- a/keyboards/preonic/keymaps/dlaroe/keymap.c +++ b/keyboards/preonic/keymaps/dlaroe/keymap.c @@ -24,10 +24,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index ffd588945593..e4cd76b84d3d 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -22,10 +22,6 @@ enum preonic_keycodes { MRAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/kinesis/keymap.c b/keyboards/preonic/keymaps/kinesis/keymap.c index 93fd99163583..44d51da4a082 100644 --- a/keyboards/preonic/keymaps/kinesis/keymap.c +++ b/keyboards/preonic/keymaps/kinesis/keymap.c @@ -8,9 +8,6 @@ #define _FN 1 #define _ULCK 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define HYP_TIC ALL_T(KC_GRV) #define EQ_LOCK TD(TD_EQ_LOCK) #define MIN_ULK TD(TD_MIN_ULOCK) diff --git a/keyboards/preonic/keymaps/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c index bb7be876c24f..34d837cd6487 100644 --- a/keyboards/preonic/keymaps/nikchi/keymap.c +++ b/keyboards/preonic/keymaps/nikchi/keymap.c @@ -21,10 +21,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/seph/keymap.c b/keyboards/preonic/keymaps/seph/keymap.c index 3d2606006767..1584d2cb9814 100644 --- a/keyboards/preonic/keymaps/seph/keymap.c +++ b/keyboards/preonic/keymaps/seph/keymap.c @@ -8,9 +8,6 @@ #define _LO 1 #define _RA 2 -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 3c703f473200..bb561a72cff8 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -20,10 +20,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c index 968b2ae25b74..bf9e89e1f2a7 100644 --- a/keyboards/preonic/keymaps/that_canadian/keymap.c +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c @@ -20,10 +20,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index e9866883b4b2..5de64de955d3 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -5,9 +5,6 @@ #include "keymap_colemak.h" extern keymap_config_t keymap_config; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #undef C #define C(n) RCTL(n) #define CADKEY RCTL(RALT(KC_DEL)) diff --git a/keyboards/primekb/prime_r/keymaps/rooski/keymap.c b/keyboards/primekb/prime_r/keymaps/rooski/keymap.c index 3fadc6c6bc25..40c73e7c16d7 100644 --- a/keyboards/primekb/prime_r/keymaps/rooski/keymap.c +++ b/keyboards/primekb/prime_r/keymaps/rooski/keymap.c @@ -18,10 +18,6 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Arrow Cluster Toggle static bool arrow_toggle = false; diff --git a/keyboards/rama/m6_a/keymaps/krusli/keymap.c b/keyboards/rama/m6_a/keymaps/krusli/keymap.c index c8775f4eae5b..410229ae471a 100644 --- a/keyboards/rama/m6_a/keymaps/krusli/keymap.c +++ b/keyboards/rama/m6_a/keymaps/krusli/keymap.c @@ -52,9 +52,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT( MUTE, DEAFEN, TO(_LAYER1), diff --git a/keyboards/satan/keymaps/ben_iso/keymap.c b/keyboards/satan/keymaps/ben_iso/keymap.c index 7cc8efc96d96..5dfb2ae703c5 100644 --- a/keyboards/satan/keymaps/ben_iso/keymap.c +++ b/keyboards/satan/keymaps/ben_iso/keymap.c @@ -64,7 +64,6 @@ #define MYCM KC_MYCM // Open default file manager // increase readability -#define _______ KC_TRNS #define XXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/satan/keymaps/bri/keymap.c b/keyboards/satan/keymaps/bri/keymap.c index 7f38ba6f5f1c..1f9430a9f136 100644 --- a/keyboards/satan/keymaps/bri/keymap.c +++ b/keyboards/satan/keymaps/bri/keymap.c @@ -5,7 +5,6 @@ #define _FL 1 #define _NAV 2 -#define _______ KC_TRNS #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) diff --git a/keyboards/satan/keymaps/chaser/keymap.c b/keyboards/satan/keymaps/chaser/keymap.c index ef1095fb7e78..edba9a3091f7 100644 --- a/keyboards/satan/keymaps/chaser/keymap.c +++ b/keyboards/satan/keymaps/chaser/keymap.c @@ -12,8 +12,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/colemak/keymap.c b/keyboards/satan/keymaps/colemak/keymap.c index a772e92c7c33..08d456d6ce81 100644 --- a/keyboards/satan/keymaps/colemak/keymap.c +++ b/keyboards/satan/keymaps/colemak/keymap.c @@ -12,8 +12,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - enum custom_keycodes { SFT_ESC = SAFE_RANGE }; diff --git a/keyboards/satan/keymaps/dende_iso/keymap.c b/keyboards/satan/keymaps/dende_iso/keymap.c index be1bfd23aada..e6187c161523 100644 --- a/keyboards/satan/keymaps/dende_iso/keymap.c +++ b/keyboards/satan/keymaps/dende_iso/keymap.c @@ -13,9 +13,6 @@ // dual-role shortcuts #define FN_CAPS LT(_MEDIA, KC_CAPSLOCK) -// increase readability -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,------------------------------------------------------------. diff --git a/keyboards/satan/keymaps/fakb/keymap.c b/keyboards/satan/keymaps/fakb/keymap.c index 5744a109df7f..93e11a5de2e4 100644 --- a/keyboards/satan/keymaps/fakb/keymap.c +++ b/keyboards/satan/keymaps/fakb/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H - -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LCTL_MA LCTL_T(KC_UP) #define LSFT_MA LSFT_T(KC_DOWN) #define RSFT_MA SFT_T(KC_DOWN) diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c index e8ac01ed4bb6..141bef3d6432 100644 --- a/keyboards/satan/keymaps/midi/keymap.c +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -8,10 +8,6 @@ #define _BL 0 #define _ML 1 -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/olligranlund_iso/keymap.c b/keyboards/satan/keymaps/olligranlund_iso/keymap.c index 5016d4377960..6979092cd2b6 100644 --- a/keyboards/satan/keymaps/olligranlund_iso/keymap.c +++ b/keyboards/satan/keymaps/olligranlund_iso/keymap.c @@ -48,10 +48,6 @@ #define CALC KC_CALC // Open default calculator app #define MYCM KC_MYCM // Open default file manager -// increase readability -#define _______ KC_TRNS -#define XXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index e244aced14c2..13251a5645b1 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -12,10 +12,6 @@ #define _FL 1 #define _RL 2 -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { SFT_ESC = SAFE_RANGE }; diff --git a/keyboards/satan/keymaps/sethbc/keymap.c b/keyboards/satan/keymaps/sethbc/keymap.c index 21a4f1fe1221..2a25b2b6b461 100644 --- a/keyboards/satan/keymaps/sethbc/keymap.c +++ b/keyboards/satan/keymaps/sethbc/keymap.c @@ -11,9 +11,6 @@ #define _BL 0 #define _FL 1 -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index e12b305276e1..8546211d5e71 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -20,9 +20,6 @@ enum planck_keycodes { DVORAK }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl diff --git a/keyboards/satan/keymaps/spacemanspiff/keymap.c b/keyboards/satan/keymaps/spacemanspiff/keymap.c index 7dc1d3d788b6..8caa70e02abf 100644 --- a/keyboards/satan/keymaps/spacemanspiff/keymap.c +++ b/keyboards/satan/keymaps/spacemanspiff/keymap.c @@ -9,8 +9,6 @@ #define CTL_ESC MT(MOD_LCTL,KC_ESC) #define GUI_ENT MT(MOD_RGUI, KC_ENT) -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/stanleylai/keymap.c b/keyboards/satan/keymaps/stanleylai/keymap.c index e5c5dc60e207..633719a88b1d 100644 --- a/keyboards/satan/keymaps/stanleylai/keymap.c +++ b/keyboards/satan/keymaps/stanleylai/keymap.c @@ -12,10 +12,6 @@ #define _FL 1 #define _RGBL 2 -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // See base_layer.png and rgb_layer.png for layout reference diff --git a/keyboards/satan/keymaps/unxmaal/keymap.c b/keyboards/satan/keymaps/unxmaal/keymap.c index 20641416b7ec..f311ebeebb59 100644 --- a/keyboards/satan/keymaps/unxmaal/keymap.c +++ b/keyboards/satan/keymaps/unxmaal/keymap.c @@ -13,8 +13,6 @@ #define _AL 1 #define _FL 2 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * ANSI Base, Mac style diff --git a/keyboards/staryu/keymaps/krusli/keymap.c b/keyboards/staryu/keymaps/krusli/keymap.c index c0fcd00d5d83..cdfa9fe8fed4 100644 --- a/keyboards/staryu/keymaps/krusli/keymap.c +++ b/keyboards/staryu/keymaps/krusli/keymap.c @@ -58,9 +58,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT( \ KC_ESC, TO(_LAYER1), \ diff --git a/keyboards/tada68/keymaps/amnesia0287/keymap.c b/keyboards/tada68/keymaps/amnesia0287/keymap.c index 46cbf177a076..bf84462de582 100644 --- a/keyboards/tada68/keymaps/amnesia0287/keymap.c +++ b/keyboards/tada68/keymaps/amnesia0287/keymap.c @@ -10,8 +10,6 @@ #define _HL 3 #define _XL 4 -#define _______ KC_TRNS - enum hype_keycodes { FN_HLa = SAFE_RANGE, FN_HLb diff --git a/keyboards/tada68/keymaps/ardakilic/keymap.c b/keyboards/tada68/keymaps/ardakilic/keymap.c index fc5b596d8395..6c3475cb2080 100755 --- a/keyboards/tada68/keymaps/ardakilic/keymap.c +++ b/keyboards/tada68/keymaps/ardakilic/keymap.c @@ -12,8 +12,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/bazooka/keymap.c b/keyboards/tada68/keymaps/bazooka/keymap.c index 4105f981d132..dfe0feb12f37 100644 --- a/keyboards/tada68/keymaps/bazooka/keymap.c +++ b/keyboards/tada68/keymaps/bazooka/keymap.c @@ -9,7 +9,6 @@ #define _FUNC 2 #define _MOUSE 3 -#define _______ KC_TRNS #define MAC_TOG TG(_MAC) enum { diff --git a/keyboards/tada68/keymaps/fakb/keymap.c b/keyboards/tada68/keymaps/fakb/keymap.c index 88a9d4b370c0..743c30ad624b 100755 --- a/keyboards/tada68/keymaps/fakb/keymap.c +++ b/keyboards/tada68/keymaps/fakb/keymap.c @@ -5,8 +5,6 @@ // 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 _______ KC_TRNS -#define XXXXXXX KC_NO #define LCTL_MA LCTL_T(KC_UP) #define LSFT_MA LSFT_T(KC_DOWN) #define RSFT_MA SFT_T(KC_UP) diff --git a/keyboards/tada68/keymaps/fezzant/keymap.c b/keyboards/tada68/keymaps/fezzant/keymap.c index d38e4b3b6469..fdc2b6ac8c1c 100644 --- a/keyboards/tada68/keymaps/fezzant/keymap.c +++ b/keyboards/tada68/keymaps/fezzant/keymap.c @@ -7,9 +7,6 @@ #define _NUM 2 #define _BSPC 3 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Macros // name macros here for keymap reference enum { diff --git a/keyboards/tada68/keymaps/laas/keymap.c b/keyboards/tada68/keymaps/laas/keymap.c index 25b990a72ac1..1a8cd6f0c107 100755 --- a/keyboards/tada68/keymaps/laas/keymap.c +++ b/keyboards/tada68/keymaps/laas/keymap.c @@ -6,7 +6,6 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _______ KC_TRNS LEADER_EXTERNS(); diff --git a/keyboards/tada68/keymaps/mattdicarlo/keymap.c b/keyboards/tada68/keymaps/mattdicarlo/keymap.c index 378da62da8aa..8fad86b0be95 100755 --- a/keyboards/tada68/keymaps/mattdicarlo/keymap.c +++ b/keyboards/tada68/keymaps/mattdicarlo/keymap.c @@ -4,8 +4,6 @@ #define BASE_LAYER 0 #define FUNC_LAYER 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Base layer, always active. diff --git a/keyboards/tada68/keymaps/mlechner/keymap.c b/keyboards/tada68/keymaps/mlechner/keymap.c index 01ba3352ca3d..710ff9dcbefc 100755 --- a/keyboards/tada68/keymaps/mlechner/keymap.c +++ b/keyboards/tada68/keymaps/mlechner/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - enum custom_keycodes { MAC_AE = SAFE_RANGE, MAC_OE, diff --git a/keyboards/tada68/keymaps/pascamel/keymap.c b/keyboards/tada68/keymaps/pascamel/keymap.c index a836cefd21f7..1e7499f66b86 100755 --- a/keyboards/tada68/keymaps/pascamel/keymap.c +++ b/keyboards/tada68/keymaps/pascamel/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/raylas/keymap.c b/keyboards/tada68/keymaps/raylas/keymap.c index e2ea33ec6082..2845163a2f29 100755 --- a/keyboards/tada68/keymaps/raylas/keymap.c +++ b/keyboards/tada68/keymaps/raylas/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/rbong/keymap.c b/keyboards/tada68/keymaps/rbong/keymap.c index ffed2caa29b9..03c4d7839248 100644 --- a/keyboards/tada68/keymaps/rbong/keymap.c +++ b/keyboards/tada68/keymaps/rbong/keymap.c @@ -7,7 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS // Dual bind caps to left ctrl and escape when held #define CAPSDUAL CTL_T(KC_ESC) diff --git a/keyboards/tada68/keymaps/stephengrier/keymap.c b/keyboards/tada68/keymaps/stephengrier/keymap.c index a19642ce151b..96f6b2bf22f3 100755 --- a/keyboards/tada68/keymaps/stephengrier/keymap.c +++ b/keyboards/tada68/keymaps/stephengrier/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/trashcat/keymap.c b/keyboards/tada68/keymaps/trashcat/keymap.c index da6bf6a1e977..5c7019731d3e 100644 --- a/keyboards/tada68/keymaps/trashcat/keymap.c +++ b/keyboards/tada68/keymaps/trashcat/keymap.c @@ -9,8 +9,6 @@ #define _GM 2 #define _GF 3 -#define _______ KC_TRNS - // Tap dance declarations (These must go above the keymaps) enum { TD_F1 = 0, diff --git a/keyboards/tada68/keymaps/tshack/keymap.c b/keyboards/tada68/keymaps/tshack/keymap.c index 177cc4bd1296..3bffa36dc49e 100755 --- a/keyboards/tada68/keymaps/tshack/keymap.c +++ b/keyboards/tada68/keymaps/tshack/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/unix/keymap.c b/keyboards/tada68/keymaps/unix/keymap.c index 554abd0243cf..c7073fa694a2 100644 --- a/keyboards/tada68/keymaps/unix/keymap.c +++ b/keyboards/tada68/keymaps/unix/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/wamsm_tada/keymap.c b/keyboards/tada68/keymaps/wamsm_tada/keymap.c index 475555ded9e2..3b5e9d373ba1 100755 --- a/keyboards/tada68/keymaps/wamsm_tada/keymap.c +++ b/keyboards/tada68/keymaps/wamsm_tada/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -49,4 +47,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,KC_LEFT,KC_DOWN,KC_RIGHT,KC_MPLY,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______, _______,KC_HOME, \ _______,KC_VOLD, KC_VOLU, KC_MUTE, _______,_______, _______, _______,BL_DEC, BL_INC, BL_TOGG,KC_CAPS,_______,KC_END, \ _______,_______,_______, _______, _______,_______,_______,KC_MRWD, KC_MPLY, KC_MFFD), -}; \ No newline at end of file +}; diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c index cc4f23979272..437b1881a4d8 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c @@ -43,9 +43,6 @@ uint16_t tap_dance_keys[] = { [BE_TD_ALT] = KC_LALT, }; -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_arrow_command( /* Qwerty */ L2_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c index baa266e63534..ee8653520e1f 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c @@ -81,10 +81,6 @@ extern keymap_config_t keymap_config; #define XBACK LGUI(LALT(KC_LEFT)) #define XFFWD LGUI(LALT(KC_RIGHT)) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define xxxxxxx KC_NO - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here SWTCH diff --git a/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c index 6a069713faea..95987e1ca856 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c @@ -4,9 +4,6 @@ #define _L1 1 #define _L2 2 -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT( /* Qwerty */ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c index 0ec9485c724b..a7ace39e39c6 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c @@ -46,10 +46,6 @@ enum macro_keycodes { KC_AG_TAB_R, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index 8f0fba11dcc6..cf03633da4a1 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c @@ -20,8 +20,6 @@ enum planck_keycodes { DYNAMIC_MACRO_RANGE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS #define FKEYS F(_FKEYS) #define NUMSYM F(_NUMSYM) #define FKEYGRV F(_FKEYGRV) @@ -30,7 +28,6 @@ enum planck_keycodes { #define LAYERRESET M(7) #define BACKLIT M(8) #define ADJUST M(9) -#define XXXXXXX KC_NO #include "dynamic_macro.h" diff --git a/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c index ee117e47bd7c..371bcd4719a3 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c @@ -23,10 +23,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c index 220cc8c61b1d..0c97954494c6 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c @@ -25,11 +25,8 @@ enum tv44_keycodes { EXT_MOUSE }; -// Fillers to make layering more clear -#define _______ KC_TRNS #define LOWER F(_LOWER) #define RAISE F(_RAISE) -#define XXXXXXX KC_NO #define WINDOW_SHORTCUT MO(_WINDOW_SHORTCUT) #define MAC_SHORTCUT MO(_MAC_SHORTCUT) diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c index ec0d270070b6..059b7eb46e29 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c @@ -20,10 +20,6 @@ enum planck_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases for some other things I want to try out #define RAI_ESC LT(_RAISE, KC_ESC) #define LOW_QUQ LT(_LOWER, KC_QUOT) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c index d541b1a579f7..b00cf80f5c2b 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c @@ -40,10 +40,6 @@ enum roadkit_keycodes { #include "dynamic_macro.h" -// Fillers to make keymaps cleaner looking -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c index 9111f4f898aa..674f3f37abec 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c @@ -6,10 +6,6 @@ extern keymap_config_t keymap_config; #define _L1 1 #define _L2 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { NUMPAD = SAFE_RANGE, ADMIN, diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c index e7f6485e2353..18454d56496f 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c @@ -38,11 +38,6 @@ enum minivan_keycodes { #include "dynamic_macro.h" -// Fillers to make keymaps cleaner looking -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c index fd5d99503dee..9263ddbf1ebb 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c @@ -14,11 +14,6 @@ extern keymap_config_t keymap_config; #define NUMPAD M(_NP) #define LAYER1 M(_L1) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NP] = LAYOUT_ortho_4x4( /* Numpad */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c index 853bb783a507..e5c14eec8dcd 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c @@ -18,10 +18,6 @@ extern keymap_config_t keymap_config; #define LAYER2 M(_L2) #define LAYER3 M(_L3) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - void matrix_init_user(void) { backlight_level(4); } diff --git a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c index ec337bb22e78..82a7e528080c 100644 --- a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c +++ b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c @@ -18,7 +18,6 @@ #include "xtonhasvim.h" #include "fancylighting.h" -#define _______ KC_TRNS #define X_____X KC_NO enum layers { diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c index 459ec6437133..1e6149899fbd 100644 --- a/keyboards/whitefox/keymaps/kim-kim/keymap.c +++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c @@ -20,9 +20,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xd60/keymaps/krusli/keymap.c index 6a460cd34ab7..b34b4dfbcf67 100644 --- a/keyboards/xd60/keymaps/krusli/keymap.c +++ b/keyboards/xd60/keymaps/krusli/keymap.c @@ -1,8 +1,6 @@ #include QMK_KEYBOARD_H #include "action_layer.h" -#define _______ KC_TRNS - #define _BASE 0 #define _FN 1 diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xd60/keymaps/rooski/keymap.c index bea96a30d99d..624c118bf380 100644 --- a/keyboards/xd60/keymaps/rooski/keymap.c +++ b/keyboards/xd60/keymaps/rooski/keymap.c @@ -8,9 +8,6 @@ // Define tapping term #define TAPPING_TERM 150 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Layer definitions~ #define _BL 0 #define _FL 1 @@ -79,4 +76,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xd75/keymaps/adi/keymap.c index 24b450c8d4e0..a91b7d35dbef 100644 --- a/keyboards/xd75/keymaps/adi/keymap.c +++ b/keyboards/xd75/keymaps/adi/keymap.c @@ -16,9 +16,7 @@ #include "xd75.h" // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/atomic_style/keymap.c b/keyboards/xd75/keymaps/atomic_style/keymap.c index c40d89bc79d5..d3e86b050993 100644 --- a/keyboards/xd75/keymaps/atomic_style/keymap.c +++ b/keyboards/xd75/keymaps/atomic_style/keymap.c @@ -16,9 +16,7 @@ #include "xd75.h" // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/bramver/keymap.c b/keyboards/xd75/keymaps/bramver/keymap.c index 142d8efd2b1d..0d6091523197 100644 --- a/keyboards/xd75/keymaps/bramver/keymap.c +++ b/keyboards/xd75/keymaps/bramver/keymap.c @@ -15,10 +15,6 @@ */ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Layer shorthand #define _BASE 0 #define _LOWER 1 diff --git a/keyboards/xd75/keymaps/cbbrowne/config.h b/keyboards/xd75/keymaps/cbbrowne/config.h index cc583f0aed9a..f6bb06f399b6 100644 --- a/keyboards/xd75/keymaps/cbbrowne/config.h +++ b/keyboards/xd75/keymaps/cbbrowne/config.h @@ -38,7 +38,6 @@ /* Filler to make layering a bit clearer * * borrowed from basic keymap */ -#define _______ KC_TRNS #define _____ KC_NO #endif diff --git a/keyboards/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c index 322fffdadb44..1bebf2d11f37 100644 --- a/keyboards/xd75/keymaps/cbbrowne/keymap.c +++ b/keyboards/xd75/keymaps/cbbrowne/keymap.c @@ -16,9 +16,7 @@ #include "xd75.h" /* Fillers to make layering more clear */ -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO /* Layer shorthand */ diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c index 5d09dfa27cc6..b37cad054888 100644 --- a/keyboards/xd75/keymaps/davidrambo/keymap.c +++ b/keyboards/xd75/keymaps/davidrambo/keymap.c @@ -1,7 +1,5 @@ #include "xd75.h" -//aliases for clarity in layering -#define _______ KC_TRNS #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac // #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use #define A_LEFT LALT(KC_LEFT) diff --git a/keyboards/xd75/keymaps/emilyh/keymap.c b/keyboards/xd75/keymaps/emilyh/keymap.c index 04c239636d5c..f597dc2b99e5 100644 --- a/keyboards/xd75/keymaps/emilyh/keymap.c +++ b/keyboards/xd75/keymaps/emilyh/keymap.c @@ -17,9 +17,7 @@ #include "backlight.h" // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/fabian/keymap.c b/keyboards/xd75/keymaps/fabian/keymap.c index 3a330ca96dd0..7c515626868b 100644 --- a/keyboards/xd75/keymaps/fabian/keymap.c +++ b/keyboards/xd75/keymaps/fabian/keymap.c @@ -41,9 +41,6 @@ enum custom_keycodes { EXT_PLV }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c b/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c index 8820b4ef5072..61e5c73ab309 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c +++ b/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c @@ -16,9 +16,7 @@ #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/kim-kim/keymap.c b/keyboards/xd75/keymaps/kim-kim/keymap.c index c67ce2287182..f46c0b659067 100644 --- a/keyboards/xd75/keymaps/kim-kim/keymap.c +++ b/keyboards/xd75/keymaps/kim-kim/keymap.c @@ -16,9 +16,7 @@ #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/zeal60/keymaps/tusing/keymap.c b/keyboards/zeal60/keymaps/tusing/keymap.c index 41d2effd4686..755ace8618c3 100644 --- a/keyboards/zeal60/keymaps/tusing/keymap.c +++ b/keyboards/zeal60/keymaps/tusing/keymap.c @@ -2,7 +2,6 @@ #include QMK_KEYBOARD_H // For readability. -#define _______ KC_TRNS #define _x_ KC_NO #define AUD_PRV LCTL(KC_MPRV) // Previous music track #define AUD_PLY LCTL(KC_MPLY) // Pause music diff --git a/keyboards/zen/keymaps/jwlawrence/keymap.c b/keyboards/zen/keymaps/jwlawrence/keymap.c index 1ca9b78c0ff4..13edd0db8da8 100644 --- a/keyboards/zen/keymaps/jwlawrence/keymap.c +++ b/keyboards/zen/keymaps/jwlawrence/keymap.c @@ -16,10 +16,6 @@ enum custom_keycodes { }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -98,4 +94,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/zen/keymaps/xyverz/keymap.c b/keyboards/zen/keymaps/xyverz/keymap.c index 8879fbb5ff06..6250086ed9db 100644 --- a/keyboards/zen/keymaps/xyverz/keymap.c +++ b/keyboards/zen/keymaps/xyverz/keymap.c @@ -41,10 +41,6 @@ enum atreus52_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make the keymap clearer. #define CTLBSPC CTL_T(KC_BSPC) // CTRL when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias From 7cbfd8d4a112f8d6afe24bd5bfe23c4e593a622b Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 17 Feb 2019 15:42:49 +0000 Subject: [PATCH 124/445] convert to unix line-endings [skip ci] --- keyboards/ergotravel/keymaps/ian/keymap.c | 2 +- keyboards/ergotravel/keymaps/jpconstantineau/keymap.c | 2 +- keyboards/ergotravel/keymaps/viet/keymap.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ergotravel/keymaps/ian/keymap.c b/keyboards/ergotravel/keymaps/ian/keymap.c index f763d6bcdcf2..0dbf3278ac7c 100644 --- a/keyboards/ergotravel/keymaps/ian/keymap.c +++ b/keyboards/ergotravel/keymaps/ian/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c index 8bdaf4faf3fe..764b2b18c771 100644 --- a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c +++ b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; diff --git a/keyboards/ergotravel/keymaps/viet/keymap.c b/keyboards/ergotravel/keymaps/viet/keymap.c index 5e266ff4e08c..dd7fffcc69e0 100644 --- a/keyboards/ergotravel/keymaps/viet/keymap.c +++ b/keyboards/ergotravel/keymaps/viet/keymap.c @@ -1,4 +1,4 @@ -#include "ergotravel.h" +#include "ergotravel.h" #include "action_layer.h" #include "eeconfig.h" #include "mousekey.h" From 4eb7248401bb852cca637a061400cd13ac410bb6 Mon Sep 17 00:00:00 2001 From: rfvizarra Date: Sun, 17 Feb 2019 17:44:27 +0100 Subject: [PATCH 125/445] [Keymap] rfvizarra's custom PK60 layout (#5156) * rfvizarra's custom PK60 layout * Update keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c Co-Authored-By: rfvizarra * Update keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md Co-Authored-By: rfvizarra --- .../playkbtw/pk60/keymaps/rfvizarra/keymap.c | 29 +++++++++++++++++++ .../playkbtw/pk60/keymaps/rfvizarra/readme.md | 11 +++++++ 2 files changed, 40 insertions(+) create mode 100644 keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c create mode 100644 keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md diff --git a/keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c b/keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c new file mode 100644 index 000000000000..e439d4462e44 --- /dev/null +++ b/keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_minila( + 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_GRAVE, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(2), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [1] = LAYOUT_minila( + 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, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY + ), + + [2] = LAYOUT_minila( + _______, 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_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; diff --git a/keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md b/keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md new file mode 100644 index 000000000000..cd9a22108796 --- /dev/null +++ b/keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md @@ -0,0 +1,11 @@ +# A personal keymap for Play Keyboard60 based on the minila layout + +![Mininla layout](https://i.imgur.com/K7ONE1k.jpg) + +To build the firmware use + + make playkbtw/pk60:rfvizarra + +or if you prefer to use docker + + util/docker_build.sh playkbtw/pk60:rfvizarra From ae9439a3f984641b8bc4c1e0d5c5c1818e0b2e32 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Sat, 19 Jan 2019 13:06:19 +1000 Subject: [PATCH 126/445] Add .clang-format file --- .clang-format | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000000..bd896176d542 --- /dev/null +++ b/.clang-format @@ -0,0 +1,26 @@ +--- +BasedOnStyle: Google +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: 'true' +AlignConsecutiveDeclarations: 'true' +AlignOperands: 'true' +AllowAllParametersOfDeclarationOnNextLine: 'false' +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: 'false' +BinPackArguments: 'true' +BinPackParameters: 'true' +ColumnLimit: '1000' +IndentCaseLabels: 'true' +IndentPPDirectives: AfterHash +IndentWidth: '2' +MaxEmptyLinesToKeep: '1' +PointerAlignment: Right +SortIncludes: 'false' +SpaceBeforeAssignmentOperators: 'true' +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: 'false' +TabWidth: '2' +UseTab: Never + +... From dc5933aff7d948c1bb1e6199259509f20d170768 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Sun, 17 Feb 2019 17:31:47 +1000 Subject: [PATCH 127/445] Add clang-format section to contributing.md --- docs/contributing.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/contributing.md b/docs/contributing.md index bcedcaf974e5..eee40609bb5d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -91,6 +91,18 @@ int foo(void) { } ``` +# Auto-formatting with clang-format + +[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself. + +Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu. + +If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory. + +If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it. + +Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`. + # General Guidelines We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making. From 278a6c74f34784dde307d6d024aaea0e783c1f3f Mon Sep 17 00:00:00 2001 From: Olivia Briggs Date: Sun, 17 Feb 2019 13:28:10 -0500 Subject: [PATCH 128/445] Add Olivia's TMO50 layout --- keyboards/tmo50/keymaps/olivia/keymap.c | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 keyboards/tmo50/keymaps/olivia/keymap.c diff --git a/keyboards/tmo50/keymaps/olivia/keymap.c b/keyboards/tmo50/keymaps/olivia/keymap.c new file mode 100644 index 000000000000..c1e86f9b902e --- /dev/null +++ b/keyboards/tmo50/keymaps/olivia/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2019 funderburker + * + * 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 LT1_SPC LT(1, KC_SPC) +#define LT1_BSPC LT(1, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer + [0] = LAYOUT_all( + KC_VOLU, 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_VOLD, MT(MOD_LCTL, KC_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_MUTE, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_MPLY, KC_LALT, KC_LGUI, LT1_BSPC, LT1_SPC, KC_RALT, MO(3) + ), + + // Fn1 layer + [1] = LAYOUT_all( + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 layer + [2] = LAYOUT_all( + KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, + KC_BRID, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, 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, KC_TRNS + ), + + // Fn3 layer + [3] = LAYOUT_all( + 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, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, 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 657d05593491f7d4d1346f0f06f9972fdbde9095 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 18 Feb 2019 01:47:01 +0000 Subject: [PATCH 129/445] Inital port of xd84 (#5164) * Inital port of xd84 * Inital port of xd84 - review comments --- keyboards/xd84/config.h | 241 ++++++++++++++++++++ keyboards/xd84/custom_matrix_helper.c | 112 +++++++++ keyboards/xd84/dev.md | 132 +++++++++++ keyboards/xd84/info.json | 18 ++ keyboards/xd84/keymaps/default/keymap.c | 38 +++ keyboards/xd84/keymaps/default_iso/keymap.c | 38 +++ keyboards/xd84/matrix.c | 94 ++++++++ keyboards/xd84/pca9555.c | 63 +++++ keyboards/xd84/pca9555.h | 55 +++++ keyboards/xd84/readme.md | 23 ++ keyboards/xd84/rules.mk | 86 +++++++ keyboards/xd84/xd84.c | 43 ++++ keyboards/xd84/xd84.h | 59 +++++ 13 files changed, 1002 insertions(+) create mode 100644 keyboards/xd84/config.h create mode 100644 keyboards/xd84/custom_matrix_helper.c create mode 100644 keyboards/xd84/dev.md create mode 100644 keyboards/xd84/info.json create mode 100644 keyboards/xd84/keymaps/default/keymap.c create mode 100644 keyboards/xd84/keymaps/default_iso/keymap.c create mode 100644 keyboards/xd84/matrix.c create mode 100644 keyboards/xd84/pca9555.c create mode 100644 keyboards/xd84/pca9555.h create mode 100644 keyboards/xd84/readme.md create mode 100644 keyboards/xd84/rules.mk create mode 100644 keyboards/xd84/xd84.c create mode 100644 keyboards/xd84/xd84.h diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h new file mode 100644 index 000000000000..b2f850c184df --- /dev/null +++ b/keyboards/xd84/config.h @@ -0,0 +1,241 @@ +/* Copyright 2019 + * + * 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 0x4084 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD84 +#define DESCRIPTION KPrepublic XD84 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * 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 { D0, D5 } +//#define MATRIX_COL_PINS { F1, F0, B0 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW + +// TODO: NOT WORKING - original kimera code seems to suggest B6 or C7 in backlight.c +// however tracing seems to suggest this is not true (as C7 is RGB) +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 3 +// #define BACKLIGHT_BREATHING + +#define RGB_DI_PIN C7 +#define RGBLED_NUM 7 +#define RGBLIGHT_ANIMATIONS +// #ifdef RGB_DI_PIN +// #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c new file mode 100644 index 000000000000..a6a0a041d9da --- /dev/null +++ b/keyboards/xd84/custom_matrix_helper.c @@ -0,0 +1,112 @@ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +//_____COMMON__________________________________________________________________ +// user-defined overridable functions +__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) {} + + +//_____COULD BE COMMON_________________________________________________________ +/* matrix state(1:on, 0:off) */ +/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; +/*static*/ matrix_row_t matrix[MATRIX_ROWS]; + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +__attribute__ ((weak)) +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +__attribute__ ((weak)) +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +__attribute__ ((weak)) +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +__attribute__ ((weak)) +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +__attribute__ ((weak)) +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + + +//_____CUSTOM MATRIX 'LITE'____________________________________________________ +__attribute__ ((weak)) +void custom_matrix_init(void) { +} + +__attribute__ ((weak)) +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = true; + return changed; +} + +__attribute__ ((weak)) +void matrix_init(void) { + + custom_matrix_init(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +__attribute__ ((weak)) +uint8_t matrix_scan(void) { + bool changed = custom_matrix_scan(raw_matrix); + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/keyboards/xd84/dev.md b/keyboards/xd84/dev.md new file mode 100644 index 000000000000..453edb366792 --- /dev/null +++ b/keyboards/xd84/dev.md @@ -0,0 +1,132 @@ +# XD84 + +Development docs covering the following: +- Kimera core +- RGB +- Backlight + +## Kimera core +![Kimera core](https://gd2.alicdn.com/imgextra/i4/159916802/TB2qsIgdrJkpuFjy1zcXXa5FFXa_!!159916802.jpg) + +What little available info that was available for the qmk port +- atmega32u4 16Mhz + - board seems to have a 6Mhz crystal +- 2x PCA9555 I2C IO expander + +Links: +- [Schematic, BOM, Gerbers](/kairyu/kimera/blob/master/kimera_core) +- [Original firmware](https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/kimera) + +```c +/* +Kimera_core_v1.0 Components + + U1 (atmega32u4) + ,----------------. + TX --| TX0(PD3) RAW |-- + RX --| RX1(PD2) GND |-- + --| GND RESET |-- RST + --| GND VCC |-- + SDA --| 2(PD1) (PF4)A3 |-- + SCL --| 3(PD0) (PF5)A2 |-- + (INT) --| 4(PD4) (PF6)A1 |-- + --| 5(PC6) (PF7)A0 |-- + --| 6(PD7) (PB1)15 |-- SCK + LED2 --| 7(PE6) (PB3)14 |-- MISO + LED1 --| 8(PB4) (PB2)16 |-- MOSI + LED3 --| 9(PB5) (PB6)10 |-- LED4 + `----------------' + + IC1 (PCA9555) IC2 (PCA9555) + ,----------. ,----------. + SDA --| SDA P00 |-- P1 SDA --| SDA P00 |-- P17 + SCL --| SCL P01 |-- P2 SCL --| SCL P01 |-- P18 + INT --| INT P02 |-- P3 INT --| INT P02 |-- P19 + | P03 |-- P4 | P03 |-- P20 + GND --| A0 P04 |-- P5 VCC --| A0 P04 |-- P21 + SJ1 --| A1 P05 |-- P6 SJ1 --| A1 P05 |-- P22 + SJ2 --| A2 P06 |-- P7 SJ2 --| A2 P06 |-- P23 + | P07 |-- P8 | P07 |-- P24 + | | | | + | P10 |-- P9 | P10 |-- P25 + | P11 |-- P10 | P11 |-- P26 + | P12 |-- P11 | P12 |-- P27 + | P13 |-- P12 | P13 |-- P28 + | P14 |-- P13 | P14 |-- P29 + | P15 |-- P14 | P15 |-- P30 + | P16 |-- P15 | P16 |-- P31 + | P17 |-- P16 | P17 |-- P32 + `----------' `----------' +*/ + +``` + +### Bootloader +Default bootloader is `atmel-dfu`. +Reboot to bootloader via magnetic switch next to icsp header. +Flash using regular dfu methods. + +### XD84 pin mappings +Taken from [kimera-config.json](https://github.com/kairyu/tkg/blob/master/keyboard/config/kimera-config.json) + + "row_mapping": [ 1, 2, 3, 4, 5, 6 ], + "col_mapping": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + +# RGB +- PIN C7 +- Number of RGB LED 7 + +# Backlight + TODO - not working + +## Assumptions +### Pin/Port mappings +- All cols are on the same IC +- All rows are on the same IC and port +- Pins mapped sequentially +- Each port only does row or column not a mixture of both + - No need to have complex port config + - + +| ROW index | Kimera Pin | PCA9555 | +| ----------|------------|-------------------| +| 0 | 1 | IC1 Port 0 pin 0 | +| 1 | 2 | IC1 Port 0 pin 1 | +| 2 | 3 | IC1 Port 0 pin 2 | +| 3 | 4 | IC1 Port 0 pin 3 | +| 4 | 5 | IC1 Port 0 pin 4 | +| 5 | 6 | IC1 Port 0 pin 5 | + +- Safe enough to assume `row_index == pin` + + +| COL index | Kimera Pin | PCA9555 | +| ----------|------------|-------------------| +| 0 | 17 | IC2 Port 0 pin 0 | +| 1 | 18 | IC2 Port 0 pin 1 | +| 2 | 19 | IC2 Port 0 pin 2 | +| 3 | 20 | IC2 Port 0 pin 3 | +| 4 | 21 | IC2 Port 0 pin 4 | +| 5 | 22 | IC2 Port 0 pin 5 | +| 6 | 23 | IC2 Port 0 pin 6 | +| 7 | 24 | IC2 Port 0 pin 7 | +| 8 | 25 | IC2 Port 1 pin 0 | +| 9 | 26 | IC2 Port 1 pin 1 | +| 10 | 27 | IC2 Port 1 pin 2 | +| 11 | 28 | IC2 Port 1 pin 3 | +| 12 | 29 | IC2 Port 1 pin 4 | +| 13 | 30 | IC2 Port 1 pin 5 | +| 14 | 31 | IC2 Port 1 pin 6 | + +- Safe enough to assume here col_index does not need to be converted to pin +- Reading both ports one after the other gives us the same sequential behavior + - maps to the usual practice of reading matrix columns + - while this technically gives 16 column reads, the 16th column can never be set so is safely ignored + +## Notes +[pca9555 datasheet](https://www.ti.com/lit/ds/symlink/pca9555.pdf) + +- Other Kimera based boards with non sequential pin mappings, pins mapped across ICs, or mixed row/col configs will need more complicated `pin -> i2c_addr,port,pin` logic as well as rather more complex pin functions. + +## Return to stock firmware +Not tested but original firmware seems to be available in the [kairyu/tkg-firmware](https://github.com/kairyu/tkg-firmware/blob/master/kimera-core.hex) repo. diff --git a/keyboards/xd84/info.json b/keyboards/xd84/info.json new file mode 100644 index 000000000000..b701db1b79e5 --- /dev/null +++ b/keyboards/xd84/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "XD84", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_ansi": { + "key_count": 84, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"delete", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, + + "LAYOUT_75_iso": { + "key_count": 85, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"delete", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/xd84/keymaps/default/keymap.c b/keyboards/xd84/keymaps/default/keymap.c new file mode 100644 index 000000000000..4b9cf9fd24df --- /dev/null +++ b/keyboards/xd84/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RGUI LM(1, MOD_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_F13, KC_PAUS, 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_HOME, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, L1_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd84/keymaps/default_iso/keymap.c b/keyboards/xd84/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..18a0f06a8287 --- /dev/null +++ b/keyboards/xd84/keymaps/default_iso/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RGUI LM(1, MOD_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_PAUS, 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_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, L1_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd84/matrix.c b/keyboards/xd84/matrix.c new file mode 100644 index 000000000000..a3590504777a --- /dev/null +++ b/keyboards/xd84/matrix.c @@ -0,0 +1,94 @@ +/* Copyright 2019 + * + * 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 +#include +#include "matrix.h" +#include "pca9555.h" +#include "quantum.h" + +#include "debug.h" + +// PCA9555 slave addresses +#define IC1 0x20 +#define IC2 0x21 + +//_____Utility funcs___________________________________________________________ + +static void init_pins(void) { + // init all cols high - IC2 all input + pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT);//same as initial state + pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT);//same as initial state + + // init all rows - IC1 port0 input + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT);//same as initial state +} + +static void select_row(uint8_t row) { + // For the XD84 all rows are on the same IC and port + // so its safe enough to assume here row == pin + uint8_t pin = row; + uint8_t mask = 1 << pin; + + pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH & (~mask)); + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT & (~mask)); +} + +static uint16_t read_cols(void) { + uint16_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0); + uint16_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1); + + // For the XD84 all cols are on the same IC and mapped sequentially + // while this technically gives 16 column reads, + // the 16th column can never be set so is safely ignored + return ~((state_2 << 8) | state_1); +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + current_matrix[current_row] = read_cols(); + + // No need to Unselect row as the next `select_row` will blank everything + + return (last_row_value != current_matrix[current_row]); +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void custom_matrix_init(void) { + pca9555_init(IC1); + pca9555_init(IC2); + + init_pins(); +} + +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + return changed; +} \ No newline at end of file diff --git a/keyboards/xd84/pca9555.c b/keyboards/xd84/pca9555.c new file mode 100644 index 000000000000..df4631e9d74d --- /dev/null +++ b/keyboards/xd84/pca9555.c @@ -0,0 +1,63 @@ +#include "i2c_master.h" +#include "pca9555.h" + +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n<<1) +#define TIMEOUT 100 + +enum { + CMD_INPUT_0 = 0, + CMD_INPUT_1, + CMD_OUTPUT_0, + CMD_OUTPUT_1, + CMD_INVERSION_0, + CMD_INVERSION_1, + CMD_CONFIG_0, + CMD_CONFIG_1 +}; + +void pca9555_init(uint8_t slave_addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + + s_init=1; + } + + // TODO: could check device connected + //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); + //i2c_stop(); +} + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_config::FAILED\n"); + } +} + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_output::FAILED\n"); + } +} + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; + + uint8_t data = 0; + i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_readPins::FAILED\n"); + } + return data; +} diff --git a/keyboards/xd84/pca9555.h b/keyboards/xd84/pca9555.h new file mode 100644 index 000000000000..6aaee8a6f88a --- /dev/null +++ b/keyboards/xd84/pca9555.h @@ -0,0 +1,55 @@ +/* Copyright 2019 + * + * 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 + +/* + PCA9555 + ,----------. + SDA --| SDA P00 |-- P1 + SCL --| SCL P01 |-- P2 + INT --| INT P02 |-- P3 + | P03 |-- P4 + A0 --| A0 P04 |-- P5 + A1 --| A1 P05 |-- P6 + A2 --| A2 P06 |-- P7 + | P07 |-- P8 + | | + | P10 |-- P10 + | P11 |-- P11 + | P12 |-- P12 + | P13 |-- P13 + | P14 |-- P14 + | P15 |-- P15 + | P16 |-- P16 + | P17 |-- P17 + `----------' +*/ + +#define PCA9555_PORT0 0 +#define PCA9555_PORT1 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void pca9555_init(uint8_t slave_addr); + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file diff --git a/keyboards/xd84/readme.md b/keyboards/xd84/readme.md new file mode 100644 index 000000000000..38b4efcba29f --- /dev/null +++ b/keyboards/xd84/readme.md @@ -0,0 +1,23 @@ +# XD84 + +![XD84](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB17eeJSXXXXXbIXFXXq6xXFXXXp_1024x1024.jpg?v=1515505994) + +Compact With 84 Keys & RGB LED Underglow +- Designed by Xiudi +- Up to 87 keys + - iso and ansi support +- Uses Kimera core + +Keyboard Maintainer: QMK Community +Hardware Supported: XD84 +Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84-xiudi-70-custom-keyboard-pcb) + +Make example for this keyboard (after setting up your build environment): + + make xd84:default + +Install examples: + + make xd84:default:dfu + +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/xd84/rules.mk b/keyboards/xd84/rules.mk new file mode 100644 index 000000000000..0806d092ff2d --- /dev/null +++ b/keyboards/xd84/rules.mk @@ -0,0 +1,86 @@ +# 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 = 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 = lite # 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 +# 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 = yes # 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) + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c + +LAYOUTS = 75_ansi 75_iso \ No newline at end of file diff --git a/keyboards/xd84/xd84.c b/keyboards/xd84/xd84.c new file mode 100644 index 000000000000..f7048f3252dc --- /dev/null +++ b/keyboards/xd84/xd84.c @@ -0,0 +1,43 @@ +/* Copyright 2019 + * + * 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 "xd84.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/xd84/xd84.h b/keyboards/xd84/xd84.h new file mode 100644 index 000000000000..d59956f691d7 --- /dev/null +++ b/keyboards/xd84/xd84.h @@ -0,0 +1,59 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define ____ KC_NO + +/* 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_75_ansi( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K416, \ + K501, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, K414, K416 }, \ + { K501, ____, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, ____, K611, K612, K614, K615, K616 } \ +} + +#define LAYOUT_75_iso( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416 }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, ____, K611, K612, K614, K615, K616 } \ +} From 4e2369693f7f2ef654db35d158af5cddb98d9703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 04:05:12 +0100 Subject: [PATCH 130/445] Move RGBLIGHT_LIMIT_VAL definition from rgblight.c to rgblight.h (#5167) --- quantum/rgblight.c | 4 ---- quantum/rgblight.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index d42a1d2e5932..45d521786e4b 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -31,10 +31,6 @@ #include "debug.h" #include "led_tables.h" -#ifndef RGBLIGHT_LIMIT_VAL -#define RGBLIGHT_LIMIT_VAL 255 -#endif - #define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_ ## sym, #define _RGBM_SINGLE_DYNAMIC(sym) #define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_ ## sym, diff --git a/quantum/rgblight.h b/quantum/rgblight.h index aa608d424084..f92388c96104 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -121,6 +121,9 @@ enum RGBLIGHT_EFFECT_MODE { #ifndef RGBLIGHT_VAL_STEP #define RGBLIGHT_VAL_STEP 17 #endif +#ifndef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 +#endif #define RGBLED_TIMER_TOP F_CPU/(256*64) // #define RGBLED_TIMER_TOP 0xFF10 From 5cb713148dbc319167517df370ca9dd774ceb31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 07:23:32 +0100 Subject: [PATCH 131/445] Change Command keycode defaults to match corresponding Bootmagic codes (#5078) * Change Command keycode defaults to match corresponding Bootmagic codes * Make alternate magic key keycodes consistent * Reflect changes from previous commit in tmk_core/common/command.c * Remove unnecessary MAGIC_KEY_* definitions from keymaps compatible with these changes * Swap E and BSPACE for MAGIC_KEY_EEPROM * Add MAGIC_KEY_EEPROM_CLEAR instead of MAGIC_KEY_EEPROM_ALT * Remove BOOTMAGIC_ENABLE checks around EECONFIG stuff * Update Command descriptions --- docs/feature_command.md | 13 ++++---- keyboards/xd75/keymaps/billypython/config.h | 3 -- quantum/template/avr/config.h | 11 ++++--- tmk_core/common/command.c | 31 ++++++++++--------- tmk_core/common/command.h | 34 ++++++++++++--------- users/billypython/config.h | 2 -- users/konstantin/config.h | 3 -- 7 files changed, 48 insertions(+), 49 deletions(-) diff --git a/docs/feature_command.md b/docs/feature_command.md index 53a140a11682..deabedc1c3f6 100644 --- a/docs/feature_command.md +++ b/docs/feature_command.md @@ -29,9 +29,10 @@ If you would like to change the key assignments for Command, `#define` these in |`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console | |`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console | |`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console| -|`MAGIC_KEY_HELP1` |`H` |Print Command help to the console | -|`MAGIC_KEY_HELP2` |`SLASH` |Print Command help to the console (alternate) | +|`MAGIC_KEY_HELP` |`H` |Print Command help to the console | +|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) | |`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer | +|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) | |`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer | |`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer | |`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer | @@ -41,10 +42,10 @@ If you would like to change the key assignments for Command, `#define` these in |`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer | |`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer | |`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer | -|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Make layer 0 the default layer (alternate) | -|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Make layer 0 the default layer (alternate) | -|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Enter the bootloader | +|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader | +|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) | |`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | -|`MAGIC_KEY_EEPROM` |`E` |Clear the EEPROM | +|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console | +|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM | |`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) | |`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping | diff --git a/keyboards/xd75/keymaps/billypython/config.h b/keyboards/xd75/keymaps/billypython/config.h index 275f8effba79..36e6b6785170 100644 --- a/keyboards/xd75/keymaps/billypython/config.h +++ b/keyboards/xd75/keymaps/billypython/config.h @@ -2,9 +2,6 @@ #define FORCE_NKRO -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 #define MOUSEKEY_MAX_SPEED 4 diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index a31fcf236fbf..41e1aa0788f2 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -143,8 +143,8 @@ along with this program. If not, see . //#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_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH //#define MAGIC_KEY_DEBUG D //#define MAGIC_KEY_DEBUG_MATRIX X //#define MAGIC_KEY_DEBUG_KBD K @@ -152,9 +152,8 @@ along with this program. If not, see . //#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_LAYER0_ALT GRAVE //#define MAGIC_KEY_LAYER1 1 //#define MAGIC_KEY_LAYER2 2 //#define MAGIC_KEY_LAYER3 3 @@ -164,9 +163,11 @@ along with this program. If not, see . //#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC //#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE //#define MAGIC_KEY_NKRO N //#define MAGIC_KEY_SLEEP_LED Z diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index aab99290d212..d3884d9fa972 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -151,17 +151,17 @@ static void command_common_help(void) "0-9: Switch to Layer 0-9\n" #endif - STR(MAGIC_KEY_LAYER0_ALT1 ) ": Switch to Layer 0 (alternate key 1)\n" - STR(MAGIC_KEY_LAYER0_ALT2 ) ": Switch to Layer 0 (alternate key 2)\n" - STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader (Reset)\n" + STR(MAGIC_KEY_LAYER0_ALT ) ": Switch to Layer 0 (alternate)\n" + + STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader\n" + STR(MAGIC_KEY_BOOTLOADER_ALT) ": Jump to Bootloader (alternate)\n" #ifdef KEYBOARD_LOCK_ENABLE - STR(MAGIC_KEY_LOCK ) ": Lock\n" + STR(MAGIC_KEY_LOCK ) ": Lock Keyboard\n" #endif -#ifdef BOOTMAGIC_ENABLE STR(MAGIC_KEY_EEPROM ) ": Print EEPROM Settings\n" -#endif + STR(MAGIC_KEY_EEPROM_CLEAR) ": Clear EEPROM\n" #ifdef NKRO_ENABLE STR(MAGIC_KEY_NKRO ) ": NKRO Toggle\n" @@ -265,7 +265,6 @@ static void print_status(void) return; } -#ifdef BOOTMAGIC_ENABLE static void print_eeconfig(void) { @@ -305,7 +304,6 @@ static void print_eeconfig(void) #endif /* !NO_PRINT */ } -#endif /* BOOTMAGIC_ENABLE */ static bool command_common(uint8_t code) { @@ -326,14 +324,17 @@ static bool command_common(uint8_t code) break; #endif -#ifdef BOOTMAGIC_ENABLE - // print stored eeprom config case MAGIC_KC(MAGIC_KEY_EEPROM): print("eeconfig:\n"); print_eeconfig(); break; -#endif + + // clear eeprom + case MAGIC_KC(MAGIC_KEY_EEPROM_CLEAR): + print("Clearing EEPROM\n"); + eeconfig_init(); + break; #ifdef KEYBOARD_LOCK_ENABLE @@ -352,8 +353,8 @@ static bool command_common(uint8_t code) #endif // print help - case MAGIC_KC(MAGIC_KEY_HELP1): - case MAGIC_KC(MAGIC_KEY_HELP2): + case MAGIC_KC(MAGIC_KEY_HELP): + case MAGIC_KC(MAGIC_KEY_HELP_ALT): command_common_help(); break; @@ -370,6 +371,7 @@ static bool command_common(uint8_t code) // jump to bootloader case MAGIC_KC(MAGIC_KEY_BOOTLOADER): + case MAGIC_KC(MAGIC_KEY_BOOTLOADER_ALT): clear_keyboard(); // clear to prevent stuck keys print("\n\nJumping to bootloader... "); #ifdef AUDIO_ENABLE @@ -453,8 +455,7 @@ static bool command_common(uint8_t code) // switch layers - case MAGIC_KC(MAGIC_KEY_LAYER0_ALT1): - case MAGIC_KC(MAGIC_KEY_LAYER0_ALT2): + case MAGIC_KC(MAGIC_KEY_LAYER0_ALT): switch_default_layer(0); break; diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h index 052e25184388..e7c7b0ea1d22 100644 --- a/tmk_core/common/command.h +++ b/tmk_core/common/command.h @@ -50,12 +50,12 @@ bool command_proc(uint8_t code); #define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false #endif -#ifndef MAGIC_KEY_HELP1 -#define MAGIC_KEY_HELP1 H +#ifndef MAGIC_KEY_HELP +#define MAGIC_KEY_HELP H #endif -#ifndef MAGIC_KEY_HELP2 -#define MAGIC_KEY_HELP2 SLASH +#ifndef MAGIC_KEY_HELP_ALT +#define MAGIC_KEY_HELP_ALT SLASH #endif #ifndef MAGIC_KEY_DEBUG @@ -86,18 +86,14 @@ bool command_proc(uint8_t code); #define MAGIC_KEY_CONSOLE C #endif -#ifndef MAGIC_KEY_LAYER0_ALT1 -#define MAGIC_KEY_LAYER0_ALT1 ESC -#endif - -#ifndef MAGIC_KEY_LAYER0_ALT2 -#define MAGIC_KEY_LAYER0_ALT2 GRAVE -#endif - #ifndef MAGIC_KEY_LAYER0 #define MAGIC_KEY_LAYER0 0 #endif +#ifndef MAGIC_KEY_LAYER0_ALT +#define MAGIC_KEY_LAYER0_ALT GRAVE +#endif + #ifndef MAGIC_KEY_LAYER1 #define MAGIC_KEY_LAYER1 1 #endif @@ -135,7 +131,11 @@ bool command_proc(uint8_t code); #endif #ifndef MAGIC_KEY_BOOTLOADER -#define MAGIC_KEY_BOOTLOADER PAUSE +#define MAGIC_KEY_BOOTLOADER B +#endif + +#ifndef MAGIC_KEY_BOOTLOADER_ALT +#define MAGIC_KEY_BOOTLOADER_ALT ESC #endif #ifndef MAGIC_KEY_LOCK @@ -146,6 +146,10 @@ bool command_proc(uint8_t code); #define MAGIC_KEY_EEPROM E #endif +#ifndef MAGIC_KEY_EEPROM_CLEAR +#define MAGIC_KEY_EEPROM_CLEAR BSPACE +#endif + #ifndef MAGIC_KEY_NKRO #define MAGIC_KEY_NKRO N #endif @@ -155,5 +159,5 @@ bool command_proc(uint8_t code); #endif -#define XMAGIC_KC(key) KC_##key -#define MAGIC_KC(key) XMAGIC_KC(key) +#define XMAGIC_KC(key) KC_ ## key +#define MAGIC_KC(key) XMAGIC_KC(key) diff --git a/users/billypython/config.h b/users/billypython/config.h index 705e6c934a0d..4609adbbeafd 100644 --- a/users/billypython/config.h +++ b/users/billypython/config.h @@ -2,8 +2,6 @@ #define FORCE_NKRO -#define MAGIC_KEY_BOOTLOADER B - #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 #define MOUSEKEY_MAX_SPEED 4 diff --git a/users/konstantin/config.h b/users/konstantin/config.h index 800b8e49ba0e..f18c4a70e455 100644 --- a/users/konstantin/config.h +++ b/users/konstantin/config.h @@ -2,9 +2,6 @@ #define FORCE_NKRO -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 #define MOUSEKEY_MAX_SPEED 4 From 2cd2078b9d84449996dc0b01c8ad8cd0b56d9372 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Mon, 18 Feb 2019 19:01:37 +0900 Subject: [PATCH 132/445] Update Helix 'led_test' keymap Change to use keyboard_post_init_user() hook (#3113) --- keyboards/helix/rev2/keymaps/default/keymap.c | 7 ------- .../helix/rev2/keymaps/led_test/led_test_init.c | 16 +--------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index 5b8c5fae57b4..a64eed3e72cb 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -506,14 +506,7 @@ void music_scale_user(void) //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(RGBLIGHT_MODE_RGB_TEST); -__attribute__ ((weak)) -void led_test_init(void) {} - void matrix_scan_user(void) { - led_test_init(); iota_gfx_task(); // this is what updates the display continuously } diff --git a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c index 85f5d1aa7efb..7f8813acdd8c 100644 --- a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c +++ b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c @@ -1,20 +1,6 @@ #include QMK_KEYBOARD_H -#if 1 -void led_test_init(void) { - static int scan_count = 0; - if( scan_count == 2 ) { - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); - } - if( scan_count < 3 ) scan_count ++; -} - -#else -// when qmk/qmk_firmware PullRequest #3113 available. -// can use this? -void startup_user(void) { +void keyboard_post_init_user(void) { rgblight_enable_noeeprom(); rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); } -#endif From 593d08d6aec38aca6f38db4a17f3d8cdcd13bf28 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 18 Feb 2019 16:33:10 +0000 Subject: [PATCH 133/445] [Keyboard] Add LAYOUT_75_iso community layout support (#5161) * Add LAYOUT_75_iso community layout support * Add LAYOUT_75_iso community layout support - review comments --- layouts/default/75_iso/default_75_iso/keymap.c | 13 +++++++++++++ layouts/default/75_iso/layout.json | 6 ++++++ layouts/default/75_iso/readme.md | 3 +++ 3 files changed, 22 insertions(+) create mode 100644 layouts/default/75_iso/default_75_iso/keymap.c create mode 100644 layouts/default/75_iso/layout.json create mode 100644 layouts/default/75_iso/readme.md diff --git a/layouts/default/75_iso/default_75_iso/keymap.c b/layouts/default/75_iso/default_75_iso/keymap.c new file mode 100644 index 000000000000..2fcca4d2b58b --- /dev/null +++ b/layouts/default/75_iso/default_75_iso/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_75_iso(\ + 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_PAUS, 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_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/75_iso/layout.json b/layouts/default/75_iso/layout.json new file mode 100644 index 000000000000..6606d90e1d8d --- /dev/null +++ b/layouts/default/75_iso/layout.json @@ -0,0 +1,6 @@ +[{a:7},"","","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","",{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/75_iso/readme.md b/layouts/default/75_iso/readme.md new file mode 100644 index 000000000000..cbcaeaf9e571 --- /dev/null +++ b/layouts/default/75_iso/readme.md @@ -0,0 +1,3 @@ +# 75_iso + + LAYOUT_75_iso \ No newline at end of file From f0edc993b7beb15cc9c0443677801daddcae710b Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 18 Feb 2019 08:35:34 -0800 Subject: [PATCH 134/445] [Keyboard] Winkeyless Directory (#5163) * introduce wkl directory and readme * move bface into winkeyless directory and edit readme for new make instructions * move bmini into the winkeyless directory and edit readme * move bmini ex into winkeyless directory * edit readme some more * add newbs guide to readmes * fix path to bface * temporarily turn off community layout support until we refactor this taking out all the custom ps2avrgb stuff --- keyboards/{ => winkeyless}/bface/README.md | 4 ++-- keyboards/{ => winkeyless}/bface/backlight_ps2avrGB.c | 0 keyboards/{ => winkeyless}/bface/backlight_ps2avrGB.h | 0 keyboards/{ => winkeyless}/bface/bface.c | 0 keyboards/{ => winkeyless}/bface/bface.h | 0 keyboards/{ => winkeyless}/bface/config.h | 0 keyboards/{ => winkeyless}/bface/i2c.c | 0 keyboards/{ => winkeyless}/bface/i2c.h | 0 keyboards/{ => winkeyless}/bface/info.json | 0 keyboards/{ => winkeyless}/bface/keymaps/default/keymap.c | 0 keyboards/{ => winkeyless}/bface/keymaps/kpeatt/keymap.c | 0 keyboards/{ => winkeyless}/bface/keymaps/kpeatt/readme.md | 0 keyboards/{ => winkeyless}/bface/matrix.c | 0 keyboards/{ => winkeyless}/bface/program | 0 keyboards/{ => winkeyless}/bface/rules.mk | 3 +-- keyboards/{ => winkeyless}/bface/usbconfig.h | 0 keyboards/{ => winkeyless}/bmini/bmini.c | 0 keyboards/{ => winkeyless}/bmini/bmini.h | 0 keyboards/{ => winkeyless}/bmini/config.h | 0 keyboards/{ => winkeyless}/bmini/i2c.c | 0 keyboards/{ => winkeyless}/bmini/i2c.h | 0 keyboards/{ => winkeyless}/bmini/info.json | 0 keyboards/{ => winkeyless}/bmini/keymaps/default/keymap.c | 0 keyboards/{ => winkeyless}/bmini/matrix.c | 0 keyboards/{ => winkeyless}/bmini/readme.md | 7 +++---- keyboards/{ => winkeyless}/bmini/rules.mk | 0 keyboards/{ => winkeyless}/bmini/usbconfig.h | 0 keyboards/{ => winkeyless}/bminiex/backlight.c | 0 keyboards/{ => winkeyless}/bminiex/backlight_custom.h | 0 keyboards/{ => winkeyless}/bminiex/bminiex.c | 0 keyboards/{ => winkeyless}/bminiex/bminiex.h | 0 keyboards/{ => winkeyless}/bminiex/breathing_custom.h | 0 keyboards/{ => winkeyless}/bminiex/config.h | 0 keyboards/{ => winkeyless}/bminiex/i2c.c | 0 keyboards/{ => winkeyless}/bminiex/i2c.h | 0 keyboards/{ => winkeyless}/bminiex/info.json | 0 keyboards/{ => winkeyless}/bminiex/keymaps/ansi/keymap.c | 0 keyboards/{ => winkeyless}/bminiex/keymaps/ansi/readme.md | 0 .../{ => winkeyless}/bminiex/keymaps/default/keymap.c | 0 keyboards/{ => winkeyless}/bminiex/keymaps/iso/keymap.c | 0 keyboards/{ => winkeyless}/bminiex/keymaps/iso/readme.md | 0 keyboards/{ => winkeyless}/bminiex/matrix.c | 0 keyboards/{ => winkeyless}/bminiex/readme.md | 7 +++---- keyboards/{ => winkeyless}/bminiex/rules.mk | 0 keyboards/{ => winkeyless}/bminiex/usbconfig.h | 0 keyboards/winkeyless/readme.md | 7 +++++++ 46 files changed, 16 insertions(+), 12 deletions(-) rename keyboards/{ => winkeyless}/bface/README.md (82%) rename keyboards/{ => winkeyless}/bface/backlight_ps2avrGB.c (100%) rename keyboards/{ => winkeyless}/bface/backlight_ps2avrGB.h (100%) rename keyboards/{ => winkeyless}/bface/bface.c (100%) rename keyboards/{ => winkeyless}/bface/bface.h (100%) rename keyboards/{ => winkeyless}/bface/config.h (100%) rename keyboards/{ => winkeyless}/bface/i2c.c (100%) rename keyboards/{ => winkeyless}/bface/i2c.h (100%) rename keyboards/{ => winkeyless}/bface/info.json (100%) rename keyboards/{ => winkeyless}/bface/keymaps/default/keymap.c (100%) rename keyboards/{ => winkeyless}/bface/keymaps/kpeatt/keymap.c (100%) rename keyboards/{ => winkeyless}/bface/keymaps/kpeatt/readme.md (100%) rename keyboards/{ => winkeyless}/bface/matrix.c (100%) rename keyboards/{ => winkeyless}/bface/program (100%) rename keyboards/{ => winkeyless}/bface/rules.mk (94%) rename keyboards/{ => winkeyless}/bface/usbconfig.h (100%) rename keyboards/{ => winkeyless}/bmini/bmini.c (100%) rename keyboards/{ => winkeyless}/bmini/bmini.h (100%) rename keyboards/{ => winkeyless}/bmini/config.h (100%) rename keyboards/{ => winkeyless}/bmini/i2c.c (100%) rename keyboards/{ => winkeyless}/bmini/i2c.h (100%) rename keyboards/{ => winkeyless}/bmini/info.json (100%) rename keyboards/{ => winkeyless}/bmini/keymaps/default/keymap.c (100%) rename keyboards/{ => winkeyless}/bmini/matrix.c (100%) rename keyboards/{ => winkeyless}/bmini/readme.md (80%) rename keyboards/{ => winkeyless}/bmini/rules.mk (100%) rename keyboards/{ => winkeyless}/bmini/usbconfig.h (100%) rename keyboards/{ => winkeyless}/bminiex/backlight.c (100%) rename keyboards/{ => winkeyless}/bminiex/backlight_custom.h (100%) rename keyboards/{ => winkeyless}/bminiex/bminiex.c (100%) rename keyboards/{ => winkeyless}/bminiex/bminiex.h (100%) rename keyboards/{ => winkeyless}/bminiex/breathing_custom.h (100%) rename keyboards/{ => winkeyless}/bminiex/config.h (100%) rename keyboards/{ => winkeyless}/bminiex/i2c.c (100%) rename keyboards/{ => winkeyless}/bminiex/i2c.h (100%) rename keyboards/{ => winkeyless}/bminiex/info.json (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/ansi/keymap.c (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/ansi/readme.md (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/default/keymap.c (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/iso/keymap.c (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/iso/readme.md (100%) rename keyboards/{ => winkeyless}/bminiex/matrix.c (100%) rename keyboards/{ => winkeyless}/bminiex/readme.md (89%) rename keyboards/{ => winkeyless}/bminiex/rules.mk (100%) rename keyboards/{ => winkeyless}/bminiex/usbconfig.h (100%) create mode 100644 keyboards/winkeyless/readme.md diff --git a/keyboards/bface/README.md b/keyboards/winkeyless/bface/README.md similarity index 82% rename from keyboards/bface/README.md rename to keyboards/winkeyless/bface/README.md index 0dac7caf308f..f1789b04cfaf 100644 --- a/keyboards/bface/README.md +++ b/keyboards/winkeyless/bface/README.md @@ -8,7 +8,7 @@ Hardware Availability: [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/ Make example for this keyboard (after setting up your build environment): - make bface:default + make winkeyless/bface:default Flashing @@ -41,4 +41,4 @@ macOS: 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -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. +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/bface/backlight_ps2avrGB.c b/keyboards/winkeyless/bface/backlight_ps2avrGB.c similarity index 100% rename from keyboards/bface/backlight_ps2avrGB.c rename to keyboards/winkeyless/bface/backlight_ps2avrGB.c diff --git a/keyboards/bface/backlight_ps2avrGB.h b/keyboards/winkeyless/bface/backlight_ps2avrGB.h similarity index 100% rename from keyboards/bface/backlight_ps2avrGB.h rename to keyboards/winkeyless/bface/backlight_ps2avrGB.h diff --git a/keyboards/bface/bface.c b/keyboards/winkeyless/bface/bface.c similarity index 100% rename from keyboards/bface/bface.c rename to keyboards/winkeyless/bface/bface.c diff --git a/keyboards/bface/bface.h b/keyboards/winkeyless/bface/bface.h similarity index 100% rename from keyboards/bface/bface.h rename to keyboards/winkeyless/bface/bface.h diff --git a/keyboards/bface/config.h b/keyboards/winkeyless/bface/config.h similarity index 100% rename from keyboards/bface/config.h rename to keyboards/winkeyless/bface/config.h diff --git a/keyboards/bface/i2c.c b/keyboards/winkeyless/bface/i2c.c similarity index 100% rename from keyboards/bface/i2c.c rename to keyboards/winkeyless/bface/i2c.c diff --git a/keyboards/bface/i2c.h b/keyboards/winkeyless/bface/i2c.h similarity index 100% rename from keyboards/bface/i2c.h rename to keyboards/winkeyless/bface/i2c.h diff --git a/keyboards/bface/info.json b/keyboards/winkeyless/bface/info.json similarity index 100% rename from keyboards/bface/info.json rename to keyboards/winkeyless/bface/info.json diff --git a/keyboards/bface/keymaps/default/keymap.c b/keyboards/winkeyless/bface/keymaps/default/keymap.c similarity index 100% rename from keyboards/bface/keymaps/default/keymap.c rename to keyboards/winkeyless/bface/keymaps/default/keymap.c diff --git a/keyboards/bface/keymaps/kpeatt/keymap.c b/keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c similarity index 100% rename from keyboards/bface/keymaps/kpeatt/keymap.c rename to keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c diff --git a/keyboards/bface/keymaps/kpeatt/readme.md b/keyboards/winkeyless/bface/keymaps/kpeatt/readme.md similarity index 100% rename from keyboards/bface/keymaps/kpeatt/readme.md rename to keyboards/winkeyless/bface/keymaps/kpeatt/readme.md diff --git a/keyboards/bface/matrix.c b/keyboards/winkeyless/bface/matrix.c similarity index 100% rename from keyboards/bface/matrix.c rename to keyboards/winkeyless/bface/matrix.c diff --git a/keyboards/bface/program b/keyboards/winkeyless/bface/program similarity index 100% rename from keyboards/bface/program rename to keyboards/winkeyless/bface/program diff --git a/keyboards/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk similarity index 94% rename from keyboards/bface/rules.mk rename to keyboards/winkeyless/bface/rules.mk index 95b6c8a97a6c..10331ef70022 100644 --- a/keyboards/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -44,6 +44,5 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight_ps2avrGB.c # programming options -PROGRAM_CMD = ./keyboards/bface/program .build/$(TARGET).hex +PROGRAM_CMD = ./keyboards/winkeyless/bface/program .build/$(TARGET).hex -LAYOUTS = 60_ansi diff --git a/keyboards/bface/usbconfig.h b/keyboards/winkeyless/bface/usbconfig.h similarity index 100% rename from keyboards/bface/usbconfig.h rename to keyboards/winkeyless/bface/usbconfig.h diff --git a/keyboards/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c similarity index 100% rename from keyboards/bmini/bmini.c rename to keyboards/winkeyless/bmini/bmini.c diff --git a/keyboards/bmini/bmini.h b/keyboards/winkeyless/bmini/bmini.h similarity index 100% rename from keyboards/bmini/bmini.h rename to keyboards/winkeyless/bmini/bmini.h diff --git a/keyboards/bmini/config.h b/keyboards/winkeyless/bmini/config.h similarity index 100% rename from keyboards/bmini/config.h rename to keyboards/winkeyless/bmini/config.h diff --git a/keyboards/bmini/i2c.c b/keyboards/winkeyless/bmini/i2c.c similarity index 100% rename from keyboards/bmini/i2c.c rename to keyboards/winkeyless/bmini/i2c.c diff --git a/keyboards/bmini/i2c.h b/keyboards/winkeyless/bmini/i2c.h similarity index 100% rename from keyboards/bmini/i2c.h rename to keyboards/winkeyless/bmini/i2c.h diff --git a/keyboards/bmini/info.json b/keyboards/winkeyless/bmini/info.json similarity index 100% rename from keyboards/bmini/info.json rename to keyboards/winkeyless/bmini/info.json diff --git a/keyboards/bmini/keymaps/default/keymap.c b/keyboards/winkeyless/bmini/keymaps/default/keymap.c similarity index 100% rename from keyboards/bmini/keymaps/default/keymap.c rename to keyboards/winkeyless/bmini/keymaps/default/keymap.c diff --git a/keyboards/bmini/matrix.c b/keyboards/winkeyless/bmini/matrix.c similarity index 100% rename from keyboards/bmini/matrix.c rename to keyboards/winkeyless/bmini/matrix.c diff --git a/keyboards/bmini/readme.md b/keyboards/winkeyless/bmini/readme.md similarity index 80% rename from keyboards/bmini/readme.md rename to keyboards/winkeyless/bmini/readme.md index 9c702621295b..3401b9744484 100644 --- a/keyboards/bmini/readme.md +++ b/keyboards/winkeyless/bmini/readme.md @@ -1,5 +1,4 @@ -B.mini -======== +# B.mini A 75% keyboard with RGB @@ -9,7 +8,7 @@ Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ Make example for this keyboard (after setting up your build environment): - make bmini:default + make winkeyless/bmini:default Flashing @@ -41,4 +40,4 @@ macOS: 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -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. +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/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk similarity index 100% rename from keyboards/bmini/rules.mk rename to keyboards/winkeyless/bmini/rules.mk diff --git a/keyboards/bmini/usbconfig.h b/keyboards/winkeyless/bmini/usbconfig.h similarity index 100% rename from keyboards/bmini/usbconfig.h rename to keyboards/winkeyless/bmini/usbconfig.h diff --git a/keyboards/bminiex/backlight.c b/keyboards/winkeyless/bminiex/backlight.c similarity index 100% rename from keyboards/bminiex/backlight.c rename to keyboards/winkeyless/bminiex/backlight.c diff --git a/keyboards/bminiex/backlight_custom.h b/keyboards/winkeyless/bminiex/backlight_custom.h similarity index 100% rename from keyboards/bminiex/backlight_custom.h rename to keyboards/winkeyless/bminiex/backlight_custom.h diff --git a/keyboards/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c similarity index 100% rename from keyboards/bminiex/bminiex.c rename to keyboards/winkeyless/bminiex/bminiex.c diff --git a/keyboards/bminiex/bminiex.h b/keyboards/winkeyless/bminiex/bminiex.h similarity index 100% rename from keyboards/bminiex/bminiex.h rename to keyboards/winkeyless/bminiex/bminiex.h diff --git a/keyboards/bminiex/breathing_custom.h b/keyboards/winkeyless/bminiex/breathing_custom.h similarity index 100% rename from keyboards/bminiex/breathing_custom.h rename to keyboards/winkeyless/bminiex/breathing_custom.h diff --git a/keyboards/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h similarity index 100% rename from keyboards/bminiex/config.h rename to keyboards/winkeyless/bminiex/config.h diff --git a/keyboards/bminiex/i2c.c b/keyboards/winkeyless/bminiex/i2c.c similarity index 100% rename from keyboards/bminiex/i2c.c rename to keyboards/winkeyless/bminiex/i2c.c diff --git a/keyboards/bminiex/i2c.h b/keyboards/winkeyless/bminiex/i2c.h similarity index 100% rename from keyboards/bminiex/i2c.h rename to keyboards/winkeyless/bminiex/i2c.h diff --git a/keyboards/bminiex/info.json b/keyboards/winkeyless/bminiex/info.json similarity index 100% rename from keyboards/bminiex/info.json rename to keyboards/winkeyless/bminiex/info.json diff --git a/keyboards/bminiex/keymaps/ansi/keymap.c b/keyboards/winkeyless/bminiex/keymaps/ansi/keymap.c similarity index 100% rename from keyboards/bminiex/keymaps/ansi/keymap.c rename to keyboards/winkeyless/bminiex/keymaps/ansi/keymap.c diff --git a/keyboards/bminiex/keymaps/ansi/readme.md b/keyboards/winkeyless/bminiex/keymaps/ansi/readme.md similarity index 100% rename from keyboards/bminiex/keymaps/ansi/readme.md rename to keyboards/winkeyless/bminiex/keymaps/ansi/readme.md diff --git a/keyboards/bminiex/keymaps/default/keymap.c b/keyboards/winkeyless/bminiex/keymaps/default/keymap.c similarity index 100% rename from keyboards/bminiex/keymaps/default/keymap.c rename to keyboards/winkeyless/bminiex/keymaps/default/keymap.c diff --git a/keyboards/bminiex/keymaps/iso/keymap.c b/keyboards/winkeyless/bminiex/keymaps/iso/keymap.c similarity index 100% rename from keyboards/bminiex/keymaps/iso/keymap.c rename to keyboards/winkeyless/bminiex/keymaps/iso/keymap.c diff --git a/keyboards/bminiex/keymaps/iso/readme.md b/keyboards/winkeyless/bminiex/keymaps/iso/readme.md similarity index 100% rename from keyboards/bminiex/keymaps/iso/readme.md rename to keyboards/winkeyless/bminiex/keymaps/iso/readme.md diff --git a/keyboards/bminiex/matrix.c b/keyboards/winkeyless/bminiex/matrix.c similarity index 100% rename from keyboards/bminiex/matrix.c rename to keyboards/winkeyless/bminiex/matrix.c diff --git a/keyboards/bminiex/readme.md b/keyboards/winkeyless/bminiex/readme.md similarity index 89% rename from keyboards/bminiex/readme.md rename to keyboards/winkeyless/bminiex/readme.md index 204bcbbb1b77..7dbabedbaf3d 100644 --- a/keyboards/bminiex/readme.md +++ b/keyboards/winkeyless/bminiex/readme.md @@ -1,5 +1,4 @@ -B.mini EX -========= +# B.mini EX A compact fullsize keyboard with RGB @@ -9,6 +8,6 @@ Hardware Availability: https://winkeyless.kr/product/b-mini-ex-x2-pcb/ Make example for this keyboard (after setting up your build environment): - make bminiex:default + make winkeyless/bminiex: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 +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/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk similarity index 100% rename from keyboards/bminiex/rules.mk rename to keyboards/winkeyless/bminiex/rules.mk diff --git a/keyboards/bminiex/usbconfig.h b/keyboards/winkeyless/bminiex/usbconfig.h similarity index 100% rename from keyboards/bminiex/usbconfig.h rename to keyboards/winkeyless/bminiex/usbconfig.h diff --git a/keyboards/winkeyless/readme.md b/keyboards/winkeyless/readme.md new file mode 100644 index 000000000000..e6cb45fc4741 --- /dev/null +++ b/keyboards/winkeyless/readme.md @@ -0,0 +1,7 @@ +# Winkeyless + +[Winkeyless](https://www.winkeyless.kr) is a Korean keyboard company popular for creating the Boot Mapper Client (BMC) firmware. Most Winkeyless boards were low profile and constructed out of acrylic showcasing their RGB underglow capabilities. + +In late 2018, Winkeyless closed its doors due to the numerous unlicensed implementations of its hardware and software. + +This directory contains official Winkeyless boards that have had QMK ported to work with them. From 66a86bc50cef34dc7cabc241cf3778a323d7e6f7 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 18 Feb 2019 08:36:12 -0800 Subject: [PATCH 135/445] [Keymap] update keymap and readme for my 75% layout (#5166) --- .../community/75_ansi/mechmerlin-75_ansi/keymap.c | 12 ++++++------ .../community/75_ansi/mechmerlin-75_ansi/readme.md | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c index ec3286b09750..e7b89516263d 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c @@ -9,13 +9,13 @@ 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, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [_FL] = LAYOUT_75_ansi(\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_TOG, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) -}; \ No newline at end of file + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) +}; diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md b/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md index 12c95027032e..ab7a9b92f735 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md @@ -4,7 +4,8 @@ This is the 75% layout used by u/merlin36, host of the [MechMerlin](www.youtube. YouTube channel. It is used on his -[Duck Octagon V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/octagon/v2) +[Duck Octagon V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/duck/octagon/v2) +[XD84](https://github.com/qmk/qmk_firmware/tree/master/keyboards/xd84) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin-ansi`. From 0e68b6c1a9f5223fa1dc6b18d9204137b4edd921 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sat, 16 Feb 2019 13:57:06 +0000 Subject: [PATCH 136/445] Add UK variant of the SEND_STRING() LUTs --- quantum/keymap_extras/sendstring_uk.h | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 quantum/keymap_extras/sendstring_uk.h diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h new file mode 100644 index 000000000000..3c71f97640c0 --- /dev/null +++ b/quantum/keymap_extras/sendstring_uk.h @@ -0,0 +1,62 @@ +/* Copyright 2019 Rys Sommefeldt + * + * 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 . + */ + +/* SEND_STRING() LUTs for UK layouts */ + +#ifndef SENDSTRING_UK +#define SENDSTRING_UK + +const bool ascii_to_shift_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, KC_ESC, 0, 0, 0, 0, + + KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_QUOT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; + +#endif From 7639edb0aeea7b16f49cad9963d32b7eace9434d Mon Sep 17 00:00:00 2001 From: zwnk Date: Mon, 18 Feb 2019 13:49:11 -0300 Subject: [PATCH 137/445] [Keyboard] handwired dactyl with 2 pro micros added (#5113) * handwired dactyl with 2 pro micros added * dactyl_promicro README updated * dactyl_promicro default layout fixed * requested changes * dactyl_promicro README updated * qmk toolbox link fixed * layout reflects phys. keys positions --- keyboards/handwired/dactyl_manuform/readme.md | 16 +--- keyboards/handwired/dactyl_promicro/config.h | 83 +++++++++++++++++ .../dactyl_promicro/dactyl_promicro.c | 12 +++ .../dactyl_promicro/dactyl_promicro.h | 39 ++++++++ .../dactyl_promicro/keymaps/default/config.h | 25 +++++ .../dactyl_promicro/keymaps/default/keymap.c | 47 ++++++++++ .../dactyl_promicro/keymaps/impstyle/config.h | 25 +++++ .../dactyl_promicro/keymaps/impstyle/keymap.c | 47 ++++++++++ keyboards/handwired/dactyl_promicro/readme.md | 93 +++++++++++++++++++ keyboards/handwired/dactyl_promicro/rules.mk | 66 +++++++++++++ 10 files changed, 441 insertions(+), 12 deletions(-) create mode 100644 keyboards/handwired/dactyl_promicro/config.h create mode 100644 keyboards/handwired/dactyl_promicro/dactyl_promicro.c create mode 100644 keyboards/handwired/dactyl_promicro/dactyl_promicro.h create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/default/config.h create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c create mode 100644 keyboards/handwired/dactyl_promicro/readme.md create mode 100644 keyboards/handwired/dactyl_promicro/rules.mk diff --git a/keyboards/handwired/dactyl_manuform/readme.md b/keyboards/handwired/dactyl_manuform/readme.md index 0d08c67a08da..3221da0e9db4 100644 --- a/keyboards/handwired/dactyl_manuform/readme.md +++ b/keyboards/handwired/dactyl_manuform/readme.md @@ -131,17 +131,9 @@ file will run on both hands instead of having to flash left and right handed versions of the firmware to each half. To flash the EEPROM file for the left half run: ``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep" -// or the equivalent in dfu-programmer - -``` -and similarly for right half +make handwired/dactyl_promicro:default:dfu-split-left +make handwired/dactyl_promicro:default:dfu-split-right ``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-righthand.eep" -// or the equivalent in dfu-programmer -``` - -NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. @@ -162,6 +154,6 @@ Also, if the slave board is producing weird characters in certain columns, update the following line in `matrix.c` to the following: ``` -// _delay_us(30); // without this wait read unstable value. -_delay_us(300); // without this wait read unstable value. +// wait_us(30); // without this wait read unstable value. +wait_us(300); // without this wait read unstable value. ``` diff --git a/keyboards/handwired/dactyl_promicro/config.h b/keyboards/handwired/dactyl_promicro/config.h new file mode 100644 index 000000000000..f81b3de51959 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" +#define PRODUCT Dactyl Ergo(6x6) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +//#define MANUFACTURER tshort +// defined in subfolder +#define DESCRIPTION A split keyboard + +/* mouse config */ +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Enables This makes it easier for fast typists to use dual-function keys */ +#define PERMISSIVE_HOLD + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 12 // Number of LEDs + +/* + * 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 diff --git a/keyboards/handwired/dactyl_promicro/dactyl_promicro.c b/keyboards/handwired/dactyl_promicro/dactyl_promicro.c new file mode 100644 index 000000000000..5d708cf4805a --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/dactyl_promicro.c @@ -0,0 +1,12 @@ +#include "dactyl_promicro.h" + +#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 + +void matrix_init_kb(void) { + matrix_init_user(); +}; \ No newline at end of file diff --git a/keyboards/handwired/dactyl_promicro/dactyl_promicro.h b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h new file mode 100644 index 000000000000..5dfc42f2a94c --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h @@ -0,0 +1,39 @@ +#pragma once + +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + + +#define LAYOUT_6x6(\ + 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, \ + L55, L51, L52, R53, R54, R50, \ + L53, R52, \ + L54, R51 \ + )\ + { \ + { 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 }, \ + { KC_NO, L51, L52, L53, L54, L55 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, R54, KC_NO }, \ +} diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/config.h b/keyboards/handwired/dactyl_promicro/keymaps/default/config.h new file mode 100644 index 000000000000..ce8f3501ada5 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/config.h @@ -0,0 +1,25 @@ +/* +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 . +*/ + +#pragma once + +#define USE_SERIAL + +#define MASTER_RIGHT +// #define MASTER_RIGHT +//#define EE_HANDS +// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c new file mode 100644 index 000000000000..d396e4676289 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c @@ -0,0 +1,47 @@ + +/* A QWERTY 3 Layer layout for the Dactyl Manuform 6x6 Keyboard */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + [_QWERTY] = LAYOUT_6x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , 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_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_LSFT , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM , KC_DOT ,KC_SLSH,KC_BSLASH, + KC_PLUS , KC_LEFT,KC_UP ,KC_DOWN, KC_RGHT, RAISE , LOWER , KC_HOME, KC_PGUP, KC_PGDN,KC_END ,KC_EQL, + _______,KC_LALT,KC_PSCR, KC_LGUI, KC_SPC, KC_ENT,KC_GRAVE, KC_AT ,KC_PSCR ,_______ + + ), + + + [_LOWER] = LAYOUT_6x6( + 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_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,KC_PSCR, KC_P0 , KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +), + + [_RAISE] = LAYOUT_6x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + ), + + }; diff --git a/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h new file mode 100644 index 000000000000..ce8f3501ada5 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h @@ -0,0 +1,25 @@ +/* +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 . +*/ + +#pragma once + +#define USE_SERIAL + +#define MASTER_RIGHT +// #define MASTER_RIGHT +//#define EE_HANDS +// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c new file mode 100644 index 000000000000..d396e4676289 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c @@ -0,0 +1,47 @@ + +/* A QWERTY 3 Layer layout for the Dactyl Manuform 6x6 Keyboard */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + [_QWERTY] = LAYOUT_6x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , 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_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_LSFT , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM , KC_DOT ,KC_SLSH,KC_BSLASH, + KC_PLUS , KC_LEFT,KC_UP ,KC_DOWN, KC_RGHT, RAISE , LOWER , KC_HOME, KC_PGUP, KC_PGDN,KC_END ,KC_EQL, + _______,KC_LALT,KC_PSCR, KC_LGUI, KC_SPC, KC_ENT,KC_GRAVE, KC_AT ,KC_PSCR ,_______ + + ), + + + [_LOWER] = LAYOUT_6x6( + 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_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,KC_PSCR, KC_P0 , KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +), + + [_RAISE] = LAYOUT_6x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + ), + + }; diff --git a/keyboards/handwired/dactyl_promicro/readme.md b/keyboards/handwired/dactyl_promicro/readme.md new file mode 100644 index 000000000000..a426319b4e56 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/readme.md @@ -0,0 +1,93 @@ +# Dactyl with Arduino Pro Micro + +See https://github.com/adereth/dactyl-keyboard for the original Version. + +This Dactyl uses the Arduino Pro Mirco (2x). +Wiring is a 6x6 Matrix like the [Dactyl Manuform](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform) + + +## Build the Firmware: + + - Build the firmware with `make handwired/dactyl_promicro:`, for example `make handwired/dactyl:default` + - This will result in a hex file called `handwired_dactyl_promicro_.hex`, e.g. + `handwired_dactyl_promicro_default.hex` + +How to setup your build enviroment can be found here: [Installing Build Tools](https://docs.qmk.fm/#/getting_started_build_tools) + +## Required Hardware + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +## Optional Hardware +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +## Wiring + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +## Notes on Software Configuration + +the keymaps in here are for the 4x5 layout of the keyboard only. + +## Flashing + +To flash your firmware take a look at: [Flashing Instructions and Bootloader Information](https://docs.qmk.fm/#/flashing). + +Under Windows the most convenient way is installing the [QMK Drivers](https://github.com/qmk/qmk_driver_installer/releases) and use the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). + + +## Choosing which board to plug the USB cable into (choosing Master) + +### Setting the right or left hand as master + +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +OR + +``` + #define MASTER_LEFT +``` + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/handwired/dactyl_promicro/rules.mk b/keyboards/handwired/dactyl_promicro/rules.mk new file mode 100644 index 000000000000..a93de3685876 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/rules.mk @@ -0,0 +1,66 @@ +# MCU name +#MCU = at90usb1287 +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) + +# 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 +# +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 = no # Console for debug(+400) +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 SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes From fc069869896c279f175d2d5acf1ef545278c7102 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 18 Feb 2019 16:49:51 +0000 Subject: [PATCH 138/445] Remove CUSTOM_MATRIX option from diode direction (#5090) * Remove CUSTOM_MATRIX refs from DIODE_DIRECTION * Remove '#define DIODE_DIRECTION CUSTOM_MATRIX' * Remove CUSTOM_MATRIX refs from DIODE_DIRECTION documentation --- docs/hardware_avr.md | 2 +- keyboards/1upkeyboards/1up60hse/config.h | 2 +- keyboards/1upkeyboards/super16/config.h | 2 +- keyboards/40percentclub/25/config.h | 2 +- keyboards/40percentclub/4x4/config.h | 2 +- keyboards/40percentclub/5x5/config.h | 2 +- keyboards/40percentclub/6lit/config.h | 2 +- keyboards/40percentclub/foobar/config.h | 2 +- keyboards/40percentclub/half_n_half/config.h | 2 +- keyboards/40percentclub/i75/promicro/config.h | 2 +- keyboards/40percentclub/i75/teensy2/config.h | 2 +- keyboards/40percentclub/nori/config.h | 2 +- keyboards/40percentclub/ut47/config.h | 2 +- keyboards/412_64/config.h | 2 +- keyboards/ai03/lunar/config.h | 2 +- keyboards/al1/config.h | 2 +- keyboards/alf/dc60/config.h | 2 +- keyboards/amj96/config.h | 2 +- keyboards/baguette/config.h | 2 +- keyboards/bigswitch/keymaps/wanleg/config.h | 2 +- keyboards/blockey/config.h | 2 +- keyboards/bthlabs/geekpad/config.h | 2 +- keyboards/ckeys/handwire_101/config.h | 2 +- keyboards/ckeys/nakey/config.h | 2 +- keyboards/ckeys/obelus/config.h | 2 +- keyboards/clueboard/2x1800/config.h | 2 +- keyboards/converter/usb_usb/config.h | 2 +- keyboards/cu24/config.h | 2 +- keyboards/daisy/config.h | 2 +- keyboards/dc01/arrow/config.h | 2 +- keyboards/dc01/left/config.h | 2 +- keyboards/dc01/numpad/config.h | 2 +- keyboards/dc01/right/config.h | 2 +- keyboards/diverge3/config.h | 2 +- keyboards/divergetm2/config.h | 2 +- keyboards/duck/jetfire/config.h | 2 +- keyboards/ep/40/config.h | 2 +- keyboards/ep/96/config.h | 2 +- keyboards/fc660c/config.h | 2 +- keyboards/fc980c/config.h | 2 +- keyboards/fleuron/config.h | 2 +- keyboards/gray_studio/cod67/config.h | 2 +- keyboards/gray_studio/space65/config.h | 2 +- keyboards/h87a/config.h | 2 +- keyboards/handwired/datahand/config.h | 2 +- keyboards/handwired/downbubble/config.h | 2 +- keyboards/handwired/ibm122m/config.h | 2 +- keyboards/handwired/jn68m/config.h | 2 +- keyboards/handwired/kbod/config.h | 2 +- keyboards/handwired/prime_exl/config.h | 2 +- keyboards/handwired/terminus_mini/config.h | 2 +- keyboards/handwired/woodpad/config.h | 2 +- keyboards/hid_liber/config.h | 2 +- keyboards/hs60/v1/config.h | 2 +- keyboards/hs60/v2/config.h | 2 +- keyboards/idobo/config.h | 2 +- keyboards/katana60/config.h | 2 +- keyboards/kbdfans/kbd19x/config.h | 2 +- keyboards/kbdfans/kbd4x/config.h | 2 +- keyboards/kbdfans/kbd66/config.h | 2 +- keyboards/kbdfans/kbd67/hotswap/config.h | 2 +- keyboards/kbdfans/kbd67/rev1/config.h | 2 +- keyboards/kbdfans/kbd6x/config.h | 2 +- keyboards/kbdfans/kbd8x/config.h | 2 +- keyboards/kc60se/config.h | 2 +- keyboards/keebio/bdn9/config.h | 2 +- keyboards/kira75/config.h | 2 +- keyboards/kmac/config.h | 4 ++-- keyboards/kmini/config.h | 4 ++-- keyboards/knops/mini/config.h | 2 +- keyboards/meira/config.h | 4 ++-- keyboards/meishi/config.h | 2 +- keyboards/meme/config.h | 2 +- keyboards/miniaxe/config.h | 4 ++-- keyboards/mint60/config.h | 2 +- keyboards/mt40/config.h | 2 +- keyboards/mxss/config.h | 2 +- keyboards/namecard2x4/rev1/config.h | 2 +- keyboards/namecard2x4/rev2/config.h | 2 +- keyboards/noxary/268_2/config.h | 2 +- keyboards/noxary/x268/config.h | 2 +- keyboards/pinky/3/config.h | 2 +- keyboards/pinky/4/config.h | 2 +- keyboards/primekb/prime_l/config.h | 2 +- keyboards/primekb/prime_m/config.h | 2 +- keyboards/primekb/prime_o/config.h | 2 +- keyboards/rama/m10_b/config.h | 2 +- keyboards/rama/m6_a/config.h | 2 +- keyboards/rama/m6_b/config.h | 2 +- keyboards/rama/u80_a/config.h | 2 +- keyboards/scarletbandana/config.h | 2 +- keyboards/scrabblepad/config.h | 2 +- keyboards/sentraq/number_pad/config.h | 2 +- keyboards/sirius/unigo66/config.h | 2 +- keyboards/sixshooter/config.h | 2 +- keyboards/speedo/config.h | 2 +- keyboards/tmo50/config.h | 2 +- keyboards/treasure/type9/config.h | 2 +- keyboards/v60_type_r/config.h | 2 +- keyboards/vinta/config.h | 2 +- keyboards/westfoxtrot/cyclops/config.h | 2 +- keyboards/wilba_tech/wt60_a/config.h | 2 +- keyboards/wilba_tech/wt65_a/config.h | 2 +- keyboards/wilba_tech/wt75_a/config.h | 2 +- keyboards/wilba_tech/wt80_a/config.h | 2 +- keyboards/wilba_tech/wt8_a/config.h | 2 +- keyboards/xd75/config.h | 2 +- keyboards/xd87/config.h | 2 +- keyboards/yd68/config.h | 2 +- quantum/template/avr/config.h | 2 +- 110 files changed, 114 insertions(+), 114 deletions(-) diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 2c3652a02dbf..12a0059c3fe8 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -87,7 +87,7 @@ Once you've defined the size of your matrix you need to define which pins on you The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open. -Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`. +Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`. ```c #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 420d0a025897..188603622526 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index 1f97c6fea90b..810aa254e4ba 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 338683ee7e7b..7381a76d92e5 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -54,7 +54,7 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index 5dc780f0e7b3..3b41e501d473 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -30,7 +30,7 @@ #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN C7 diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index bf521e71e91e..f1c348a48ff5 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -30,7 +30,7 @@ #define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 6a96c4757dd5..c6beafa41221 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -55,7 +55,7 @@ #define MATRIX_COL_PINS { F6, F7, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index aba9f09ae478..1443c1ca1ddf 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -55,7 +55,7 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index 1c4298bc3894..9aa8e810dd96 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* diff --git a/keyboards/40percentclub/i75/promicro/config.h b/keyboards/40percentclub/i75/promicro/config.h index bc9146328ed7..d4cd99773622 100644 --- a/keyboards/40percentclub/i75/promicro/config.h +++ b/keyboards/40percentclub/i75/promicro/config.h @@ -36,5 +36,5 @@ #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/i75/teensy2/config.h b/keyboards/40percentclub/i75/teensy2/config.h index fdbde8d6437d..bcf9b1b888bd 100644 --- a/keyboards/40percentclub/i75/teensy2/config.h +++ b/keyboards/40percentclub/i75/teensy2/config.h @@ -36,5 +36,5 @@ #define MATRIX_COL_PINS { C6, C7, D6, D7, B5, B6, F7, F6, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index f46ca4264457..a3366de6211c 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D4, C6, D7, E6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B5 diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index 4a221ca52726..87f2bedd7371 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/412_64/config.h b/keyboards/412_64/config.h index 948ae743abfe..9cdb3fac8166 100644 --- a/keyboards/412_64/config.h +++ b/keyboards/412_64/config.h @@ -30,7 +30,7 @@ #define MATRIX_COL_PINS { B0, D2, D0, D1, D4, C6, D7, E6 } #define UNUSED_PINS { B4, B5, B6, B7, C7, F0, F1 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN C7 diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index 4b30ca3094fb..2fe66d4bce9d 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h index 3a3daf8673f0..838d56963868 100644 --- a/keyboards/al1/config.h +++ b/keyboards/al1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . * */ -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index c3e2ecb2e032..f551a3e3d163 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 2e49380ae672..866bcd526605 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . */ #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN D4 diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 0b53c653f679..1259d7055936 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, B0, D0, D1, D2, D3, D5, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/bigswitch/keymaps/wanleg/config.h b/keyboards/bigswitch/keymaps/wanleg/config.h index 8ac82f40d99f..0c6790618e8e 100644 --- a/keyboards/bigswitch/keymaps/wanleg/config.h +++ b/keyboards/bigswitch/keymaps/wanleg/config.h @@ -22,7 +22,7 @@ #undef MATRIX_COL_PINS #define MATRIX_COL_PINS { B6 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #undef DIODE_DIRECTION #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index f47849744afd..9bf64ef002ab 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, B4, C6, D7, F4, F5, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* ws2812 RGB LED */ diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index 6b03ae30a733..017bee184880 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, D0, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 106a7fd961ed..40faec066b2b 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW //#define BACKLIGHT_PIN B7 diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index cdd16015d477..cd8b1aa32939 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B0, B1, B2, B3 } #define UNUSED_PINS { D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, B4, B5, B6, B7 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index 4ef308819aca..8d3bfa3b67e5 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, B2, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h index 1b47a9d65562..62821f7663be 100644 --- a/keyboards/clueboard/2x1800/config.h +++ b/keyboards/clueboard/2x1800/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D2, D3, D4, D5, D7, E0, E1, B0, E6, B3, B2 } #define UNUSED_PINS { D0, D1, D6, C5, C6, E4, E5, E7, F0, F1, A0, A1, A2, A3, A4, A5, A6, A7 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index 1cab3c1c3c57..fdaf42eda49d 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -37,7 +37,7 @@ along with this program. If not, see . #define MATRIX_COLS 16 /* matrix scanning is done in custom_matrix.cpp */ -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* * Feature disable options diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index 351694a111fe..1de9d33cb781 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -45,7 +45,7 @@ #define MATRIX_COL_PINS { F0, F1, D0, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Backlight */ diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index 4698c216e1d1..f397d28da618 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -29,7 +29,7 @@ #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D0 diff --git a/keyboards/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h index f734d9b18968..e58967ac0855 100644 --- a/keyboards/dc01/arrow/config.h +++ b/keyboards/dc01/arrow/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, B7, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index 9a8ba1b558d6..3f51373124af 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define F_SCL 300000UL -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dc01/numpad/config.h b/keyboards/dc01/numpad/config.h index 982be66456a2..a8a24455421f 100644 --- a/keyboards/dc01/numpad/config.h +++ b/keyboards/dc01/numpad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, B7, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dc01/right/config.h b/keyboards/dc01/right/config.h index e7aea97a32f5..4933f58295e9 100644 --- a/keyboards/dc01/right/config.h +++ b/keyboards/dc01/right/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, E6, F6, F5, F4, D4, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index 27938cf239a0..aa9f52fcbd36 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL #define BACKLIGHT_PIN C6 diff --git a/keyboards/divergetm2/config.h b/keyboards/divergetm2/config.h index a5b1eaa682d7..2cdc315dea78 100644 --- a/keyboards/divergetm2/config.h +++ b/keyboards/divergetm2/config.h @@ -45,7 +45,7 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index f49a298883cb..4bc535b19260 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -31,7 +31,7 @@ along with this program. If not, see . #define MATRIX_ROWS 6 #define MATRIX_COLS 20 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/ep/40/config.h b/keyboards/ep/40/config.h index 0a2495953d6d..b7f99a3b7cbc 100644 --- a/keyboards/ep/40/config.h +++ b/keyboards/ep/40/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C7, C6, B6, B5 } #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 9438553093b6..152b04b6281b 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C7, F7, F6, F5, F4, F1, F0, E6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #endif diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index 96f04b097c1c..fe9c695174c9 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 16 -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index a6cb97756261..b46bdfd55065 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // #define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } // #define UNUSED_PINS -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index cccb798be07e..8e1d27436996 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, B6, B3, B5, B4, D7, D4, D5, D3, D2, D1, D0, B7, B0, B1, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/gray_studio/cod67/config.h b/keyboards/gray_studio/cod67/config.h index 51c695de4921..b72f47143cd0 100644 --- a/keyboards/gray_studio/cod67/config.h +++ b/keyboards/gray_studio/cod67/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D4 diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 2c05979f7cbf..e6d9f235d813 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B0, B3, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/h87a/config.h b/keyboards/h87a/config.h index a7a94a0bc9c0..90b3a509c860 100644 --- a/keyboards/h87a/config.h +++ b/keyboards/h87a/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/datahand/config.h b/keyboards/handwired/datahand/config.h index 75d8372bf709..a269775f35ee 100644 --- a/keyboards/handwired/datahand/config.h +++ b/keyboards/handwired/datahand/config.h @@ -30,7 +30,7 @@ #define MATRIX_ROWS 13 #define MATRIX_COLS 4 -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 0 diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h index 77e34ceab7fc..4b2bd92e4dc6 100644 --- a/keyboards/handwired/downbubble/config.h +++ b/keyboards/handwired/downbubble/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #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 */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index 3986f0ded6fd..1ef7be78de80 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F0, B5, B4, B3, B2, B1, B0, E7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/jn68m/config.h b/keyboards/handwired/jn68m/config.h index 9cb00172376d..f6ab4056ba17 100644 --- a/keyboards/handwired/jn68m/config.h +++ b/keyboards/handwired/jn68m/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index 8772ead3a2c9..5f02c71721e2 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index c5395dab4272..948d6312becc 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, B3, B2, D1, D2, D3, F7, F6, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index de146b225b87..e1b5daccd725 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B0, D0, D5, B6, D4, C7, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h index f4d005307b53..77be4a0d9f9b 100644 --- a/keyboards/handwired/woodpad/config.h +++ b/keyboards/handwired/woodpad/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index 849c89ce38a2..4519d8628e0c 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -35,7 +35,7 @@ #define MATRIX_COLS 8 // HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3. -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index debc6bdde601..7581e54b6195 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define QMK_ESC_OUTPUT B5 // usually COL #define QMK_ESC_INPUT B2 // usually ROW -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 6f5e0012c3e3..493a2580a626 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3 } // To enable debugger set A13 A14 -> A5 A6 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index 70b6a48063b5..122180780eb8 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D5, D3, D2, D1, D0, D4, D6, D7, B4, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h index 177a09ff4507..eb67c0b214eb 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/katana60/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 03b701b1cc98..9c5f2ba38e3f 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, F1, F4, F5, F6, F7, D7, B4, B5, D0, D1, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index cac4ed95d11d..c99fcc73fa7a 100644 --- a/keyboards/kbdfans/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index f9990c0e4fee..48262f785956 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, C7, E2, F5, F6, F4, D3, D2, D5, D0, D1, B4, D7, D6, E6, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index f54ffa1cac17..a24afd16c600 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7, C6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index 2a1e558ab324..a98687569c67 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 4a3fb881bf67..d3f1ee82cdf3 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D6, D7, B4, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index dca9b40ee052..2cae29626769 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D0, F7, F6, F5, D5, D3, D2, C7, C6, B5, F4, F1, B4, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 54e66cb31da5..66a4aa0cbe28 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define UNUSED_PINS #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F5 diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h index 23b92b6cee42..ad0ada040171 100644 --- a/keyboards/keebio/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { NO_PIN } #define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define NUMBER_OF_ENCODERS 2 diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index f4b1c7a5ce69..4f98c1df8ab7 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, F5, F4, F1, F0, E6, B3, B2, B1, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 18eb1de1f942..bea682173111 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -41,8 +41,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, B6, F0, F1, C7, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index b2ee7185e4da..7a795d49df98 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -39,8 +39,8 @@ #define MATRIX_COL_PINS { } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index a12ed2720efc..31291412768e 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/meira/config.h b/keyboards/meira/config.h index ff39f90eb727..8cbd82f01d3f 100644 --- a/keyboards/meira/config.h +++ b/keyboards/meira/config.h @@ -32,8 +32,8 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #define MATRIX_COLS 12 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION #ifdef BACKLIGHT_ENABLE #define BACKLIGHT_LEVELS 10 diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h index 6c712e2ad13c..6aa4e6b6eab8 100644 --- a/keyboards/meishi/config.h +++ b/keyboards/meishi/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index 58b53b674a17..bd3e1cf2c127 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D3, D2, B5, B6, C7, C6, C5, C4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index ae1fd448a6e8..be8ef4bafa7b 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -52,8 +52,8 @@ along with this program. If not, see . } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -//#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +////#define DIODE_DIRECTION // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index c3d5d5663e2b..eda933d3ad2c 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, B3, B1, F7, B2, B6, F6, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index f0b3b9caa33e..e268c3c1a611 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -59,7 +59,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C2, C3, C4, C5, C6, C7, D7 } /* #define UNUSED_PINS */ -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ /* #define DIODE_DIRECTION COL2ROW */ #define BACKLIGHT_PIN D2 diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 74188c943045..e3636ed519a4 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -37,7 +37,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, D6, D4, D0, C6, B6, D1, B5, D2, B4, D3, D5, B0, B2, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/namecard2x4/rev1/config.h b/keyboards/namecard2x4/rev1/config.h index fbb5cf4454d3..4c60d059df74 100644 --- a/keyboards/namecard2x4/rev1/config.h +++ b/keyboards/namecard2x4/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { E6,D7,C6,D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define RGB_DI_PIN F4 diff --git a/keyboards/namecard2x4/rev2/config.h b/keyboards/namecard2x4/rev2/config.h index 569ba8199b3c..4343dff8cf3f 100644 --- a/keyboards/namecard2x4/rev2/config.h +++ b/keyboards/namecard2x4/rev2/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7,E6,B4,B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION ROW2COL #define RGB_DI_PIN D4 diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index 2702f924b572..733c87990304 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, D0, D7, D1, D2, B4, D6, D4, D5, F1, D3, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* number of backlight levels */ diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index ac52d9fc3fe7..d2a8c3b9fd73 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, B2, D6, D0, D1, D7, D4, D5, D3, F1, D2, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h index 6de5a35d0e6a..370d2a702dde 100644 --- a/keyboards/pinky/3/config.h +++ b/keyboards/pinky/3/config.h @@ -46,7 +46,7 @@ #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h index 53c6f91b1a7f..a6beaf29d48e 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -46,7 +46,7 @@ #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 354f69c4d4b2..8451a7686b75 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index aeddcf25c981..119e20a40e52 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B3, C7, C6, D2, D1, D0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/primekb/prime_o/config.h b/keyboards/primekb/prime_o/config.h index 511d3d483498..2a35785ea0d0 100644 --- a/keyboards/primekb/prime_o/config.h +++ b/keyboards/primekb/prime_o/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, B5, C7, C6, D2, D1, D0, C2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h index 1af1f64a5064..25fd58d154dd 100644 --- a/keyboards/rama/m10_b/config.h +++ b/keyboards/rama/m10_b/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN C6 diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h index 3098a988dc46..efaf74a9329b 100644 --- a/keyboards/rama/m6_a/config.h +++ b/keyboards/rama/m6_a/config.h @@ -43,7 +43,7 @@ #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h index 5ad648c7634c..c2a225d53aaf 100644 --- a/keyboards/rama/m6_b/config.h +++ b/keyboards/rama/m6_b/config.h @@ -43,7 +43,7 @@ #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h index 0a8397c0a09b..953bf63f2310 100644 --- a/keyboards/rama/u80_a/config.h +++ b/keyboards/rama/u80_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/scarletbandana/config.h b/keyboards/scarletbandana/config.h index 58c5d4a413a0..01cf95065414 100644 --- a/keyboards/scarletbandana/config.h +++ b/keyboards/scarletbandana/config.h @@ -31,7 +31,7 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #define MATRIX_COLS 17 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/scrabblepad/config.h b/keyboards/scrabblepad/config.h index 800b9297b5df..8c23ccdabd48 100644 --- a/keyboards/scrabblepad/config.h +++ b/keyboards/scrabblepad/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D6, D7, E0, E1, B7, D2, D3, D4, C0, B4, B5, B6, F0, E6, E7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h index 0769f9f3d219..f02e537b698a 100644 --- a/keyboards/sentraq/number_pad/config.h +++ b/keyboards/sentraq/number_pad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, D5, D1, D0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/sirius/unigo66/config.h b/keyboards/sirius/unigo66/config.h index e5e45f90572a..66f7f9542f77 100644 --- a/keyboards/sirius/unigo66/config.h +++ b/keyboards/sirius/unigo66/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define MATRIX_COLS 16 /* matrix scanning is done in custom_matrix.cpp */ -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* * Feature disable options diff --git a/keyboards/sixshooter/config.h b/keyboards/sixshooter/config.h index 3c4fd96998c8..ed890d3c9076 100644 --- a/keyboards/sixshooter/config.h +++ b/keyboards/sixshooter/config.h @@ -28,7 +28,7 @@ #define MATRIX_COL_PINS { F7, F6, F1, F5, F4, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/speedo/config.h b/keyboards/speedo/config.h index 8670cceca89e..ac9d5e4f14f5 100644 --- a/keyboards/speedo/config.h +++ b/keyboards/speedo/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, D0, B7, B3, B2, B1, B0 } #define UNUSED_PINS { D5, D4, D6, D7, B4 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index 780a530263f9..3af322e9b032 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D4, F0, F1, F4, F5, F6, F7, D6, D7, B4, B5, B6, C6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* number of backlight levels */ diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index 435325f6c4ae..6115880d06fe 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D0, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL #define BACKLIGHT_PIN B5 diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 34eb128537f8..703745d56429 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F7 diff --git a/keyboards/vinta/config.h b/keyboards/vinta/config.h index 81a661f168b5..54be2a87f18e 100644 --- a/keyboards/vinta/config.h +++ b/keyboards/vinta/config.h @@ -17,7 +17,7 @@ #define MATRIX_ROW_PINS { A10, A9, B0, A7, A6 } #define MATRIX_COL_PINS { A5, A4, A3, A2, A1, A0, F1, F0, B7, B6, B5, B4, B3, A15, A14, A13 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index 65107c30a14c..b9a8fb28b140 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D3, D2, D5, D6, B6, B1, B2, B3, C6, C7, F7, F6, F4, F5, F1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 0ca896d5ec36..405685093e45 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 59c1d04a1bad..a9da35eaa599 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index a24ab246299c..8400447f0d6c 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 36f5c957468d..7bdcf7f7049f 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index 1c8522a1b50a..c4d18918330c 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F4, F1, B2, B6, F6, F7, D5, B4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h index 482edc9c1ddc..bc1f1860f921 100644 --- a/keyboards/xd75/config.h +++ b/keyboards/xd75/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F5 diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index 7af3d03579ac..4fb52be6ed90 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D0 diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 811e35c0d224..4caedb0b570c 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3, D5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 41e1aa0788f2..2409ae186cb8 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* From efef54032bddadcaf8b2a138121a6fda382b271a Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 18 Feb 2019 08:50:22 -0800 Subject: [PATCH 139/445] [Docs] Add section about EEPROM on ARM (#5070) * [Docs] Add section about EEPROM on ARM * Add Preonic firmware * Update docs/faq_build.md add hyperlink Co-Authored-By: yanfali --- docs/faq_build.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index d920d27e2a45..be26a7c581fe 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -38,16 +38,16 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` ### Serial device is not detected in bootloader mode on Linux -Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as +Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. ## Unknown Device for DFU Bootloader -If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue. +If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue. -Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. +Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. -If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUS(libusb-1.0)` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. +If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUS(libusb-1.0)` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. ## WINAVR is Obsolete It is no longer recommended and may cause some problem. @@ -102,9 +102,9 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048 ``` ## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS -This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. +This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. -The solution is to remove and reinstall all affected modules. +The solution is to remove and reinstall all affected modules. ``` brew rm avr-gcc @@ -132,3 +132,11 @@ brew uninstall --force avr-gcc brew install avr-gcc@7 brew link --force avr-gcc@7 ``` + +### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) +Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this. + +[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) can be used to force an eeprom reset. After flashing this image, flash your normal firmware again which should restore your keyboard to _normal_ working order. +[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) + +If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](feature_bootmagic.md) and keyboard info for specifics on how to do this). From 545f95c8f49b8714a2fe2d0fa0f849f305cc7ca3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 18 Feb 2019 13:51:55 +1100 Subject: [PATCH 140/445] Migrate ACTION_LAYER_TAP_TOGGLEs to TT() --- .../frosty_flake/keymaps/QFR_JM/keymap.c | 4 ++-- .../bpiphany/kitten_paw/keymaps/ickerwx/keymap.c | 6 ++---- keyboards/ergodone/keymaps/eozaki/keymap.c | 4 ---- keyboards/ergodone/keymaps/erovia/keymap.c | 8 ++------ keyboards/ergodox_ez/keymaps/blakedietz/keymap.c | 6 +----- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 4 ---- keyboards/ergodox_ez/keymaps/kou/keymap.c | 5 ----- keyboards/ergodox_ez/keymaps/profet_80/keymap.c | 6 +----- keyboards/ergodox_ez/keymaps/skug/keymap.c | 4 ---- keyboards/ergodox_ez/keymaps/smurmann/keymap.c | 4 ---- keyboards/ergodox_ez/keymaps/steno/keymap.c | 6 +----- keyboards/ergodox_ez/keymaps/vim/keymap.c | 4 ---- .../ergodox_infinity/keymaps/gordon/keymap.c | 4 ---- .../keymaps/halfkeyboard/keymap.c | 5 ----- .../ergodox_infinity/keymaps/input_club/keymap.c | 4 ---- .../keymaps/nordic_ergo/keymap.c | 4 ---- keyboards/ergodox_infinity/keymaps/rask/keymap.c | 4 ---- keyboards/ergotravel/keymaps/ckofy/keymap.c | 5 +---- keyboards/jd45/keymaps/mjt/keymap.c | 6 +++--- .../keebio/nyquist/keymaps/DivergeJM/keymap.c | 2 +- .../keebio/nyquist/keymaps/danielhklein/keymap.c | 2 +- keyboards/kinesis/keymaps/milestogo/keymap.c | 16 +++++++--------- .../thevankeyboards/minivan/keymaps/mjt/keymap.c | 3 +-- layouts/community/ergodox/333fred/keymap.c | 4 ---- layouts/community/ergodox/absenth/keymap.c | 6 +----- layouts/community/ergodox/adnw_k_o_y/keymap.c | 6 +----- layouts/community/ergodox/alexjj/keymap.c | 13 +++---------- layouts/community/ergodox/andrew_osx/keymap.c | 8 ++------ layouts/community/ergodox/bryan/keymap.c | 6 +----- layouts/community/ergodox/coderkun_neo2/keymap.c | 2 -- layouts/community/ergodox/colemak/keymap.c | 6 +----- .../community/ergodox/common_nighthawk/keymap.c | 4 ---- layouts/community/ergodox/csharp_dev/keymap.c | 4 ---- layouts/community/ergodox/dragon788/keymap.c | 8 ++------ layouts/community/ergodox/dvorak/keymap.c | 6 +----- layouts/community/ergodox/dvorak_emacs/keymap.c | 5 ----- .../ergodox/dvorak_emacs_software/keymap.c | 5 ----- .../ergodox/dvorak_intl_squisher/keymap.c | 6 +----- layouts/community/ergodox/dvorak_plover/keymap.c | 4 ---- .../ergodox/dvorak_programmer_swe/keymap.c | 6 +----- .../community/ergodox/dvorak_spanish/keymap.c | 6 +----- .../community/ergodox/dvorak_svorak_a5/keymap.c | 5 ----- layouts/community/ergodox/emacs_osx_dk/keymap.c | 4 ---- layouts/community/ergodox/french_hacker/keymap.c | 4 ---- layouts/community/ergodox/galson/keymap.c | 4 ---- .../community/ergodox/german-kinergo/keymap.c | 6 +----- layouts/community/ergodox/german-lukas/keymap.c | 4 ---- layouts/community/ergodox/german/keymap.c | 6 +----- layouts/community/ergodox/haegin/keymap.c | 4 ---- layouts/community/ergodox/italian/keymap.c | 4 ---- layouts/community/ergodox/j3rn/keymap.c | 5 ----- layouts/community/ergodox/jackhumbert/keymap.c | 4 ---- layouts/community/ergodox/jacobono/keymap.c | 6 +----- layouts/community/ergodox/jafo/keymap.c | 6 +----- layouts/community/ergodox/jgarr/keymap.c | 6 +----- layouts/community/ergodox/josh/keymap.c | 4 ---- layouts/community/ergodox/kines-ish/keymap.c | 4 ---- layouts/community/ergodox/kristian/keymap.c | 4 ---- layouts/community/ergodox/maz/keymap.c | 4 ---- layouts/community/ergodox/mclennon_osx/keymap.c | 4 ---- layouts/community/ergodox/msc/keymap.c | 4 ---- layouts/community/ergodox/naps62/keymap.c | 4 ---- layouts/community/ergodox/osx_fr/keymap.c | 6 +----- .../community/ergodox/osx_kinesis_pnut/keymap.c | 6 +----- layouts/community/ergodox/phoenix/keymap.c | 6 +----- layouts/community/ergodox/plover/keymap.c | 6 +----- .../ergodox/qwerty_code_friendly/keymap.c | 12 +++--------- .../keymap.c | 10 ++-------- .../romanzolotarev-norman-plover-osx/keymap.c | 10 ++-------- layouts/community/ergodox/siroken3/keymap.c | 6 +----- layouts/community/ergodox/sneako/keymap.c | 6 +----- .../community/ergodox/swedish-lindhe/keymap.c | 4 ---- layouts/community/ergodox/swedish/keymap.c | 6 +----- layouts/community/ergodox/swissgerman/keymap.c | 6 +----- layouts/community/ergodox/techtomas/keymap.c | 8 +------- layouts/community/ergodox/tkuichooseyou/keymap.c | 6 +----- layouts/community/ergodox/tonyabra_osx/keymap.c | 4 ---- .../twentylives_dvorak_with_hebrew/keymap.c | 4 ---- layouts/community/ergodox/twey/keymap.c | 4 ---- .../community/ergodox/workman_osx_mdw/keymap.c | 1 - .../community/ergodox/zweihander-macos/keymap.c | 4 ---- 81 files changed, 60 insertions(+), 372 deletions(-) diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c index 684987e3627a..f76b7e02c812 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c +++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c @@ -21,7 +21,7 @@ enum custom_macros { R_POINT }; - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, [1] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE @@ -120,4 +120,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c index b7675dcb7d5d..e2b56132bfbe 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c @@ -41,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \ - F(0), 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, \ + TT(MOUSE1), 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, \ F(8),KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, F(9), KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \ - F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4), F(5), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), + F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4),TT(PROG1), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), /* Layer 1: Programming Layer 1, emulating US l ayout */ [PROG1] = LAYOUT(\ KC_ESC,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ @@ -97,12 +97,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_TOGGLE(MOUSE1), // tap-toggle mouse layer (4) [1] = ACTION_FUNCTION_TAP(LCTRL_BRACKET), // tap to print [ [2] = ACTION_FUNCTION_TAP(RCTRL_BRACKET), // tap to print ] [3] = ACTION_FUNCTION_TAP(LALT_CURLY), // tap to print { [4] = ACTION_FUNCTION_TAP(RALT_CURLY), // tap to print } - [5] = ACTION_LAYER_TAP_TOGGLE(PROG1), // tap-toggle programming layer 1 [6] = ACTION_LAYER_SET_CLEAR(DEFAULT), [7] = ACTION_FUNCTION_TAP(CTRL_CLICK), [8] = ACTION_FUNCTION_TAP(LSHFT_PAREN), // tap to print ( diff --git a/keyboards/ergodone/keymaps/eozaki/keymap.c b/keyboards/ergodone/keymaps/eozaki/keymap.c index a6d17b61c29e..d29f4b763187 100644 --- a/keyboards/ergodone/keymaps/eozaki/keymap.c +++ b/keyboards/ergodone/keymaps/eozaki/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodone/keymaps/erovia/keymap.c b/keyboards/ergodone/keymaps/erovia/keymap.c index 627805afb077..697e917119ab 100644 --- a/keyboards/ergodone/keymaps/erovia/keymap.c +++ b/keyboards/ergodone/keymaps/erovia/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TT(FN), KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, KC_CAPS, KC_LGUI, KC_HOME, @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_MUTE, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_FN1, + KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, TT(FN), KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, KC_CAPS, KC_LGUI, KC_HOME, @@ -146,10 +146,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(FN) // FN1 - Momentary Layer 1 -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case VRSN: diff --git a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c index 325743b2ec02..8facc6e92562 100644 --- a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c +++ b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, MEH_T(KC_NO), KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT, - KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, KC_FN1, + KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, TT(SYMB), KC_PGDN, KC_PGUP, KC_ESC, @@ -198,10 +198,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - // MACRODOWN only works in this function const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index dd5ee2897950..0d48711ed3bb 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -348,10 +348,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - // leaving this in place for compatibilty with old keymaps cloned and re-compiled. const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/ergodox_ez/keymaps/kou/keymap.c b/keyboards/ergodox_ez/keymaps/kou/keymap.c index 6116548050d5..98fafe8ce62d 100644 --- a/keyboards/ergodox_ez/keymaps/kou/keymap.c +++ b/keyboards/ergodox_ez/keymaps/kou/keymap.c @@ -248,11 +248,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c index 984c90b1eac6..29505b641e59 100644 --- a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP,KC_3, KC_4, KC_PGDN,KC_TAB, KC_ENT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index b3696f3a980b..6f9a577f7e3a 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -192,10 +192,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c index bad8dcf5e89a..9194c041c282 100644 --- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -103,10 +103,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index 3cc008e7bc9c..d23b4447514f 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(TXBOLT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -250,10 +250,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - uint8_t chord[4] = {0,0,0,0}; uint8_t pressed_count = 0; diff --git a/keyboards/ergodox_ez/keymaps/vim/keymap.c b/keyboards/ergodox_ez/keymaps/vim/keymap.c index 9102a7a0a90e..2823a7b4eafe 100644 --- a/keyboards/ergodox_ez/keymaps/vim/keymap.c +++ b/keyboards/ergodox_ez/keymaps/vim/keymap.c @@ -153,10 +153,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case 0: diff --git a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c index f67dd13a5b1f..c321d546fb56 100644 --- a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c @@ -331,10 +331,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) }; void matrix_scan_user(void) { diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c b/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c index 8b6a0fcc7024..7f829b243e44 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c @@ -456,11 +456,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_infinity/keymaps/input_club/keymap.c b/keyboards/ergodox_infinity/keymaps/input_club/keymap.c index 45ad1f51f702..064c01c55112 100644 --- a/keyboards/ergodox_infinity/keymaps/input_club/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/input_club/keymap.c @@ -187,10 +187,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(L1) // FN1 - Momentary Layer 1 (Function) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c index f1fedb56242b..156fd2f1987d 100644 --- a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c @@ -197,10 +197,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 2 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_infinity/keymaps/rask/keymap.c b/keyboards/ergodox_infinity/keymaps/rask/keymap.c index e63e2e2cff6d..990081f2f017 100644 --- a/keyboards/ergodox_infinity/keymaps/rask/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/rask/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(FL1) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c index 24f88ba54179..691d4aa943ba 100644 --- a/keyboards/ergotravel/keymaps/ckofy/keymap.c +++ b/keyboards/ergotravel/keymaps/ckofy/keymap.c @@ -59,7 +59,7 @@ enum { #define KC_SVE LCTL(KC_S) #define KC_OSH F(F_SFT) #define KC_OCTL F(F_CTRL) -#define KC_NUMP F(F_NUMPAD) +#define KC_NUMP TT(_NUMPAD) #define KC_SHESC MT(MOD_LSFT,KC_ESC) #define KC_SHENT MT(MOD_RSFT,KC_ENT) //#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in KC_keymaps @@ -146,9 +146,6 @@ const uint16_t PROGMEM fn_actions[] = { [F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) - ,[F_NUMPAD] = ACTION_LAYER_TAP_TOGGLE(_NUMPAD) -// ,[F_LOWER] = ACTION_LAYER_TAP_TOGGLE(LOWER) // FN1 - Momentary Layer 1 (Lower) -// ,[F_RAISE] = ACTION_LAYER_TAP_TOGGLE(RAISE) // FN2 - Momentary Layer 2 (Raise) }; diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c index f806de65d962..63563d6aaab6 100644 --- a/keyboards/jd45/keymaps/mjt/keymap.c +++ b/keyboards/jd45/keymaps/mjt/keymap.c @@ -3,12 +3,14 @@ /* Mike's Layout for JD45 with backlight LEDs acting as layer indicator */ +#define KC_TT2 TT(2) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_kc( TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS, FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT, FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO), + NO, LCTL, LALT, LGUI, SPC, BSPC, APP, TT2, ESC, NO), [1] = LAYOUT_kc( GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, @@ -35,9 +37,7 @@ enum macro_id const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT), - // [1] = ACTION_LAYER_TAP_TOGGLE(1), [1] = ACTION_MACRO(M_LAYER1), - [2] = ACTION_LAYER_TAP_TOGGLE(2), [3] = ACTION_BACKLIGHT_STEP(), [4] = ACTION_BACKLIGHT_TOGGLE()}; diff --git a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c index 585fa6347e39..c0c1760cd16c 100644 --- a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c @@ -44,7 +44,7 @@ enum { }; */ // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, [2] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index 496b1afa3633..14428812f2ba 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c @@ -31,7 +31,7 @@ enum custom_keycodes { }; // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + const uint16_t PROGMEM fn_actions[] = { [0] = LT(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Backspace, [1] = LT(_RAISE, KC_BSPC), //Hold for momentary Raise layer, Tap for Space, [2] = MO(_ARROW), //Hold for momentary Arrow diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index c790e3ca3e41..f3eb24eb0579 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -50,13 +50,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, KC_GRAVE, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , - KC_FN0 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_GRAVE, KC_ESC, KC_FN4, KC_FN5, KC_LCTL,KC_LALT, KC_DEL, - KC_BSPC, KC_DEL ,KC_FN0 , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET, + KC_BSPC, KC_DEL ,TT(_MOUSE) , + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,KC_FN1 ,TT(_SYMB), KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2, _______, _______, _______, KC_ASTR, _______, _______, _______, _______, KC_PLUS, KC_MINS, _______, _______, _______, _______, KC_EQL, KC_PIPE, _______, _______, @@ -198,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_FN0,RESET, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE),RESET, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2, KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0, @@ -247,7 +247,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -264,9 +264,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_TOGGLE(_MOUSE) , [1] = ACTION_LAYER_TOGGLE(_MOUSE) , - [2] = ACTION_LAYER_TAP_TOGGLE(_SYMB) , [5]= ACTION_LAYER_TAP_KEY(_SYMB,KC_RIGHT), [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), [6]= ACTION_LAYER_TAP_KEY(_SYMB,KC_UP), diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index cf03633da4a1..10e9b9dcdf4b 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c @@ -21,7 +21,7 @@ enum planck_keycodes { }; #define FKEYS F(_FKEYS) -#define NUMSYM F(_NUMSYM) +#define NUMSYM TT(_NUMSYM) #define FKEYGRV F(_FKEYGRV) #define MACSLEEP M(5) #define PLOVER M(6) @@ -85,7 +85,6 @@ void persistant_default_layer_set(uint16_t default_layer) { const uint16_t PROGMEM fn_actions[] = { [_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB), [_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV), - [_NUMSYM] = ACTION_LAYER_TAP_TOGGLE(_NUMSYM), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/layouts/community/ergodox/333fred/keymap.c b/layouts/community/ergodox/333fred/keymap.c index b203f42c62e1..c649e88dcacd 100644 --- a/layouts/community/ergodox/333fred/keymap.c +++ b/layouts/community/ergodox/333fred/keymap.c @@ -271,10 +271,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/absenth/keymap.c b/layouts/community/ergodox/absenth/keymap.c index b9dddfb420f7..e4f1ec901a6a 100644 --- a/layouts/community/ergodox/absenth/keymap.c +++ b/layouts/community/ergodox/absenth/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/adnw_k_o_y/keymap.c b/layouts/community/ergodox/adnw_k_o_y/keymap.c index 4ff4495905c7..8a0e47026ed2 100644 --- a/layouts/community/ergodox/adnw_k_o_y/keymap.c +++ b/layouts/community/ergodox/adnw_k_o_y/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), DE_V, DE_G, DE_C, DE_L, DE_SS, DE_Z, DE_D, DE_T, DE_R, DE_N, LT(MDIA, DE_S), GUI_T(KC_F), MEH_T(KC_NO),KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_RSFT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/alexjj/keymap.c b/layouts/community/ergodox/alexjj/keymap.c index 5127b93f46f8..5f4f85cd431a 100644 --- a/layouts/community/ergodox/alexjj/keymap.c +++ b/layouts/community/ergodox/alexjj/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, ALT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_LCTRL, LCTL(KC_C), LCTL(KC_V), KC_LEFT,KC_RGHT, - KC_FN3, KC_F5, + TT(UNIC), KC_F5, KC_PGUP, KC_ENT,KC_BSPC,KC_PGDN, // right hand @@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_DOWN,KC_UP, ALL_T(KC_NO),KC_GRV, KC_RCTRL, - KC_F2, KC_FN2, + KC_F2, TT(MDIA), KC_INS, - KC_DELT,KC_FN1, KC_SPC + KC_DELT,TT(SYMB), KC_SPC ), /* Keymap 1: Symbol Layer * @@ -179,13 +179,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols) - [2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media) - [3] = ACTION_LAYER_TAP_TOGGLE(UNIC) // FN3 - Momentary Layer 3 (Unicode entry) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/andrew_osx/keymap.c b/layouts/community/ergodox/andrew_osx/keymap.c index ef37fc0329bf..8fb570bd757f 100644 --- a/layouts/community/ergodox/andrew_osx/keymap.c +++ b/layouts/community/ergodox/andrew_osx/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_QUOT, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_FN1, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TT(SYMB), CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC,KC_LGUI,KC_RPRN, // right hand KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_FN1, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + TT(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TG(1), @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/bryan/keymap.c b/layouts/community/ergodox/bryan/keymap.c index 220ae2e80375..5e74c9126291 100644 --- a/layouts/community/ergodox/bryan/keymap.c +++ b/layouts/community/ergodox/bryan/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), ALT_T(KC_APP), KC_LGUI, KC_HOME, @@ -146,10 +146,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/coderkun_neo2/keymap.c b/layouts/community/ergodox/coderkun_neo2/keymap.c index 5b1887ec532a..0c70dbb5d074 100644 --- a/layouts/community/ergodox/coderkun_neo2/keymap.c +++ b/layouts/community/ergodox/coderkun_neo2/keymap.c @@ -219,8 +219,6 @@ const uint16_t PROGMEM fn_actions[] = { [BASE] = ACTION_FUNCTION(BASE), [PMQ] = ACTION_FUNCTION(PMQ), [PMN] = ACTION_FUNCTION(PMN), - [FMU] = ACTION_LAYER_TAP_TOGGLE(FMU), - [NHL] = ACTION_LAYER_TAP_TOGGLE(NHL) }; diff --git a/layouts/community/ergodox/colemak/keymap.c b/layouts/community/ergodox/colemak/keymap.c index e9e27bcc4dfb..7330eda1404f 100644 --- a/layouts/community/ergodox/colemak/keymap.c +++ b/layouts/community/ergodox/colemak/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, LT(MDIA, KC_O), KC_QUOT, MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/common_nighthawk/keymap.c b/layouts/community/ergodox/common_nighthawk/keymap.c index e113e85d1fa6..cb13822e4e96 100644 --- a/layouts/community/ergodox/common_nighthawk/keymap.c +++ b/layouts/community/ergodox/common_nighthawk/keymap.c @@ -149,10 +149,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/csharp_dev/keymap.c b/layouts/community/ergodox/csharp_dev/keymap.c index 7996c92e083d..221389ef242d 100644 --- a/layouts/community/ergodox/csharp_dev/keymap.c +++ b/layouts/community/ergodox/csharp_dev/keymap.c @@ -118,10 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(FKEYS) // FN1 - Momentary Layer 1 -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dragon788/keymap.c b/layouts/community/ergodox/dragon788/keymap.c index ea3fe3ee5e0e..c0c2134774eb 100644 --- a/layouts/community/ergodox/dragon788/keymap.c +++ b/layouts/community/ergodox/dragon788/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_FN1, KC_GRV, KC_QUOT,KC_LEFT, LT(MDIA, KC_RGHT), + TT(SYMB), KC_GRV, KC_QUOT,KC_LEFT, LT(MDIA, KC_RGHT), KC_APP, KC_HOME, KC_END, KC_BSPC,KC_DELT,KC_LALT, @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(2), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - LT(MDIA, KC_UP), KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + LT(MDIA, KC_UP), KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_PGUP, CTL_T(KC_ESC), KC_PGDN, CTL_T(KC_TAB),KC_ENT, KC_SPC @@ -180,10 +180,6 @@ LAYOUT_ergodox( }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak/keymap.c b/layouts/community/ergodox/dvorak/keymap.c index ade89db96544..b161358c14ab 100644 --- a/layouts/community/ergodox/dvorak/keymap.c +++ b/layouts/community/ergodox/dvorak/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), KC_MINS, MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -135,10 +135,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_emacs/keymap.c b/layouts/community/ergodox/dvorak_emacs/keymap.c index fc83a1d66c15..244dfe521d00 100644 --- a/layouts/community/ergodox/dvorak_emacs/keymap.c +++ b/layouts/community/ergodox/dvorak_emacs/keymap.c @@ -117,11 +117,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) -}; - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_emacs_software/keymap.c b/layouts/community/ergodox/dvorak_emacs_software/keymap.c index 1f5681f66a37..720dcde12b37 100644 --- a/layouts/community/ergodox/dvorak_emacs_software/keymap.c +++ b/layouts/community/ergodox/dvorak_emacs_software/keymap.c @@ -118,11 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) -}; - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_intl_squisher/keymap.c b/layouts/community/ergodox/dvorak_intl_squisher/keymap.c index e1ed56f8491f..83cee0d06f55 100644 --- a/layouts/community/ergodox/dvorak_intl_squisher/keymap.c +++ b/layouts/community/ergodox/dvorak_intl_squisher/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), TG(2), KC_PSCREEN, KC_PGUP, KC_PGDN,RALT(KC_RSFT), KC_ENT @@ -136,10 +136,6 @@ LAYOUT_ergodox( // layer 0 : default ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_plover/keymap.c b/layouts/community/ergodox/dvorak_plover/keymap.c index 4d11224731e1..24746c751da6 100644 --- a/layouts/community/ergodox/dvorak_plover/keymap.c +++ b/layouts/community/ergodox/dvorak_plover/keymap.c @@ -178,10 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c index 9c66baceb239..43efc763d163 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, NO_AM, KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE, TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -203,10 +203,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_spanish/keymap.c b/layouts/community/ergodox/dvorak_spanish/keymap.c index 19dfb27f57f3..98aa638a0f60 100644 --- a/layouts/community/ergodox/dvorak_spanish/keymap.c +++ b/layouts/community/ergodox/dvorak_spanish/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ENT,KC_TAB,MT((MOD_LALT | MOD_LSFT), KC_F3), // right hand KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, - KC_FN1, KC_F, KC_G, KC_C, KC_H, KC_L, ALL_T(KC_RBRACKET), + TT(AUX), KC_F, KC_G, KC_C, KC_H, KC_L, ALL_T(KC_RBRACKET), KC_D, KC_R, KC_T, KC_N, KC_S, CTL_T(KC_QUOTE), KC_RALT, KC_B, KC_M, KC_W, KC_V, KC_Z, M(CBRACE), KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,M(CBRACK), @@ -168,10 +168,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) -}; - static uint16_t key_timer; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c index 98df73289338..b0eff652b877 100644 --- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c +++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c @@ -178,11 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/layouts/community/ergodox/emacs_osx_dk/keymap.c b/layouts/community/ergodox/emacs_osx_dk/keymap.c index 3fa14a5644a0..8f4c010afe3a 100644 --- a/layouts/community/ergodox/emacs_osx_dk/keymap.c +++ b/layouts/community/ergodox/emacs_osx_dk/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/french_hacker/keymap.c b/layouts/community/ergodox/french_hacker/keymap.c index 30bf56608d5b..731d917fd924 100644 --- a/layouts/community/ergodox/french_hacker/keymap.c +++ b/layouts/community/ergodox/french_hacker/keymap.c @@ -199,10 +199,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/galson/keymap.c b/layouts/community/ergodox/galson/keymap.c index e34500551805..2b7994b11d9b 100644 --- a/layouts/community/ergodox/galson/keymap.c +++ b/layouts/community/ergodox/galson/keymap.c @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/german-kinergo/keymap.c b/layouts/community/ergodox/german-kinergo/keymap.c index d8da953e0e90..7e1e5bf82b79 100644 --- a/layouts/community/ergodox/german-kinergo/keymap.c +++ b/layouts/community/ergodox/german-kinergo/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, // KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), // MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT, -// KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_FN1, +// KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB), // KC_LALT,CTL_T(KC_ESC), // KC_PGUP, // KC_PGDN,KC_TAB, KC_ENT @@ -162,10 +162,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/german-lukas/keymap.c b/layouts/community/ergodox/german-lukas/keymap.c index 2ad909b6c83f..e0cdf25c6e73 100644 --- a/layouts/community/ergodox/german-lukas/keymap.c +++ b/layouts/community/ergodox/german-lukas/keymap.c @@ -185,10 +185,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/german/keymap.c b/layouts/community/ergodox/german/keymap.c index 67d01fd337a4..a379b24ca38e 100644 --- a/layouts/community/ergodox/german/keymap.c +++ b/layouts/community/ergodox/german/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_FN1, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB), KC_LALT,CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/haegin/keymap.c b/layouts/community/ergodox/haegin/keymap.c index fc6ec576221e..b7e382957f83 100644 --- a/layouts/community/ergodox/haegin/keymap.c +++ b/layouts/community/ergodox/haegin/keymap.c @@ -223,10 +223,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_BSPC] = ACTION_TAP_DANCE_FN_ADVANCED (dance_backspace, dance_backspace_ended, dance_backspace_reset) }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMBOLS) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/italian/keymap.c b/layouts/community/ergodox/italian/keymap.c index 366f4c9b9863..64dd51db67c9 100644 --- a/layouts/community/ergodox/italian/keymap.c +++ b/layouts/community/ergodox/italian/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/j3rn/keymap.c b/layouts/community/ergodox/j3rn/keymap.c index 7f62a164697b..8209c9c63e82 100644 --- a/layouts/community/ergodox/j3rn/keymap.c +++ b/layouts/community/ergodox/j3rn/keymap.c @@ -138,11 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols) - [2] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN2 - Momentary Layer 2 (Media) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jackhumbert/keymap.c b/layouts/community/ergodox/jackhumbert/keymap.c index 634e4a0ceea4..745d632d0227 100644 --- a/layouts/community/ergodox/jackhumbert/keymap.c +++ b/layouts/community/ergodox/jackhumbert/keymap.c @@ -69,10 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jacobono/keymap.c b/layouts/community/ergodox/jacobono/keymap.c index c0a1c0cdb885..8d80e349ba8f 100644 --- a/layouts/community/ergodox/jacobono/keymap.c +++ b/layouts/community/ergodox/jacobono/keymap.c @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_RCTRL, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - MO(SYMB), KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + MO(SYMB), KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_RGUI, KC_ENT), @@ -224,10 +224,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_WBAK), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jafo/keymap.c b/layouts/community/ergodox/jafo/keymap.c index 081f18894fbc..08ea16d4bbee 100644 --- a/layouts/community/ergodox/jafo/keymap.c +++ b/layouts/community/ergodox/jafo/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), TG(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jgarr/keymap.c b/layouts/community/ergodox/jgarr/keymap.c index 359b2e1acf03..37524dfa0860 100644 --- a/layouts/community/ergodox/jgarr/keymap.c +++ b/layouts/community/ergodox/jgarr/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), KC_MINS, MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_EQL, - KC_LALT, KC_FN1, + KC_LALT, TT(SYMB), KC_PGUP, KC_PGDN,KC_ENT, KC_SPC ), @@ -135,10 +135,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/josh/keymap.c b/layouts/community/ergodox/josh/keymap.c index 5121fabdb002..07ee97ec8212 100644 --- a/layouts/community/ergodox/josh/keymap.c +++ b/layouts/community/ergodox/josh/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/kines-ish/keymap.c b/layouts/community/ergodox/kines-ish/keymap.c index da39b5278b11..6f0d99d8db01 100644 --- a/layouts/community/ergodox/kines-ish/keymap.c +++ b/layouts/community/ergodox/kines-ish/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/kristian/keymap.c b/layouts/community/ergodox/kristian/keymap.c index aeb3112de87c..b56e880c0e2b 100644 --- a/layouts/community/ergodox/kristian/keymap.c +++ b/layouts/community/ergodox/kristian/keymap.c @@ -21,10 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/layouts/community/ergodox/maz/keymap.c b/layouts/community/ergodox/maz/keymap.c index ad425a726c59..c36821ded24b 100644 --- a/layouts/community/ergodox/maz/keymap.c +++ b/layouts/community/ergodox/maz/keymap.c @@ -180,10 +180,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/mclennon_osx/keymap.c b/layouts/community/ergodox/mclennon_osx/keymap.c index dd37c5eef73b..aeea456ecab5 100644 --- a/layouts/community/ergodox/mclennon_osx/keymap.c +++ b/layouts/community/ergodox/mclennon_osx/keymap.c @@ -95,10 +95,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/msc/keymap.c b/layouts/community/ergodox/msc/keymap.c index 52962634193e..c64c92c9c848 100644 --- a/layouts/community/ergodox/msc/keymap.c +++ b/layouts/community/ergodox/msc/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/naps62/keymap.c b/layouts/community/ergodox/naps62/keymap.c index 481b0dd765fa..a242a14fe943 100644 --- a/layouts/community/ergodox/naps62/keymap.c +++ b/layouts/community/ergodox/naps62/keymap.c @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/osx_fr/keymap.c b/layouts/community/ergodox/osx_fr/keymap.c index f899b8b0f1b4..b1876d6a8edd 100644 --- a/layouts/community/ergodox/osx_fr/keymap.c +++ b/layouts/community/ergodox/osx_fr/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, FR_GRV, KC_H, KC_J, KC_K, KC_L, FR_M, KC_LGUI, MEH_T(KC_NO), KC_N, FR_COMM, LT(MDIA, FR_SCLN), FR_COLN, CTL_T(FR_EQL), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/osx_kinesis_pnut/keymap.c b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c index 59ffe4f3ff0f..5b731a1c006c 100644 --- a/layouts/community/ergodox/osx_kinesis_pnut/keymap.c +++ b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOTE, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), CTL_T(KC_ESC), KC_LGUI, KC_EQL, KC_TAB, KC_ENT, KC_SPC @@ -142,10 +142,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/phoenix/keymap.c b/layouts/community/ergodox/phoenix/keymap.c index 7ebdeaeb83c3..31a987b356ac 100644 --- a/layouts/community/ergodox/phoenix/keymap.c +++ b/layouts/community/ergodox/phoenix/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, + KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_ENT, KC_SPC @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/plover/keymap.c b/layouts/community/ergodox/plover/keymap.c index d3e3547299ea..9f19ab24c412 100644 --- a/layouts/community/ergodox/plover/keymap.c +++ b/layouts/community/ergodox/plover/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(3), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_ENT, KC_SPC @@ -179,10 +179,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index 43a1d1ad8084..5f4ed3c19dea 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -291,9 +291,9 @@ enum custom_keycodes { #define CFQ_KC_FN2 MO(2) #define CFQ_KC_FN3 MO(3) #else -#define CFQ_KC_FN1 KC_FN1 -#define CFQ_KC_FN2 KC_FN2 -#define CFQ_KC_FN3 KC_FN3 +#define CFQ_KC_FN1 TT(1) +#define CFQ_KC_FN2 TT(2) +#define CFQ_KC_FN3 TT(3) #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -490,12 +490,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(LAYER_KPAD), /* FN1 - Momentary Layer 1 (KeyPad) */ - [2] = ACTION_LAYER_TAP_TOGGLE(LAYER_MDIA), /* FN2 - Momentary Layer 2 (Media, Mouse) */ - [3] = ACTION_LAYER_TAP_TOGGLE(LAYER_FKEY), /* FN3 - Momentary Layer 3 (FKey's & Words) */ -}; - #define WITHOUT_MODS(...) \ do { \ uint8_t _real_mods = get_mods(); \ diff --git a/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c index 1dd956bdad53..866aa22f9349 100644 --- a/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_LALT, KC_LGUI, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_FN1, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), TT(SYMB), // /*-*/ KC_F15, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, /*-*/ KC_BSLS, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*-*/ /*-*/ /*-*/ KC_RGUI, KC_RALT, KC_F4, KC_F5, KC_F6, KC_MPLY, KC_MNXT, KC_MPRV, - KC_FN3, KC_QUOT, KC_SPC + TT(ARRW), KC_QUOT, KC_SPC ), [SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -86,12 +86,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [SYMB] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Symbols Layer - [PLVR] = ACTION_LAYER_TAP_TOGGLE(PLVR), // FN2 - Momentary Plover Layer - [ARRW] = ACTION_LAYER_TAP_TOGGLE(ARRW), // FN3 - Momentary Arrows Layer -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c index f8ae8a51d1ac..08aad4f22641 100644 --- a/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_LALT, KC_LGUI, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_FN1, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), TT(SYMB), // /*-*/ KC_F15, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, /*-*/ KC_BSLS, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*-*/ /*-*/ /*-*/ KC_RGUI, KC_RALT, KC_F4, KC_F5, KC_F6, KC_MPLY, KC_MNXT, KC_MPRV, - KC_FN3, KC_QUOT, KC_SPC + TT(ARRW), KC_QUOT, KC_SPC ), [SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -86,12 +86,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [SYMB] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Symbols Layer - [PLVR] = ACTION_LAYER_TAP_TOGGLE(PLVR), // FN2 - Momentary Plover Layer - [ARRW] = ACTION_LAYER_TAP_TOGGLE(ARRW), // FN3 - Momentary Arrows Layer -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/siroken3/keymap.c b/layouts/community/ergodox/siroken3/keymap.c index e8e12238737b..98422b440a64 100644 --- a/layouts/community/ergodox/siroken3/keymap.c +++ b/layouts/community/ergodox/siroken3/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_LANG2, KC_ENT @@ -138,10 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/sneako/keymap.c b/layouts/community/ergodox/sneako/keymap.c index 98f3469fcedd..5add317e16bb 100644 --- a/layouts/community/ergodox/sneako/keymap.c +++ b/layouts/community/ergodox/sneako/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c index a46408793afb..71ccba241484 100644 --- a/layouts/community/ergodox/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -154,10 +154,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c index 0cda8511f7cc..987f2c6afd59 100644 --- a/layouts/community/ergodox/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -75,7 +75,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), 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, + KC_UP, KC_DOWN, NO_CIRC, NO_ASTR, TT(SYMB), KC_ALGR, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -167,10 +167,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/swissgerman/keymap.c b/layouts/community/ergodox/swissgerman/keymap.c index 0288c955b5dc..b32fa4c2a421 100644 --- a/layouts/community/ergodox/swissgerman/keymap.c +++ b/layouts/community/ergodox/swissgerman/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, TT(SYMB), KC_LALT,CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -172,10 +172,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/techtomas/keymap.c b/layouts/community/ergodox/techtomas/keymap.c index 361583a0df8c..07228c4c067d 100644 --- a/layouts/community/ergodox/techtomas/keymap.c +++ b/layouts/community/ergodox/techtomas/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, MEH_T(KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(APP,KC_SCLN), ALL_T(KC_QUOT), S(KC_TAB), KC_N, KC_M, KC_COMM, KC_DOT, LT(APP,KC_SLSH), KC_RSFT, - KC_RGUI, KC_UP, KC_DOWN, KC_FN3, KC_FN1, + KC_RGUI, KC_UP, KC_DOWN, TT(CNTL), TT(SYMB), LALT(KC_LGUI), S(KC_LGUI), LT(APP,KC_PGUP), LT(SYMB,KC_PGDN), KC_ENT, KC_SPC @@ -177,12 +177,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), - [2] = ACTION_LAYER_TAP_TOGGLE(APP), - [3] = ACTION_LAYER_TAP_TOGGLE(CNTL) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/tkuichooseyou/keymap.c b/layouts/community/ergodox/tkuichooseyou/keymap.c index 0a94b5205281..4dbf8be585fe 100644 --- a/layouts/community/ergodox/tkuichooseyou/keymap.c +++ b/layouts/community/ergodox/tkuichooseyou/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH_T(KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_DELT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -135,10 +135,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/tonyabra_osx/keymap.c b/layouts/community/ergodox/tonyabra_osx/keymap.c index d0b5c5d9c12d..4f174a69de7c 100644 --- a/layouts/community/ergodox/tonyabra_osx/keymap.c +++ b/layouts/community/ergodox/tonyabra_osx/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c index 909127ad4fbb..6bca18316232 100644 --- a/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c +++ b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c @@ -173,10 +173,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/layouts/community/ergodox/twey/keymap.c b/layouts/community/ergodox/twey/keymap.c index 9ee318a5dd0e..0cc98ca77b89 100644 --- a/layouts/community/ergodox/twey/keymap.c +++ b/layouts/community/ergodox/twey/keymap.c @@ -183,10 +183,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN1 - Momentary Layer 3 (Media) -}; - // press `key`, but deactivate `layer` whilst it's held void press_without(int pressed, int key, uint8_t layer) { diff --git a/layouts/community/ergodox/workman_osx_mdw/keymap.c b/layouts/community/ergodox/workman_osx_mdw/keymap.c index d0f3882fa868..81fd3984b377 100644 --- a/layouts/community/ergodox/workman_osx_mdw/keymap.c +++ b/layouts/community/ergodox/workman_osx_mdw/keymap.c @@ -188,7 +188,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols) [2] = ACTION_LAYER_ON(BASE,0), // FN2 - Go back to the base layer [3] = ACTION_LAYER_ON(DEAD,0), [4] = ACTION_LAYER_TOGGLE(DEAD), diff --git a/layouts/community/ergodox/zweihander-macos/keymap.c b/layouts/community/ergodox/zweihander-macos/keymap.c index b4a9efb3ee00..f64808c4d27e 100644 --- a/layouts/community/ergodox/zweihander-macos/keymap.c +++ b/layouts/community/ergodox/zweihander-macos/keymap.c @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function From 1a6a2a7b75dec3b20311bc6d89923fde3222ba1c Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 18 Feb 2019 17:03:44 +0000 Subject: [PATCH 141/445] Relocate usb_detach to utils (#5121) * Relocate usb_detach to utils * Relocate usb_detach to utils - fix up files after move --- keyboards/jj40/tools/usb_detach.c | 33 ------------------- keyboards/jj4x4/tools/README.md | 16 --------- keyboards/jj4x4/tools/usb_detach.c | 33 ------------------- keyboards/ymd96/tools/README.md | 16 --------- util/usb_detach/Makefile | 18 ++++++++++ .../README.md => util/usb_detach/readme.md | 12 +++---- .../tools => util/usb_detach}/usb_detach.c | 1 + 7 files changed, 24 insertions(+), 105 deletions(-) delete mode 100644 keyboards/jj40/tools/usb_detach.c delete mode 100644 keyboards/jj4x4/tools/README.md delete mode 100644 keyboards/jj4x4/tools/usb_detach.c delete mode 100644 keyboards/ymd96/tools/README.md create mode 100644 util/usb_detach/Makefile rename keyboards/jj40/tools/README.md => util/usb_detach/readme.md (84%) rename {keyboards/ymd96/tools => util/usb_detach}/usb_detach.c (98%) diff --git a/keyboards/jj40/tools/usb_detach.c b/keyboards/jj40/tools/usb_detach.c deleted file mode 100644 index c21e47a7a439..000000000000 --- a/keyboards/jj40/tools/usb_detach.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ -#include -#include -#include -#include -#include -#include - -int main(int argc, char**argv) -{ - struct usbdevfs_ioctl command; - int ret; - int fd; - int i; - if (argc>1) { - fd = open(argv[1],O_RDWR); - if (fd<1){ - perror("unable to open file"); - return 1; - } - for (i=0;i<255;i++){ // hack: should fetch how many interface there is. - command.ifno = i; - command.ioctl_code = USBDEVFS_DISCONNECT; - command.data = NULL; - ret = ioctl(fd, USBDEVFS_IOCTL, &command); - if(ret!=-1) - printf("un claimed interface %d %d\n",i,ret); - } - } else { - printf ("usage: %s /dev/bus/usb/BUS/DEVICE\n",argv[0]); - printf("Release all interfaces of this usb device for usage in virtualisation\n"); - } -} \ No newline at end of file diff --git a/keyboards/jj4x4/tools/README.md b/keyboards/jj4x4/tools/README.md deleted file mode 100644 index 081984ed44bc..000000000000 --- a/keyboards/jj4x4/tools/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# JJ40 Tools - -## usb_detach.c - -When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. -This program can force Linux to give up a device, so that the programming script can reset it. - -### To compile: -``` -gcc usb_detach.c -o usb_detach -``` - -### To run: -1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. -2. Run the program: `sudo ./usb_detach /dev/bus/usb//`. -3. Build and program the firmware as normal. diff --git a/keyboards/jj4x4/tools/usb_detach.c b/keyboards/jj4x4/tools/usb_detach.c deleted file mode 100644 index c21e47a7a439..000000000000 --- a/keyboards/jj4x4/tools/usb_detach.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ -#include -#include -#include -#include -#include -#include - -int main(int argc, char**argv) -{ - struct usbdevfs_ioctl command; - int ret; - int fd; - int i; - if (argc>1) { - fd = open(argv[1],O_RDWR); - if (fd<1){ - perror("unable to open file"); - return 1; - } - for (i=0;i<255;i++){ // hack: should fetch how many interface there is. - command.ifno = i; - command.ioctl_code = USBDEVFS_DISCONNECT; - command.data = NULL; - ret = ioctl(fd, USBDEVFS_IOCTL, &command); - if(ret!=-1) - printf("un claimed interface %d %d\n",i,ret); - } - } else { - printf ("usage: %s /dev/bus/usb/BUS/DEVICE\n",argv[0]); - printf("Release all interfaces of this usb device for usage in virtualisation\n"); - } -} \ No newline at end of file diff --git a/keyboards/ymd96/tools/README.md b/keyboards/ymd96/tools/README.md deleted file mode 100644 index 081984ed44bc..000000000000 --- a/keyboards/ymd96/tools/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# JJ40 Tools - -## usb_detach.c - -When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. -This program can force Linux to give up a device, so that the programming script can reset it. - -### To compile: -``` -gcc usb_detach.c -o usb_detach -``` - -### To run: -1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. -2. Run the program: `sudo ./usb_detach /dev/bus/usb//`. -3. Build and program the firmware as normal. diff --git a/util/usb_detach/Makefile b/util/usb_detach/Makefile new file mode 100644 index 000000000000..533c1928f494 --- /dev/null +++ b/util/usb_detach/Makefile @@ -0,0 +1,18 @@ +# the compiler: gcc for C program, define as g++ for C++ +CC = gcc + +# compiler flags: +# -g adds debugging information to the executable file +# -Wall turns on most, but not all, compiler warnings +CFLAGS = -g -Wall + +# the build target executable: +TARGET = usb_detach + +all: $(TARGET) + +$(TARGET): $(TARGET).c + $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c + +clean: + $(RM) $(TARGET) diff --git a/keyboards/jj40/tools/README.md b/util/usb_detach/readme.md similarity index 84% rename from keyboards/jj40/tools/README.md rename to util/usb_detach/readme.md index 081984ed44bc..ac42944ee470 100644 --- a/keyboards/jj40/tools/README.md +++ b/util/usb_detach/readme.md @@ -1,16 +1,14 @@ -# JJ40 Tools - -## usb_detach.c +# usb_detach When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. This program can force Linux to give up a device, so that the programming script can reset it. -### To compile: -``` -gcc usb_detach.c -o usb_detach +## To compile: +```bash +make clean && make ``` -### To run: +## To run: 1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. 2. Run the program: `sudo ./usb_detach /dev/bus/usb//`. 3. Build and program the firmware as normal. diff --git a/keyboards/ymd96/tools/usb_detach.c b/util/usb_detach/usb_detach.c similarity index 98% rename from keyboards/ymd96/tools/usb_detach.c rename to util/usb_detach/usb_detach.c index c21e47a7a439..786ab5e674e8 100644 --- a/keyboards/ymd96/tools/usb_detach.c +++ b/util/usb_detach/usb_detach.c @@ -1,5 +1,6 @@ /* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ #include +#include #include #include #include From feee01192eacdbbdc92e76f965d6c93c695b2d2d Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 18 Feb 2019 09:53:38 -0800 Subject: [PATCH 142/445] Fix Audio Clicky by adding missing punctuation (#5171) --- quantum/process_keycode/process_clicky.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index 34c3f620b98a..12fef51f9e54 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c @@ -32,7 +32,7 @@ extern bool midi_activated; void clicky_play(void) { #ifndef NO_MUSIC_MODE - if (music_activated || midi_activated || audio_config.enable) return; + if (music_activated || midi_activated || !audio_config.enable) return; #endif // !NO_MUSIC_MODE clicky_song[0][0] = 2.0f * clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); clicky_song[1][0] = clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); From 0cee0764fd9d53d6bb835e2db2340f2541870386 Mon Sep 17 00:00:00 2001 From: upinthecloudz <46974709+upinthecloudz@users.noreply.github.com> Date: Mon, 18 Feb 2019 09:59:08 -0800 Subject: [PATCH 143/445] Fix Espectro Mac keymap and add new layout option (#4923) * Fix Espectro Mac keymap and add new layout option * Fix keymap * Fix keymap --- keyboards/espectro/espectro.h | 21 ++++++++++++++++++++- keyboards/espectro/keymaps/mac/keymap.c | 3 --- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/keyboards/espectro/espectro.h b/keyboards/espectro/espectro.h index ff58f9d97f01..98c930f8f57d 100755 --- a/keyboards/espectro/espectro.h +++ b/keyboards/espectro/espectro.h @@ -104,6 +104,25 @@ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C } \ } +// Split backspace 1.5u right mods +#define LAYOUT_split_bs_joined_right( \ + K00, K01, K02, K03, K04, K60, K61, K62, K63, K05, K06, K07, K08, K72, K09, K0A, K0B, K0C, K7C, \ + K10, K11, K12, K13, K14, K64, K65, K66, K67, K15, K16, K17, K18, K70, K71, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K68, K69, K6A, K6B, K25, K26, K27, K28, K73, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K6C, K75, K76, K77, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K42, K43, K44, K78, K79, K7A, K7B, K45, K46, K47, K48, K74, K49, K4A, K4B, K4C, \ + K50, K51, K52, K59, K55, K57, K58, K53, K54, K5A, K5B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ + { K50, K51, K52, K53, K54, K55, KC_NO, K57, K58, K59, K5A, K5B, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C }, \ +} + // Split numpad (enter, 0), split shifts (right, left), split backspace // This layout contains every possible keycode placement #define LAYOUT_split_shift_and_bs( \ @@ -121,7 +140,7 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C }, \ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C }, \ - { K71, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C }, \ } // ISO Layout diff --git a/keyboards/espectro/keymaps/mac/keymap.c b/keyboards/espectro/keymaps/mac/keymap.c index 9c03e1345fd0..9bd75d61d646 100644 --- a/keyboards/espectro/keymaps/mac/keymap.c +++ b/keyboards/espectro/keymaps/mac/keymap.c @@ -132,7 +132,6 @@ ________________________________________________________________________________ }; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { @@ -159,8 +158,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LGUI) SS_TAP(X_Q) SS_UP(X_LGUI) SS_UP(X_LALT)); return false; } - return false; } return true; }; - From 149015e799b5d5df49f7e22aa7bce8f607afdd28 Mon Sep 17 00:00:00 2001 From: Jumail Mundekkat Date: Tue, 19 Feb 2019 05:00:33 +1100 Subject: [PATCH 144/445] Fixed grep issue in bootloader build target (#3848) * Changed use of '\s' in grep to '[ \t]' for portability * Pushed DFU Keyboard.h into a shell script * Fixed execution permissions on make_dfu_header,sh --- tmk_core/avr.mk | 9 +-------- tmk_core/make_dfu_header.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100755 tmk_core/make_dfu_header.sh diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 0c3a9624cb4e..d22c3bbcadef 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -292,14 +292,7 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf bootloader: make -C lib/lufa/Bootloaders/DFU/ clean - printf "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n\n" > lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "MANUFACTURER\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s Bootloader\n" "`$(GREP) "PRODUCT\s" $(ALL_CONFIGS) -h | tail -1 | tr -d '\r'`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_ESC_OUTPUT\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_ESC_INPUT\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_LED\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_SPEAKER\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h + $(TMK_DIR)/make_dfu_header.sh $(ALL_CONFIGS) make -C lib/lufa/Bootloaders/DFU/ printf "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex\n" cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex diff --git a/tmk_core/make_dfu_header.sh b/tmk_core/make_dfu_header.sh new file mode 100755 index 000000000000..49ba66251a0a --- /dev/null +++ b/tmk_core/make_dfu_header.sh @@ -0,0 +1,16 @@ +#!/bin/sh +ALL_CONFIGS=$* +GREP="grep" + +cat <<- EOF > lib/lufa/Bootloaders/DFU/Keyboard.h +#ifndef QMK_KEYBOARD +#define QMK_KEYBOARD + +$($GREP "MANUFACTURER[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "PRODUCT[ \t]" $ALL_CONFIGS -h | tail -1 | tr -d '\r') Bootloader +$($GREP "QMK_ESC_OUTPUT[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "QMK_ESC_INPUT[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "QMK_LED[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "QMK_SPEAKER[ \t]" $ALL_CONFIGS -h | tail -1) +#endif +EOF From 100697ebab662b3c19299cf0002d77bac3f00ca6 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 18 Feb 2019 12:32:38 -0800 Subject: [PATCH 145/445] Stop all notes on startup, if there is no song and audio is disabled to prevent continouse tone (#5173) --- quantum/audio/audio_arm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index f24ce4bd0108..a3a403957045 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -317,6 +317,8 @@ void audio_init() { if (audio_config.enable) { PLAY_SONG(startup_song); + } else { + stop_all_notes(); } } From 030faf951cb99840394c56803958f249383e9362 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 19 Feb 2019 06:55:20 +0900 Subject: [PATCH 146/445] Fix `quantum/split_common/matrix.c: select_col()/select_row()` (#5174) * add temporary pdhelix(Patched Helix) code * add test code into quantum/split_common/matrix.c * add test code into keyboards/handwired/pdhelix/ * Revert "add test code into keyboards/handwired/pdhelix/" This reverts commit 9ed98f0797ddd962c99756689fc4ecb4cd067d3d. * Revert "add test code into quantum/split_common/matrix.c" This reverts commit 1876d3ed69f6c213153a9f6476192be839f16c1f. * Revert "add temporary pdhelix(Patched Helix) code" This reverts commit 41ac92b814e3f894eaf85bc3e5bb945895342fa8. * fix quantum/split_common/matrix.c: select_col()/select_row() --- quantum/split_common/matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index c3d2857ed50b..f2a277c69f3a 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -143,8 +143,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { - writePinLow(row_pins[row]); setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); } static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } @@ -188,8 +188,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { - writePinLow(col_pins[col]); setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); } static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } From 9a64c6b82ef7fc46e35f7d8c35eeccf3961ba0bf Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 19 Feb 2019 00:48:52 +0000 Subject: [PATCH 147/445] [Keyboard] XD84 fixes for caps lock led, backlight and firmware size (#5178) * Enable backlight * Enable Link Time Optimization * Enable caps lock led --- keyboards/xd84/config.h | 8 +++--- keyboards/xd84/dev.md | 6 ++++- keyboards/xd84/keymaps/default/keymap.c | 2 +- keyboards/xd84/keymaps/default_iso/keymap.c | 2 +- keyboards/xd84/rules.mk | 4 ++- keyboards/xd84/xd84.c | 29 +++++++-------------- 6 files changed, 24 insertions(+), 27 deletions(-) diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h index b2f850c184df..abb9f17a580b 100644 --- a/keyboards/xd84/config.h +++ b/keyboards/xd84/config.h @@ -47,10 +47,8 @@ /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW -// TODO: NOT WORKING - original kimera code seems to suggest B6 or C7 in backlight.c -// however tracing seems to suggest this is not true (as C7 is RGB) #define BACKLIGHT_PIN B5 -#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LEVELS 10 // #define BACKLIGHT_BREATHING #define RGB_DI_PIN C7 @@ -239,3 +237,7 @@ /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 + +// LTO options +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/xd84/dev.md b/keyboards/xd84/dev.md index 453edb366792..536b01d06ba5 100644 --- a/keyboards/xd84/dev.md +++ b/keyboards/xd84/dev.md @@ -4,6 +4,7 @@ Development docs covering the following: - Kimera core - RGB - Backlight +- Light Through Cat ## Kimera core ![Kimera core](https://gd2.alicdn.com/imgextra/i4/159916802/TB2qsIgdrJkpuFjy1zcXXa5FFXa_!!159916802.jpg) @@ -77,7 +78,10 @@ Taken from [kimera-config.json](https://github.com/kairyu/tkg/blob/master/keyboa - Number of RGB LED 7 # Backlight - TODO - not working +- PIN B6 + +# Light Through Cat + TODO - PWM C6 ## Assumptions ### Pin/Port mappings diff --git a/keyboards/xd84/keymaps/default/keymap.c b/keyboards/xd84/keymaps/default/keymap.c index 4b9cf9fd24df..b122fbddc304 100644 --- a/keyboards/xd84/keymaps/default/keymap.c +++ b/keyboards/xd84/keymaps/default/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_75_ansi( /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ diff --git a/keyboards/xd84/keymaps/default_iso/keymap.c b/keyboards/xd84/keymaps/default_iso/keymap.c index 18a0f06a8287..87b4bfeea1d4 100644 --- a/keyboards/xd84/keymaps/default_iso/keymap.c +++ b/keyboards/xd84/keymaps/default_iso/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_75_iso( /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index 0806d092ff2d..283d4babc7a7 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -70,7 +70,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode @@ -83,4 +83,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c +EXTRAFLAGS += -flto + LAYOUTS = 75_ansi 75_iso \ No newline at end of file diff --git a/keyboards/xd84/xd84.c b/keyboards/xd84/xd84.c index f7048f3252dc..eaf531421b64 100644 --- a/keyboards/xd84/xd84.c +++ b/keyboards/xd84/xd84.c @@ -15,29 +15,18 @@ */ #include "xd84.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up +void keyboard_pre_init_kb(void) { + setPinOutput(B6); - 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); + keyboard_pre_init_user(); } void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B6); + } else { + writePinHigh(B6); + } - led_set_user(usb_led); + led_set_user(usb_led); } From 33f1259f89f9d752c9507c5a2cb19a9286cf1388 Mon Sep 17 00:00:00 2001 From: mechmerlin Date: Tue, 19 Feb 2019 14:40:37 -0800 Subject: [PATCH 148/445] get doro67 led working --- keyboards/doro67/regular/regular.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/doro67/regular/regular.c b/keyboards/doro67/regular/regular.c index ad4cc279c3a3..719ceea6fe95 100644 --- a/keyboards/doro67/regular/regular.c +++ b/keyboards/doro67/regular/regular.c @@ -18,7 +18,7 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + setPinOutput(E6); matrix_init_user(); } @@ -39,9 +39,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(E6); - } else { writePinLow(E6); + } else { + writePinHigh(E6); } led_set_user(usb_led); } From ffb75b720fd0d4d28ed0ae99b66313c06df47183 Mon Sep 17 00:00:00 2001 From: mechmerlin Date: Mon, 18 Feb 2019 10:17:47 -0800 Subject: [PATCH 149/445] move sixshooter into bpiphany directory and edit readme --- keyboards/{ => bpiphany}/sixshooter/config.h | 0 keyboards/{ => bpiphany}/sixshooter/info.json | 0 .../{ => bpiphany}/sixshooter/keymaps/default/keymap.c | 0 .../{ => bpiphany}/sixshooter/keymaps/default/readme.md | 0 keyboards/{ => bpiphany}/sixshooter/readme.md | 8 ++++---- keyboards/{ => bpiphany}/sixshooter/rules.mk | 0 keyboards/{ => bpiphany}/sixshooter/sixshooter.c | 0 keyboards/{ => bpiphany}/sixshooter/sixshooter.h | 0 8 files changed, 4 insertions(+), 4 deletions(-) rename keyboards/{ => bpiphany}/sixshooter/config.h (100%) rename keyboards/{ => bpiphany}/sixshooter/info.json (100%) rename keyboards/{ => bpiphany}/sixshooter/keymaps/default/keymap.c (100%) rename keyboards/{ => bpiphany}/sixshooter/keymaps/default/readme.md (100%) rename keyboards/{ => bpiphany}/sixshooter/readme.md (51%) rename keyboards/{ => bpiphany}/sixshooter/rules.mk (100%) rename keyboards/{ => bpiphany}/sixshooter/sixshooter.c (100%) rename keyboards/{ => bpiphany}/sixshooter/sixshooter.h (100%) diff --git a/keyboards/sixshooter/config.h b/keyboards/bpiphany/sixshooter/config.h similarity index 100% rename from keyboards/sixshooter/config.h rename to keyboards/bpiphany/sixshooter/config.h diff --git a/keyboards/sixshooter/info.json b/keyboards/bpiphany/sixshooter/info.json similarity index 100% rename from keyboards/sixshooter/info.json rename to keyboards/bpiphany/sixshooter/info.json diff --git a/keyboards/sixshooter/keymaps/default/keymap.c b/keyboards/bpiphany/sixshooter/keymaps/default/keymap.c similarity index 100% rename from keyboards/sixshooter/keymaps/default/keymap.c rename to keyboards/bpiphany/sixshooter/keymaps/default/keymap.c diff --git a/keyboards/sixshooter/keymaps/default/readme.md b/keyboards/bpiphany/sixshooter/keymaps/default/readme.md similarity index 100% rename from keyboards/sixshooter/keymaps/default/readme.md rename to keyboards/bpiphany/sixshooter/keymaps/default/readme.md diff --git a/keyboards/sixshooter/readme.md b/keyboards/bpiphany/sixshooter/readme.md similarity index 51% rename from keyboards/sixshooter/readme.md rename to keyboards/bpiphany/sixshooter/readme.md index 1fcf26a51094..f5d92600348b 100644 --- a/keyboards/sixshooter/readme.md +++ b/keyboards/bpiphany/sixshooter/readme.md @@ -2,12 +2,12 @@ A PCB for the CM Storm switch tester utilizing a Teensy 2.0 designed by Bpiphany. Because the PCB was designed with individual pins for each LED, there are custom keycodes (`SS_LON` and `SS_LOFF`) for turning on and off the backlight LEDs. -Keyboard Maintainer: QMK Community\ -Hardware Supported: Six Shooter PCB, Teensy 2.0\ +Keyboard Maintainer: QMK Community +Hardware Supported: Six Shooter PCB, Teensy 2.0 Hardware Availability: [GeekHack.org](https://geekhack.org/index.php?topic=70033.0) Make example for this keyboard (after setting up your build environment): - make sixshooter:default + make bpiphany/sixshooter:default -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. +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/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk similarity index 100% rename from keyboards/sixshooter/rules.mk rename to keyboards/bpiphany/sixshooter/rules.mk diff --git a/keyboards/sixshooter/sixshooter.c b/keyboards/bpiphany/sixshooter/sixshooter.c similarity index 100% rename from keyboards/sixshooter/sixshooter.c rename to keyboards/bpiphany/sixshooter/sixshooter.c diff --git a/keyboards/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h similarity index 100% rename from keyboards/sixshooter/sixshooter.h rename to keyboards/bpiphany/sixshooter/sixshooter.h From 8ae83b490eb3f8ebc696c9531dff49bdfecd26ed Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 20 Feb 2019 05:49:22 +0100 Subject: [PATCH 150/445] [Docs] Fix typo in RGB Matrix Driver configuration (#5182) * Fix #3797 firmware not compiling If DRIVER_COUNT 1 firmware will not compile. * Fix typo --- docs/feature_rgb_matrix.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index e955eb26f7e7..910a70469125 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -67,7 +67,7 @@ Configure the hardware via your `config.h`: #define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - #define DRIVER_COUNT 1 + #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 64 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL @@ -102,8 +102,8 @@ From this point forward the configuration is the same for all the drivers. The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: - x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION - y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION + x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION + y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION Where all variables are decimels/floats. From 67495ae24a98a2d7965ba5dda9b1d133caf606ca Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:57:15 -0800 Subject: [PATCH 151/445] [Keyboard] Alf X1.1 QMK Support (#5189) * initial commit * get rid of vanilla cookie cutter code and replace with more correct info * edit config file for pins and switch matrix size * turn on bootmagic lite, and backlight/rgb settings * copy pasta switch matrix from noroads tool * create an appropriate keymap (copy pasta) * disable some features to decrease firmware file size * add qmk configurator support * add in support for caps lock, scroll lock, and num lock leds --- keyboards/alf/x11/config.h | 245 ++++++++++++++++++++ keyboards/alf/x11/info.json | 103 ++++++++ keyboards/alf/x11/keymaps/default/config.h | 19 ++ keyboards/alf/x11/keymaps/default/keymap.c | 78 +++++++ keyboards/alf/x11/keymaps/default/readme.md | 1 + keyboards/alf/x11/readme.md | 13 ++ keyboards/alf/x11/rules.mk | 82 +++++++ keyboards/alf/x11/x11.c | 63 +++++ keyboards/alf/x11/x11.h | 43 ++++ 9 files changed, 647 insertions(+) create mode 100644 keyboards/alf/x11/config.h create mode 100644 keyboards/alf/x11/info.json create mode 100644 keyboards/alf/x11/keymaps/default/config.h create mode 100644 keyboards/alf/x11/keymaps/default/keymap.c create mode 100644 keyboards/alf/x11/keymaps/default/readme.md create mode 100644 keyboards/alf/x11/readme.md create mode 100644 keyboards/alf/x11/rules.mk create mode 100644 keyboards/alf/x11/x11.c create mode 100644 keyboards/alf/x11/x11.h diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h new file mode 100644 index 000000000000..14c97247b525 --- /dev/null +++ b/keyboards/alf/x11/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alf +#define PRODUCT x11 +#define DESCRIPTION A TKL custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 13 + +/* + * 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 { B0, B1, B2, B3, B4, B5, B6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 28 + #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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/alf/x11/info.json b/keyboards/alf/x11/info.json new file mode 100644 index 000000000000..ca794f56ce7a --- /dev/null +++ b/keyboards/alf/x11/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "QMK80", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "key_count": 88, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":2, "y":0}, + {"label":"K02", "x":3, "y":0}, + {"label":"K03", "x":4, "y":0}, + {"label":"K04", "x":5, "y":0}, + {"label":"K05", "x":6.5, "y":0}, + {"label":"K06", "x":7.5, "y":0}, + {"label":"K07", "x":8.5, "y":0}, + {"label":"K08", "x":9.5, "y":0}, + {"label":"K09", "x":11, "y":0}, + {"label":"K0A", "x":12, "y":0}, + {"label":"K0B", "x":13, "y":0}, + {"label":"K0C", "x":14, "y":0}, + {"label":"K60", "x":15.25, "y":0}, + {"label":"K61", "x":16.25, "y":0}, + {"label":"K62", "x":17.25, "y":0}, + {"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":7, "y":1.5}, + {"label":"K18", "x":8, "y":1.5}, + {"label":"K19", "x":9, "y":1.5}, + {"label":"K1A", "x":10, "y":1.5}, + {"label":"K1B", "x":11, "y":1.5}, + {"label":"K1C", "x":12, "y":1.5}, + {"label":"K5A", "x":13, "y":1.5, "w":2}, + {"label":"K63", "x":15.25, "y":1.5}, + {"label":"K65", "x":16.25, "y":1.5}, + {"label":"K67", "x":17.25, "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":6.5, "y":2.5}, + {"label":"K27", "x":7.5, "y":2.5}, + {"label":"K28", "x":8.5, "y":2.5}, + {"label":"K29", "x":9.5, "y":2.5}, + {"label":"K2A", "x":10.5, "y":2.5}, + {"label":"K2B", "x":11.5, "y":2.5}, + {"label":"K2C", "x":12.5, "y":2.5}, + {"label":"K4C", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K64", "x":15.25, "y":2.5}, + {"label":"K66", "x":16.25, "y":2.5}, + {"label":"K68", "x":17.25, "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":6.75, "y":3.5}, + {"label":"K37", "x":7.75, "y":3.5}, + {"label":"K38", "x":8.75, "y":3.5}, + {"label":"K39", "x":9.75, "y":3.5}, + {"label":"K3A", "x":10.75, "y":3.5}, + {"label":"K3B", "x":11.75, "y":3.5}, + {"label":"K3C", "x":12.75, "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.25, "y":4.5}, + {"label":"K47", "x":8.25, "y":4.5}, + {"label":"K48", "x":9.25, "y":4.5}, + {"label":"K49", "x":10.25, "y":4.5}, + {"label":"K4A", "x":11.25, "y":4.5}, + {"label":"K4B", "x":12.25, "y":4.5, "w":1.75}, + {"label":"K69", "x":14, "y":4.5}, + {"label":"K58", "x":16.25, "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":6.25}, + {"label":"K54", "x":10, "y":5.5, "w":1.25}, + {"label":"K55", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K56", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K57", "x":13.75, "y":5.5, "w":1.25}, + {"label":"K6A", "x":15.25, "y":5.5}, + {"label":"K59", "x":16.25, "y":5.5}, + {"label":"K6B", "x":17.25, "y":5.5} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/alf/x11/keymaps/default/config.h b/keyboards/alf/x11/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/alf/x11/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/alf/x11/keymaps/default/keymap.c b/keyboards/alf/x11/keymaps/default/keymap.c new file mode 100644 index 000000000000..cd97dd0a2b4d --- /dev/null +++ b/keyboards/alf/x11/keymaps/default/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2019 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_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_RSFT, MO(1), KC_UP, KC_LCTL, \ + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPLY, KC_MSTP, RGB_TOG, RGB_MOD, \ + 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, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_VAD, RGB_SAD \ + ), + +}; + +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/alf/x11/keymaps/default/readme.md b/keyboards/alf/x11/keymaps/default/readme.md new file mode 100644 index 000000000000..a08c59173fe6 --- /dev/null +++ b/keyboards/alf/x11/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for x11 diff --git a/keyboards/alf/x11/readme.md b/keyboards/alf/x11/readme.md new file mode 100644 index 000000000000..b403a0952a47 --- /dev/null +++ b/keyboards/alf/x11/readme.md @@ -0,0 +1,13 @@ +# Alf X1.1 + +TKL Keyboard made by Alf + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Alf X1.1 PCB +Hardware Availability: [Massdrop](https://www.massdrop.com/buy/alf-studio-x1-1-custom-mechanical-keyboard-kit) + +Make example for this keyboard (after setting up your build environment): + + make alf/x11: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/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk new file mode 100644 index 000000000000..180c60a4a4ec --- /dev/null +++ b/keyboards/alf/x11/rules.mk @@ -0,0 +1,82 @@ +# 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 = lite # 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 +# 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # 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) +EXTRAFLAGS += -flto diff --git a/keyboards/alf/x11/x11.c b/keyboards/alf/x11/x11.c new file mode 100644 index 000000000000..b91de016e281 --- /dev/null +++ b/keyboards/alf/x11/x11.c @@ -0,0 +1,63 @@ +/* Copyright 2019 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 "x11.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(C6); + setPinOutput(E6); + setPinOutput(C7); + 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 + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + led_set_user(usb_led); +} diff --git a/keyboards/alf/x11/x11.h b/keyboards/alf/x11/x11.h new file mode 100644 index 000000000000..53f3a3e34d1d --- /dev/null +++ b/keyboards/alf/x11/x11.h @@ -0,0 +1,43 @@ +/* Copyright 2019 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 . + */ +#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( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K60, K61, K62, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K69, K58, \ + K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \ +} From b6e1e6aeeb2e2affce36a302ae0e14c07c8772c8 Mon Sep 17 00:00:00 2001 From: tw1t611 Date: Wed, 20 Feb 2019 17:33:53 +0100 Subject: [PATCH 152/445] [Keymap] Add kinesis layout. (#5183) * Add kinesis layout. * Remove unneeded code. --- keyboards/kinesis/keymaps/tw1t611/config.h | 3 + keyboards/kinesis/keymaps/tw1t611/keymap.c | 64 +++++++++++++++++++++ keyboards/kinesis/keymaps/tw1t611/readme.md | 1 + keyboards/kinesis/keymaps/tw1t611/rules.mk | 18 ++++++ 4 files changed, 86 insertions(+) create mode 100644 keyboards/kinesis/keymaps/tw1t611/config.h create mode 100644 keyboards/kinesis/keymaps/tw1t611/keymap.c create mode 100644 keyboards/kinesis/keymaps/tw1t611/readme.md create mode 100644 keyboards/kinesis/keymaps/tw1t611/rules.mk diff --git a/keyboards/kinesis/keymaps/tw1t611/config.h b/keyboards/kinesis/keymaps/tw1t611/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c new file mode 100644 index 000000000000..ceb9d5e7d0be --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c @@ -0,0 +1,64 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +#define QWERTZ 0 +#define MOD 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[QWERTZ] = LAYOUT( + _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, + _______,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , + KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + DE_HASH,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , + DE_TILD,DE_PIPE,DE_BSLS,DE_GRV, + KC_RCTL,KC_LALT, + KC_HOME, + KC_LSFT,MO(MOD),KC_BSPC , + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET, + KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_AUDIO_MUTE, + KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_EQL , + KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_QUOT, + KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_PLUS, + DE_AE ,DE_OE, DE_UE, DE_SS, + KC_LGUI,KC_LCTL, + KC_END , + KC_DEL,KC_ENTER ,KC_SPC + ), +[MOD] = LAYOUT( + _______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,DE_AT ,DE_EURO,DE_LBRC,DE_RBRC,_______, + _______,DE_EXLM,DE_DLR ,DE_LPRN,DE_RPRN,_______, + _______,DE_CIRC,DE_AMPR,DE_LCBR,DE_RCBR,_______, + _______,_______,DE_LESS,DE_MORE, + _______,_______, + _______, + _______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,KC_PGDOWN,KC_PGUP,_______,_______,DE_PERC, + KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QST ,DE_DQOT, + _______,_______,DE_SCLN,DE_COLN,DE_UNDS,DE_ASTR, + _______,_______,_______,_______, + _______,_______, + _______, + _______,_______ ,_______ + ) +}; + +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/kinesis/keymaps/tw1t611/readme.md b/keyboards/kinesis/keymaps/tw1t611/readme.md new file mode 100644 index 000000000000..da033be1e950 --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/readme.md @@ -0,0 +1 @@ +# The default keymap for kinesis-advantage diff --git a/keyboards/kinesis/keymaps/tw1t611/rules.mk b/keyboards/kinesis/keymaps/tw1t611/rules.mk new file mode 100644 index 000000000000..7a331cd530cf --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/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 = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # 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 = 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. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + From eb7a821c5bc345ea64a1eb08c19b852516ba4696 Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Wed, 20 Feb 2019 11:45:36 -0800 Subject: [PATCH 153/445] Markdown cleanup on Config Options doc Descriptions for B5_AUDIO, B6_AUDIO, and B7_AUDIO under Hardware Options were partially italicized when parsed by Docsify, though rendered as intended by GitHub. --- docs/config_options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 5e2de6d04861..8fa6e944f067 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -68,11 +68,11 @@ This is a C header file that is one of the first things included, and will persi * `#define C6_AUDIO` * enables audio on pin C6 * `#define B5_AUDIO` - * enables audio on pin B5 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) + * enables audio on pin B5 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define B6_AUDIO` - * enables audio on pin B6 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) + * enables audio on pin B6 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define B7_AUDIO` - * enables audio on pin B7 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) + * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define BACKLIGHT_PIN B7` * pin of the backlight - B5, B6, B7 use PWM, others use softPWM * `#define BACKLIGHT_LEVELS 3` From 657b44cb7cc445575d1f506a78cebd4aa59787e6 Mon Sep 17 00:00:00 2001 From: Hannes Hornwall Date: Wed, 20 Feb 2019 21:48:46 +0100 Subject: [PATCH 154/445] Make escape work after changing the backlight settings on the HS60 V2 (#5193) --- keyboards/hs60/v2/config.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 493a2580a626..b0c56adf8916 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -130,10 +130,10 @@ along with this program. If not, see . // 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 +// Dynamic keymap starts after backlight config (35+32) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 67 #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 +// Dynamic macro starts after dynamic keymaps (67+(4*5*14*2)) = (67+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 627 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 From de0fb39403e8dbf8c94937c91768debf3c570b62 Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Thu, 21 Feb 2019 09:46:30 +1100 Subject: [PATCH 155/445] Reduce tetris firmware size by disabling default audio (#5197) --- keyboards/tetris/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk index 4741c162bda0..64c434554340 100644 --- a/keyboards/tetris/rules.mk +++ b/keyboards/tetris/rules.mk @@ -52,7 +52,7 @@ 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 = yes +AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = no From 9f1d781fcb7129a07e671a46461e501e3f1ae59d Mon Sep 17 00:00:00 2001 From: Johannes Jansson Date: Thu, 21 Feb 2019 02:27:27 +0100 Subject: [PATCH 156/445] Updated hand wiring docs (#5198) * renamed KEYMAP to LAYOUT in hand wiring docs * added two additional guides for hand wiring --- docs/hand_wire.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 1cbc16dfea82..ba2eee7125fe 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -185,6 +185,13 @@ When you're done with the columns, start with the rows in the same process, from As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain! +## Additional guides + +If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful: + +- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050) +- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0) + # Getting Some Basic Firmware Set Up From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. @@ -231,10 +238,10 @@ This can be described by saying the top row is 3 1u keys, and the bottom row is └─────┴─────┘ ``` -The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this: +The middle column is unused on the bottom row in this example. Our `LAYOUT` definition would look like this: ``` - #define KEYMAP( \ + #define LAYOUT( \ k00, k01, k02, \ k10, k11, \ ) \ @@ -256,10 +263,10 @@ Let's say that instead, we wired our keyboard like this (a fair thing to do): └─────┴─────┘ ``` -This would require our `KEYMAP` definition to look like this: +This would require our `LAYOUT` definition to look like this: ``` - #define KEYMAP( \ + #define LAYOUT( \ k00, k01, k02, \ k10, k11, \ ) \ @@ -269,7 +276,7 @@ This would require our `KEYMAP` definition to look like this: } ``` -Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. +Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `LAYOUT` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. ### `keymaps//default.c` @@ -291,7 +298,7 @@ This can be accomplished by using the following `keymaps` definition: ``` const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( /* Base */ + [0] = LAYOUT( /* Base */ KC_A, KC_1, KC_H, \ KC_TAB, KC_SPC \ ), @@ -300,7 +307,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file. -It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. +It's also important to use the `LAYOUT` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. ## Compiling Your Firmware From c1c5922aae7b60b7c7d13d3769350eed9dda17ab Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Fri, 22 Feb 2019 02:22:46 +1100 Subject: [PATCH 157/445] Velocikey: Match RGB animation speed to typing speed (#3754) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Experimental LED support (untested) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Added documentation * Renamed feature to velocikey * Reverted readme to original state * Correct the readme title * Updated feature name in the docs * Update EECONFIG name * Add compile-time toggles for velocikey * Update feature documentation * Revert "Merge branch 'led-support' into master" This reverts commit e123ff5febf61639b9a9020748e1c2e2313460ff, reversing changes made to df111a55b9d4929182e16108b1c0ead15b16df97. * Move velocikey EECONFIG definition to depend on VELOCIKEY_ENABLE * Rename decay_task function to decelerate * Apply suggestions from code review Co-Authored-By: chrislewisdev * Re-order eeconfig definitions * Apply coding conventions * Apply #ifdef check in lufa.c * Refactored interval time checks into one functionc * Small rename * Fix unused function error for layouts not using all rgb effects * Only update EEPROM if Velocikey is enabled * Incorporate code review feedback * Small adjustment to top-end decay rate * Add Velocikey documentation to table of contents * Bring tetris:default keymap size down by disabling audio --- common_features.mk | 5 +++++ docs/_summary.md | 1 + docs/feature_velocikey.md | 30 +++++++++++++++++++++++++ quantum/quantum.c | 17 +++++++++++++- quantum/quantum_keycodes.h | 3 +++ quantum/rgblight.c | 40 ++++++++++++++++++++++++++++----- quantum/velocikey.c | 46 ++++++++++++++++++++++++++++++++++++++ quantum/velocikey.h | 13 +++++++++++ tmk_core/common/eeconfig.c | 1 + tmk_core/common/eeconfig.h | 1 + tmk_core/common/keyboard.c | 7 ++++++ 11 files changed, 158 insertions(+), 6 deletions(-) create mode 100644 docs/feature_velocikey.md create mode 100644 quantum/velocikey.c create mode 100644 quantum/velocikey.h diff --git a/common_features.mk b/common_features.mk index 3d3b8506e40e..f5bef3d5dd68 100644 --- a/common_features.mk +++ b/common_features.mk @@ -266,6 +266,11 @@ ifeq ($(strip $(HD44780_ENABLE)), yes) OPT_DEFS += -DHD44780_ENABLE endif +ifeq ($(strip $(VELOCIKEY_ENABLE)), yes) + OPT_DEFS += -DVELOCIKEY_ENABLE + SRC += $(QUANTUM_DIR)/velocikey.c +endif + ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE SRC += $(QUANTUM_DIR)/dynamic_keymap.c diff --git a/docs/_summary.md b/docs/_summary.md index 6bc747189663..09ea9e6e7967 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -76,6 +76,7 @@ * [Thermal Printer](feature_thermal_printer.md) * [Unicode](feature_unicode.md) * [Userspace](feature_userspace.md) + * [Velocikey](feature_velocikey.md) * For Makers and Modders * [Hand Wiring Guide](hand_wire.md) diff --git a/docs/feature_velocikey.md b/docs/feature_velocikey.md new file mode 100644 index 000000000000..5d98410735bc --- /dev/null +++ b/docs/feature_velocikey.md @@ -0,0 +1,30 @@ +# Velocikey + +Velocikey is a feature that lets you control the speed of lighting effects (like the Rainbow Swirl effect) with the speed of your typing. The faster you type, the faster the lights will go! + +## Usage +For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.: + +``` +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +STENO_ENABLE = no +EXTRAKEY_ENABLE = yes +VELOCIKEY_ENABLE = yes +``` + +Then, while using your keyboard, you need to also turn it on with the VLK_TOG keycode, which toggles the feature on and off. + +The following light effects will all be controlled by Velocikey when it is enabled: + - RGB Breathing + - RGB Rainbow Mood + - RGB Rainbow Swirl + - RGB Snake + - RGB Knight + +Support for LED breathing effects is planned but not available yet. + + As long as Velocikey is enabled, it will control the speed regardless of any other speed setting that your RGB lights are currently on. + + ## Configuration + Velocikey doesn't currently support any configuration via keyboard settings. If you want to adjust something like the speed increase or decay rate, you would need to edit `velocikey.c` and adjust the values there to achieve the kinds of speeds that you like. diff --git a/quantum/quantum.c b/quantum/quantum.c index cb4d5ee806fc..46d404029f8b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -47,6 +47,10 @@ extern backlight_config_t backlight_config; #include "process_midi.h" #endif +#ifdef VELOCIKEY_ENABLE +#include "velocikey.h" +#endif + #ifdef HAPTIC_ENABLE #include "haptic.h" #endif @@ -251,6 +255,10 @@ bool process_record_quantum(keyrecord_t *record) { // return false; // } + #ifdef VELOCIKEY_ENABLE + if (velocikey_enabled() && record->event.pressed) { velocikey_accelerate(); } + #endif + #ifdef TAP_DANCE_ENABLE preprocess_tap_dance(keycode, record); #endif @@ -568,7 +576,14 @@ bool process_record_quantum(keyrecord_t *record) { #endif return false; #endif // defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - #ifdef PROTOCOL_LUFA + #ifdef VELOCIKEY_ENABLE + case VLK_TOG: + if (record->event.pressed) { + velocikey_toggle(); + } + return false; + #endif + #ifdef PROTOCOL_LUFA case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 00c84cbf537c..1ced6ae37e54 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -422,6 +422,9 @@ enum quantum_keycodes { RGB_MODE_GRADIENT, RGB_MODE_RGBTEST, + //Momentum matching toggle + VLK_TOG, + // Left shift, open paren KC_LSPO, diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 45d521786e4b..57de56df7007 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -30,6 +30,9 @@ #include "rgblight.h" #include "debug.h" #include "led_tables.h" +#ifdef VELOCIKEY_ENABLE + #include "velocikey.h" +#endif #define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_ ## sym, #define _RGBM_SINGLE_DYNAMIC(sym) @@ -607,6 +610,19 @@ void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); } +#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \ + || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) + +static uint8_t get_interval_time(const uint8_t* default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) { + return +#ifdef VELOCIKEY_ENABLE + velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) : +#endif + pgm_read_byte(default_interval_address); +} + +#endif + void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) { if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { return; } @@ -707,6 +723,7 @@ void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { } void rgblight_task(void) { + if (rgblight_timer_enabled) { // static light mode, do nothing here if ( 1 == 0 ) { //dummy @@ -778,7 +795,9 @@ void rgblight_effect_breathing(uint8_t interval) { static uint16_t last_timer = 0; float val; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_BREATHING_INTERVALS[interval])) { + uint8_t interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2], 1, 100); + + if (timer_elapsed(last_timer) < interval_time) { return; } last_timer = timer_read(); @@ -798,7 +817,9 @@ void rgblight_effect_rainbow_mood(uint8_t interval) { static uint16_t current_hue = 0; static uint16_t last_timer = 0; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_MOOD_INTERVALS[interval])) { + uint8_t interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[interval], 5, 100); + + if (timer_elapsed(last_timer) < interval_time) { return; } last_timer = timer_read(); @@ -820,7 +841,10 @@ void rgblight_effect_rainbow_swirl(uint8_t interval) { static uint16_t last_timer = 0; uint16_t hue; uint8_t i; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2])) { + + uint8_t interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2], 1, 100); + + if (timer_elapsed(last_timer) < interval_time) { return; } last_timer = timer_read(); @@ -855,7 +879,10 @@ void rgblight_effect_snake(uint8_t interval) { if (interval % 2) { increment = -1; } - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_SNAKE_INTERVALS[interval / 2])) { + + uint8_t interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[interval / 2], 1, 200); + + if (timer_elapsed(last_timer) < interval_time) { return; } last_timer = timer_read(); @@ -892,7 +919,10 @@ const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; void rgblight_effect_knight(uint8_t interval) { static uint16_t last_timer = 0; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_KNIGHT_INTERVALS[interval])) { + + uint8_t interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[interval], 5, 100); + + if (timer_elapsed(last_timer) < interval_time) { return; } last_timer = timer_read(); diff --git a/quantum/velocikey.c b/quantum/velocikey.c new file mode 100644 index 000000000000..550c3b70a647 --- /dev/null +++ b/quantum/velocikey.c @@ -0,0 +1,46 @@ +#include "velocikey.h" +#include "timer.h" +#include "eeconfig.h" +#include "eeprom.h" + +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + +#define TYPING_SPEED_MAX_VALUE 200 +uint8_t typing_speed = 0; + +bool velocikey_enabled(void) { + return eeprom_read_byte(EECONFIG_VELOCIKEY) == 1; +} + +void velocikey_toggle(void) { + if (velocikey_enabled()) + eeprom_update_byte(EECONFIG_VELOCIKEY, 0); + else + eeprom_update_byte(EECONFIG_VELOCIKEY, 1); +} + +void velocikey_accelerate(void) { + if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 100); +} + +void velocikey_decelerate(void) { + static uint16_t decay_timer = 0; + + if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) { + if (typing_speed > 0) typing_speed -= 1; + //Decay a little faster at half of max speed + if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1; + //Decay even faster at 3/4 of max speed + if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 2; + decay_timer = timer_read(); + } +} + +uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) { + return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE)); +} diff --git a/quantum/velocikey.h b/quantum/velocikey.h new file mode 100644 index 000000000000..1910f0f4e96f --- /dev/null +++ b/quantum/velocikey.h @@ -0,0 +1,13 @@ +#ifndef VELOCIKEY_H +#define VELOCIKEY_H + +#include +#include + +bool velocikey_enabled(void); +void velocikey_toggle(void); +void velocikey_accelerate(void); +void velocikey_decelerate(void); +uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue); + +#endif \ No newline at end of file diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index ded27e599f4a..9c1e3520eea8 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -46,6 +46,7 @@ void eeconfig_init_quantum(void) { eeprom_update_dword(EECONFIG_RGBLIGHT, 0); eeprom_update_byte(EECONFIG_STENOMODE, 0); eeprom_update_dword(EECONFIG_HAPTIC, 0); + eeprom_update_byte(EECONFIG_VELOCIKEY, 0); eeconfig_init_kb(); } diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index d576634f5799..0ac3dff07925 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -40,6 +40,7 @@ along with this program. If not, see . #define EECONFIG_HANDEDNESS (uint8_t *)14 #define EECONFIG_KEYBOARD (uint32_t *)15 #define EECONFIG_USER (uint32_t *)19 +#define EECONFIG_VELOCIKEY (uint8_t *)23 #define EECONFIG_HAPTIC (uint32_t*)24 diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 849d74aa1bce..52546866eb79 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -75,6 +75,9 @@ along with this program. If not, see . #ifdef QWIIC_ENABLE # include "qwiic.h" #endif +#ifdef VELOCIKEY_ENABLE + #include "velocikey.h" +#endif #ifdef MATRIX_HAS_GHOST extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; @@ -336,6 +339,10 @@ void keyboard_task(void) midi_task(); #endif +#ifdef VELOCIKEY_ENABLE + if (velocikey_enabled()) { velocikey_decelerate(); } +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); From 0c607f8bf78a735466d0e761bc339393a522e2ee Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Thu, 21 Feb 2019 14:08:28 -0300 Subject: [PATCH 158/445] [Keyboard] add jotanck keyboard (#5192) * add jotanck keyboard * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * requested changes * Update keyboards/handwired/jotanck/readme.md Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * add backlight support * add default keymap image to readme * add default keymap image to readme --- keyboards/handwired/jotanck/config.h | 37 ++++++ keyboards/handwired/jotanck/jotanck.c | 6 + keyboards/handwired/jotanck/jotanck.h | 17 +++ .../jotanck/keymaps/default/keymap.c | 115 ++++++++++++++++++ keyboards/handwired/jotanck/readme.md | 38 ++++++ keyboards/handwired/jotanck/rules.mk | 66 ++++++++++ 6 files changed, 279 insertions(+) create mode 100644 keyboards/handwired/jotanck/config.h create mode 100644 keyboards/handwired/jotanck/jotanck.c create mode 100644 keyboards/handwired/jotanck/jotanck.h create mode 100644 keyboards/handwired/jotanck/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jotanck/readme.md create mode 100644 keyboards/handwired/jotanck/rules.mk diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h new file mode 100644 index 000000000000..7e022eeb0257 --- /dev/null +++ b/keyboards/handwired/jotanck/config.h @@ -0,0 +1,37 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jotix +#define PRODUCT Jotanck +#define DESCRIPTION A Jotantastic compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* pro_micro pin-out */ +#define MATRIX_ROW_PINS { B4, B5, B6, B2 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } +#define UNUSED_PINS + +/* leds */ +#define QMK_LED E6 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/keyboards/handwired/jotanck/jotanck.c b/keyboards/handwired/jotanck/jotanck.c new file mode 100644 index 000000000000..7744570b23a4 --- /dev/null +++ b/keyboards/handwired/jotanck/jotanck.c @@ -0,0 +1,6 @@ +#include "jotanck.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} diff --git a/keyboards/handwired/jotanck/jotanck.h b/keyboards/handwired/jotanck/jotanck.h new file mode 100644 index 000000000000..e8dd93edafa1 --- /dev/null +++ b/keyboards/handwired/jotanck/jotanck.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c new file mode 100644 index 000000000000..77c144890bee --- /dev/null +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -0,0 +1,115 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum planck_keycodes { + BACKLIT = SAFE_RANGE +}; + +#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 | ; | ' | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * |backlit | lctrl | lgui | lalt | lower | space | space | raise | left | down | up | right | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_QWERTY] = LAYOUT_ortho_4x12 ( + 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_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_LOWER] = 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_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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Raise + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | home | home | pgdn | end | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_RAISE] = 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_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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +[_ADJUST] = LAYOUT_ortho_4x12 ( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + + default: + return true; + + } +} diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md new file mode 100644 index 000000000000..41b0ea401e00 --- /dev/null +++ b/keyboards/handwired/jotanck/readme.md @@ -0,0 +1,38 @@ +# Jotanck + +![Jotanck](https://i.imgur.com/bBfO4L2.jpg) + +A compact 40% (12x4) ortholinear keyboard kit inspired in the Planck made by jotix. + +Keyboard Maintainer: [jotix](https://github.com/jotix) +Hardware Supported: Arduino Pro Micro +Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA-771696548-teclado-mecanico-handwired-black-switchs-pbt-keycaps-_JM) + +### Arduino Pro Micro Pinout + +| Rows | 0 | 1 | 2 | 3 | +|-------------|----|----|----|----| +| Arduino pin | 8 | 9 | 10 | 16 | +| QMK pin | B4 | B5 | B6 | B2 | + +| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | +|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----| +| Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 | +| QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 | + +| | QMK led | Backlight | +|-------------|-----------|-----------| +| Arduino pin | 7 | 6 | +| QMK pin | E6 | D7 | + +### Compiling the Firmware + +Make example for this keyboard (after setting up your build environment): + + make handwired/jotanck:default + +### The Defaukt Keymap + +![Default Keymap](https://i.imgur.com/Fh7g1AQ.jpg) + +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/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk new file mode 100644 index 000000000000..6c3263446137 --- /dev/null +++ b/keyboards/handwired/jotanck/rules.mk @@ -0,0 +1,66 @@ +# 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) + +# 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 +# + +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 = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI 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. +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 +LAYOUTS = ortho_4x12 From 9c73a4a5c6814d09b47ec9d0778051435c047fa3 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 21 Feb 2019 09:24:59 -0800 Subject: [PATCH 159/445] Grammar cleanup of Flashing Your Keyboard Newbs Guide (#5201) Fixed references to a "built" (sic) command, and an incorrect word. --- docs/newbs_flashing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index 0b0ede37c4e0..9d2bf920f53a 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -86,7 +86,7 @@ If you know what bootloader that you're using, then when compiling the firmware, ### DFU -For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command: +For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the build command: make ::dfu @@ -133,7 +133,7 @@ If you have any issues with this, you may need to this: ### Caterina -For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: +For Arduino boards and their clones (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: make ::avrdude @@ -201,7 +201,7 @@ If you have any issues with this, you may need to this: ## HalfKay -For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: +For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: make ::teensy From 8a2346eda1e9fbdec71adf023a1337d5536fe1fa Mon Sep 17 00:00:00 2001 From: SpacebarRacecar <42380065+SpacebarRacecar@users.noreply.github.com> Date: Thu, 21 Feb 2019 18:39:04 +0100 Subject: [PATCH 160/445] [Keymap] Added preonic and mechmini 2 keymaps (#5202) * added mechmini2 keymap * added preonic keymap * changed readme * correction to mechmini 2 readme * changes to preonic keymap --- .../v2/keymaps/spacebarracecar/config.h | 3 + .../v2/keymaps/spacebarracecar/keymap.c | 139 ++++++++++++++ .../v2/keymaps/spacebarracecar/readme.md | 5 + .../v2/keymaps/spacebarracecar/rules.mk | 22 +++ .../planck/keymaps/spacebarracecar/keymap.c | 2 +- .../preonic/keymaps/spacebarracecar/config.h | 5 + .../preonic/keymaps/spacebarracecar/keymap.c | 176 ++++++++++++++++++ .../preonic/keymaps/spacebarracecar/readme.md | 5 + .../preonic/keymaps/spacebarracecar/rules.mk | 22 +++ .../prime_o/keymaps/spacebarracecar/keymap.c | 6 +- users/spacebarracecar/spacebarracecar.h | 2 + 11 files changed, 383 insertions(+), 4 deletions(-) create mode 100644 keyboards/mechmini/v2/keymaps/spacebarracecar/config.h create mode 100644 keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c create mode 100644 keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md create mode 100644 keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk create mode 100644 keyboards/preonic/keymaps/spacebarracecar/config.h create mode 100644 keyboards/preonic/keymaps/spacebarracecar/keymap.c create mode 100644 keyboards/preonic/keymaps/spacebarracecar/readme.md create mode 100644 keyboards/preonic/keymaps/spacebarracecar/rules.mk diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/config.h b/keyboards/mechmini/v2/keymaps/spacebarracecar/config.h new file mode 100644 index 000000000000..45dcbb04b589 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/config.h @@ -0,0 +1,3 @@ +#pragma once + + diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c new file mode 100644 index 000000000000..d4e9de03698b --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c @@ -0,0 +1,139 @@ +#include QMK_KEYBOARD_H +#include "spacebarracecar.h" + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +enum layers { + _BASE, + _RAISE, + _LOWER, + _MUSICMODE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base +,-----------------------------------------------------------------------------------------------------------------------. +|Tab |Q |W |E |R |T |Z |U |I |O |P |Backspace| +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Esc/Nav |A |S |D |F |G |H |J |K |L |; |' | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Shift |Y |X |C |V |B |N |M |, |. |/ |Shift | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|LCtrl | |Win |Alt |Lower |Space |Enter |Raise |AltGr |Win |Menu |RCtrl | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_BASE] = LAYOUT_ortho( + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, + CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, + CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL +), + +/* Lower +,-----------------------------------------------------------------------------------------------------------------------. +|~ |! |" |# |$ |% |^ |& |* |( |) | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |? | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_ortho( + DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, + _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, + _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Raise +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_RAISE] = LAYOUT_ortho( + CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Deadkey +,-----------------------------------------------------------------------------------------------------------------------. +| | | | | | | |Ü | |Ö | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Ä |ß | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | |" |" | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_DEADKEY] = LAYOUT_ortho( + KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, KC_BSPC, + CU_NAV, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, + CU_LSFT, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, CU_DDQ, CU_DDQ, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL +), + +/* Navigation +,-----------------------------------------------------------------------------------------------------------------------. +|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|RESET |ESCT | | | | | | | | | |Game | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_NAV] = LAYOUT_ortho( + ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, RGB_MOD, RGB_HUI, CU_RGBV, _______, + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, RGB_M_P, _______, _______, _______, CU_GAME +) + +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case MO(_LOWER): + if (game){ + if(record->event.pressed) { + register_code(KC_SPC); + } else { + unregister_code(KC_SPC); + } + return false; + } else { + return true; + } + case KC_LALT: + if (game) { + if (record->event.pressed){ + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + } else { + return true; + } + default: + return true; + } +} diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md b/keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md new file mode 100644 index 000000000000..d4039713a51f --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md @@ -0,0 +1,5 @@ +# SpacebarRacecar US-International Mechmini 2 Keymap for German PCs + +This keymap emulates most keys of the US-International layout on PCs that have German set as input language. +This allows the use of the keyboard on any PC in Germany without the need to change any settings. +The keymap is mostly based on the Planck default layout but adds essential features for german input, like access to Ä, Ö, Ü, ß. diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk b/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk new file mode 100644 index 000000000000..cade68ac9849 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk @@ -0,0 +1,22 @@ +# 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 = 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 + +# Userspace defines +GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language diff --git a/keyboards/planck/keymaps/spacebarracecar/keymap.c b/keyboards/planck/keymaps/spacebarracecar/keymap.c index 14b96c8472ff..7ace78903460 100644 --- a/keyboards/planck/keymaps/spacebarracecar/keymap.c +++ b/keyboards/planck/keymaps/spacebarracecar/keymap.c @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT_ortho_4x12( ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ) diff --git a/keyboards/preonic/keymaps/spacebarracecar/config.h b/keyboards/preonic/keymaps/spacebarracecar/config.h new file mode 100644 index 000000000000..4f48857fe57d --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) +#endif diff --git a/keyboards/preonic/keymaps/spacebarracecar/keymap.c b/keyboards/preonic/keymaps/spacebarracecar/keymap.c new file mode 100644 index 000000000000..041fa9fed3bd --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/keymap.c @@ -0,0 +1,176 @@ +#include QMK_KEYBOARD_H +#include "spacebarracecar.h" + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +enum layers { + _BASE, + _RAISE, + _LOWER, + _MUSICMODE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Tab |Q |W |E |R |T |Z |U |I |O |P |Backspace| +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Esc/Nav |A |S |D |F |G |H |J |K |L |; |' | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Shift |Y |X |C |V |B |N |M |, |. |/ |Shift | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|LCtrl | |Win |Alt |Lower |Space |Enter |Raise |AltGr |Win |Menu |RCtrl | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_BASE] = LAYOUT_preonic_grid( + CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, CU_BSLS, + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, + CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, + CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL +), + +/* Lower +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|~ |! |" |# |$ |% |^ |& |* |( |) | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |? | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, + _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, + _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Raise +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_RAISE] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_MUSICMODE] = LAYOUT_preonic_grid( + 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, + KC_LCTL, KC_LALT, KC_LGUI, KC_DOWN, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_MOD, MU_OFF +), + +/* Deadkey +,-----------------------------------------------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | |Ü | |Ö | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Ä |ß | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | |" |" | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_DEADKEY] = LAYOUT_preonic_grid( + CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, + KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, KC_BSPC, + CU_NAV, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, + CU_LSFT, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, CU_DDQ, CU_DDQ, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL +), + +/* Navigation +,-----------------------------------------------------------------------------------------------------------------------. +|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10 |F11 |F12 | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|RESET |ESCT | | | | | | | | | |Game | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_NAV] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME +) + +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case MO(_LOWER): + if (game){ + if(record->event.pressed) { + register_code(KC_SPC); + } else { + unregister_code(KC_SPC); + } + return false; + } else { + return true; + } + case KC_LALT: + if (game) { + if (record->event.pressed){ + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + } else { + return true; + } + case MU_ON: + if(record->event.pressed) { + layer_off(_LOWER); + layer_off(_RAISE); + layer_off(_NAV); + layer_off(_DEADKEY); + layer_on(_MUSICMODE); + } + return true; + case MU_OFF: + if(record->event.pressed) { + layer_off(_MUSICMODE); + } + return true; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/spacebarracecar/readme.md b/keyboards/preonic/keymaps/spacebarracecar/readme.md new file mode 100644 index 000000000000..b99bb956feec --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/readme.md @@ -0,0 +1,5 @@ +# SpacebarRacecar US-International Preonic Keymap for German PCs + +This keymap emulates most keys of the US-International layout on PCs that have German set as input language. +This allows the use of the keyboard on any PC in Germany without the need to change any settings. +The keymap is mostly based on the Preonic default layout but adds essential features for german input, like access to Ä, Ö, Ü, ß. diff --git a/keyboards/preonic/keymaps/spacebarracecar/rules.mk b/keyboards/preonic/keymaps/spacebarracecar/rules.mk new file mode 100644 index 000000000000..bc817a140317 --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/rules.mk @@ -0,0 +1,22 @@ +# 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 = yes # 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 SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Userspace defines +GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c index 87ae5d12420a..407118309741 100644 --- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c +++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( _______, _______, _______, _______, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ), @@ -243,7 +243,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, _______, _______, _______, _______, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, _______, _______, _______, _______, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, _______, _______, _______, _______, CTLENT, _______, _______, _______, _______, CU_GAME ), @@ -364,7 +364,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME, _______, _______, _______, _______ ), diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h index b57cbed82425..690971c39b04 100644 --- a/users/spacebarracecar/spacebarracecar.h +++ b/users/spacebarracecar/spacebarracecar.h @@ -90,6 +90,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define CTLENT CTL_T(KC_ENT) +#define EMOJI LWIN(KC_DOT) + /* Templates for Keys, with custom shifted and non shifted Characters */ From 384fef72d3a08f6bdc4e8557caf0bb78953dab32 Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Thu, 21 Feb 2019 15:24:44 -0800 Subject: [PATCH 161/445] Replace instances of KEYMAP with LAYOUT Many instances in the QMK Docs referenced KEYMAP macros, which is outdated terminology. Replaced most instances of KEYMAP with LAYOUT, to reflect the desired usage. --- docs/faq_keymap.md | 4 ++-- docs/feature_advanced_keycodes.md | 2 +- docs/feature_macros.md | 6 +++--- docs/hand_wire.md | 2 +- docs/keymap.md | 8 ++++---- ...r_keyboard_to_qmk_(arm_and_other_chibios_cpus).md | 4 ++-- docs/understanding_qmk.md | 12 ++++++------ 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index ae01e938780a..0a627469e75d 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -151,13 +151,13 @@ This turns right modifier keys into arrow keys when the keys are tapped while st */ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ - [0] = KEYMAP( \ + [0] = LAYOUT( \ ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), - [1] = KEYMAP( \ + [1] = LAYOUT( \ GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 9edb9fcebccc..b20acf3c44ec 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -11,7 +11,7 @@ People often define custom names using `#define`. For example: #define ALT_TAB LALT(KC_TAB) ``` -This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable. +This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it more readable. ## Caveats diff --git a/docs/feature_macros.md b/docs/feature_macros.md index aa13fb97f4f8..79419abd20a4 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -183,11 +183,11 @@ A macro can include the following commands: ### Mapping a Macro to a Key -Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard: +Use the `M()` function within your keymap to call a macro. For example, here is the keymap for a 2-key keyboard: ```c const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( M(0), M(1) ), }; @@ -216,7 +216,7 @@ If you have a bunch of macros you want to refer to from your keymap while keepin #define M_BYE M(1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( M_HI, M_BYE ), }; diff --git a/docs/hand_wire.md b/docs/hand_wire.md index ba2eee7125fe..697a50805211 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -216,7 +216,7 @@ Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitio ### `.h` -The next file you'll want to look at is `.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. +The next file you'll want to look at is `.h`. You're going to want to rewrite the `LAYOUT` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. We'll dive into how this will work with the following example. Say we have a keyboard like this: diff --git a/docs/keymap.md b/docs/keymap.md index 382a0e911bae..49e6654a26dc 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -1,6 +1,6 @@ # Keymap Overview -QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays. +QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `LAYOUT()` macro to help you create this array of arrays. ## Keymap and Layers @@ -119,7 +119,7 @@ The main part of this file is the `keymaps[]` definition. This is where you list const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer. +After this you'll find a list of LAYOUT() macros. A LAYOUT() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer. `keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard. @@ -131,7 +131,7 @@ Here is an example of the Clueboard's base layer: /* Keymap _BL: Base Layer (Default Layer) */ - [_BL] = KEYMAP( + [_BL] = LAYOUT( F(0), 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_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_BSLS, 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_NUHS, KC_ENT, \ @@ -149,7 +149,7 @@ Some interesting things to note about this: Our function layer is, from a code point of view, no different from the base layer. Conceptually, however, you will build that layer as an overlay, not a replacement. For many people this distinction does not matter, but as you build more complicated layering setups it matters more and more. - [_FL] = KEYMAP( + [_FL] = 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_F12, _______, KC_DEL, BL_STEP, \ _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md index 50d291a2300f..c32c428cf01d 100644 --- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md +++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md @@ -54,10 +54,10 @@ This is where all of the custom logic for your keyboard goes - you may not need ## `/keyboards//.h` -Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design: +Here is where you can (optionally) define your `LAYOUT` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design: ``` -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, \ k10, k11 \ ) \ diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 20ead2b3f54f..bf4b5eadcdde 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -57,10 +57,10 @@ Matrix Scanning runs many times per second. The exact rate varies but typically Once we know the state of every switch on our keyboard we have to map that to a keycode. In QMK this is done by making use of C macros to allow us to separate the definition of the physical layout from the definition of keycodes. -At the keyboard level we define a C macro (typically named `KEYMAP()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `KEYMAP()` macro for a numpad: +At the keyboard level we define a C macro (typically named `LAYOUT()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `LAYOUT()` macro for a numpad: ```c -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ k20, k21, k22, \ @@ -75,17 +75,17 @@ 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. +Notice how the second block of our `LAYOUT()` 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/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment -At the keymap level we make use of our `KEYMAP()` macro above to map keycodes to physical locations to matrix locations. It looks like this: +At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: ``` const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( +[0] = LAYOUT( KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_P7, KC_P8, KC_P9, KC_PPLS, \ KC_P4, KC_P5, KC_P6, \ @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } ``` -Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier. +Notice how all of these arguments match up with the first half of the `LAYOUT()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier. ##### State Change Detection From e3621c162c32dd12ede78f6e2936724fc1dabcf1 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 23 Feb 2019 01:07:31 +0900 Subject: [PATCH 162/445] fix rgblight_effect_breathing interval time (#5213) --- quantum/rgblight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 57de56df7007..52e0be8ba016 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -795,7 +795,7 @@ void rgblight_effect_breathing(uint8_t interval) { static uint16_t last_timer = 0; float val; - uint8_t interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2], 1, 100); + uint8_t interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[interval], 1, 100); if (timer_elapsed(last_timer) < interval_time) { return; From c3cf9c0cef2283cce65ad025402b14ad021dc1dc Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Fri, 22 Feb 2019 13:08:25 -0300 Subject: [PATCH 163/445] Jotpad16 (#5212) * jotix 4x12 keymap * readme corrections * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * add jotpad keyboard * add jotpad keyboard * backlight pin for arduino pro micro * readme correction * readme correction * jotpad16 * Update keyboards/handwired/jotpad16/jotpad16.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/handwired/jotpad16/keymaps/default/keymap.c Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/handwired/jotpad16/readme.md Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> --- keyboards/handwired/jotpad16/config.h | 38 +++++++++++ keyboards/handwired/jotpad16/jotpad16.c | 6 ++ keyboards/handwired/jotpad16/jotpad16.h | 18 +++++ .../jotpad16/keymaps/default/keymap.c | 34 ++++++++++ keyboards/handwired/jotpad16/readme.md | 39 +++++++++++ keyboards/handwired/jotpad16/rules.mk | 66 +++++++++++++++++++ 6 files changed, 201 insertions(+) create mode 100644 keyboards/handwired/jotpad16/config.h create mode 100644 keyboards/handwired/jotpad16/jotpad16.c create mode 100644 keyboards/handwired/jotpad16/jotpad16.h create mode 100644 keyboards/handwired/jotpad16/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jotpad16/readme.md create mode 100644 keyboards/handwired/jotpad16/rules.mk diff --git a/keyboards/handwired/jotpad16/config.h b/keyboards/handwired/jotpad16/config.h new file mode 100644 index 000000000000..e113597dc280 --- /dev/null +++ b/keyboards/handwired/jotpad16/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jotix +#define PRODUCT JotPad16 +#define DESCRIPTION A Jotantastic compact NumPad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* pro_micro pin-out */ +#define MATRIX_ROW_PINS { B6, B2, D2, D3 } +#define MATRIX_COL_PINS { B5, B4, B3, B1 } +#define UNUSED_PINS + +/* leds */ +#define QMK_LED E6 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN D7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 0 + +/* 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 + diff --git a/keyboards/handwired/jotpad16/jotpad16.c b/keyboards/handwired/jotpad16/jotpad16.c new file mode 100644 index 000000000000..512234b91772 --- /dev/null +++ b/keyboards/handwired/jotpad16/jotpad16.c @@ -0,0 +1,6 @@ +#include "jotpad16.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} diff --git a/keyboards/handwired/jotpad16/jotpad16.h b/keyboards/handwired/jotpad16/jotpad16.h new file mode 100644 index 000000000000..012c9290ddfe --- /dev/null +++ b/keyboards/handwired/jotpad16/jotpad16.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +// Used to create a keymap using only KC_ prefixed keys +#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 } \ +} + diff --git a/keyboards/handwired/jotpad16/keymaps/default/keymap.c b/keyboards/handwired/jotpad16/keymaps/default/keymap.c new file mode 100644 index 000000000000..fb5dc71e2344 --- /dev/null +++ b/keyboards/handwired/jotpad16/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _NUMPAD 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * +-------+-------+-------+-------+ + * | 7 | 8 | 9 | - | + * +-------+-------+-------+-------+ + * | 4 | 5 | 6 | + | + * +-------+-------+-------+-------+ + * | 1 | 2 | 3 | enter | + * +-------+-------+-------+-------+ + * | 0 | . | / | * | + * +-------+-------+-------+-------+ + */ +[_NUMPAD] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_MINS, + KC_P4, KC_P5, KC_P6, KC_PLUS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_PDOT,KC_PSLS,KC_ASTR +), +}; diff --git a/keyboards/handwired/jotpad16/readme.md b/keyboards/handwired/jotpad16/readme.md new file mode 100644 index 000000000000..3d971a51548c --- /dev/null +++ b/keyboards/handwired/jotpad16/readme.md @@ -0,0 +1,39 @@ +# JotPad16 + +![JotPad16](https://i.imgur.com/RwmqWuS.jpg) + +A ortholinear keypad (4x4) made by jotix. + +Keyboard Maintainer: [jotix](https://github.com/jotix) +Hardware Supported: Arduino Pro Micro + +### Arduino Pro Micro Pinout + +| rows | 0 | 1 | 2 | 3 | +|-------------|----|----|-----|-----| +| arduino pin | 10 | 16 | RXI | TX0 | +| qmk pin | B6 | B2 | D2 | D3 | + +| columns | 0 | 1 | 2 | 3 | +|-------------|----|----|----|----| +| arduino pin | 9 | 8 | 14 | 15 | +| qmk pin | B5 | B4 | B3 | C3 | + +| | QMK led | Backlight | +|-------------|-----------|-----------| +| Arduino pin | 7 | 6 | +| qmk pin | E6 | D7 | + +### Compiling the Firmware + +Make example for this keyboard (after setting up your build environment): + + make handwired/jotpad16:default + +### The Default Keymap + +![Default Keymap](https://i.imgur.com/VJZcFRN.jpg) + +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/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk new file mode 100644 index 000000000000..8105f800cb9a --- /dev/null +++ b/keyboards/handwired/jotpad16/rules.mk @@ -0,0 +1,66 @@ +# 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) + +# 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 +# + +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 = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI 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. +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 +LAYOUTS = ortho_4x4 From 50139d9c5948e802bdb84489e0859fbacafdcec9 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Fri, 22 Feb 2019 11:46:05 -0500 Subject: [PATCH 164/445] Candybar: remove mousekeys as default (#5210) Binaries compiled at config.qmk.fm are oversized for the MCU. Adjusting default options to compensate. --- keyboards/candybar/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk index d27bbe102a7b..6f39ee0e74a1 100644 --- a/keyboards/candybar/rules.mk +++ b/keyboards/candybar/rules.mk @@ -39,11 +39,11 @@ EXTRAFLAGS+=-flto BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # 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 RGBLIGHT_ENABLE = no From 24a8bc3fd00ecb435c5d34e72dc7768fbf76e14a Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Fri, 22 Feb 2019 13:47:42 -0300 Subject: [PATCH 165/445] Jotix keymaps (#5203) * jotix 4x12 keymap * readme corrections * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x4 keymap * jotix ortho 4x4 keymap * jotix keymaps --- layouts/community/ortho_4x12/jotix/keymap.c | 137 +++++++++++++++++++ layouts/community/ortho_4x12/jotix/readme.md | 10 ++ layouts/community/ortho_4x4/jotix/keymap.c | 41 ++++++ layouts/community/ortho_4x4/jotix/readme.md | 6 + 4 files changed, 194 insertions(+) create mode 100644 layouts/community/ortho_4x12/jotix/keymap.c create mode 100644 layouts/community/ortho_4x12/jotix/readme.md create mode 100644 layouts/community/ortho_4x4/jotix/keymap.c create mode 100644 layouts/community/ortho_4x4/jotix/readme.md diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c new file mode 100644 index 000000000000..2c622cb959f7 --- /dev/null +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -0,0 +1,137 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 1 +#define _RAISE 2 +#define _FUNCTION 3 +#define _ADJUST 4 + +enum custom_keycodes { + BACKLIT = SAFE_RANGE +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FUNCT LT(_FUNCTION, KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | func | A | S | D | F | G | H | J | K | L | ; | del | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_QWERTY] = LAYOUT_ortho_4x12 ( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + FUNCT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL, + 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_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | vol- | mute | vol+ | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | prev | play | next | | | | CapsLk | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_LOWER] = LAYOUT_ortho_4x12 ( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Raise + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | \ | ` | - | = | [ | ] | ' | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | ~ | _ | + | { | } | " | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | home | pgdn | pgun | end | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_RAISE] = LAYOUT_ortho_4x12 ( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, KC_BSLS, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, + _______, _______, _______, _______, _______, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* + * Function + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | | | P7 | P8 | P9 | P- | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F5 | F6 | F7 | F8 | | | P4 | P5 | P6 | P+ | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F9 | F10 | F11 | F12 | | NumLck | P1 | P2 | P3 | P/ | Penter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | P0 | Pdot | P* | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_FUNCTION] = LAYOUT_ortho_4x12 ( + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PAST, XXXXXXX +), + +/* Adjust */ +[_ADJUST] = LAYOUT_ortho_4x12 ( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BACKLIT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + + default: + return true; + + } +} diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md new file mode 100644 index 000000000000..608944801d21 --- /dev/null +++ b/layouts/community/ortho_4x12/jotix/readme.md @@ -0,0 +1,10 @@ +# Jotix ortho 4x12 keymap + +![keymap](https://i.imgur.com/7hGJJPs.jpg) + +Tab is 'Func' on hold. + +Tested on: + +* Planck/rev4 +* Jotanck diff --git a/layouts/community/ortho_4x4/jotix/keymap.c b/layouts/community/ortho_4x4/jotix/keymap.c new file mode 100644 index 000000000000..561084f8ae24 --- /dev/null +++ b/layouts/community/ortho_4x4/jotix/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _NUMPAD 0 +#define _LOWER 1 +#define LOWER LT(_LOWER, KC_PENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * +-------+-------+-------+-------+ + * | 7 | 8 | 9 | - | + * +-------+-------+-------+-------+ + * | 4 | 5 | 6 | + | + * +-------+-------+-------+-------+ + * | 1 | 2 | 3 | / | + * +-------+-------+-------+-------+ + * | | 0 | . | * | + * +-------+-------+-------+-------+ + */ +[_NUMPAD] = LAYOUT_jotpad16 ( + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PSLS, + LOWER, KC_P0, KC_PDOT,KC_PAST +), + +/* Lower */ +[_LOWER] = LAYOUT_jotpad16 ( + KC_NLCK,_______,_______,RESET , + _______,_______,_______,_______, + _______,_______,_______,_______, + _______,_______,_______,_______ +), +}; diff --git a/layouts/community/ortho_4x4/jotix/readme.md b/layouts/community/ortho_4x4/jotix/readme.md new file mode 100644 index 000000000000..0624f6215513 --- /dev/null +++ b/layouts/community/ortho_4x4/jotix/readme.md @@ -0,0 +1,6 @@ +# Jotix ortho 4x4 keymap + +![keymap](https://i.imgur.com/e67yN7x.jpg) + +Enter is 'Lower' on hold. + From db26d0fbd883bcdc44fc7bcc0b6888de046ca73e Mon Sep 17 00:00:00 2001 From: mechmerlin Date: Fri, 22 Feb 2019 08:28:04 -0800 Subject: [PATCH 166/445] edit the readme to mention the NYM96 since it's the same PCB and is currently on sale at Massdrop --- keyboards/melody96/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/melody96/readme.md b/keyboards/melody96/readme.md index 3df1e48b46db..73cc13262b3c 100644 --- a/keyboards/melody96/readme.md +++ b/keyboards/melody96/readme.md @@ -2,11 +2,11 @@ ![melody96](https://i.imgur.com/9o0a6XF.png) -96-key Keyboard from YMDK +96-key Keyboard from YMDK. The PCB for this board is also commonly used in the NYM96. Keyboard Maintainer: [superuser41](https://github.com/kaylanm) Hardware Supported: melody96 -Hardware Availability: [YMDK, group buy closed](https://geekhack.org/index.php?topic=93614.0) +Hardware Availability: [YMDK on Geekhack, group buy closed](https://geekhack.org/index.php?topic=93614.0), [NYM96 on Massdrop](https://www.massdrop.com/buy/nym96-aluminum-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): From 791cdd6e3122c3c70904155c0b14b4ad3612dc86 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 24 Feb 2019 12:21:01 +1100 Subject: [PATCH 167/445] Update readme.md (#5230) Correct comment. --- layouts/community/ergodox/qwerty_code_friendly/readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/layouts/community/ergodox/qwerty_code_friendly/readme.md b/layouts/community/ergodox/qwerty_code_friendly/readme.md index 9abd071b9b60..319ea50b9a33 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/readme.md +++ b/layouts/community/ergodox/qwerty_code_friendly/readme.md @@ -6,8 +6,7 @@ The this layout is a normalized qwerty, with some configurable keys left thumb cluster so you can use it more as needed. -- Arrow keys follow VIM convention - (the media layer even uses arrow keys for HJKL). +- Arrow keys follow VIM convention. - On the top row only symbols are used (not numbers), it's expected the symbol layer's number-pad layout will be used for numbers. From 58d035dccc0ef283cf845f53b2edd5722f502932 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Daisuke Date: Sun, 24 Feb 2019 10:22:20 +0900 Subject: [PATCH 168/445] Keymap: Update Koba's keymap for Ergo42. (#5223) --- keyboards/ergo42/keymaps/koba/keymap.c | 52 +++++++++++----------- keyboards/ergo42/keymaps/koba/readme.md | 4 +- keyboards/ergo42/keymaps/koba/readme_ja.md | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/keyboards/ergo42/keymaps/koba/keymap.c b/keyboards/ergo42/keymaps/koba/keymap.c index f05f78b9e7c6..9bc504207fb1 100644 --- a/keyboards/ergo42/keymaps/koba/keymap.c +++ b/keyboards/ergo42/keymaps/koba/keymap.c @@ -37,36 +37,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* WIN * ,------------------------------------------------. ,------------------------------------------------. - * | Esc | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Esc | Del | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | H/Z |Shift | Z | X | C | V | B | | N | M | , < | . > | / ? | Up |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Fn | Ctrl | Win | Alt | Mhen |LOWER |Space | |Space |RAISE | Henk | Menu | Left | Down |Right | * `------------------------------------------------' `------------------------------------------------' */ [_WIN] = LAYOUT( \ - KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ + KC_ESC, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ + KC_TAB, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ KC_ZKHK, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ FN, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, LOWER, KC_SPC, KC_SPC, RAISE, KC_HENK, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* MACOS * ,------------------------------------------------. ,------------------------------------------------. - * | Esc | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Esc | Del | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Caps |Shift | Z | X | C | V | B | | N | M | , < | . > | / ? | Up |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Fn | Ctrl | Opt | Cmd | Eisu |LOWER |Space | |Space |RAISE | Kana | Cmd | Left | Down |Right | * `------------------------------------------------' `------------------------------------------------' */ [_MACOS] = LAYOUT( \ - KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ + KC_ESC, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ + KC_TAB, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ FN, KC_LCTL, KC_LALT, KC_LGUI, KC_EISU, LOWER, KC_SPC, KC_SPC, RAISE, KC_KNA, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT \ ), @@ -74,9 +74,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LOWER * ,------------------------------------------------. ,------------------------------------------------. * | | | ! | " | # | $ | % | | & | ' | ( | ) | | = | | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | XXXX | XXXX | XXXX | { | ( | | ) | } | XXXX | ~ | | | _ | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | XXXX | XXXX | XXXX | XXXX | XXXX | | XXXX | XXXX | XXXX | XXXX | XXXX | PgUp | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | | | | | | | | | | | Home | PgDn | End | @@ -92,9 +92,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* RAISE * ,------------------------------------------------. ,------------------------------------------------. * | | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | F11 | F12 | XXXX | [ | ( | | ) | ] | XXXX | ^ | \ | \ | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | | | | | | | | | | | | | | @@ -109,20 +109,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNC * ,------------------------------------------------. ,------------------------------------------------. - * |Reset | | XXXX | XXXX | XXXX | XXXX | XXXX | |PrtSc |SLock |Pause | XXXX | XXXX | XXXX | | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | | | XXXX | XXXX | XXXX | XXXX | >Win | | Ins | XXXX | XXXX | XXXX | XXXX | XXXX | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | | | XXXX | XXXX | XXXX | XXXX | >Mac | | XXXX | XXXX | XXXX | XXXX | XXXX | Vol+ | | + * |Reset | Ins | XXXX | XXXX | XXXX | XXXX | XXXX | | XXXX | XXXX |PrtSc |SrcLk |Pause | XXXX | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | XXXX | XXXX | XXXX | XXXX | >Win | | * | / | Home | PgUp | XXXX | XXXX | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Caps | | XXXX | XXXX | XXXX | XXXX | >Mac | | + | - | End | PgDn | XXXX | Vol+ | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | Vol- | Play | + * | | | | | | | | | | | | | Mute | Vol- | Play | * `------------------------------------------------' `------------------------------------------------' */ [_FUNC] = LAYOUT( \ - RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WIN, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MACOS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_VOLD, KC_MPLY \ + RESET, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, _______, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WIN, JP_ASTR, KC_SLSH, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, _______, \ + KC_CAPS, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MACOS, JP_PLUS, KC_MINS, KC_END, KC_PGDN, XXXXXXX, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY \ ) }; diff --git a/keyboards/ergo42/keymaps/koba/readme.md b/keyboards/ergo42/keymaps/koba/readme.md index 1fe0543902f4..bbf9c1c4a6c9 100644 --- a/keyboards/ergo42/keymaps/koba/readme.md +++ b/keyboards/ergo42/keymaps/koba/readme.md @@ -6,12 +6,12 @@ This keymap is for Ergo42. - JIS layout. - Independent Windows layout/MacOS layout layers. -- Bottom row keys arranged like a standard keyboard. +- Bottom row keys are arranged like a standard keyboard. - Arrow keys are designed in the inverted-T. ## Layout -![keyboard-layout](https://user-images.githubusercontent.com/1042121/45888288-aa35ed00-bdf8-11e8-8741-71fe9a0fadc6.png) +![keyboard-layout](https://user-images.githubusercontent.com/1042121/52666273-32a45e00-2f51-11e9-9e15-c231155f3bed.png) ## Windows mode/MacOS mode diff --git a/keyboards/ergo42/keymaps/koba/readme_ja.md b/keyboards/ergo42/keymaps/koba/readme_ja.md index e1dbda821f02..188fb48310e2 100644 --- a/keyboards/ergo42/keymaps/koba/readme_ja.md +++ b/keyboards/ergo42/keymaps/koba/readme_ja.md @@ -11,7 +11,7 @@ Ergo42 用キーマップです。 ## レイアウト -![keyboard-layout](https://user-images.githubusercontent.com/1042121/45888288-aa35ed00-bdf8-11e8-8741-71fe9a0fadc6.png) +![keyboard-layout](https://user-images.githubusercontent.com/1042121/52666273-32a45e00-2f51-11e9-9e15-c231155f3bed.png) ## Windows モード/MacOS モード From 539a6fc8255b5a9f0173dca0b9b6bd94c12a51f4 Mon Sep 17 00:00:00 2001 From: SpacebarRacecar <42380065+SpacebarRacecar@users.noreply.github.com> Date: Sun, 24 Feb 2019 02:22:55 +0100 Subject: [PATCH 169/445] removed old keymaps (#5227) --- .../fc660c/keymaps/spacebarracecar/config.h | 8 - .../fc660c/keymaps/spacebarracecar/keymap.c | 38 ----- .../fc660c/keymaps/spacebarracecar/readme.md | 5 - .../fc660c/keymaps/spacebarracecar/rules.mk | 6 - .../niu_mini/keymaps/spacebarracecar/config.h | 1 - .../niu_mini/keymaps/spacebarracecar/keymap.c | 138 ------------------ .../keymaps/spacebarracecar/readme.md | 5 - .../niu_mini/keymaps/spacebarracecar/rules.mk | 22 --- 8 files changed, 223 deletions(-) delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/config.h delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/keymap.c delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/readme.md delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/rules.mk delete mode 100644 keyboards/niu_mini/keymaps/spacebarracecar/config.h delete mode 100644 keyboards/niu_mini/keymaps/spacebarracecar/keymap.c delete mode 100644 keyboards/niu_mini/keymaps/spacebarracecar/readme.md delete mode 100644 keyboards/niu_mini/keymaps/spacebarracecar/rules.mk diff --git a/keyboards/fc660c/keymaps/spacebarracecar/config.h b/keyboards/fc660c/keymaps/spacebarracecar/config.h deleted file mode 100644 index 9d83a27000ef..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -/* -higher value means deeper actuation point, less sensitive -this should probably stay in the range +/-5. -*/ -#undef ACTUATION_DEPTH_ADJUSTMENT -#define ACTUATION_DEPTH_ADJUSTMENT -1 diff --git a/keyboards/fc660c/keymaps/spacebarracecar/keymap.c b/keyboards/fc660c/keymaps/spacebarracecar/keymap.c deleted file mode 100644 index 760b83b9fb8d..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/keymap.c +++ /dev/null @@ -1,38 +0,0 @@ -#include QMK_KEYBOARD_H -#include "spacebarracecar.h" - -enum layers { - _BASE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_BASE] = LAYOUT( - KC_ESC, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, DE_MINS,CU_EQL, KC_BSPC, KC_INS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, CU_Z, KC_U, KC_I, KC_O, KC_P, CU_LBRC,CU_RBRC,CU_BSLS, KC_DEL, - CU_NAV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, CU_SCLN,CU_QUOT, KC_ENT, - CU_LSFT,CU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, CU_COMM,CU_DOT, CU_SLSH,CU_RSFT, KC_UP, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ), - - [_DEADKEY] = LAYOUT( - CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, _______, CU_ED, - _______,CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, - _______,CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, CU_DDQ , - _______,CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, _______, _______, - _______,_______,_______, CU_DDQ, _______,_______,_______, _______,_______,_______ - ), - - [_NAV] = LAYOUT( - CU_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, CU_GAME, - _______,KC_PGDN,KC_UP, KC_PGUP,KC_HOME,XXXXXXX,XXXXXXX,XXXXXXX,GUIU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, CU_ESCT, - _______,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, XXXXXXX,XXXXXXX,GUIL, GUID, GUIR, XXXXXXX,XXXXXXX, KC_ENT, - _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_VOLD,KC_VOLU,KC_MUTE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, KC_PGUP, - RESET, _______,_______, KC_SPC, _______,_______,_______, KC_HOME,KC_PGDN,KC_END - ) - -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/fc660c/keymaps/spacebarracecar/readme.md b/keyboards/fc660c/keymaps/spacebarracecar/readme.md deleted file mode 100644 index 88c447e75c66..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# SpacebarRacecar US-International FC660C Keymap for German PCs - -This keymap emulates most keys of the US-International layout on PCs that have German set as input language. -This allows the use of the keyboard on any PC in Germany without the need to change any settings. -The keymap is mostly based on the US-International layout. diff --git a/keyboards/fc660c/keymaps/spacebarracecar/rules.mk b/keyboards/fc660c/keymaps/spacebarracecar/rules.mk deleted file mode 100644 index 8ee642a4a734..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work - -# Userspace defines -GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/config.h b/keyboards/niu_mini/keymaps/spacebarracecar/config.h deleted file mode 100644 index 6f70f09beec2..000000000000 --- a/keyboards/niu_mini/keymaps/spacebarracecar/config.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c b/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c deleted file mode 100644 index ea22ce94775a..000000000000 --- a/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c +++ /dev/null @@ -1,138 +0,0 @@ -#include QMK_KEYBOARD_H -#include "spacebarracecar.h" - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -enum layers { - _BASE, - _RAISE, - _LOWER -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Base -,-----------------------------------------------------------------------------------------------------------------------. -|Tab |Q |W |E |R |T |Z |U |I |O |P |Backspace| -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Esc/Nav |A |S |D |F |G |H |J |K |L |; |' | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Shift |Y |X |C |V |B |N |M |, |. |/ |Shift | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|LCtrl | |Win |Alt |Lower |Space |Enter |Raise |AltGr |Win |Menu |RCtrl | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_BASE] = LAYOUT_ortho_4x12( - KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, - CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, - CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, - KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL -), - -/* Lower -,-----------------------------------------------------------------------------------------------------------------------. -|~ |! |" |# |$ |% |^ |& |* |( |) | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |? | | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------------------------------------------' -*/ -[_LOWER] = LAYOUT_ortho_4x12( - DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, - _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, - _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Raise -,-----------------------------------------------------------------------------------------------------------------------. -|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_RAISE] = LAYOUT_ortho_4x12( - CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Deadkey -,-----------------------------------------------------------------------------------------------------------------------. -| | | | | | | |Ü | |Ö | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Ä |ß | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | |" |" | | | | | | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_DEADKEY] = LAYOUT_ortho_4x12( - KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, _______, - _______, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, - _______, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, _______, - _______, _______, _______, _______, _______, CU_DDQ, CU_DDQ, _______, _______, _______, _______, _______ -), - -/* Navigation -,-----------------------------------------------------------------------------------------------------------------------. -|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|RESET |ESCT | | | | | | | | | |Game | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_NAV] = LAYOUT_ortho_4x12( - ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, RGB_M_P, KC_ENT, - _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, RGB_MOD, RGB_HUI, CU_RGBV, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME -) - -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { -switch (keycode) { - case MO(_LOWER): - if (game){ - if(record->event.pressed) { - register_code(KC_SPC); - } else { - unregister_code(KC_SPC); - } - return false; - } else { - return true; - } - case KC_LALT: - if (game) { - if (record->event.pressed){ - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - } else { - return true; - } - default: - return true; - } -} diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/readme.md b/keyboards/niu_mini/keymaps/spacebarracecar/readme.md deleted file mode 100644 index 96727438167b..000000000000 --- a/keyboards/niu_mini/keymaps/spacebarracecar/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# SpacebarRacecar US-International NIU Mini Keymap for German PCs - -This keymap emulates most keys of the US-International layout on PCs that have German set as input language. -This allows the use of the keyboard on any PC in Germany without the need to change any settings. -The keymap is mostly based on the Planck default layout but adds essential features for german input, like access to Ä, Ö, Ü, ß. diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/rules.mk b/keyboards/niu_mini/keymaps/spacebarracecar/rules.mk deleted file mode 100644 index 124de79deb86..000000000000 --- a/keyboards/niu_mini/keymaps/spacebarracecar/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -# 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 = 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 - -# Userspace defines -GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language From 0f62383be57d2e3dacc79a76973295c73e805038 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Sat, 23 Feb 2019 17:25:25 -0800 Subject: [PATCH 170/445] Clueboard 66% Hotswap Support (#5204) * Initial Clueboard 66% arm support * Fix LAYOUT_66_ansi * wip * Bring this branch up to date with led_matrix * Get Clueboard 66% hotswap working with led_matrix * stm32 cleanup * Fix compiling for clueboard 66% hotswap prototype * Reduce the size of the prototype firmware --- keyboards/clueboard/66_hotswap/66_hotswap.h | 4 + keyboards/clueboard/66_hotswap/config.h | 1 - keyboards/clueboard/66_hotswap/gen1/chconf.h | 520 ++++++++++++++++++ keyboards/clueboard/66_hotswap/gen1/config.h | 158 +++++- keyboards/clueboard/66_hotswap/gen1/gen1.c | 227 ++++++-- keyboards/clueboard/66_hotswap/gen1/gen1.h | 104 ++-- keyboards/clueboard/66_hotswap/gen1/halconf.h | 388 +++++++++++++ keyboards/clueboard/66_hotswap/gen1/info.json | 11 + keyboards/clueboard/66_hotswap/gen1/led.c | 21 + keyboards/clueboard/66_hotswap/gen1/matrix.c | 160 ++++++ keyboards/clueboard/66_hotswap/gen1/mcuconf.h | 257 +++++++++ keyboards/clueboard/66_hotswap/gen1/rules.mk | 70 ++- .../66_hotswap/keymaps/default/keymap.c | 93 +++- .../clueboard/66_hotswap/prototype/config.h | 55 ++ .../66_hotswap/prototype/prototype.c | 63 +++ .../66_hotswap/prototype/prototype.h | 86 +++ .../clueboard/66_hotswap/prototype/rules.mk | 24 + 17 files changed, 2099 insertions(+), 143 deletions(-) create mode 100644 keyboards/clueboard/66_hotswap/gen1/chconf.h create mode 100644 keyboards/clueboard/66_hotswap/gen1/halconf.h create mode 100644 keyboards/clueboard/66_hotswap/gen1/info.json create mode 100644 keyboards/clueboard/66_hotswap/gen1/led.c create mode 100644 keyboards/clueboard/66_hotswap/gen1/matrix.c create mode 100644 keyboards/clueboard/66_hotswap/gen1/mcuconf.h create mode 100644 keyboards/clueboard/66_hotswap/prototype/config.h create mode 100644 keyboards/clueboard/66_hotswap/prototype/prototype.c create mode 100644 keyboards/clueboard/66_hotswap/prototype/prototype.h create mode 100644 keyboards/clueboard/66_hotswap/prototype/rules.mk diff --git a/keyboards/clueboard/66_hotswap/66_hotswap.h b/keyboards/clueboard/66_hotswap/66_hotswap.h index 9367c26337ba..a1ea44841f3a 100644 --- a/keyboards/clueboard/66_hotswap/66_hotswap.h +++ b/keyboards/clueboard/66_hotswap/66_hotswap.h @@ -3,3 +3,7 @@ #ifdef KEYBOARD_clueboard_66_hotswap_gen1 #include "gen1.h" #endif + +#ifdef KEYBOARD_clueboard_66_hotswap_prototype + #include "prototype.h" +#endif diff --git a/keyboards/clueboard/66_hotswap/config.h b/keyboards/clueboard/66_hotswap/config.h index 88adb57378d3..2c265c9470ad 100644 --- a/keyboards/clueboard/66_hotswap/config.h +++ b/keyboards/clueboard/66_hotswap/config.h @@ -16,7 +16,6 @@ along with this program. If not, see . */ #pragma once - #include "config_common.h" /* USB Device descriptor parameter */ diff --git a/keyboards/clueboard/66_hotswap/gen1/chconf.h b/keyboards/clueboard/66_hotswap/gen1/chconf.h new file mode 100644 index 000000000000..1d9f12ff1f8b --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index d5d36d4a1c2e..6b0cfb60b53c 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -1,44 +1,146 @@ -#pragma once +/* + * Copyright 2017 skully + * + * 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" -#define PRODUCT_ID 0x2390 +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2391 #define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 8 -/* ROWS: Top to bottom, COLS: Left to right +/* + * 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 { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } -#define UNUSED_PINS +#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 } +#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 } +#define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 } +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 -/* Speaker configuration +/* 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 + +/* + * 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 B7_AUDIO -#define NO_MUSIC_MODE -#define AUDIO_CLICKY +//#define FORCE_NKRO + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) -/* Backlight configuration +/* + * Feature disable options + * These options are also useful to firmware size reduction. */ -#define BACKLIGHT_LEVELS 1 -/* Underlight configuration +/* 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 */ -#define RGB_DI_PIN D7 -#define RGBLED_NUM 26 // Number of LEDs -#define RGBLIGHT_HUE_STEP 32 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_BREATHE_MAX 200 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up -#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up + +/* 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 + + /* Backlight configuration + */ +#define BACKLIGHT_LEVELS 10 + +// 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) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define LED_DRIVER_ADDR_1 0b1110100 +#define I2C1_BANK GPIOB +#define I2C1_SCL 8 +#define I2C1_SDA 9 + +#define LED_DRIVER_COUNT 1 +#define LED_DRIVER_LED_COUNT 71 diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c index 01f74bc50bcb..c70f223756ca 100644 --- a/keyboards/clueboard/66_hotswap/gen1/gen1.c +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -1,63 +1,186 @@ +/* Copyright 2017 Clueboard + * + * 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 "gen1.h" -#include -#include "backlight.h" -#include "print.h" +#include "is31fl3731-simple.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (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 . + */ #pragma once #include "quantum.h" +/* + * These are shortcuts to help you work with the various layout options. If your + * keymap works with one of the LAYOUT_...() macros you are encouraged to use that + * and to contribute your keymap to the corresponding layout in + * `qmk_firmware/layouts/community`. + */ + /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. - * | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56| | 57| + * | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56 | | 57| * |-----------------------------------------------------------| |---| * | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67| * |-----------------------------------------------------------| `---' * | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 75| - * |-------------------------------------------------------------. - * | 30| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85| 86| - * |-----------------------------------------------------------------. - * | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95| 96| 97| - * `-----------------------------------------------------------------' + * |--------------------------------------------------------------. + * | 30 | 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85 |86| + * |------------------------------------------------------------------. + * | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95|96| 97| + * `------------------------------------------------------------------' * ,-----------------------------------------------------------. ,---. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins| * |-----------------------------------------------------------| |---| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del| * |-----------------------------------------------------------| `---' * |Caps | A| S| D| F| G| H| J| k| L| ;| '|Enter | - * |-------------------------------------------------------------. - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up | - * |-----------------------------------------------------------------. - * |Ctrl|Alt |Gui | Space| Space|Gui |Alt |Fn |Ctrl|Lft|Dwn|Rgt| - * `-----------------------------------------------------------------' + * |--------------------------------------------------------------. + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up| + * |------------------------------------------------------------------. + * |Ctrl|Alt|Gui | Space| Space|Gui |Alt |Fn |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' */ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ - k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ - k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ - k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ + k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27 }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \ - { k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \ - { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ - { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ - { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ - { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ } #define LAYOUT_66_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ - k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ - k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ - k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ + k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27 }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ - { k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \ - { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ - { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ - { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ - { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ } diff --git a/keyboards/clueboard/66_hotswap/gen1/halconf.h b/keyboards/clueboard/66_hotswap/gen1/halconf.h new file mode 100644 index 000000000000..eda293c49b8b --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/clueboard/66_hotswap/gen1/info.json b/keyboards/clueboard/66_hotswap/gen1/info.json new file mode 100644 index 000000000000..bab110f3d50c --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/info.json @@ -0,0 +1,11 @@ +{ + "layouts": { + "LAYOUT": { + "layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}] + }, + + "LAYOUT_66_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "x":13.5, "y":1, "w":1.5}, {"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":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.25}, {"x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}] + } + } +} diff --git a/keyboards/clueboard/66_hotswap/gen1/led.c b/keyboards/clueboard/66_hotswap/gen1/led.c new file mode 100644 index 000000000000..efbf532022af --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/led.c @@ -0,0 +1,21 @@ +/* + * Copyright 2017 skully + * + * 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 "hal.h" +#include "backlight.h" +#include "led.h" +#include "printf.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/matrix.c b/keyboards/clueboard/66_hotswap/gen1/matrix.c new file mode 100644 index 000000000000..c3e59b56460f --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/matrix.c @@ -0,0 +1,160 @@ +#include +#include +#include +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "printf.h" +#include "backlight.h" +#include "matrix.h" +#include "action.h" +#include "keycode.h" +#include + +/* + * #define MATRIX_ROW_PINS { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 } + * #define MATRIX_COL_PINS { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 } + */ +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_COLS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +void matrix_init(void) { + printf("matrix init\n"); + //debug_matrix = true; + + // actual matrix setup + palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); + + palSetPadMode(GPIOB, 11, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOB, 5, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOB, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN); + + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + // actual matrix + for (int col = 0; col < MATRIX_COLS; col++) { + matrix_row_t data = 0; + + // strobe col { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 } + switch (col) { + case 0: palSetPad(GPIOB, 10); break; + case 1: palSetPad(GPIOB, 2); break; + case 2: palSetPad(GPIOB, 1); break; + case 3: palSetPad(GPIOB, 0); break; + case 4: palSetPad(GPIOA, 7); break; + case 5: palSetPad(GPIOB, 4); break; + case 6: palSetPad(GPIOB, 3); break; + case 7: palSetPad(GPIOB, 7); break; + } + + // need wait to settle pin state + wait_us(20); + + // read row data { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 } + data = ( + (palReadPad(GPIOB, 11) << 0 ) | + (palReadPad(GPIOA, 6) << 1 ) | + (palReadPad(GPIOA, 3) << 2 ) | + (palReadPad(GPIOA, 2) << 3 ) | + (palReadPad(GPIOA, 1) << 4 ) | + (palReadPad(GPIOB, 5) << 5 ) | + (palReadPad(GPIOB, 6) << 6 ) | + (palReadPad(GPIOC, 15) << 7 ) | + (palReadPad(GPIOC, 14) << 8 ) | + (palReadPad(GPIOC, 13) << 9 ) + ); + + // unstrobe col { B11, B10, B2, B1, A7, B0 } + switch (col) { + case 0: palClearPad(GPIOB, 10); break; + case 1: palClearPad(GPIOB, 2); break; + case 2: palClearPad(GPIOB, 1); break; + case 3: palClearPad(GPIOB, 0); break; + case 4: palClearPad(GPIOA, 7); break; + case 5: palClearPad(GPIOB, 4); break; + case 6: palClearPad(GPIOB, 3); break; + case 7: palClearPad(GPIOB, 7); break; + } + + if (matrix_debouncing[col] != data) { + matrix_debouncing[col] = data; + debouncing = true; + debouncing_time = timer_read(); + } + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix[row] = 0; + for (int col = 0; col < MATRIX_COLS; col++) { + matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); + } + } + debouncing = false; + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# LED Configuration +LED_MATRIX_ENABLE = IS31FL3731 # Build Options # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = no -NKRO_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +#CUSTOM_MATRIX = yes # Custom matrix file AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no -UNICODE_ENABLE = no -BLUETOOTH_ENABLE = no +# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c index 94f2ec0c400a..6451cf0370bc 100644 --- a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c +++ b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c @@ -6,6 +6,30 @@ #define _FL 1 #define _CL 2 +enum custom_keycodes { + S_BSKTC = SAFE_RANGE, + S_ODEJY, + S_RCKBY, + S_DOEDR, + S_SCALE, + S_ONEUP, + S_COIN, + S_SONIC, + S_ZELDA +}; + +#ifdef AUDIO_ENABLE + float song_basketcase[][2] = SONG(BASKET_CASE); + float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); + float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); + float song_doe_a_deer[][2] = SONG(DOE_A_DEER); + float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float song_coin[][2] = SONG(COIN_SOUND); + float song_one_up[][2] = SONG(ONE_UP_SOUND); + float song_sonic_ring[][2] = SONG(SONIC_RING); + float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); +#endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ @@ -28,9 +52,72 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _CL: Control layer */ [_CL] = LAYOUT( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + BL_STEP,S_ONEUP,S_SCALE,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, BL_TOGG, BL_INC, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ - _______,_______,_______, RGB_MOD,RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), + _______,_______,_______, BL_BRTG,BL_BRTG, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + #ifdef AUDIO_ENABLE + case S_BSKTC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_basketcase); + } + return false; + case S_ODEJY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_ode_to_joy); + } + return false; + case S_RCKBY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_rock_a_bye_baby); + } + return false; + case S_DOEDR: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_doe_a_deer); + } + return false; + case S_SCALE: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_scale); + } + return false; + case S_ONEUP: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_one_up); + } + return false; + case S_COIN: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_coin); + } + return false; + case S_SONIC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_sonic_ring); + } + return false; + case S_ZELDA: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_zelda_puzzle); + } + return false; + #endif + } + return true; +} diff --git a/keyboards/clueboard/66_hotswap/prototype/config.h b/keyboards/clueboard/66_hotswap/prototype/config.h new file mode 100644 index 000000000000..7679d08e5236 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/prototype/config.h @@ -0,0 +1,55 @@ +#pragma once +#include "config_common.h" + +#define PRODUCT_ID 0x2390 +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +* row: 0 1 2 3 4 5 6 7 8 9 +* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2 +*/ + +#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } +/* Column pin configuration + * col: 0 1 2 3 4 5 6 7 + * pin: F0 F1 F4 F5 F6 F7 E6 B1 + */ +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } +#define UNUSED_PINS + +/* Speaker configuration + */ +#define B7_AUDIO +#define NO_MUSIC_MODE +#define AUDIO_CLICKY + +/* Space savings + */ +#define NO_ACTION_TAPPING + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 26 // Number of LEDs +#define RGBLIGHT_HUE_STEP 32 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up diff --git a/keyboards/clueboard/66_hotswap/prototype/prototype.c b/keyboards/clueboard/66_hotswap/prototype/prototype.c new file mode 100644 index 000000000000..991d4b8faea1 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/prototype/prototype.c @@ -0,0 +1,63 @@ +#include "prototype.h" +#include +#include "backlight.h" +#include "print.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< Date: Sun, 24 Feb 2019 04:32:48 +0100 Subject: [PATCH 171/445] Fix Tx Bolt ghosting second character on key press (#5229) * convert tabs to spaces * fix #4578: don't call gemini protocol code when in bolt mode Add missing break; statements in switch. The missing break resulted in a fall through and an additional processing of the gemini code. --- quantum/process_keycode/process_steno.c | 46 +++++++++++++------------ 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 3051fade912d..50a1ef2fcf99 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -114,13 +114,13 @@ static void send_steno_chord(void) { if (send_steno_chord_user(mode, chord)) { switch(mode) { case STENO_MODE_BOLT: - send_steno_state(BOLT_STATE_SIZE, false); - virtser_send(0); // terminating byte - break; + send_steno_state(BOLT_STATE_SIZE, false); + virtser_send(0); // terminating byte + break; case STENO_MODE_GEMINI: - chord[0] |= 0x80; // Indicate start of packet - send_steno_state(GEMINI_STATE_SIZE, true); - break; + chord[0] |= 0x80; // Indicate start of packet + send_steno_state(GEMINI_STATE_SIZE, true); + break; } } steno_clear_state(); @@ -161,7 +161,7 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_STENO_BOLT: if (!process_steno_user(keycode, record)) { - return false; + return false; } if (IS_PRESSED(record->event)) { steno_set_mode(STENO_MODE_BOLT); @@ -170,7 +170,7 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { case QK_STENO_GEMINI: if (!process_steno_user(keycode, record)) { - return false; + return false; } if (IS_PRESSED(record->event)) { steno_set_mode(STENO_MODE_GEMINI); @@ -179,25 +179,27 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { case STN__MIN...STN__MAX: if (!process_steno_user(keycode, record)) { - return false; + return false; } switch(mode) { - case STENO_MODE_BOLT: - update_state_bolt(keycode - QK_STENO, IS_PRESSED(record->event)); - case STENO_MODE_GEMINI: - update_state_gemini(keycode - QK_STENO, IS_PRESSED(record->event)); + case STENO_MODE_BOLT: + update_state_bolt(keycode - QK_STENO, IS_PRESSED(record->event)); + break; + case STENO_MODE_GEMINI: + update_state_gemini(keycode - QK_STENO, IS_PRESSED(record->event)); + break; } // allow postprocessing hooks if (postprocess_steno_user(keycode, record, mode, chord, pressed)) { - if (IS_PRESSED(record->event)) { - ++pressed; - } else { - --pressed; - if (pressed <= 0) { - pressed = 0; - send_steno_chord(); - } - } + if (IS_PRESSED(record->event)) { + ++pressed; + } else { + --pressed; + if (pressed <= 0) { + pressed = 0; + send_steno_chord(); + } + } } return false; } From 6f30a6b4079684742c147741b98414b1b2350b0b Mon Sep 17 00:00:00 2001 From: Fred Silberberg Date: Sun, 24 Feb 2019 17:57:16 -0500 Subject: [PATCH 172/445] [Keymap] Added a key to handle copy/paste in and out of a terminal (#5205) --- .../5x6/keymaps/333fred/keymap.c | 16 ++++---- users/333fred/333fred.c | 37 +++++++++++++++++-- users/333fred/333fred.h | 7 ++-- 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c index c37009f24d82..4f6151a51274 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c @@ -10,14 +10,14 @@ enum custom_macros { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_5x6( - 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), - KC_F4, KC_F5, TG(CODEFLOW), KC_EQL, - KC_LALT, KC_BSPC, KC_SPC, OSL(VIM), - KC_TAB, TD(TD_SYM_VIM), KC_ENT, KC_RGUI, - KC_LCTL, KC_DEL, KC_UP, KC_DOWN + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + KC_F4, KC_F5, TG(CODEFLOW), KC_EQL, + KC_LALT, KC_BSPC, KC_SPC, OSL(VIM), + TD(TD_COPY_PASTE), TD(TD_SYM_VIM), KC_ENT, KC_RGUI, + KC_LCTL, KC_DEL, KC_UP, KC_DOWN ), [CODEFLOW] = LAYOUT_5x6( diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 12ee9e7d7d2c..3b2b36d020e4 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c @@ -9,7 +9,7 @@ typedef enum { static tap_dance_state_enum tap_dance_state; static bool tap_dance_active = false; -void tap_dance_layer_finished(qk_tap_dance_state_t *state, void *user_data) { +void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) { // Determine the current state if (state->count == 1) { if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP; @@ -38,8 +38,7 @@ void tap_dance_layer_finished(qk_tap_dance_state_t *state, void *user_data) { } } - -void tap_dance_layer_reset(qk_tap_dance_state_t *state, void *user_data) { +void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) { switch(tap_dance_state) { case SINGLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); @@ -53,8 +52,38 @@ void tap_dance_layer_reset(qk_tap_dance_state_t *state, void *user_data) { } } +void tap_dance_copy_paste_finished(qk_tap_dance_state_t *state, void *user_data) { + bool is_paste = state->count == 2; + // If either the one-shot shift is set, or if shift is being held, count as shift being held. + // We'll clear the one-shot shift if it was held + uint8_t one_shot_mods = get_oneshot_mods(); + bool is_shift = false; + + if (get_mods() & MOD_MASK_SHIFT) { + is_shift = true; + } else if (one_shot_mods & MOD_MASK_SHIFT) { + set_oneshot_mods(one_shot_mods & ~MOD_MASK_SHIFT); + is_shift = true; + } + + if (is_paste) { + if (is_shift) { + SEND_STRING(SS_LSFT(SS_TAP(X_INSERT))); + } else { + SEND_STRING(SS_LCTRL("v")); + } + } else { + if (is_shift) { + SEND_STRING(SS_LCTRL(SS_TAP(X_INSERT))); + } else { + SEND_STRING(SS_LCTRL("c")); + } + } +} + qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_layer_finished, tap_dance_layer_reset) + [TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_sym_vim_finished, tap_dance_sym_vim_reset), + [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL) }; void tap_dance_process_record(uint16_t keycode) { diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h index 443930a6b1ab..0e6c6a196f9a 100644 --- a/users/333fred/333fred.h +++ b/users/333fred/333fred.h @@ -13,9 +13,10 @@ // Tap dance config shared between my keyboards enum tap_dance_declarations { - TD_SYM_VIM = 0 + TD_SYM_VIM = 0, + TD_COPY_PASTE, }; -void tap_dance_layer_finished(qk_tap_dance_state_t*, void*); -void tap_dance_layer_reset(qk_tap_dance_state_t*, void*); +void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*); +void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*); void tap_dance_process_record(uint16_t); From c8de0f78bfa729e610566d41a31aa1615369a597 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sun, 24 Feb 2019 18:14:55 -0500 Subject: [PATCH 173/445] [Keymap] Initial upload of stanrc85 HS60 v2 layout and config (#5217) --- keyboards/hs60/v2/keymaps/stanrc85/config.h | 25 +++++++ keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 76 ++++++++++++++++++++ keyboards/hs60/v2/keymaps/stanrc85/readme.md | 6 ++ keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 1 + 4 files changed, 108 insertions(+) create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/config.h create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/readme.md create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/rules.mk diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h new file mode 100644 index 000000000000..4be7965e3df9 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2019 Stanrc85 + +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 overwrites for specific keymap */ + +#define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 +#define TAPPING_TERM 200 +#define RETRO_TAPPING diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c new file mode 100644 index 000000000000..d8d79a581c80 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2018 Stanrc85 + * + * 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 DEFAULT 0 //Custom ANSI +#define LAYER1 1 //Default ANSI (enable with Fn2+D) +#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control +#define LAYER3 3 //RGB Underglow controls and RESET + +//Aliases for longer keycodes +#define KC_CAD LALT(LCTL(KC_DEL)) +#define KC_LOCK LGUI(KC_L) +#define CA_QUOT LCA(KC_QUOT) +#define CA_SCLN LCA(KC_SCLN) +#define KC_CTLE LCTL_T(KC_ESC) +#define LT_SPCF LT(2, KC_SPC) +#define TD_TESC TD(TD_ESC) +#define TD_TWIN TD(TD_WIN) + +//Tap Dance Declarations +enum { + TD_WIN = 0, + TD_ESC +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CTLE, 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, + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL), + + [1] = LAYOUT_60_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), + + [2] = LAYOUT_60_ansi( + KC_TILD, 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, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, RESET, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_60_ansi( + _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/keymaps/stanrc85/readme.md new file mode 100644 index 000000000000..650871a5e689 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/readme.md @@ -0,0 +1,6 @@ +The default keymap for ANSI HS60 V2 +=================================== + +![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/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes From d5dcf54e23a39d9d55e99ff9b27ee7d1347bcc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 25 Feb 2019 00:21:09 +0100 Subject: [PATCH 174/445] Fix indentation in quantum_keycodes.h (#5221) --- quantum/quantum_keycodes.h | 59 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 1ced6ae37e54..fe2e3510d63f 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -449,36 +449,35 @@ enum quantum_keycodes { KC_LOCK, #endif - #ifdef TERMINAL_ENABLE - TERM_ON, - TERM_OFF, - #endif - - EEPROM_RESET, - - UNICODE_MODE_FORWARD, - UNICODE_MODE_REVERSE, - - UNICODE_MODE_OSX, - UNICODE_MODE_LNX, - UNICODE_MODE_WIN, - UNICODE_MODE_BSD, - UNICODE_MODE_WINC, - - HPT_ON, - HPT_OFF, - HPT_TOG, - HPT_RST, - HPT_FBK, - HPT_BUZ, - HPT_MODI, - HPT_MODD, - HPT_DWLI, - HPT_DWLD, - - // always leave at the end - SAFE_RANGE - }; +#ifdef TERMINAL_ENABLE + TERM_ON, + TERM_OFF, +#endif + + EEPROM_RESET, + + UNICODE_MODE_FORWARD, + UNICODE_MODE_REVERSE, + UNICODE_MODE_OSX, + UNICODE_MODE_LNX, + UNICODE_MODE_WIN, + UNICODE_MODE_BSD, + UNICODE_MODE_WINC, + + HPT_ON, + HPT_OFF, + HPT_TOG, + HPT_RST, + HPT_FBK, + HPT_BUZ, + HPT_MODI, + HPT_MODD, + HPT_DWLI, + HPT_DWLD, + + // always leave at the end + SAFE_RANGE +}; // Ability to use mods in layouts #define LCTL(kc) (QK_LCTL | (kc)) From 1c2b3143d089c29a898bbfb9ac6a4e12bcab7dba Mon Sep 17 00:00:00 2001 From: Brian Schott Date: Fri, 15 Feb 2019 23:55:45 -0800 Subject: [PATCH 175/445] The code in this directory supports the KBD65 --- keyboards/kbdfans/kbd67/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index 7ee3c6adbb13..e028042aa5d6 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -4,7 +4,7 @@ A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 +Hardware Supported: KBD67, KBD65 USB-C PCB Hardware Availability: KBDFans Make example for this keyboard (after setting up your build environment): From 2fe21c67c597fbb99ee8fae989e227c3c359a2ca Mon Sep 17 00:00:00 2001 From: Brian Schott Date: Fri, 15 Feb 2019 23:56:17 -0800 Subject: [PATCH 176/445] Update readme.md --- keyboards/kbdfans/kbd67/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index e028042aa5d6..6f96d1a68f1c 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -4,7 +4,7 @@ A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67, KBD65 USB-C PCB +Hardware Supported: KBD67, KBD65 USB-C PCB Hardware Availability: KBDFans Make example for this keyboard (after setting up your build environment): From d093678458ef6e0cb7f4fac1c66df6d3d8f564dd Mon Sep 17 00:00:00 2001 From: Brian Schott Date: Sat, 16 Feb 2019 00:00:58 -0800 Subject: [PATCH 177/445] Update readme.md --- keyboards/kbdfans/kbd67/rev1/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/kbdfans/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md index ab5209646f6c..4779d1004e86 100644 --- a/keyboards/kbdfans/kbd67/rev1/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/readme.md @@ -1,10 +1,10 @@ # kbd67 -65% keyboard with blocker. +65% keyboard with blocker / 65% PCB Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 PCB -Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit) +Hardware Supported: KBD67 PCB, KBD65 USB-C PCB +Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit) (Keyboard kit), [KBDFans](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb) (PCB) Make example for this keyboard (after setting up your build environment): From c1cb95d953f387292640a6df1198b9e97e29497b Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sun, 24 Feb 2019 20:00:26 -0800 Subject: [PATCH 178/445] Clear up the confusion between the kbd67/kbd65 naming. --- keyboards/kbdfans/kbd67/readme.md | 7 ++++--- keyboards/kbdfans/kbd67/rev1/readme.md | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index 6f96d1a68f1c..eae4539ecd64 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -1,10 +1,11 @@ # KBD67 -A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts. -Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. +A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts. +Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. +The rev1 PCB for the KBD76 is sold under the name "KBD65" Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67, KBD65 USB-C PCB +Hardware Supported: KBD67 Hardware Availability: KBDFans Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kbdfans/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md index 4779d1004e86..9074557cbb17 100644 --- a/keyboards/kbdfans/kbd67/rev1/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/readme.md @@ -1,10 +1,10 @@ # kbd67 -65% keyboard with blocker / 65% PCB +65% keyboard with blocker. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 PCB, KBD65 USB-C PCB -Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit) (Keyboard kit), [KBDFans](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb) (PCB) +Hardware Supported: KBD67 PCB (Sometimes sold under the name "KBD65") +Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb) Make example for this keyboard (after setting up your build environment): From 79acf1e6602a20a5d82bd70e4fc7b2b34ec2207a Mon Sep 17 00:00:00 2001 From: Adam Price Date: Mon, 25 Feb 2019 11:01:50 -0500 Subject: [PATCH 179/445] atreus default keymap `pagedown` didn't match comment instructions (#5245) --- keyboards/atreus/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index d353728a97e4..631697384b89 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; From c4451f450570bf6dd858661410a383b2ad4f16dc Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Mon, 25 Feb 2019 11:02:40 -0500 Subject: [PATCH 180/445] Corrected HS60 v2 keyboard name in info.json (#5242) * Corrected keyboard name in info.json * Updated maintainer to yiancar --- keyboards/hs60/v2/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/hs60/v2/info.json b/keyboards/hs60/v2/info.json index abafb69f99e7..c42e9e9418f4 100644 --- a/keyboards/hs60/v2/info.json +++ b/keyboards/hs60/v2/info.json @@ -1,6 +1,6 @@ { - "keyboard_name": "clueboard/60", - "maintainer": "skullydazed", + "keyboard_name": "HS60v2", + "maintainer": "yiancar", "url": "", "width": 15, "height": 5, From 2c1963d583f51a6ac1d90e7c330781c036b25f16 Mon Sep 17 00:00:00 2001 From: takashiski Date: Tue, 26 Feb 2019 09:51:09 +0900 Subject: [PATCH 181/445] [Keyboard] Hecomi conf (#5246) * add info.json * update readme * remove info.json from no rule.mk folder --- keyboards/hecomi/alpha/info.json | 12 ++++++++++++ keyboards/hecomi/alpha/readme.md | 8 ++++++-- keyboards/hecomi/info.json | 0 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 keyboards/hecomi/alpha/info.json delete mode 100644 keyboards/hecomi/info.json diff --git a/keyboards/hecomi/alpha/info.json b/keyboards/hecomi/alpha/info.json new file mode 100644 index 000000000000..12472acbf1c8 --- /dev/null +++ b/keyboards/hecomi/alpha/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "hecomi/alpha", + "url": "https://skyhigh-works.hatenablog.com/entry/2019/02/25/221959", + "maintainer": "takashiski", + "width": 19.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":11.25, "y":1.5}, {"label":"*", "x":12.25, "y":1.5}, {"label":"(", "x":13.25, "y":1.5}, {"label":")", "x":14.25, "y":1.5}, {"label":"_", "x":15.25, "y":1.5}, {"label":"+", "x":16.25, "y":1.5}, {"label":"|", "x":17.25, "y":1.5}, {"label":"~", "x":18.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"Y", "x":10.75, "y":2.5}, {"label":"U", "x":11.75, "y":2.5}, {"label":"I", "x":12.75, "y":2.5}, {"label":"O", "x":13.75, "y":2.5}, {"label":"P", "x":14.75, "y":2.5}, {"label":"{", "x":15.75, "y":2.5}, {"label":"}", "x":16.75, "y":2.5}, {"label":"Delete", "x":17.75, "y":2.5, "w":1.5}, {"label":"Control", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":11, "y":3.5}, {"label":"J", "x":12, "y":3.5}, {"label":"K", "x":13, "y":3.5}, {"label":"L", "x":14, "y":3.5}, {"label":":", "x":15, "y":3.5}, {"label":"\"", "x":16, "y":3.5}, {"label":"Return", "x":17, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"B", "x":10.5, "y":4.5}, {"label":"N", "x":11.5, "y":4.5}, {"label":"M", "x":12.5, "y":4.5}, {"label":"<", "x":13.5, "y":4.5}, {"label":">", "x":14.5, "y":4.5}, {"label":"?", "x":15.5, "y":4.5}, {"label":"Shift", "x":16.5, "y":4.5, "w":1.75}, {"label":"Fn", "x":18.25, "y":4.5}, {"label":"", "x":1.55, "y":5.5}, {"label":"\u25c7", "x":2.55, "y":5.5, "w":1.5}, {"x":4.05, "y":5.5, "w":1.5}, {"x":5.55, "y":5.5, "w":1.5}, {"x":11.3, "y":5.5, "w":1.5}, {"x":12.8, "y":5.5, "w":1.5}, {"label":"\u25c7", "x":14.3, "y":5.5, "w":1.5}, {"label":"", "x":15.8, "y":5.5}] + } + } +} diff --git a/keyboards/hecomi/alpha/readme.md b/keyboards/hecomi/alpha/readme.md index 7ac7569f8475..5b316245c304 100644 --- a/keyboards/hecomi/alpha/readme.md +++ b/keyboards/hecomi/alpha/readme.md @@ -1,6 +1,6 @@ # hecomi_alpha -![hecomi_alpha](imgur.com image replace me!) +![hecomi_alpha](https://imgur.com/a/5AwQw0r) This keyboard based on HHKB pro 2 and physical layout designed by @hecomi and @takashiski. @@ -12,6 +12,10 @@ Hardware Availability: booth(@skyhigh_works) Make example for this keyboard (after setting up your build environment): - make hecomi_alpha:default + make hecomi/alpha: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). + +and build guide is here. + +[build guide](https://skyhigh-works.hatenablog.com/entry/2019/02/25/221959) diff --git a/keyboards/hecomi/info.json b/keyboards/hecomi/info.json deleted file mode 100644 index e69de29bb2d1..000000000000 From 7276cc24d070925667061251436f45534e2b5918 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 25 Feb 2019 16:59:40 -0800 Subject: [PATCH 182/445] [Keyboard] KBDFans Minor Fixes (#5238) * pragma once and turn on bootmagic lite * pragma once changes and turning on bootmagic lite * switch to using pragma once * switch to using #pragma once * switch to using #pramga once --- keyboards/kbdfans/kbd4x/kbd4x.h | 5 +---- keyboards/kbdfans/kbd4x/rules.mk | 2 +- keyboards/kbdfans/kbd66/config.h | 4 +--- keyboards/kbdfans/kbd66/kbd66.h | 4 +--- keyboards/kbdfans/kbd66/rules.mk | 2 +- keyboards/kbdfans/kbd67/hotswap/config.h | 2 +- keyboards/kbdfans/kbd67/rev1/rev1.h | 4 +--- keyboards/kbdfans/kbd6x/kbd6x.h | 5 +---- keyboards/kbdfans/kbd75/kbd75.h | 4 +--- 9 files changed, 9 insertions(+), 23 deletions(-) diff --git a/keyboards/kbdfans/kbd4x/kbd4x.h b/keyboards/kbdfans/kbd4x/kbd4x.h index d7a851e3ebd0..df0251fa4205 100644 --- a/keyboards/kbdfans/kbd4x/kbd4x.h +++ b/keyboards/kbdfans/kbd4x/kbd4x.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KBD4X_H -#define KBD4X_H +#pragma once #include "quantum.h" @@ -44,5 +43,3 @@ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } - -#endif diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 6cfd92bc63b1..de03b833ce2e 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -62,7 +62,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index 48262f785956..730df130778a 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -182,4 +181,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#endif diff --git a/keyboards/kbdfans/kbd66/kbd66.h b/keyboards/kbdfans/kbd66/kbd66.h index 6a4b99ec4259..797b331b0d72 100644 --- a/keyboards/kbdfans/kbd66/kbd66.h +++ b/keyboards/kbdfans/kbd66/kbd66.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KBD66_H -#define KBD66_H +#pragma once #include "quantum.h" @@ -33,4 +32,3 @@ { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F}, \ } -#endif diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index dcc9b5bbd65f..764bdf424f91 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # 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) diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index a24afd16c600..8822b213e3c6 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -66,7 +66,7 @@ along with this program. If not, see . #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 + #define RGBLIGHT_ANIMATIONS // /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/kbdfans/kbd67/rev1/rev1.h b/keyboards/kbdfans/kbd67/rev1/rev1.h index 4ee136393a72..f27a00191a2b 100644 --- a/keyboards/kbdfans/kbd67/rev1/rev1.h +++ b/keyboards/kbdfans/kbd67/rev1/rev1.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef REV1_H -#define REV1_H +#pragma once #include "quantum.h" @@ -56,4 +55,3 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ } -#endif diff --git a/keyboards/kbdfans/kbd6x/kbd6x.h b/keyboards/kbdfans/kbd6x/kbd6x.h index 3d0c70f77ab8..46e3c2460736 100644 --- a/keyboards/kbdfans/kbd6x/kbd6x.h +++ b/keyboards/kbdfans/kbd6x/kbd6x.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KBD6X_H -#define KBD6X_H +#pragma once #include "quantum.h" @@ -32,5 +31,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ } - -#endif diff --git a/keyboards/kbdfans/kbd75/kbd75.h b/keyboards/kbdfans/kbd75/kbd75.h index 8e6f094500bf..ad8706ba97e8 100644 --- a/keyboards/kbdfans/kbd75/kbd75.h +++ b/keyboards/kbdfans/kbd75/kbd75.h @@ -1,5 +1,4 @@ -#ifndef KBD75_H -#define KBD75_H +#pragma once #include "quantum.h" @@ -12,4 +11,3 @@ #include "rev2.h" #endif -#endif From da5e9043061ae3baadc7922acddf15dc92bffb7b Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 25 Feb 2019 00:12:33 -0500 Subject: [PATCH 183/445] Fix pinout for Quefrency left half w/macros --- keyboards/keebio/quefrency/rev1/config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 4b95eea5091c..67cef6195b85 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -34,8 +34,10 @@ along with this program. If not, see . #define MATRIX_COLS 8 // wiring of each half -#define MATRIX_ROW_PINS { F4, D4, D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6, C6 } +#define MATRIX_ROW_PINS { F4, D4, D7, E6, B4, C6 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6, B5 } +#define MATRIX_ROW_PINS_RIGHT { F4, D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS_RIGHT { F5, F6, F7, B1, B3, B2, B6, C6 } #define SPLIT_HAND_PIN D2 /* Set 0 if debouncing isn't needed */ From d7e3d718d0bd0225c8f2887561cd483461c0a04c Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:03:36 -0800 Subject: [PATCH 184/445] Some minor refactoring of boards in 1upkeyboards directory (#5236) * use #pragma once * get rid of code for unused indicators * pragma once and other small fixes for consistency * use #pragma once * pragma once and other small fixes for consistency * add a short blurb to the readme * turn on compiler optimization flags * remove the compiler optimization * remove compiler optimization for super16 --- keyboards/1upkeyboards/1up60hse/1up60hse.h | 4 +-- keyboards/1upkeyboards/1up60hse/rules.mk | 1 + .../1up60hte/keymaps/default/keymap.c | 28 +------------------ keyboards/1upkeyboards/1up60hte/rules.mk | 1 + keyboards/1upkeyboards/1up60rgb/1up60rgb.h | 5 +--- keyboards/1upkeyboards/1up60rgb/config.h | 5 +--- keyboards/1upkeyboards/1up60rgb/readme.md | 2 +- keyboards/1upkeyboards/1up60rgb/rules.mk | 20 ++++++------- keyboards/1upkeyboards/readme.md | 2 ++ .../super16/keymaps/default/config.h | 2 +- keyboards/1upkeyboards/super16/rules.mk | 2 +- keyboards/1upkeyboards/sweet16/config.h | 4 +-- keyboards/1upkeyboards/sweet16/readme.md | 3 +- keyboards/1upkeyboards/sweet16/rules.mk | 3 +- keyboards/1upkeyboards/sweet16/sweet16.h | 4 +-- 15 files changed, 26 insertions(+), 60 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/1up60hse.h b/keyboards/1upkeyboards/1up60hse/1up60hse.h index d24bbaabf604..f1b4f5e43e96 100644 --- a/keyboards/1upkeyboards/1up60hse/1up60hse.h +++ b/keyboards/1upkeyboards/1up60hse/1up60hse.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" @@ -36,4 +35,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D } \ } -#endif diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index f33e33fd9e47..72e6849e04f1 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -68,5 +68,6 @@ 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) +EXTRAFLAGS += -flto LAYOUTS = 60_ansi diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index 396b660803a2..8c3916629f1f 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -46,35 +46,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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)) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { writePinLow(B6); } else { writePinHigh(B6); } - - 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/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index b8b5582991ba..860a754a643d 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -54,5 +54,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes +EXTRAFLAGS += -flto LAYOUTS = 60_hhkb diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h index 6905fd220508..0f6818a6d861 100644 --- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h @@ -1,5 +1,4 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" @@ -77,5 +76,3 @@ K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \ ) - -#endif diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index 86696dab8457..fbafe0c44bc1 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/1upkeyboards/1up60rgb/readme.md b/keyboards/1upkeyboards/1up60rgb/readme.md index de3ad98b7388..ad733f6b5e55 100644 --- a/keyboards/1upkeyboards/1up60rgb/readme.md +++ b/keyboards/1upkeyboards/1up60rgb/readme.md @@ -1,4 +1,4 @@ -# 1upkeyboards 60% RGB +# 1up60rgb 60% RGB Firmware for custom keyboard PCB with 60% key layout. diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 540e4ea96c27..8b1cf6667fa1 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -44,15 +44,15 @@ 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 ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes +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 = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb diff --git a/keyboards/1upkeyboards/readme.md b/keyboards/1upkeyboards/readme.md index 4f075d827922..de8ae36acb6c 100644 --- a/keyboards/1upkeyboards/readme.md +++ b/keyboards/1upkeyboards/readme.md @@ -1,5 +1,7 @@ # 1UP Keyboards +1UP Keyboards is an online mechanical keyboard retailer located in New York, USA. + Website: [1UP Keyboards](https://www.1upkeyboards.com/) Discord: [Server Invite](https://discordapp.com/invite/c6SYn8) YouTube: [skiwithpete](https://www.youtube.com/user/skiwithpete) \ No newline at end of file diff --git a/keyboards/1upkeyboards/super16/keymaps/default/config.h b/keyboards/1upkeyboards/super16/keymaps/default/config.h index 16fc8b974680..26c6d6ade101 100644 --- a/keyboards/1upkeyboards/super16/keymaps/default/config.h +++ b/keyboards/1upkeyboards/super16/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 'mechmerlin' +/* Copyright 2019 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 diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index efcde883428f..8fb44b9b5cf0 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -80,4 +80,4 @@ 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) -LAYOUTS = ortho_4x4 \ No newline at end of file +LAYOUTS = ortho_4x4 diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index eedd3708f219..b05b5774006e 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -47,4 +46,3 @@ #define RGBLIGHT_VAL_STEP 8 #endif -#endif diff --git a/keyboards/1upkeyboards/sweet16/readme.md b/keyboards/1upkeyboards/sweet16/readme.md index 3b7b1d6f0b09..f096a5fc992a 100644 --- a/keyboards/1upkeyboards/sweet16/readme.md +++ b/keyboards/1upkeyboards/sweet16/readme.md @@ -1,5 +1,4 @@ -Sweet16 -=== +# Sweet 16 Macropad A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk index 212e74059e4b..e3436dc3387f 100644 --- a/keyboards/1upkeyboards/sweet16/rules.mk +++ b/keyboards/1upkeyboards/sweet16/rules.mk @@ -53,4 +53,5 @@ 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 = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes +EXTRAFLAGS += -flto diff --git a/keyboards/1upkeyboards/sweet16/sweet16.h b/keyboards/1upkeyboards/sweet16/sweet16.h index 879f51fae66a..7320ccd9e074 100644 --- a/keyboards/1upkeyboards/sweet16/sweet16.h +++ b/keyboards/1upkeyboards/sweet16/sweet16.h @@ -1,5 +1,4 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" @@ -29,4 +28,3 @@ { KC_NO, K31, K32, KC_NO } \ } -#endif From 65db4042603af6592b8433e384397eb880e5e1f5 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 26 Feb 2019 02:04:15 +0100 Subject: [PATCH 185/445] [Keymap] HS60 v2 ISO layout andys8 (#5235) --- keyboards/hs60/v2/keymaps/iso_andys8/keymap.c | 61 +++++++++++++++++++ .../hs60/v2/keymaps/iso_andys8/readme.md | 4 ++ 2 files changed, 65 insertions(+) create mode 100644 keyboards/hs60/v2/keymaps/iso_andys8/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/iso_andys8/readme.md diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c b/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c new file mode 100644 index 000000000000..12272ee79805 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// This is the ISO version of the PCB. With modifications by andys8 and an additional function layer. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_60_iso( /* 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_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \ + MO(1), 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_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso( /* FN */ + 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_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, KC_NO, \ + KC_LSFT, KC_NO, KC_APP, KC_PAUS, KC_INS, KC_NO, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + +[2] = LAYOUT_60_iso( /* Light (Default FN) */ + 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, 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), + +[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) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/readme.md b/keyboards/hs60/v2/keymaps/iso_andys8/readme.md new file mode 100644 index 000000000000..1b843feb92e6 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/iso_andys8/readme.md @@ -0,0 +1,4 @@ +The andys8 keymap for ISO HS60 V2 +================================== + +Default iso layout with minor modifications and additional function layer. \ No newline at end of file From 303859ea284ebd08e305ac1bd907aee399f5a01d Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:05:22 -0800 Subject: [PATCH 186/445] handwired/magicforce68: refactor, Configurator support, and readme cleanup (#5234) * handwired/magicforce68: refactor - layout macro KEYMAP renamed to LAYOUT - keymap now uses #include QMK_KEYBOARD_H - keymap now uses non-auto-prepended keycodes per QMK standard. - deleted deprecated and unused action_get_macro block from default keymap. * handwired/magicforce68: Configurator support * handwired/magicforce68: readme cleanup - updated to current QMK template - rename file to lowercase - fix make commands - Add Docs links --- keyboards/handwired/magicforce68/README.md | 20 ----- keyboards/handwired/magicforce68/info.json | 81 +++++++++++++++++++ .../magicforce68/keymaps/default/keymap.c | 73 +++++------------ .../handwired/magicforce68/magicforce68.h | 14 ++-- keyboards/handwired/magicforce68/readme.md | 24 ++++++ 5 files changed, 132 insertions(+), 80 deletions(-) delete mode 100644 keyboards/handwired/magicforce68/README.md create mode 100644 keyboards/handwired/magicforce68/info.json create mode 100644 keyboards/handwired/magicforce68/readme.md diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md deleted file mode 100644 index a0de66069db5..000000000000 --- a/keyboards/handwired/magicforce68/README.md +++ /dev/null @@ -1,20 +0,0 @@ -Magicforce 68 Handwired -======================= - -This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro. - -## Wiring Layout - -![Wiring Layout](http://i.imgur.com/NmTCv5u.png) - -## Pinout - -The following pins are used: -- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 -- Rows 1-5: F0, F1, F4, F5, F6 - -## Compiling and loading the firmware - -To build the firmware, run `make`. - -To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button. diff --git a/keyboards/handwired/magicforce68/info.json b/keyboards/handwired/magicforce68/info.json new file mode 100644 index 000000000000..a3905336ab88 --- /dev/null +++ b/keyboards/handwired/magicforce68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Magicforce 68 Handwired", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "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":"Insert", "x":15.25, "y":0}, + {"label":"Page Up", "x":16.25, "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":"Delete", "x":15.25, "y":1}, + {"label":"Page Down", "x":16.25, "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":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Up", "x":15.25, "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":"Fn", "x":10, "y":4, "w":1.25}, + {"label":"Alt", "x":11.25, "y":4, "w":1.25}, + {"label":"Ctrl", "x":12.5, "y":4, "w":1.25}, + {"label":"Left", "x":14.25, "y":4}, + {"label":"Down", "x":15.25, "y":4}, + {"label":"Right", "x":16.25, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c index 22553f714c30..e44cfefdb156 100644 --- a/keyboards/handwired/magicforce68/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -1,67 +1,34 @@ -#include "magicforce68.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS + #define KC_X0 LT(_FN2, KC_GRV) #define KC_X1 MO(_FN1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, - /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ - TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, - /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ - X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , - /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ - LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , - /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ - LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT - /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, 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_PGDN, \ + KC_X0, 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, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_X1, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [_FN1] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , , , , , , , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , , , , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , ,MUTE, , , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN1] = 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_F12, KC_BSPC, KC_VOLU, KC_HOME, \ + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, \ + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT \ ), - [_FN2] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , 0 , 1 , 2 , 3 , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN2] = 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_F12, KC_BSPC, KC_VOLU, KC_HOME, \ + _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END, \ + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT \ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h index cfcdce38d572..949507fef791 100644 --- a/keyboards/handwired/magicforce68/magicforce68.h +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -3,18 +3,18 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ ) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ + { 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, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/handwired/magicforce68/readme.md b/keyboards/handwired/magicforce68/readme.md new file mode 100644 index 000000000000..5b5ade3b7f38 --- /dev/null +++ b/keyboards/handwired/magicforce68/readme.md @@ -0,0 +1,24 @@ +# Magicforce 68 Handwired + +This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro. + +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: magicforce68, Arduino Micro + +## Wiring Layout + +![Wiring Layout](http://i.imgur.com/NmTCv5u.png) + +## Pinout + +The following pins are used: +- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 +- Rows 1-5: F0, F1, F4, F5, F6 + +Make example for this keyboard (after setting up your build environment): + + make handwired/magicforce68:default + +To flash the firmware onto the microcontroller, run `make handwired/magicforce68:default:avrdude`, and press the reset button. + +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 36fce12d080a4dd37a00f504396bd94b7a06e203 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 26 Feb 2019 01:07:58 +0000 Subject: [PATCH 187/445] [Keyboard] Initial refactor of maxipad to conform to current standards (#5233) --- keyboards/maxipad/config.h | 69 ++++++------------ keyboards/maxipad/info.json | 7 +- keyboards/maxipad/keymaps/default/config.h | 19 +++++ keyboards/maxipad/keymaps/default/keymap.c | 50 +++++++------ keyboards/maxipad/keymaps/default/readme.md | 1 + keyboards/maxipad/maxipad.c | 15 ++++ keyboards/maxipad/maxipad.h | 58 ++++++++++++--- keyboards/maxipad/promicro/config.h | 39 ++++++++++ keyboards/maxipad/promicro/promicro.c | 16 +++++ keyboards/maxipad/promicro/promicro.h | 20 ++++++ keyboards/maxipad/promicro/rules.mk | 58 +++++++++++++++ keyboards/maxipad/readme.md | 28 +++++--- keyboards/maxipad/rules.mk | 80 ++++----------------- keyboards/maxipad/teensy2/config.h | 39 ++++++++++ keyboards/maxipad/teensy2/rules.mk | 58 +++++++++++++++ keyboards/maxipad/teensy2/teensy2.c | 16 +++++ keyboards/maxipad/teensy2/teensy2.h | 19 +++++ 17 files changed, 438 insertions(+), 154 deletions(-) create mode 100644 keyboards/maxipad/keymaps/default/config.h create mode 100644 keyboards/maxipad/keymaps/default/readme.md create mode 100644 keyboards/maxipad/promicro/config.h create mode 100644 keyboards/maxipad/promicro/promicro.c create mode 100644 keyboards/maxipad/promicro/promicro.h create mode 100644 keyboards/maxipad/promicro/rules.mk create mode 100644 keyboards/maxipad/teensy2/config.h create mode 100644 keyboards/maxipad/teensy2/rules.mk create mode 100644 keyboards/maxipad/teensy2/teensy2.c create mode 100644 keyboards/maxipad/teensy2/teensy2.h diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index 1acd232c99ec..6d8225d74e95 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h @@ -1,22 +1,19 @@ -/* -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H +/* Copyright 2019 + * + * 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" @@ -28,37 +25,11 @@ along with this program. If not, see . #define PRODUCT maxipad #define DESCRIPTION A custom keyboard -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 6 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -//Pro micro pinout - #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } - #define MATRIX_COL_PINS { F4, C6, D7, F5, B4, B5 } - #define UNUSED_PINS -//Teensy 2 pinout - //#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } - //#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } - //#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ +/* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -86,4 +57,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/maxipad/info.json b/keyboards/maxipad/info.json index 3ee4830c47b8..84daa5aba4af 100644 --- a/keyboards/maxipad/info.json +++ b/keyboards/maxipad/info.json @@ -5,8 +5,11 @@ "width": 6, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_grid": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}] - } + }, + "LAYOUT_1x2uC": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"w": 2, "x":4, "y":4}] + } } } diff --git a/keyboards/maxipad/keymaps/default/config.h b/keyboards/maxipad/keymaps/default/config.h new file mode 100644 index 000000000000..08c234aee2b2 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 + * + * 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/maxipad/keymaps/default/keymap.c b/keyboards/maxipad/keymaps/default/keymap.c index 5cec84c5457c..0971569319a5 100644 --- a/keyboards/maxipad/keymaps/default/keymap.c +++ b/keyboards/maxipad/keymaps/default/keymap.c @@ -1,23 +1,33 @@ -#include "maxipad.h" +/* Copyright 2019 + * + * 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( /* Base */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ - KC_LCTL, KC_LALT, MO(1), KC_ENT,KC_GRV,KC_SPC \ -), -[1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ - KC_TRNS, KC_TRNS, KC_UP, 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_SPC \ -), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function -{ - return MACRO_NONE; + [0] = LAYOUT( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ + KC_LCTL, KC_LALT, MO(1), KC_ENT, KC_GRV, KC_SPC \ + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ + _______, _______, KC_UP, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ + ), }; diff --git a/keyboards/maxipad/keymaps/default/readme.md b/keyboards/maxipad/keymaps/default/readme.md new file mode 100644 index 000000000000..a6c0d4a3f046 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maxipad \ No newline at end of file diff --git a/keyboards/maxipad/maxipad.c b/keyboards/maxipad/maxipad.c index a193b112b91c..44a0c2b7428d 100644 --- a/keyboards/maxipad/maxipad.c +++ b/keyboards/maxipad/maxipad.c @@ -1 +1,16 @@ +/* Copyright 2019 + * + * 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 "maxipad.h" \ No newline at end of file diff --git a/keyboards/maxipad/maxipad.h b/keyboards/maxipad/maxipad.h index 613f7df22e3e..e2a08050538f 100644 --- a/keyboards/maxipad/maxipad.h +++ b/keyboards/maxipad/maxipad.h @@ -1,13 +1,39 @@ -#ifndef MAXIPAD_H -#define MAXIPAD_H +/* Copyright 2019 + * + * 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 following is an example using the Planck MIT layout -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define ___ KC_NO + +#ifdef KEYBOARD_maxipad_promicro + #include "promicro.h" +#elif KEYBOARD_maxipad_teensy2 + #include "teensy2.h" +#endif + +/* 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_grid( \ k00, k01, k02, k03, k04, k05, \ k10, k11, k12, k13, k14, k15, \ k20, k21, k22, k23, k24, k25, \ @@ -22,4 +48,20 @@ { k40, k41, k42, k43, k44, k45 } \ } -#endif +#define LAYOUT_1x2uC( \ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, ___, k44 } \ +} + +#define LAYOUT LAYOUT_grid +#define LAYOUT_ortho_5x6 LAYOUT_grid diff --git a/keyboards/maxipad/promicro/config.h b/keyboards/maxipad/promicro/config.h new file mode 100644 index 000000000000..008e7929cbbd --- /dev/null +++ b/keyboards/maxipad/promicro/config.h @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { F4, C6, D7, F5, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxipad/promicro/promicro.c b/keyboards/maxipad/promicro/promicro.c new file mode 100644 index 000000000000..4ecd97464525 --- /dev/null +++ b/keyboards/maxipad/promicro/promicro.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 "maxipad.h" diff --git a/keyboards/maxipad/promicro/promicro.h b/keyboards/maxipad/promicro/promicro.h new file mode 100644 index 000000000000..8f1419c9d7de --- /dev/null +++ b/keyboards/maxipad/promicro/promicro.h @@ -0,0 +1,20 @@ +/* Copyright 2019 + * + * 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 "maxipad.h" +#include "quantum.h" + diff --git a/keyboards/maxipad/promicro/rules.mk b/keyboards/maxipad/promicro/rules.mk new file mode 100644 index 000000000000..dc6f19623730 --- /dev/null +++ b/keyboards/maxipad/promicro/rules.mk @@ -0,0 +1,58 @@ +# 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 + + +# 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 diff --git a/keyboards/maxipad/readme.md b/keyboards/maxipad/readme.md index b62afdf34315..65661b065b3d 100644 --- a/keyboards/maxipad/readme.md +++ b/keyboards/maxipad/readme.md @@ -1,17 +1,27 @@ # Maxipad -## Quantum MK Firmware +![Maxipad](https://images.bigcartel.com/product_images/193297217/product_image.jpg) -For the full Quantum feature list, see [the parent readme.md](/readme.md). +5 x 6 Gamepad/Macropad PCBs from /u/wootpatoot -If you are using a pro micro then make sure to enable USE_PRO_MICRO in the makefile -Change the config.h pinout to match your mcu!! +- Multiple layouts supported + - Full-grid + - 2u thumb-key (the 2u only works in the bottom right position). +- Multiple controllers supported + - Pro Micro + - PJRC Teensy 2.0 -Depending on which keymap you would like to use, you will have to compile slightly differently. +Keyboard Maintainer: QMK Community +Hardware Supported: Maxipad PCB +Hardware Availability: [switchtop](http://www.switchtop.com/product/gamepad-macropad-pcbs) -### Default +Make example for this keyboard (after setting up your build environment): -To build with the default keymap, simply run `make maxipad:default`. + make maxipad:default -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. +If you would like to use one of the alternative controllers: + + make maxipad/promicro:default + make maxipad/teensy2: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/maxipad/rules.mk b/keyboards/maxipad/rules.mk index 31be1924fad3..735c7af26d69 100644 --- a/keyboards/maxipad/rules.mk +++ b/keyboards/maxipad/rules.mk @@ -1,76 +1,22 @@ - - -# MCU name -#MCU = at90usb1287 -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 - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - # Build Options -# comment out to disable the options. +# change yes to no to disable # -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 = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = lite # 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 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -USE_PRO_MICRO = yes 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 -MIDI_ENABLE = no # MIDI controls +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) + +DEFAULT_FOLDER = maxipad/promicro diff --git a/keyboards/maxipad/teensy2/config.h b/keyboards/maxipad/teensy2/config.h new file mode 100644 index 000000000000..4e43920d5afb --- /dev/null +++ b/keyboards/maxipad/teensy2/config.h @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } +#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxipad/teensy2/rules.mk b/keyboards/maxipad/teensy2/rules.mk new file mode 100644 index 000000000000..3fb7c7e5a7e4 --- /dev/null +++ b/keyboards/maxipad/teensy2/rules.mk @@ -0,0 +1,58 @@ +# 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 = halfkay + + +# 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 diff --git a/keyboards/maxipad/teensy2/teensy2.c b/keyboards/maxipad/teensy2/teensy2.c new file mode 100644 index 000000000000..4ecd97464525 --- /dev/null +++ b/keyboards/maxipad/teensy2/teensy2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 "maxipad.h" diff --git a/keyboards/maxipad/teensy2/teensy2.h b/keyboards/maxipad/teensy2/teensy2.h new file mode 100644 index 000000000000..acb213acc8b4 --- /dev/null +++ b/keyboards/maxipad/teensy2/teensy2.h @@ -0,0 +1,19 @@ +/* Copyright 2019 + * + * 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 "maxipad.h" +#include "quantum.h" From f019cd12a5c88ae50db97e996dd0d6b476b75d77 Mon Sep 17 00:00:00 2001 From: yttyx Date: Tue, 26 Feb 2019 01:09:42 +0000 Subject: [PATCH 188/445] [Keymap] Balance Twelve-based layout for Niu Mini (#5228) * Balance Twelve-based layout for Niu Mini. * niu - Changes following review. * niu - Changes following review. --- keyboards/niu_mini/keymaps/yttyx/README.md | 92 ++++++++++++++ keyboards/niu_mini/keymaps/yttyx/config.h | 4 + keyboards/niu_mini/keymaps/yttyx/keymap.c | 141 +++++++++++++++++++++ keyboards/niu_mini/keymaps/yttyx/rules.mk | 10 ++ 4 files changed, 247 insertions(+) create mode 100644 keyboards/niu_mini/keymaps/yttyx/README.md create mode 100644 keyboards/niu_mini/keymaps/yttyx/config.h create mode 100644 keyboards/niu_mini/keymaps/yttyx/keymap.c create mode 100644 keyboards/niu_mini/keymaps/yttyx/rules.mk diff --git a/keyboards/niu_mini/keymaps/yttyx/README.md b/keyboards/niu_mini/keymaps/yttyx/README.md new file mode 100644 index 000000000000..a48bdcca35f6 --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/README.md @@ -0,0 +1,92 @@ +# Overview + +This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) +for more information. It's designed for left-handers who use their right hand for the mouse. + +## To build + +``` +make niu_mini:yttyx +``` + +## To flash (example) + +``` +sudo dfu-programmer atmega32u4 erase +sudo dfu-programmer atmega32u4 flash niu_mini_yttyx.hex --debug 6 +sudo dfu-programmer atmega32u4 launch +``` + +## Layers + +### Base: + + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + +### P1: Punctuation (1) + + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### P2: Punctuation (2) + + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' + +### P3: Punctuation (3) + + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### Numerals / Cursor control + + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' + +### FV: Function keys / Cursor control (Vim) + + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' diff --git a/keyboards/niu_mini/keymaps/yttyx/config.h b/keyboards/niu_mini/keymaps/yttyx/config.h new file mode 100644 index 000000000000..b9e113ec0bb4 --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/config.h @@ -0,0 +1,4 @@ +#pragma once +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/niu_mini/keymaps/yttyx/keymap.c b/keyboards/niu_mini/keymaps/yttyx/keymap.c new file mode 100644 index 000000000000..6a9398dff904 --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/keymap.c @@ -0,0 +1,141 @@ + +#include QMK_KEYBOARD_H + +enum layers { + BA, // Base (Balance Twelve mirror varian) + P1, // Punctuation (1) + P2, // Punctuation (2) + P3, // Punctuation (2) + NC, // Numerals / Cursor control + FV // Function keys / Cursor control (Vim) +}; + +// Abbreviations - base +#define KX_P1_BSPC LT(P1, KC_BSPC) +#define KX_P2_SPC LT(P2, KC_SPC) + +#define KX_SFT_Z MT(MOD_LSFT, KC_Z) +#define KX_CTL_J MT(MOD_LCTL, KC_J) +#define KX_ALT_F MT(MOD_LALT, KC_F) + +#define KX_ALT_DOT MT(MOD_LALT, KC_DOT) +#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN) +#define KX_SFT_X MT(MOD_LSFT, KC_X) + +#define KX_AT LSFT(KC_QUOT) +#define KX_DQUOT LSFT(KC_2) +#define KX_PIPE LSFT(KC_NUBS) +#define KX_TILDA LSFT(KC_NUHS) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + */ + [BA] = LAYOUT( + KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q, + KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, XXXXXXX, KC_A, KC_E, KC_I, KC_H, KC_V, + KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, XXXXXXX, XXXXXXX, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI, + XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P1: Punctuation (1) + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + */ + [P1] = LAYOUT( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P2: Punctuation (2) + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' + */ + [P2] = LAYOUT( + KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX, + KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, XXXXXXX, XXXXXXX, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P3: Punctuation (3) + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' + */ + [P3] = LAYOUT( + KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL, + KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* NC: Numerals / Cursor control + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' + */ + [NC] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, XXXXXXX, XXXXXXX, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* FV: Function keys / Cursor control (Vim) + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' + */ + [FV] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) + +}; + diff --git a/keyboards/niu_mini/keymaps/yttyx/rules.mk b/keyboards/niu_mini/keymaps/yttyx/rules.mk new file mode 100644 index 000000000000..d8b21aa842da --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/rules.mk @@ -0,0 +1,10 @@ +# Build Options +AUDIO_ENABLE = no +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = no +MIDI_ENABLE = no +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +STENO_ENABLE = no +VIRTSER_ENABLE = no From 5838c458d74b6a4af6c65a9d6cdf346db999e980 Mon Sep 17 00:00:00 2001 From: Nick Christus <136611+nchristus@users.noreply.github.com> Date: Mon, 25 Feb 2019 19:24:11 -0600 Subject: [PATCH 189/445] [Keyboard] Added Boardwalk keyboard (#5195) * initial commit * removed key for fn layer * added missing row, misc cleanup * added nchristus keymap, more misc cleanup * Updating ergo60.h, rules * Adding McAllaster keymap * added a bunch of keymaps * added LED code * added userspace * ls vitamins keymap * added Boardwalk keyboard * boardwalk: removed unrelated files * boardwalk: undoing tkc1800 change * boardwalk: undoing tkc1800 change * nchristus keymap cleanup * boardwalk: updates per PR feedback * boardwalk: updated bootloader * boardwalk: additional updates from PR review --- keyboards/boardwalk/boardwalk.h | 78 +++++++++ keyboards/boardwalk/config.h | 84 +++++++++ keyboards/boardwalk/keymaps/default/config.h | 16 ++ keyboards/boardwalk/keymaps/default/keymap.c | 162 ++++++++++++++++++ keyboards/boardwalk/keymaps/default/readme.md | 1 + .../boardwalk/keymaps/mcallaster/keymap.c | 54 ++++++ .../boardwalk/keymaps/nchristus/config.h | 16 ++ .../boardwalk/keymaps/nchristus/keymap.c | 62 +++++++ .../boardwalk/keymaps/nchristus/readme.md | 1 + .../boardwalk/keymaps/nchristus/rules.mk | 14 ++ keyboards/boardwalk/rules.mk | 66 +++++++ 11 files changed, 554 insertions(+) create mode 100644 keyboards/boardwalk/boardwalk.h create mode 100644 keyboards/boardwalk/config.h create mode 100644 keyboards/boardwalk/keymaps/default/config.h create mode 100644 keyboards/boardwalk/keymaps/default/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default/readme.md create mode 100644 keyboards/boardwalk/keymaps/mcallaster/keymap.c create mode 100644 keyboards/boardwalk/keymaps/nchristus/config.h create mode 100644 keyboards/boardwalk/keymaps/nchristus/keymap.c create mode 100644 keyboards/boardwalk/keymaps/nchristus/readme.md create mode 100644 keyboards/boardwalk/keymaps/nchristus/rules.mk create mode 100644 keyboards/boardwalk/rules.mk diff --git a/keyboards/boardwalk/boardwalk.h b/keyboards/boardwalk/boardwalk.h new file mode 100644 index 000000000000..580a320c1f91 --- /dev/null +++ b/keyboards/boardwalk/boardwalk.h @@ -0,0 +1,78 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x14( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 } \ +} + +#define LAYOUT_ortho_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k41, k42, k43, k44, k45, k47, k49, k410, k411, k412 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k410, k411, k412, KC_NO } \ +} + +#define LAYOUT_ortho_7u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k41, k42, k46, k411, k412 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, KC_NO } \ +} + +#define LAYOUT_2u_arrow( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k43, k44, k46, k48, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, k43, k44, KC_NO, k46, KC_NO, k48, k49, k410, k411, k412, k413 } \ +} + +#define LAYOUT_625u_arrow( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k45, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k410, k411, k412, k413 } \ +} diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h new file mode 100644 index 000000000000..67352b80d0b7 --- /dev/null +++ b/keyboards/boardwalk/config.h @@ -0,0 +1,84 @@ +/* +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 0xCDCD +#define PRODUCT_ID 0x5337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER shens +#define PRODUCT Boardwalk +#define DESCRIPTION QMK keyboard firmware for Boardwalk + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * 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 { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F5 +// #define BACKLIGHT_LEVELS 6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +/* + * 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 + +// ws2812 options +#define RGB_DI_PIN B7 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 14 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) diff --git a/keyboards/boardwalk/keymaps/default/config.h b/keyboards/boardwalk/keymaps/default/config.h new file mode 100644 index 000000000000..a2530241f477 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default/config.h @@ -0,0 +1,16 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once diff --git a/keyboards/boardwalk/keymaps/default/keymap.c b/keyboards/boardwalk/keymaps/default/keymap.c new file mode 100644 index 000000000000..fddb3da8251f --- /dev/null +++ b/keyboards/boardwalk/keymaps/default/keymap.c @@ -0,0 +1,162 @@ +/* + * 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 + +// Layer shorthand +enum layer { + _1U, + _FN, + _HHKB, + _7U, + _2UARROW, + _625UARROW, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 1uGrid + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | SPACE | RIGHT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_1U] = LAYOUT_ortho_5x14( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, 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_QUOT, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL \ + ), + + /* HHKB + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | LCTRL | FN | LALT | LGUI | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_HHKB] = LAYOUT_ortho_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_RSFT, \ + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* 7u HHKB + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | LCTRL | LALT | SPACE | RALT | FN | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_7U] = LAYOUT_ortho_7u( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_RSFT, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(1) \ + ), + + /* 2x2u Space with Arrows + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | RALT | RGUI | RCTRL | LEFT | DOWN | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_2UARROW] = LAYOUT_2u_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_QUOT, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, 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_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* 6.25u Space with Arrows + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | SPACE | FN | RCTRL | LEFT | DOWN | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_625UARROW] = LAYOUT_625u_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_QUOT, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, 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_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + +/* FUNCTION + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + + [_FN] = LAYOUT_ortho_5x14( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/boardwalk/keymaps/default/readme.md b/keyboards/boardwalk/keymaps/default/readme.md new file mode 100644 index 000000000000..73cf19b06fbd --- /dev/null +++ b/keyboards/boardwalk/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/mcallaster/keymap.c b/keyboards/boardwalk/keymaps/mcallaster/keymap.c new file mode 100644 index 000000000000..9ec6f926711b --- /dev/null +++ b/keyboards/boardwalk/keymaps/mcallaster/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _BASE, + _LOWER, + _RAISE, + _FN +}; + +#define LOWER MO(1) +#define RAISE MO(2) +#define FN MO(3) + +// Mac sleep +#define __SLEEP S(LCTL(KC_POWER)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_SLCK, KC_PSCR, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, 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_END, KC_PGDN, 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_DEL, KC_INS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_CAPS, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_RGUI, KC_RALT, KC_RCTL + ), + + [_LOWER] = LAYOUT_ortho_hhkb( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PAUS, KC_NLCK, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, \ + _______, 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_LBRC, KC_RBRC, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ortho_hhkb( + _______, KC_F11, KC_F12, _______, _______, _______, KC_PAUS, KC_NLCK, _______, _______, _______, _______, _______, _______, \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT_ortho_hhkb( + __SLEEP, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \ + _______, RESET, _______, KC_MPRV, KC_MNXT, _______, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, \ + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, RGB_SAD, RGB_HUD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _FN); +} diff --git a/keyboards/boardwalk/keymaps/nchristus/config.h b/keyboards/boardwalk/keymaps/nchristus/config.h new file mode 100644 index 000000000000..a2530241f477 --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/config.h @@ -0,0 +1,16 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once diff --git a/keyboards/boardwalk/keymaps/nchristus/keymap.c b/keyboards/boardwalk/keymaps/nchristus/keymap.c new file mode 100644 index 000000000000..57b6736cbb57 --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/keymap.c @@ -0,0 +1,62 @@ +/* + * 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 + +// Layer shorthand +#define _QW 0 + +#define LOWER LT(1, KC_SPC) +#define RAISE LT(2, KC_ENT) + +#define CTRLESC CTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWE: Base Layer (Default Layer) */ + [_QW] = LAYOUT_ortho_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC, \ + CTRLESC, 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_RSFT, \ + MO(3), KC_LCTL, KC_LALT, KC_LGUI, RAISE, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Keymap LOWER: Lower Layer */ + [1] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ + ), + + /* Keymap RAISE: Raise Layer */ + [2] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______ + ), + + /* Keymap _FL: Function Layer */ + [3] = LAYOUT_ortho_hhkb( + RESET, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/boardwalk/keymaps/nchristus/readme.md b/keyboards/boardwalk/keymaps/nchristus/readme.md new file mode 100644 index 000000000000..73cf19b06fbd --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/readme.md @@ -0,0 +1 @@ +# The default keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/nchristus/rules.mk b/keyboards/boardwalk/keymaps/nchristus/rules.mk new file mode 100644 index 000000000000..b07a6475be53 --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/rules.mk @@ -0,0 +1,14 @@ +# 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 . + +RGBLIGHT_ENABLE = yes diff --git a/keyboards/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk new file mode 100644 index 000000000000..0a02497bc3bb --- /dev/null +++ b/keyboards/boardwalk/rules.mk @@ -0,0 +1,66 @@ +# 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 + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 = 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +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 + +LAYOUTS = ortho_5x14 From 7a89b39aadc347a9bbb73601b52ac65704f09da8 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Mon, 25 Feb 2019 21:16:20 -0500 Subject: [PATCH 190/445] [Keymap] HS60 v2 keymap updates (#5250) * Add backlight controls * Add backlight controls and remove RGB underglow * Make HS60 board specific changes to readme * Remove BL_TOGG as it isn't use on this board --- keyboards/hs60/v2/keymaps/stanrc85/config.h | 23 --------- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 14 ++++-- keyboards/hs60/v2/keymaps/stanrc85/readme.md | 50 ++++++++++++++++++-- keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 2 + 4 files changed, 59 insertions(+), 30 deletions(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h index 4be7965e3df9..4443dcd50ea7 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/config.h +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -1,25 +1,2 @@ -/* -Copyright 2019 Stanrc85 - -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 overwrites for specific keymap */ - -#define HS60_ANSI -#undef PRODUCT_ID -#define PRODUCT_ID 0x4854 #define TAPPING_TERM 200 #define RETRO_TAPPING diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index d8d79a581c80..add0609034c8 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -64,13 +64,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______), [3] = LAYOUT_60_ansi( - _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, + TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; +// Backlight specific keys: +// EF_INC, EF_DEC, // next/previous backlight effect +// H1_INC, H1_DEC, // Color 1 hue increase/decrease +// S1_INC, S1_DEC, // Color 1 saturation increase/decrease +// H2_INC, H2_DEC, // Color 2 hue increase/decrease +// S2_INC, S2_DEC, // Color 2 saturation increase/decrease +// BR_INC, BR_DEC, // backlight brightness increase/decrease + bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/keymaps/stanrc85/readme.md index 650871a5e689..4e978e771091 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/readme.md +++ b/keyboards/hs60/v2/keymaps/stanrc85/readme.md @@ -1,6 +1,48 @@ -The default keymap for ANSI HS60 V2 -=================================== + + +# Stanrc85's Standard ANSI 60% Layout + +## Keymap Notes +- Layer 0 is default QWERTY layout with additional custom features: + - SpaceFN to function layer 2 on `Space` + - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` + - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` + - Tap Dance on `ESC` for `ESC` and ` ` ` + +![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) + +- Layer 1 is default QWERTY with no custom features used mostly for gaming + - Enabled by `Fn2+CAPS` from base layer + +![Default ANSI Layer](https://imgur.com/M7T9PNT.png) + +- Layer 2 is Function layer: + - F keys + - Arrows + - Volume and Media controls + - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script + - AHK Mic is used to mute/unmute microphone + - AHK Speaker switches audio output between headphones and speakers + +![Function Layer](https://imgur.com/YPl0JrU.png) + +- Layer 3 is Backlight control and RESET + - `Fn2+CAPS` used to toggle Default QWERTY layer on and off + +![RGB and RESET Layer](https://imgur.com/1ScpRE4.png) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`. diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index e5ddcae8d927..2a173b316c1d 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -1 +1,3 @@ TAP_DANCE_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = no + From 80ddb344152e4ef6663f9b079677b8154fcffbec Mon Sep 17 00:00:00 2001 From: VM Date: Tue, 26 Feb 2019 00:30:26 -0500 Subject: [PATCH 191/445] [Keymap] adding my Levinson keymap (#5177) * [keymap] adding my Levinson keymap pretty self explanatory, added the readme, just in case tested it just now, seems to work fine for my needs * Update keymap.c removing the deprecated persistent layer function as Drashna kindly reminded me * Apply suggestions from code review incorporated the suggestions, and thanks again for taking care of me with my silly changes :) Co-Authored-By: OMGVee * Fix up audio calls --- .../keebio/levinson/keymaps/omgvee/config.h | 26 +++ .../keebio/levinson/keymaps/omgvee/keymap.c | 185 ++++++++++++++++++ .../keebio/levinson/keymaps/omgvee/readme.md | 21 ++ .../keebio/levinson/keymaps/omgvee/rules.mk | 11 ++ 4 files changed, 243 insertions(+) create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/config.h create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/keymap.c create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/readme.md create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/rules.mk diff --git a/keyboards/keebio/levinson/keymaps/omgvee/config.h b/keyboards/keebio/levinson/keymaps/omgvee/config.h new file mode 100644 index 000000000000..ba005c0b25b3 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/config.h @@ -0,0 +1,26 @@ +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#undef PRODUCT +#define PRODUCT "Vee's hotswappable LEVINSON purely ortholinear keeb" + diff --git a/keyboards/keebio/levinson/keymaps/omgvee/keymap.c b/keyboards/keebio/levinson/keymaps/omgvee/keymap.c new file mode 100644 index 000000000000..8dab1c2745c4 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/keymap.c @@ -0,0 +1,185 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _FN3 5 +#define _FN4 6 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + FN3, + FN4, + ADJUST, +}; + +#define KC_ KC_TRNS + +#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen +#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen +#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen +#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen +#define KC_X0 MT(MOD_LCTL, KC_ESC) +#define KC_SCAP SFT_T(KC_CAPS) +#define KC_LOW LOWER +#define KC_RAIS RAISE +#define KC_X3 LT(_FN3, KC_GRV) +#define KC_SENT MT(MOD_LSFT, KC_ENT) +#define KC_X5 BL_STEP +#define KC_CTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GESC, Q , W , E , R , T , Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI,LOW ,ENT , SPC,RAIS,RALT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, NO ,HOME,PGDN,PGUP, END, LEFT,DOWN, UP ,RGHT, INS, DEL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB , F1 , F2 , F3 , F4 , F5 , F6, F7 , F8 , F9 , F10, F11, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , F12 + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB, EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, DEL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, , , , , , MINS, EQL, ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB, , , , , , UNDS,PLUS,VOLD,VOLU,MUTE,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , NO + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_COLEMAK] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GESC, Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, A , R , S , T , D , H , N , E , I , O ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_DVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , O , E , U , I , D , H , T , N , S ,SLSH, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_FN3] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , MS_L,MS_D,MS_U,MS_R,WH_L,WH_R, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , BTN1,WH_D,WH_U,BTN2, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + RESET, QWERTY, COLEMAK, DVORAK, _______, EEP_RST, KC_MNXT, KC_MPRV, KC_MFFD, KC_MRWD, DVORAK, KC_EJCT, \ + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_PGUP, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CK_UP, CK_DOWN, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_PGDN, KC_END, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, \ + BL_TOGG, BL_INC, BL_DEC, BL_BRTG, _______, _______, CK_RST, _______, CK_TOGG, MU_MOD, MU_TOG, AU_TOG \ + ) + + +}; + +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) { + 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/keebio/levinson/keymaps/omgvee/readme.md b/keyboards/keebio/levinson/keymaps/omgvee/readme.md new file mode 100644 index 000000000000..f882c98b0bfd --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/readme.md @@ -0,0 +1,21 @@ +# What I want from my LEVINSON (Let's Split on steroids) keymap +==================================================================================================== + + +![My indigo Levinson keeb](https://i.imgur.com/sPfzSTk.jpg) + +- media keys and media controls, including Eject, for however rare those computers with OSX *and* bloody optical drives might be +- in-switch LED intensity controls (+/-) +- underglow RGB hue/color controls +- underglow RGB intensity controls +- familiar key arrangement with Enter and symbols on the usual keys (to the right hand side, on some layer, pref RAISE for one-handed operation) +- navigation keys should be the vim ones really; +- arrow keys on one layer(most likely on the ADJUST one, but also on LOWER, as per my usual other split keebs) +- mouse keys too +- hardware reset for the ProMicro to put it bootloader mode, sounds, eeprom reset, backlights and rgb controls reset, etc. + +See keymap.c for layouts +See config.h for various toggles and flags + + +P.S> this is my first fully and purely ortholinear keyboard, as opposed to my [Iris](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/iris/keymaps/omgvee "Vee's Iris keeb"), [Helidox](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/omgvee "Vee's beloved Helidox keeb"), MiniDox, etc., which are mildly staggered, but on the vertical side, which seems better imho than this... but we'll see how I get on with it over time... diff --git a/keyboards/keebio/levinson/keymaps/omgvee/rules.mk b/keyboards/keebio/levinson/keymaps/omgvee/rules.mk new file mode 100644 index 000000000000..3540947ac5ab --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/rules.mk @@ -0,0 +1,11 @@ +EXTRAFLAGS += -flto +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +TAP_DANCE_ENABLE = no +NKRO_ENABLE = yes +LEADER_ENABLE = no +UNICODE_ENABLE = yes +AUDIO_ENABLE = yes From 7ba2bc765be62f969668847797b7eb3e6665db48 Mon Sep 17 00:00:00 2001 From: Stick <8531041+nstickney@users.noreply.github.com> Date: Tue, 26 Feb 2019 01:26:39 -0500 Subject: [PATCH 192/445] [Keymap] nstickney's layout for iris (#5045) --- .../keebio/iris/keymaps/nstickney/README.md | 46 +++ .../keebio/iris/keymaps/nstickney/config.h | 40 +++ .../keebio/iris/keymaps/nstickney/keymap.c | 165 ++++++++++ .../keebio/iris/keymaps/nstickney/rules.mk | 4 + layouts/community/ergodox/familiar/README.md | 69 ----- layouts/community/ergodox/familiar/keymap.c | 281 ------------------ layouts/community/ergodox/nstickney/keymap.c | 213 +++++++++++++ .../ergodox/{familiar => nstickney}/rules.mk | 0 8 files changed, 468 insertions(+), 350 deletions(-) create mode 100644 keyboards/keebio/iris/keymaps/nstickney/README.md create mode 100644 keyboards/keebio/iris/keymaps/nstickney/config.h create mode 100644 keyboards/keebio/iris/keymaps/nstickney/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/nstickney/rules.mk delete mode 100644 layouts/community/ergodox/familiar/README.md delete mode 100644 layouts/community/ergodox/familiar/keymap.c create mode 100644 layouts/community/ergodox/nstickney/keymap.c rename layouts/community/ergodox/{familiar => nstickney}/rules.mk (100%) diff --git a/keyboards/keebio/iris/keymaps/nstickney/README.md b/keyboards/keebio/iris/keymaps/nstickney/README.md new file mode 100644 index 000000000000..1cafce67f8d7 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/README.md @@ -0,0 +1,46 @@ +# nstickney's Iris Layout + + > Familiar layout for users who regularly switch between Iris and more standard layouts. + +[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme) + +## Install + +For instructions on building and installing this keymap, see the [docs](https://docs.qmk.fm/#/getting_started_make_guide). Below is the command for me; it may be different for you. + +```sh +$ make keebio/iris/rev2:nstickney:avrdude +``` + +## Usage + +0. QWERTY `BASE` layer. + * `/`, `\\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters. + * `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`. `'` can also be held for `CTRL`. + * [Space-Cadet Shift](/docs/docs/feature_space_cadet_shift.md) is enabled, so the `SHIFT` keys send `(` and `)` when tapped. + * Hold down `/` or `=` for `ALT`. + * Hold down `\\` or `-` to access the functions layer. + * Upper-center thumb keys are `GUI` and `MENU`. + * Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively. + * Tapping `MENU` 2, 3, or 4 times will toggle the `NUMP`, `SYMB`, and `SYSH` layers, respectively. +0. Unicode-input symbols on `SYMB` and `SYSH` layers. Based (loosely) on US-International layout. +0. `NUMP` layer has number pads on each hand. Number pad `7`-`8`-`9` align with QWERTY `7`-`8`-`9` on right hand. +0. Function, arrow, media, and miscellaneous keys on `FCTN` layer. + * `F1` through `F10` on `1`-`10`. `F11` is on `GUI` and `F12` is on `MENU`. + * Brackets (`[` and `]`) available on `U` and `I`; braces (`{` and `}`) on `O` and `P`. + * Arrow keys on `ESDF` and `HJKL`; familiar for both Vim users and FPS gamers. + * `W` is `HOME`; `R` is `END`. `T` is `PAGE UP` and `G` is `PAGE DOWN`. + * Music controls on lower row of left hand. + * Volume and screen brightness on lower row of right hand. + * `PRINT SCREEN`, `PAUSE`, `SYSREQ`, `INSERT`, and `CLEAR` also mapped, as intelligently as possible. + * `A` toggles the RGB underglow (which changes color to indicate active layer). + * `Q` toggles the Unicode input through Linux, WinCompose, and MacOS. + +## Contribute + +If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls). + + +## License + +Copyright © 2016-2019 @nstickney. Released under [GPL-2.0](/LICENSE). diff --git a/keyboards/keebio/iris/keymaps/nstickney/config.h b/keyboards/keebio/iris/keymaps/nstickney/config.h new file mode 100644 index 000000000000..0aeb87e6232a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/config.h @@ -0,0 +1,40 @@ +/* +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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + +// Unicode input +#undef UNICODE_SELECTED_MODES +#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC diff --git a/keyboards/keebio/iris/keymaps/nstickney/keymap.c b/keyboards/keebio/iris/keymaps/nstickney/keymap.c new file mode 100644 index 000000000000..609139985850 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/keymap.c @@ -0,0 +1,165 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Layers +#define BASE 0 // Base layer +#define SYMB 1 // Symbols +#define SYSH 2 // Symbols, shifted +#define NUMP 4 // Numpad +#define FCTN 8 // Functions + +// Tap Dancing +void dance_lock (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count){ + case 1: // Press once for LGUI + tap_code(KC_LGUI); + break; + case 2: // Press twice for NUMLOCK + tap_code(KC_NLCK); + break; + case 3: // Press thrice for CAPSLOCK + tap_code(KC_CAPS); + break; + case 4: // Press four times for SCROLLOCK + tap_code(KC_SLCK); + break; + default: + break; + } +}; + +void dance_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state -> count) { + case 1: // Press once for MENU + tap_code(KC_APP); + break; + case 2: // Press twice for NUMPAD + layer_invert(NUMP); + break; + case 3: // Press thrice for SYMBOLS + layer_invert(SYMB); + break; + case 4: // Press four times for SYMBOLS, SHIFTED + layer_invert(SYSH); + break; + default: + break; + } +}; + +enum tap_dances {LOCKS = 0, LAYERS = 1}; +qk_tap_dance_action_t tap_dance_actions[] = { + [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock), + [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) +}; + +// Make layering more clear +#define CC_ESC LCTL_T(KC_ESC) +#define CC_QUOT RCTL_T(KC_QUOT) +#define AC_SLSH LALT_T(KC_SLSH) +#define AC_EQL RALT_T(KC_EQL) +#define FC_BSLS LT(FCTN, KC_BSLS) +#define FC_MINS LT(FCTN, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TD(LOCKS), TD(LAYERS),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + AC_SLSH, FC_BSLS, KC_SPC, KC_ENT, FC_MINS, AC_EQL +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [SYMB] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + UC(0x00EF),UC(0x00A1),UC(0x00B2),UC(0x00B3),UC(0x00A4),UC(0x20AC), UC(0x00BC),UC(0x00BD),UC(0x00BE),UC(0x2018),UC(0x2019),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00E4),UC(0x00E5),UC(0x00E9),UC(0x00AE),UC(0x00FE), UC(0x00FC),UC(0x00FA),UC(0x00ED),UC(0x00F3),UC(0x00F6),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00E1),UC(0x00DF),UC(0x00F0),UC(0x00EC),UC(0x00ED), UC(0x00EE),UC(0x00E0),UC(0x00E2),UC(0x00F8),UC(0x00B6),UC(0x00B4), +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00E6),UC(0x00E8),UC(0x00A9),UC(0x00EA),UC(0x00EB),_______, _______, UC(0x00F1),UC(0x00FD),UC(0x00E7),UC(0x00F4),UC(0x00BF),_______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + UC(0x00BF),UC(0x00AC),_______, _______, UC(0x00B1),UC(0x00D7) +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [SYSH] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + UC(0x00CF),UC(0x00B9),UC(0x2200),UC(0x2201),UC(0x00A3),UC(0x00A5), UC(0x00B5),UC(0x00AB),UC(0x00BB),UC(0x201C),UC(0x201D),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00C4),UC(0x00C5),UC(0x00C9),UC(0x2122),UC(0x00DE), UC(0x00DC),UC(0x00DA),UC(0x00CD),UC(0x00D3),UC(0x00D6),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00C1),UC(0x00A7),UC(0x00D0),UC(0x00CC),UC(0x00CD), UC(0x00CE),UC(0x00C1),UC(0x00C2),UC(0x00D8),UC(0x00B0),UC(0x00A8), +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00C6),UC(0x00C8),UC(0x00A2),UC(0x00CA),UC(0x00CB),_______, _______, UC(0x00D1),UC(0x00DD),UC(0x00C7),UC(0x00D4),UC(0x203D),_______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + UC(0x203D),UC(0x00A6),_______, _______, UC(0x00AA),UC(0x00F7) +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [NUMP] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + _______, _______, _______, KC_PENT, _______, _______ +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [FCTN] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_PSCR, UC_MOD, KC_HOME, KC_UP, KC_END, KC_PGUP, UC(0x2014),KC_LBRC, KC_RBRC, S(KC_LBRC),S(KC_RBRC),KC_INS, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_PAUS, RGB_TOG, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, KC_F11, KC_F12, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, _______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + _______, _______, _______, _______, _______, _______ +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ) +}; + +// Initialize rgblight +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + for (int i = 360; i > 0; i--) { + rgblight_sethsv_noeeprom(i, 255, 255); + } + layer_state_set_user(layer_state); +}; + +// Turn on RGB underglow according to active layer +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case FCTN: + rgblight_sethsv_noeeprom(136, 255, 255); + break; + case NUMP: + rgblight_sethsv_noeeprom(228, 255, 255); + break; + case SYMB: + case SYSH: + rgblight_sethsv_noeeprom(320, 255, 255); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_noeeprom(19, 255, 255); + break; + } + return state; +}; diff --git a/keyboards/keebio/iris/keymaps/nstickney/rules.mk b/keyboards/keebio/iris/keymaps/nstickney/rules.mk new file mode 100644 index 000000000000..851fc924e8e0 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/rules.mk @@ -0,0 +1,4 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE=yes +UNICODE_ENABLE = yes diff --git a/layouts/community/ergodox/familiar/README.md b/layouts/community/ergodox/familiar/README.md deleted file mode 100644 index 8d68af21a308..000000000000 --- a/layouts/community/ergodox/familiar/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# ErgoDox Familiar Layout -Familiar layout for those who regularly switch back and forth from ErgoDox to "normal" QWERTY. - -[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](../../../../license_GPLv3.md) [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme) - -## Table of Contents - -- [Background](#background) -- [Install](#install) -- [Usage](#usage) - - [Layers](#layers) -- [Contribute](#contribute) - - [Issues](#issues) -- [License](#license) - -## Background - -This layout is built to be as familiar as possible for users coming directly from a default (QWERTY US) keyboard, while gaining as much advantage as possible from the ErgoDox and QMK featureset. I use an ErgoDoxEZ at home, but I don't have a regular office (CS grad student) so I regularly use either my laptop or a default-setup lab computer; I context switch daily so this layout is meant to reduce the mental overhead as much as possible. - -The default ErgoDoxEZ layout is probably more optimized as a solo daily driver - as are a lot of the others available keymaps. The focus of this layout is to get as much from the 'Dox as possible without overly disrupting long-established muscle memory. - -Key features of the familiar layout: -1. QWERTY default layout. -1. International symbols layer, mapped in the US-International layout default positions, through [UCIS](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable). -1. Numpad layer on right hand. -1. Thumb cluster holds spacebar and access to secondary layers. -1. Function-layer arrow keys in both the first-person-shooter (actually ESDF instead of WASD) and vim (HJKL) locations. - -## Install - -If you are on Windows or Mac, choose the proper line in [`keymap.c`](keymap.c) for [unicode/international character support](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable) (starts at line 253). -```c -void matrix_init_user(void) { - set_unicode_input_mode(UC_LNX); // Linux - //set_unicode_input_mode(UC_OSX); // Mac OSX - //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) - //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) -}; -``` - -For instructions on building and installing this keymap, [go to the wiki](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox#build-dependencies). Below is the command for me; it may be different for you. -```sh -$ make ergodox-ez-familiar-teensy -``` - -## Usage - -[![Familiar Layout](http://i.imgur.com/6nLN9UT.png)](https://gist.github.com/nstickney/13508a9f99cff381d58b7be6f7dcc644) - -### Layers -1. Base Layer: QWERTY, with arrow keys at bottom right. -1. UCIS Layer: US-International symbols layer, plus —. Accessed by toggling the `SYMB` layer using the UCIS key (bottom of left thumb cluster). -1. UCIS-Shifted Layer: Making shift work for UCIS characters. An ugly workaround. Any ideas? Accessed by holding shift while the `SYMB` layer is active (toggles the `CSYM` layer). -1. Numpad Layer: Right hand number pad. Accessed by toggling the `NUMP` layer using the NUMP key (bottom of right thumb cluster). -1. Function Layer: F1-F12, arrows on ESDF and HJKL, media player controls. Accessed by holding either FN key (center key of each thumb cluster), which toggles the `ARRW` layer. I know, I need to work on my naming conventions. - -## Contribute - -[Contributor Covenant](http://contributor-covenant.org/) - -I'm terrible at this; I have no background in human-computer interaction, kinesiology, or keyboard-ology. Please send comments/issues/pull requests/angry tweets/etc. If you think there is a better way to take advantage of the ErgoDox/QMK comination without straying far from 84/101-key QWERTY, I want to know it. - -### Issues -1. The `CSYM` layer is an ugly workaround. I should write a function for doing different things in the `SYMB` layer depending on whether SHIFT is being held. Or something. Ideas? -1. Right now, the thumb cluster function keys double as slash and whack... this really isnt a great solution. -1. `MENU` and `LEAD` are useless, at the moment. - -## License -QMK is licensed ([mostly](https://github.com/qmk/qmk_firmware/issues/1038)) under the [GPLv2](../../../../license_GPLv2.md). Accordingly, to whatever extent applicable, this keymap is licensed under the [GPLv3](../../../../license_GPLv3.md). diff --git a/layouts/community/ergodox/familiar/keymap.c b/layouts/community/ergodox/familiar/keymap.c deleted file mode 100644 index b359a91d3677..000000000000 --- a/layouts/community/ergodox/familiar/keymap.c +++ /dev/null @@ -1,281 +0,0 @@ -#include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -// Layers -#define BASE 0 // default layer -#define SYMB 1 // international symbols -#define CSYM 2 // international symbols shifted -#define NUMP 3 // numpad -#define ARRW 4 // function, media, arrow keys - -// Tap Dancing -void dance_lock (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { // Press once for NUMLOCK - register_code (KC_NLCK); - unregister_code (KC_NLCK); - } else if (state->count == 2) { // Press twice for CAPSLOCK - register_code (KC_CAPS); - unregister_code (KC_CAPS); - } else if (state->count == 3) { //Press thrice for SCROLLLOCK - register_code (KC_SLCK); - unregister_code (KC_SLCK); - } -} -enum {LOCKS = 0}; -qk_tap_dance_action_t tap_dance_actions[] = { - [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock) -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -/* layer 0 : default - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ' | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | - * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| - * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCTRL | LGUI | MENU | LEAD | LALT | |[/RALT|]/RCTL| LEFT | DOWN | RIGHT | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * |PRTSCR| ESC | | VOL- | VOL+ | - * ,------|------|------| |------+------+------. - * | |SLASH/| LOCKS| | MUTE |WHACK/| | - * | SPC | MO(4)|------| |------|MO(4) | SPC | - * | | | TO(1)| |TO(3) | | | - * `--------------------' `--------------------' - */ -[BASE] = LAYOUT_ergodox( - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_QUOT, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, - KC_LCTL, KC_LGUI, KC_MENU, KC_LEAD, KC_LALT, - KC_PSCR, KC_ESC, - TD(LOCKS), - KC_SPC, LT(ARRW, KC_SLSH), TG(SYMB), - // right hand - KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC, - MT(MOD_RALT, KC_LBRC), MT(MOD_RCTL, KC_RBRC), KC_LEFT, KC_DOWN, KC_RGHT, - KC_VOLD, KC_VOLU, - KC_MUTE, - TG(NUMP), LT(ARRW, KC_BSLS), KC_SPC - ), - -/* layer 1: International symbols, etc - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | ¡ | ² | ³ | ¤ | € | ¼ | | ½ | ¾ | ‘ | ’ | ¥ | × | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ´ | á | ß | ð | | |------| |------| | | | ø | ¶ | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * |MO(CSYM)| æ | ¿ | © | ¬ | | | | | ñ | µ | ç | | |MO(CSYM)| - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | « | » | | | | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[SYMB] = LAYOUT_ergodox( - // left hand - _______, UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC), - _______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______, - UC(0x00B4), UC(0x00E1), UC(0x00DF), UC(0x00F0), _______, _______, - MO(CSYM), UC(0x00E6), UC(0x00BF), _______, UC(0x00AC), UC(0x00A9), _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______, - _______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______, - _______, _______, _______, UC(0x00F8), UC(0x00B6), _______, - _______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(CSYM), - UC(0x00AB), UC(0x00BB), _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ - ), - -/* layer 2 : international symbols, shifted - * This layer is an ugly workaround; it pretends that SHIFT still works normally on keys - * which don't produce an "upper case" or "shifted" international symobol. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | ¹ | | | £ | | | | | | | | — | ÷ | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ¨ | Á | § | Ð | | |------| |------| | | | Ø | ° | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | Æ | | ¢ | ¦ | | | | | Ñ | | Ç | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | “ | ” | | | | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[CSYM] = LAYOUT_ergodox( - // left hand - _______, UC(0x00B9), _______, _______, UC(0x00A3), _______, _______, - _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______, - UC(0x00A8), UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G), - _______, UC(0x00C6), UC(0x00A6), UC(0x00A2), S(KC_V), S(KC_B), _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - _______, _______, _______, _______, UC(0x2014), UC(0x00F7), _______, - _______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______, - S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______, - _______, UC(0x00D1), _______, UC(0x00C7), S(KC_DOT), _______, _______, - UC(0x201C), UC(0x201D), _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ - ), - -/* layer 3: numberpad - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | ( | ) | / | * | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | 7 | 8 | 9 | - | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | 1 | 2 | 3 | = | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |0/RALT|./RCTL| , | ENTER| | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[NUMP] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - _______, _______, S(KC_9), S(KC_0), KC_PSLS, KC_PAST, _______, - _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, - _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, - _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, _______, - MT(MOD_RALT, KC_KP_0), MT(MOD_RCTL, KC_KP_DOT),KC_PCMM, KC_PENT, _______, - _______, _______, - _______, - _______, _______, _______ - ), - -/* layer 4 : functions and arrows - * This layer is at the top so that the functions still work no matter what layers are active. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | UP | | | | | | | | | | | INSERT | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | HOME | PGDN | END | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | SYSRQ| PAUSE| | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[ARRW] = LAYOUT_ergodox( - // left hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - _______, _______, _______, KC_UP, _______, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, - _______, _______, _______, _______, _______, - KC_SYSREQ, KC_PAUSE, - _______, - _______, _______, _______, - // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, KC_INS, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, KC_HOME, KC_PGDN, KC_END, - _______, _______, - _______, - _______, _______, _______ - ), -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - set_unicode_input_mode(UC_LNX); // Linux - //set_unicode_input_mode(UC_OSX); // Mac OSX - //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) - //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - 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) { - case SYMB: - case CSYM: - ergodox_right_led_1_on(); - break; - case NUMP: - ergodox_right_led_2_on(); - break; - case ARRW: - ergodox_right_led_3_on(); - break; - default: - // none - break; - } - -}; diff --git a/layouts/community/ergodox/nstickney/keymap.c b/layouts/community/ergodox/nstickney/keymap.c new file mode 100644 index 000000000000..dc83c2f4d783 --- /dev/null +++ b/layouts/community/ergodox/nstickney/keymap.c @@ -0,0 +1,213 @@ +#include QMK_KEYBOARD_H + +/* + * This keymap simulates the key limitations of an Iris on an ErgoDox. See the + * matching iris layout (/keyboards/iris/keymaps/nstickney) for further + * information. + */ + +// Layers +#define BASE 0 // Base layer +#define SYMB 1 // Symbols +#define SYSH 2 // Symbols, shifted +#define NUMP 4 // Numpad +#define FCTN 8 // Function + +// Tap Dancing +void dance_lock (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count){ + case 1: // Press once for LGUI + tap_code(KC_LGUI); + break; + case 2: // Press twice for NUMLOCK + tap_code(KC_NLCK); + break; + case 3: // Press thrice for CAPSLOCK + tap_code(KC_CAPS); + break; + case 4: // Press four times for SCROLLOCK + tap_code(KC_SLCK); + break; + default: + break; + } +}; + +void dance_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state -> count) { + case 1: // Press once for MENU + tap_code(KC_APP); + break; + case 2: // Press twice for NUMPAD + layer_invert(NUMP); + break; + case 3: // Press thrice for SYMBOLS + layer_invert(SYMB); + break; + case 4: // Press four times for SYMBOLS, SHIFTED + layer_invert(SYSH); + break; + default: + break; + } +}; + +enum tap_dances {LOCKS = 0, LAYERS = 1}; +qk_tap_dance_action_t tap_dance_actions[] = { + [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock), + [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) +}; + +// Make layering more clear +enum custom_keycodes { + __________ = KC_TRNS, + XXX = KC_NO, + CC_ESC = LCTL_T(KC_ESC), + CC_QUOT = RCTL_T(KC_QUOT), + AC_SLSH = LALT_T(KC_SLSH), + AC_EQL = RALT_T(KC_EQL), + FC_BSLS = LT(FCTN, KC_BSLS), + FC_MINS = LT(FCTN, KC_MINS), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, XXX, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXX, + CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, XXX, + XXX, XXX, XXX, XXX, AC_SLSH, + TD(LOCKS), XXX, + XXX, + FC_BSLS, KC_SPC, XXX, + // right hand + XXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + XXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT, + XXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + AC_EQL, XXX, XXX, XXX, XXX, + XXX, TD(LAYERS), + XXX, + XXX, KC_ENT, FC_MINS + ), + + [SYMB] = LAYOUT_ergodox( + // left hand + UC(0x00EF), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), __________, + __________, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), __________, + __________, UC(0x00E1), UC(0x00DF), UC(0x00F0), UC(0x00EC), UC(0x00ED), + __________, UC(0x00E6), UC(0x00E8), UC(0x00A9), UC(0x00EA), UC(0x00EB), __________, + __________, __________, __________, __________, UC(0x00BF), + __________, __________, + __________, + UC(0x00AC), __________, __________, + // right hand + __________, UC(0x00BC), UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), __________, + __________, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), __________, + UC(0x00EE), UC(0x00E0), UC(0x00E2), UC(0x00F8), UC(0x00B6), UC(0x00B4), + __________, UC(0x00F1), UC(0x00FD), UC(0x00E7), UC(0x00F4), UC(0x00BF), __________, + UC(0x00D7), __________, __________, __________, __________, + __________, __________, + __________, + __________, __________, UC(0x00B1) + ), + + [SYSH] = LAYOUT_ergodox( + // left hand + UC(0x00CF), UC(0x00B9), UC(0x2200), UC(0x2201), UC(0x00A3), UC(0x00A5), __________, + __________, UC(0x00C4), UC(0x00C5), UC(0x00C9), UC(0x2122), UC(0x00DE), __________, + __________, UC(0x00C1), UC(0x00A7), UC(0x00D0), UC(0x00CC), UC(0x00CD), + __________, UC(0x00C6), UC(0x00C8), UC(0x00A2), UC(0x00CA), UC(0x00CB), __________, + __________, __________, __________, __________, UC(0x203D), + __________, __________, + __________, + UC(0x00A6), __________, __________, + // right hand + __________, UC(0x00B5), UC(0x00AB), UC(0x00BB), UC(0x201C), UC(0x201D), __________, + __________, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), __________, + UC(0x00CE), UC(0x00C1), UC(0x00C2), UC(0x00D8), UC(0x00B0), UC(0x00A8), + __________, UC(0x00D1), UC(0x00DD), UC(0x00C7), UC(0x00D4), UC(0x203D), __________, + UC(0x00F7), __________, __________, __________, __________, + __________, __________, + __________, + __________, __________, UC(0x00AA) + ), + + [NUMP] = LAYOUT_ergodox( + // left hand + __________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________, + __________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________, + __________, __________, KC_P1, KC_P2, KC_P3, KC_PMNS, + __________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________, + __________, __________, __________, __________, __________, + __________, __________, + __________, + __________, __________, __________, + // right hand + __________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________, + __________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________, + __________, KC_P1, KC_P2, KC_P3, KC_PMNS, __________, + __________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________, + __________, __________, __________, __________, __________, + __________, __________, + __________, + __________, KC_PENT, __________ + ), + + [FCTN] = LAYOUT_ergodox( + // left hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, __________, + KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, __________, + KC_PAUS, __________, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + __________, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, __________, + __________, __________, __________, __________, __________, + KC_F11, __________, + __________, + __________, __________, __________, + // right hand + __________, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, + __________, UC(0x2014), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, + __________, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, __________, + __________, __________, __________, __________, __________, + __________, KC_F12, + __________, + __________, __________, __________ + ), +}; + +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_LNX); // Linux + //set_unicode_input_mode(UC_OSX); // Mac OSX + //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) + //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_board_led_off(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + if (IS_LAYER_ON(SYMB) || IS_LAYER_ON(SYSH)) { + ergodox_right_led_1_on(); + } else { + ergodox_right_led_1_off(); + } + + if (IS_LAYER_ON(NUMP)) { + ergodox_right_led_2_on(); + } else { + ergodox_right_led_2_off(); + } + + if (IS_LAYER_ON(FCTN)) { + ergodox_right_led_3_on(); + } else { + ergodox_right_led_3_off(); + } + +}; diff --git a/layouts/community/ergodox/familiar/rules.mk b/layouts/community/ergodox/nstickney/rules.mk similarity index 100% rename from layouts/community/ergodox/familiar/rules.mk rename to layouts/community/ergodox/nstickney/rules.mk From 0d936b2fe6a2518f2562c59f7f84692590d77aa0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 27 Feb 2019 02:59:34 +1100 Subject: [PATCH 193/445] Ask for your name when generating a new keyboard (#5214) * Ask for your name when generating a new keyboard * Update docs * Apply suggestions from code review Co-Authored-By: fauxpark --- docs/contributing.md | 4 ++-- quantum/template/avr/config.h | 4 ++-- quantum/template/avr/readme.md | 2 +- quantum/template/avr/template.c | 2 +- quantum/template/base/keymaps/default/config.h | 2 +- quantum/template/base/keymaps/default/keymap.c | 2 +- quantum/template/base/template.h | 2 +- quantum/template/ps2avrgb/template.c | 2 +- util/new_project.sh | 8 ++++++-- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index eee40609bb5d..88b9d7d9b471 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -137,7 +137,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke * All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself * Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap. * Do not include `Makefile`s in your keymap folder (they're no longer used) -* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `) +* Update copyrights in file headers (look for `%YOUR_NAME%`) ## Keyboards @@ -150,7 +150,7 @@ We also ask that you follow these guidelines: * Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard. * Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards///.[ch]` * Do not include `Makefile`s in your keyboard folder (they're no longer used) -* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `) +* Update copyrights in file headers (look for `%YOUR_NAME%`) ## Quantum/TMK Core diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 2409ae186cb8..a9bb75482136 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 REPLACE_WITH_YOUR_NAME +Copyright 2019 %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 @@ -23,7 +23,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 -#define MANUFACTURER You +#define MANUFACTURER %YOUR_NAME% #define PRODUCT %KEYBOARD% #define DESCRIPTION A custom keyboard diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md index d243c66a9489..719222d37759 100644 --- a/quantum/template/avr/readme.md +++ b/quantum/template/avr/readme.md @@ -4,7 +4,7 @@ A short description of the keyboard/project -Keyboard Maintainer: [You](https://github.com/yourusername) +Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) Hardware Supported: The PCBs, controllers supported Hardware Availability: links to where you can find this hardware diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c index 3deeae88ba7a..1e4ce26cd162 100644 --- a/quantum/template/avr/template.c +++ b/quantum/template/avr/template.c @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %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 diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h index c8e4334124ef..44382016a1f7 100644 --- a/quantum/template/base/keymaps/default/config.h +++ b/quantum/template/base/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %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 diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 11cd134a065b..482a44544874 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %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 diff --git a/quantum/template/base/template.h b/quantum/template/base/template.h index caf2abb4c6b5..5b5076c47632 100644 --- a/quantum/template/base/template.h +++ b/quantum/template/base/template.h @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %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 diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c index 4e35a2c129e6..08156c562c8d 100644 --- a/quantum/template/ps2avrgb/template.c +++ b/quantum/template/ps2avrgb/template.c @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %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 diff --git a/util/new_project.sh b/util/new_project.sh index d1d1ed82ca38..9dec714b02a2 100755 --- a/util/new_project.sh +++ b/util/new_project.sh @@ -43,7 +43,11 @@ GIT=$(whereis git) if [ "$GIT" != "" ]; then IS_GIT_REPO=$($GIT log >>/dev/null 2>&1; echo $?) if [ "$IS_GIT_REPO" -eq 0 ]; then - ID="'$($GIT config --get user.name)'" + ID="$($GIT config --get user.name)" + read -rp "What is your name? [$ID] " YOUR_NAME + if [ -n "$YOUR_NAME" ]; then + ID=$YOUR_NAME + fi echo "Using $ID as user name" for i in "$NEW_KBD/config.h" \ @@ -52,7 +56,7 @@ if [ "$GIT" != "" ]; then "$NEW_KBD/keymaps/default/config.h" \ "$NEW_KBD/keymaps/default/keymap.c" do - awk -v id="$ID" '{sub(/REPLACE_WITH_YOUR_NAME/,id); print}' < "$i" > "$i.$$" + awk -v id="$ID" '{sub(/%YOUR_NAME%/,id); print}' < "$i" > "$i.$$" mv "$i.$$" "$i" done fi From 11bdf28001382239949541e0442aa170eb561c41 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Tue, 26 Feb 2019 13:12:56 -0300 Subject: [PATCH 194/445] LAYOUT_ortho_4x4 (#5257) --- layouts/community/ortho_4x4/jotix/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/community/ortho_4x4/jotix/keymap.c b/layouts/community/ortho_4x4/jotix/keymap.c index 561084f8ae24..91d0ed74dce8 100644 --- a/layouts/community/ortho_4x4/jotix/keymap.c +++ b/layouts/community/ortho_4x4/jotix/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | 0 | . | * | * +-------+-------+-------+-------+ */ -[_NUMPAD] = LAYOUT_jotpad16 ( +[_NUMPAD] = LAYOUT_ortho_4x4 ( KC_P7, KC_P8, KC_P9, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P1, KC_P2, KC_P3, KC_PSLS, @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower */ -[_LOWER] = LAYOUT_jotpad16 ( +[_LOWER] = LAYOUT_ortho_4x4 ( KC_NLCK,_______,_______,RESET , _______,_______,_______,_______, _______,_______,_______,_______, From bcaf66bd3238b5a69c7ec5910a116c5668e1695c Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 26 Feb 2019 16:01:46 -0500 Subject: [PATCH 195/445] [Keymap] Converted stanrc85 community layout to userspace (#5244) * Convert community layout to userspace for future use * Big readme update * Move layer toggle to CAPS * Readme updates * Deleted since unused * Removed call to unused .c file --- .../community/60_ansi/stanrc85-ansi/config.h | 4 -- .../community/60_ansi/stanrc85-ansi/keymap.c | 18 +------ .../community/60_ansi/stanrc85-ansi/rules.mk | 11 +--- users/stanrc85/config.h | 8 +++ users/stanrc85/readme.md | 52 +++++++++++++++++++ users/stanrc85/rules.mk | 10 ++++ users/stanrc85/stanrc85.h | 18 +++++++ 7 files changed, 91 insertions(+), 30 deletions(-) delete mode 100644 layouts/community/60_ansi/stanrc85-ansi/config.h create mode 100644 users/stanrc85/config.h create mode 100644 users/stanrc85/readme.md create mode 100644 users/stanrc85/rules.mk create mode 100644 users/stanrc85/stanrc85.h diff --git a/layouts/community/60_ansi/stanrc85-ansi/config.h b/layouts/community/60_ansi/stanrc85-ansi/config.h deleted file mode 100644 index 904a7f524e16..000000000000 --- a/layouts/community/60_ansi/stanrc85-ansi/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define TAPPING_TERM 200 -#define RETRO_TAPPING diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index d8d79a581c80..d3b4d4e55f3f 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -14,21 +14,7 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H - -#define DEFAULT 0 //Custom ANSI -#define LAYER1 1 //Default ANSI (enable with Fn2+D) -#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control -#define LAYER3 3 //RGB Underglow controls and RESET - -//Aliases for longer keycodes -#define KC_CAD LALT(LCTL(KC_DEL)) -#define KC_LOCK LGUI(KC_L) -#define CA_QUOT LCA(KC_QUOT) -#define CA_SCLN LCA(KC_SCLN) -#define KC_CTLE LCTL_T(KC_ESC) -#define LT_SPCF LT(2, KC_SPC) -#define TD_TESC TD(TD_ESC) -#define TD_TWIN TD(TD_WIN) +#include "stanrc85.h" //Tap Dance Declarations enum { @@ -66,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_60_ansi( _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, + TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; diff --git a/layouts/community/60_ansi/stanrc85-ansi/rules.mk b/layouts/community/60_ansi/stanrc85-ansi/rules.mk index 324e52674d6c..89d03e8c1f67 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/rules.mk +++ b/layouts/community/60_ansi/stanrc85-ansi/rules.mk @@ -1,10 +1 @@ -TAP_DANCE_ENABLE = yes -EXTRAKEY_ENABLE = yes -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = no -COMMAND_ENABLE = no -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -AUDIO_ENABLE = no -CONSOLE_ENABLE = no -NKRO_ENABLE = no +USER_NAME := stanrc85 diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h new file mode 100644 index 000000000000..628ec994b031 --- /dev/null +++ b/users/stanrc85/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define TAPPING_TERM 200 +#define RETRO_TAPPING + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP +#endif // RGBLIGHT_ENABLE diff --git a/users/stanrc85/readme.md b/users/stanrc85/readme.md new file mode 100644 index 000000000000..9009a71d5f11 --- /dev/null +++ b/users/stanrc85/readme.md @@ -0,0 +1,52 @@ + + +# Stanrc85's Standard ANSI 60% Layout + +Shared keymap between two 60% PCB: +- 1upkeyboards60HSE +- DZ60 (hotswap) + +## Keymap Notes +- Layer 0 is default QWERTY layout with additional custom features: + - SpaceFN to function layer 2 on `Space` + - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` + - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` + - Tap Dance on `ESC` for `ESC` and ` ` ` + +![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) + +- Layer 1 is default QWERTY with no custom features used mostly for gaming + - Enabled by `Fn2+CAPS` from base layer + +![Default ANSI Layer](https://imgur.com/M7T9PNT.png) + +- Layer 2 is Function layer: + - F keys + - Arrows + - Volume and Media controls + - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script + - AHK Mic is used to mute/unmute microphone + - AHK Speaker switches audio output between headphones and speakers + +![Function Layer](https://imgur.com/YPl0JrU.png) + +- Layer 3 is RGB Underglow control and RESET + - `Fn2+CAPS` used to toggle Default QWERTY layer on and off + +![RGB and RESET Layer](https://imgur.com/PyB8z7k.png) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk new file mode 100644 index 000000000000..324e52674d6c --- /dev/null +++ b/users/stanrc85/rules.mk @@ -0,0 +1,10 @@ +TAP_DANCE_ENABLE = yes +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +COMMAND_ENABLE = no +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +AUDIO_ENABLE = no +CONSOLE_ENABLE = no +NKRO_ENABLE = no diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h new file mode 100644 index 000000000000..7e581f993eea --- /dev/null +++ b/users/stanrc85/stanrc85.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define DEFAULT 0 //Custom ANSI +#define LAYER1 1 //Default ANSI (enable with Fn2+CAPS) +#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control +#define LAYER3 3 //RGB Underglow controls and RESET + +//Aliases for longer keycodes +#define KC_CAD LALT(LCTL(KC_DEL)) +#define KC_LOCK LGUI(KC_L) +#define CA_QUOT LCA(KC_QUOT) +#define CA_SCLN LCA(KC_SCLN) +#define KC_CTLE LCTL_T(KC_ESC) +#define LT_SPCF LT(2, KC_SPC) +#define TD_TESC TD(TD_ESC) +#define TD_TWIN TD(TD_WIN) From 168b0cf64d539e88436b1d93f5d2ad65db1c8591 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue, 26 Feb 2019 22:04:28 +0100 Subject: [PATCH 196/445] Added a numpad keymap for the vitamins included keyboard (#5247) * Fixed pin for RGB * Added numpad keymap for vitamins included * Implemented changes --- .../vitamins_included/keymaps/numpad/config.h | 39 ++++++++++ .../vitamins_included/keymaps/numpad/keymap.c | 75 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 keyboards/vitamins_included/keymaps/numpad/config.h create mode 100644 keyboards/vitamins_included/keymaps/numpad/keymap.c diff --git a/keyboards/vitamins_included/keymaps/numpad/config.h b/keyboards/vitamins_included/keymaps/numpad/config.h new file mode 100644 index 000000000000..aba9fa7d403c --- /dev/null +++ b/keyboards/vitamins_included/keymaps/numpad/config.h @@ -0,0 +1,39 @@ +/* +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#ifdef AUDIO_ENABLE + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(COLEMAK_SOUND) \ + } +#endif diff --git a/keyboards/vitamins_included/keymaps/numpad/keymap.c b/keyboards/vitamins_included/keymaps/numpad/keymap.c new file mode 100644 index 000000000000..1767851feb9b --- /dev/null +++ b/keyboards/vitamins_included/keymaps/numpad/keymap.c @@ -0,0 +1,75 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _NUMPAD 0 +#define _ADJUST 3 + +enum custom_keycodes { + NUMPAD = SAFE_RANGE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 4 | 7 | nlck | esc | 0 | 1 | 4 | 7 | nlck | esc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | , | 2 | 5 | 8 | / | adj | , | 2 | 5 | 8 | / | adj | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | . | 3 | 6 | 9 | * | adj | . | 3 | 6 | 9 | * | adj | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| adj | - | + |bckspc| adj | Enter| adj | - | + |bckspc| adj | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( \ + KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, \ + KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, \ + KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST, KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST , \ + KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST, KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | RESET RESET | | | | |RGB_MOD| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, RGB_MOD \ +) + + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} From 659e5d6316893d4b1b5709000d842da6a2fa0cbb Mon Sep 17 00:00:00 2001 From: mcmadhatter Date: Tue, 26 Feb 2019 21:05:18 +0000 Subject: [PATCH 197/445] [Keymap] Hs60 win osx dual (#5249) * Added a dual windows/osx layout Default layer is normal ISO for windows. Second layout is Windows ISO layout but for OSX, but with the keys corrected so you will get the correct shifted and alt'd keys on OSX (keyboard keys match OSX keys without having to change your keyboard type in system preferences). Layer three is configuration and other functions, and layer four is where the shifting magic happens. Also tab and caps lock have been swapped around. * made sure bootmagic is in a seperate rules.mk made sure bootmagic is in a seperate rules.mk * commiting the keymap rules.mk commiting the keymap rules.mk --- .../hs60/v2/keymaps/win_osx_dual/keymap.c | 97 +++++++++++++++++++ .../hs60/v2/keymaps/win_osx_dual/readme.md | 6 ++ .../hs60/v2/keymaps/win_osx_dual/rules.mk | 1 + 3 files changed, 104 insertions(+) create mode 100644 keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/win_osx_dual/readme.md create mode 100644 keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c b/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c new file mode 100644 index 000000000000..31d7ec1ed8e1 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c @@ -0,0 +1,97 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + + +#define _QWERTY 0 +#define _OSX 1 +#define _RAISE 2 +#define _SHIFTER 3 +#define _ADJUST 16 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + OSX, + RAISE, + SHIFTER, +}; + +#define RAISE MO(_RAISE) + +#define OSX_SHIFT LM(_SHIFTER, MOD_LSFT) +#define OSX_ALT LM(_SHIFTER, MOD_LALT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_60_iso( /* Windows ISO layout */ + 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_CAPS, 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_TAB, 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_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, RAISE , KC_RCTL), + +[_OSX] = LAYOUT_60_iso( /* OSX ISO 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_CAPS, 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, A(KC_3), KC_ENT, \ + OSX_SHIFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, OSX_ALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, RAISE , KC_RCTL), + +[_RAISE] = LAYOUT_60_iso( /* Configuration */ + 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_DEL ,\ + KC_TRNS, QWERTY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, OSX, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, EF_INC, H1_INC, S1_INC, H2_INC, S2_INC, BR_INC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_UP, EF_DEC, H1_DEC, S2_DEC, H2_DEC, S2_DEC, BR_DEC, ES_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[_SHIFTER] = LAYOUT_60_iso( /* Shift Mods makes a keyboard with windows key layout work on OSX*/ + KC_TRNS, S(KC_1), S(KC_QUOT),S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), KC_DEL,\ + KC_TRNS, S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), S(KC_LBRC), S(KC_RBRC), \ + KC_TRNS, S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), S(KC_H), S(KC_J), S(KC_K), S(KC_L), S(KC_SCLN), S(KC_2), S(KC_NUBS), KC_TRNS, \ + KC_TRNS, S(KC_NUHS), S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), S(KC_N), S(KC_M), S(KC_COMM), S(KC_DOT), S(KC_SLSH), KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + + +}; + +void matrix_init_user(void) { + //user initialization +} + + +void matrix_scan_user(void) { + //user matrix +} + + +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; + case OSX: + if (record->event.pressed) { + set_single_persistent_default_layer(_OSX); + } + return false; + + } + return true; +} diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md b/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md new file mode 100644 index 000000000000..c2e58bf6868d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO HS60 V2 +================================== + +![Layout image](https://i.imgur.com/NEtFQcV.png) + +Default layer is normal ISO for windows. Second layout is Windows ISO layout but for OSX, but with the keys corrected so you will get the correct shifted and alt'd keys on OSX (keyboard keys match OSX keys without having to change your keyboard type in system preferences). Layer three is configuration and other functions, and layer four is where the shifting magic happens. Also tab and caps lock have been swapped around. diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk new file mode 100644 index 000000000000..cca15190a5b1 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration From dcf4877facd0afbb40a603f931a4fe6e10d7c26d Mon Sep 17 00:00:00 2001 From: Jeri Mason Date: Tue, 26 Feb 2019 13:17:28 -0800 Subject: [PATCH 198/445] Bucktooth 2.0 key layout for Preonic (#5258) Updated layout slightly for better compatibility with sculpted (row-specific) profile keysets. Fix build error on rev 3 toolchain; click waits don't seem to be necessary anymore. --- keyboards/preonic/keymaps/bucktooth/keymap.c | 22 +++++++++---------- keyboards/preonic/keymaps/bucktooth/readme.md | 22 ++++++++++++------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/keyboards/preonic/keymaps/bucktooth/keymap.c b/keyboards/preonic/keymaps/bucktooth/keymap.c index 6d4843ff3ee5..f03e469d709b 100644 --- a/keyboards/preonic/keymaps/bucktooth/keymap.c +++ b/keyboards/preonic/keymaps/bucktooth/keymap.c @@ -28,32 +28,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QwertSplitly * ,-----------------------------------------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | + * | 1 | 2 | 3 | 4 | 5 | = | ` | 6 | 7 | 8 | 9 | 0 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Q | W | E | R | T | [ | ] | Y | U | I | O | P | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | A | S | D | F | G | ` | ' | H | J | K | L | ; | + * | A | S | D | F | G | - | ' | H | J | K | L | ; | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |LShift| Z | X | C | V | B | \ | / | N | M | , |./RSft| + * |LShift| Z | X | C | V | \ | / | B | N | M | , |./RSft| * |------+------+------+------+------+------+------+------+------+------+------+------| * |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->| * `-----------------------------------------------------------------------------------' */ [L_QWERTSPLITLY] = LAYOUT_preonic_grid( \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINUS,KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL ,KC_GRAVE,KC_6, KC_7, KC_8, KC_9, KC_0, \ 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_A, KC_S, KC_D, KC_F, KC_G, KC_GRAVE,KC_QUOTE,KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSLS, KC_SLASH,KC_N, KC_M, KC_COMM, MT_RSDOT,\ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINUS,KC_QUOTE,KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_BSLS, KC_SLASH,KC_B, KC_N, KC_M, KC_COMM, MT_RSDOT,\ LT_FNESC,KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TAB, KC_BSPC, KC_SPC, MT_RGENT,LT_FNLFT,KC_DOWN, KC_RIGHT \ ), /* Fn * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | Vol- | Vol+ | F6 | F7 | F8 | F9 | F10 | + * | F1 | F2 | F3 | F4 | F5 | Vol+ | Mute | F6 | F7 | F8 | F9 | F10 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps |^LPad |^DashB|^Help |^Drawr| Mute | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | + * | Caps |^LPad |^DashB|^Help |^Drawr| Vol- | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | * |------+------+------+------+------+------|------+------+------+------+------+------| * |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -61,9 +61,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [L_FN] = LAYOUT_preonic_grid( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_VOLD, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_VOLU, KC_MUTE, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MRWD, KC_MFFD, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_PGUP, \ - KC_CAPS, MF_LPAD, MF_DASH, MF_HELP, MF_DRWR, KC_MUTE, KC_MPLY, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, \ + KC_CAPS, MF_LPAD, MF_DASH, MF_HELP, MF_DRWR, KC_VOLD, KC_MPLY, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, \ KC_RSFT, MF_MENU, MF_STAT, MF_DOCK, MF_TOOL, MF_NOTI, KC_INS, KC_ACL0, KC_ACL1, KC_ACL2, KC_HOME, KC_END, \ _______, KC_RCTL, KC_RALT, KC_RGUI, _______, LS_TAB, KC_DEL, _______, KC_PENT, _______, KC_UP, KC_LEFT \ ) @@ -93,14 +93,12 @@ void matrix_init_user(void) { void startup_user() { - _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } void shutdown_user() { PLAY_SONG(tone_goodbye); - _delay_ms(150); stop_all_notes(); } diff --git a/keyboards/preonic/keymaps/bucktooth/readme.md b/keyboards/preonic/keymaps/bucktooth/readme.md index a1bda9f6a2b3..4c1c62721146 100644 --- a/keyboards/preonic/keymaps/bucktooth/readme.md +++ b/keyboards/preonic/keymaps/bucktooth/readme.md @@ -1,4 +1,4 @@ -# Bucktooth v1.0 (Mac) +# Bucktooth v2.0 (Mac) Bucktooth is an alternate layout that pushes the letters to the edges and puts most punctuation in the center. It's derived in part from my experience with Ergodox boards. I call the main layer layout QWERTSplitlY, you may notice the right side punctuation moving to the center and the control keys missing from the left. @@ -6,13 +6,13 @@ Bucktooth is an alternate layout that pushes the letters to the edges and puts m QwertSplitly ,-----------------------------------------------------------------------------------. - | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | + | 1 | 2 | 3 | 4 | 5 | + | ` | 6 | 7 | 8 | 9 | 0 | |------+------+------+------+------+------+------+------+------+------+------+------| | Q | W | E | R | T | [ | ] | Y | U | I | O | P | |------+------+------+------+------+-------------+------+------+------+------+------| - | A | S | D | F | G | ` | ' | H | J | K | L | ; | + | A | S | D | F | G | - | ' | H | J | K | L | ; | |------+------+------+------+------+------|------+------+------+------+------+------| - |LShift| Z | X | C | V | B | \ | / | N | M | , |./RSft| + |LShift| Z | X | C | V | \ | / | B | N | M | , |./RSft| |------+------+------+------+------+------+------+------+------+------+------+------| |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->| `-----------------------------------------------------------------------------------' @@ -24,6 +24,12 @@ That left shift is the only control or modifier key on the top four rows. All th With all control keys on the bottom row, the ESC key now lives in the bottom left and on my keyboard I actually put a very heavy keyswitch in that space to keep me from hitting it accidentally instead of ctrl. Hold it down and it becomes fn. I usually hit it with my whole hand since it is in the corner, without moving my fingers down to it. +## Revision 2 Changes + +The move of B to the right side of the keyboard may be controversial but has felt more and more comfortable to me. Again if you split a staggered layout keyboard down a straight line B has more in common with Y than T. I don't understand breaking the board into left and right on anything but a vertical line despite the long history of bringing the staggered layout slewing left. + +Revision 2 also changes the positions of -, =, and ~ for better compatibility with sculpted profile keysets which offer a Dvorak set option that provides the middle row dash because a middle row backtick/tilde is not found anywhere. + ## Function Layer There are no raise and lower or multiple function pages. The Preonic has enough keys to avoid more than a single function page, and I prefer to have spacebars for both thumbs so the "Bucktooth" name comes from the typical keyset with darker function keys and lighter alphas and space keys giving the keyboard fang-like appearance where the two spaces are. @@ -31,11 +37,11 @@ There are no raise and lower or multiple function pages. The Preonic has enough Fn ,-----------------------------------------------------------------------------------. - | F1 | F2 | F3 | F4 | F5 | Vol- | Vol+ | F6 | F7 | F8 | F9 | F10 | + | F1 | F2 | F3 | F4 | F5 | Vol+ | Mute | F6 | F7 | F8 | F9 | F10 | |------+------+------+------+------+------+------+------+------+------+------+------| | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp | |------+------+------+------+------+-------------+------+------+------+------+------| - | Caps |^LPad |^DashB|^Help |^Drawr| Mute | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | + | Caps |^LPad |^DashB|^Help |^Drawr| Vol- | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | |------+------+------+------+------+------|------+------+------+------+------+------| |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -50,6 +56,6 @@ The cursor keys are a design I stole from the old Commodore computers which had On Fn layer ZXCVB and SDFG keys I have set up the default key bindings for Mac OS Keyboard Focus keys since they are obscure and require FKeys mostly. They are pretty convenient for using the keyboard to search the menus, go to the dock, etc. Some like the one to jump to a window's toolbar and the one to jump to a window's accessory drawer are less commonly used. -___ +--- -Contributed to QMK and released with the QMK license by J. Eric Mason, 3/16/2018 +Contributed to QMK and released with the QMK license by Jeri C. Mason, 3/16/2018 - Revision 2 2/26/2019 From a0c36ed25318e863d5c47cf2b80423abd934c198 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 26 Feb 2019 21:49:05 +0000 Subject: [PATCH 199/445] [Keyboard] Add configurator support for 40percentclub/half_n_half (#5260) --- .../40percentclub/half_n_half/half_n_half.h | 25 ++++---- keyboards/40percentclub/half_n_half/info.json | 62 +++++++++++++++++++ 2 files changed, 75 insertions(+), 12 deletions(-) diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h index 6cec5992908c..e20d42fde11f 100644 --- a/keyboards/40percentclub/half_n_half/half_n_half.h +++ b/keyboards/40percentclub/half_n_half/half_n_half.h @@ -16,6 +16,7 @@ #pragma once #include "quantum.h" +#define ___ KC_NO /* This a shortcut to help you visually see your layout. * @@ -26,18 +27,18 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, \ - K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, \ - K20, K21, K22, K23, K24, K25, K26, K70, K71, K72, K73, K74, K75, K76, \ - K34, K82 \ + 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, \ + L34, R32 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06 }, \ - { K10, K11, K12, K13, K14, K15, K16 }, \ - { K20, K21, K22, K23, K24, K25, K26 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, KC_NO, KC_NO }, \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { ___, ___, ___, ___, L34, ___, ___ }, \ \ - { K56, K55, K54, K53, K52, K51, K50 }, \ - { K66, K65, K64, K63, K62, K61, K60 }, \ - { K76, K75, K74, K73, K72, K71, K70 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K82, KC_NO, KC_NO } \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { ___, ___, ___, ___, R32, ___, ___ } \ } diff --git a/keyboards/40percentclub/half_n_half/info.json b/keyboards/40percentclub/half_n_half/info.json index e69de29bb2d1..e791e36c68a8 100644 --- a/keyboards/40percentclub/half_n_half/info.json +++ b/keyboards/40percentclub/half_n_half/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "half_n_half", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 44, + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":7, "y":0}, + {"label":"R01", "x":8, "y":0}, + {"label":"R02", "x":9, "y":0}, + {"label":"R03", "x":10, "y":0}, + {"label":"R04", "x":11, "y":0}, + {"label":"R05", "x":12, "y":0}, + {"label":"R06", "x":13, "y":0}, + + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":7, "y":1}, + {"label":"R11", "x":8, "y":1}, + {"label":"R12", "x":9, "y":1}, + {"label":"R13", "x":10, "y":1}, + {"label":"R14", "x":11, "y":1}, + {"label":"R15", "x":12, "y":1}, + {"label":"R16", "x":13, "y":1}, + + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":7, "y":2}, + {"label":"R21", "x":8, "y":2}, + {"label":"R22", "x":9, "y":2}, + {"label":"R23", "x":10, "y":2}, + {"label":"R24", "x":11, "y":2}, + {"label":"R25", "x":12, "y":2}, + {"label":"R26", "x":13, "y":2}, + + {"label":"L34", "x":4, "y":3, "w":2}, + {"label":"R32", "x":8, "y":3, "w":2} + ] + } + } +} + \ No newline at end of file From a120a000d481ed14a87988383be46c5a76604bb6 Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 27 Feb 2019 15:20:45 +0000 Subject: [PATCH 200/445] Add Configurator support and readme for boardwalk (#5261) * Add configurator support and readme for boardwalk * Readme review comments --- keyboards/boardwalk/info.json | 359 ++++++++++++++++++++++++++++++++++ keyboards/boardwalk/readme.md | 16 ++ 2 files changed, 375 insertions(+) create mode 100644 keyboards/boardwalk/info.json create mode 100644 keyboards/boardwalk/readme.md diff --git a/keyboards/boardwalk/info.json b/keyboards/boardwalk/info.json new file mode 100644 index 000000000000..a287f31a44e4 --- /dev/null +++ b/keyboards/boardwalk/info.json @@ -0,0 +1,359 @@ +{ + "keyboard_name": "Boardwalk", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x14": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"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":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2}, + {"label":"k213", "x":13.5, "y":2, "w":1.5}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3}, + {"label":"k312", "x":12.5, "y":3}, + {"label":"k313", "x":13.5, "y":3, "w":1.5}, + {"label":"k40", "x":0, "y":4, "w":1.5}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k43", "x":3.5, "y":4}, + {"label":"k44", "x":4.5, "y":4}, + {"label":"k45", "x":5.5, "y":4}, + {"label":"k46", "x":6.5, "y":4}, + {"label":"k47", "x":7.5, "y":4}, + {"label":"k48", "x":8.5, "y":4}, + {"label":"k49", "x":9.5, "y":4}, + {"label":"k410", "x":10.5, "y":4}, + {"label":"k411", "x":11.5, "y":4}, + {"label":"k412", "x":12.5, "y":4}, + {"label":"k413", "x":13.5, "y":4, "w":1.5} + ] + }, + "LAYOUT_ortho_hhkb": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"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":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2}, + {"label":"k213", "x":13.5, "y":2, "w":1.5}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3}, + {"label":"k312", "x":12.5, "y":3}, + {"label":"k313", "x":13.5, "y":3, "w":1.5}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k43", "x":3.5, "y":4}, + {"label":"k44", "x":4.5, "y":4}, + {"label":"k45", "x":5.5, "y":4, "w":2}, + {"label":"k47", "x":7.5, "y":4, "w":2}, + {"label":"k49", "x":9.5, "y":4}, + {"label":"k410", "x":10.5, "y":4}, + {"label":"k411", "x":11.5, "y":4}, + {"label":"k412", "x":12.5, "y":4} + ] + }, + "LAYOUT_ortho_7u": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"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":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2}, + {"label":"k213", "x":13.5, "y":2, "w":1.5}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3}, + {"label":"k312", "x":12.5, "y":3}, + {"label":"k313", "x":13.5, "y":3, "w":1.5}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4, "w":1.5}, + {"label":"k46", "x":4, "y":4, "w":7}, + {"label":"k411", "x":11, "y":4, "w":1.5}, + {"label":"k412", "x":12.5, "y":4} + ] + }, + "LAYOUT_2u_arrow": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"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":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2, "w":1.5}, + {"label":"k213", "x":14, "y":2}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3, "w":1.5}, + {"label":"k312", "x":13, "y":3}, + {"label":"k313", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k43", "x":3.5, "y":4}, + {"label":"k44", "x":4.5, "y":4, "w":2}, + {"label":"k46", "x":6.5, "y":4, "w":2}, + {"label":"k48", "x":8.5, "y":4}, + {"label":"k49", "x":9.5, "y":4, "w":1.25}, + {"label":"k410", "x":10.75, "y":4, "w":1.25}, + {"label":"k411", "x":12, "y":4}, + {"label":"k412", "x":13, "y":4}, + {"label":"k413", "x":14, "y":4} + ] + }, + "LAYOUT_625u_arrow": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"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":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2, "w":1.5}, + {"label":"k213", "x":14, "y":2}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3, "w":1.5}, + {"label":"k312", "x":13, "y":3}, + {"label":"k313", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k45", "x":3.5, "y":4, "w":6.25}, + {"label":"k49", "x":9.75, "y":4}, + {"label":"k410", "x":10.75, "y":4, "w":1.25}, + {"label":"k411", "x":12, "y":4}, + {"label":"k412", "x":13, "y":4}, + {"label":"k413", "x":14, "y":4} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/boardwalk/readme.md b/keyboards/boardwalk/readme.md new file mode 100644 index 000000000000..932e7e9d6c42 --- /dev/null +++ b/keyboards/boardwalk/readme.md @@ -0,0 +1,16 @@ +# Boardwalk + +![Boardwalk](https://i.imgur.com/CQj3b9E.jpg) + +The Boardwalk is a 60% ortholinear keyboard, designed around Ergodox keycap sets and to fit into many standard 60% cases. The project was inspired by OLKB’s Atomic keyboard, which used larger 2u mods, but u/shensmobile +decided to switch to 1.5u keys so that Ergodox sets would provide excellent compatibility. The rest of the board can be covered using standard key sizes from 60% sets. + +Keyboard Maintainer: QMK Community +Hardware Supported: Boardwalk Ortholinear PCB +Hardware Availability: [panc.co](https://www.panc.co/boardwalk-group-buy.html) + +Make example for this keyboard (after setting up your build environment): + + make boardwalk: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). From 95d2a11c446deb3220f4a7aafa8ac6933fada0a9 Mon Sep 17 00:00:00 2001 From: Christoffer Holmberg Date: Thu, 28 Feb 2019 16:11:52 +0200 Subject: [PATCH 201/445] Update Nyquist layout (#5270) * Add Home,End,Insert,Del to Arrow layer * Add Back & Forward to Arrow layer * fix typo --- keyboards/keebio/nyquist/keymaps/skug/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/keebio/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c index fe3229966f6f..2d511fee3c77 100644 --- a/keyboards/keebio/nyquist/keymaps/skug/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c @@ -112,11 +112,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Arrow layer * ,-----------------------------------------. .-----------------------------------------. - * | | | | | | | | | | | | | PgUp | + * | §/½ | | | | | | | | | | Ins | Home | PgUp | * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | Up | | | | | | | | | | PgDn | + * | | | Up | | | | | | | | Del | End | PgDn | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Left | Down | Right| | | | | | | | | | + * | | Left | Down | Right| | Back | | Fwd | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------+ +------+------+------+------+------+------| @@ -124,9 +124,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' '-----------------------------------------' */ [ARRW] = LAYOUT( \ - NO_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, _______, _______, KC_PGDN, \ - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, \ + NO_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, KC_INS , KC_HOME, KC_PGUP, \ + _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, KC_DEL , KC_END , KC_PGDN, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, \ _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______ \ ), From 3ac3bb9b5e5fb2363983f9b0d0fcb38d7148ac16 Mon Sep 17 00:00:00 2001 From: Juno Nguyen Date: Fri, 1 Mar 2019 03:12:32 +0800 Subject: [PATCH 202/445] [Keymap] Added personal keymaps for Planck, Preonic, Vitamins Included by Juno (#5169) * Added personal keymaps for Planck, Preonic, Vitamins Included by Juno * Removing redundancies as suggested * More removals that were missed out in the previous commits * Updated Preonic to use new layout * More redundancies missed out * Updated more optimal code for FN layer LED indicator. * Further codes clean up. --- keyboards/planck/keymaps/juno/config.h | 41 ++ keyboards/planck/keymaps/juno/keymap.c | 444 ++++++++++++++++++ keyboards/planck/keymaps/juno/readme.md | 8 + keyboards/planck/keymaps/juno/rules.mk | 10 + keyboards/preonic/keymaps/juno/config.h | 37 ++ keyboards/preonic/keymaps/juno/keymap.c | 313 ++++++++++++ keyboards/preonic/keymaps/juno/readme.md | 1 + keyboards/preonic/keymaps/juno/rules.mk | 0 .../vitamins_included/keymaps/juno/keymap.c | 293 ++++++++++++ .../vitamins_included/keymaps/juno/rules.mk | 16 + 10 files changed, 1163 insertions(+) create mode 100644 keyboards/planck/keymaps/juno/config.h create mode 100644 keyboards/planck/keymaps/juno/keymap.c create mode 100644 keyboards/planck/keymaps/juno/readme.md create mode 100644 keyboards/planck/keymaps/juno/rules.mk create mode 100644 keyboards/preonic/keymaps/juno/config.h create mode 100644 keyboards/preonic/keymaps/juno/keymap.c create mode 100644 keyboards/preonic/keymaps/juno/readme.md create mode 100644 keyboards/preonic/keymaps/juno/rules.mk create mode 100644 keyboards/vitamins_included/keymaps/juno/keymap.c create mode 100644 keyboards/vitamins_included/keymaps/juno/rules.mk diff --git a/keyboards/planck/keymaps/juno/config.h b/keyboards/planck/keymaps/juno/config.h new file mode 100644 index 000000000000..eae636c57e8b --- /dev/null +++ b/keyboards/planck/keymaps/juno/config.h @@ -0,0 +1,41 @@ +#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 + +// Reduce power consumption for iOS compatibility +#define USB_MAX_POWER_CONSUMPTION 100 \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/keymap.c b/keyboards/planck/keymaps/juno/keymap.c new file mode 100644 index 000000000000..a34a9e9480d6 --- /dev/null +++ b/keyboards/planck/keymaps/juno/keymap.c @@ -0,0 +1,444 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + + _FN1, + _DPAD, + _DPADNUM +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV, + + FN1, + DP_ON, + DP_OFF +}; + +#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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | App | Ctrl | GUI | Alt |Lower | SpaceFn |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, RSFT_T(KC_ENT), + KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, LT(_FN1, KC_SPC), + LT(_FN1, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), + +/* 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 + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, 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_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_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 +), + +/* 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +// Two personal additional layers below + +/* Personal custom Fn layer + * ,-----------------------------------------------------------------------------------. + * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Prev | Play | Next | Brite| End | | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN1] = LAYOUT_planck_grid( + _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , + _______, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ +), + +/* DPAD layer, to activate arrow cluster at the bottom right corner + + * ,-----------------------------------------------------------------------------------. + * | 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 | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + +[_DPAD] = 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_UP, KC_ENT , + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), + KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT +), + +// Extended layer for weapon switching + +[_DPADNUM] = LAYOUT_planck_grid( + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, XXXXXXX, MO(_DPADNUM), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); + + // Borrowing audio from unused audio + // Caps Lock on and off sound too similar + + float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); + float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); + + float dpad_song_on[][2] = SONG(ZELDA_PUZZLE); + float dpad_song_off[][2] = SONG(SONIC_RING); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + + // LED control, lighting up when Fn layer is activated + + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + + switch (biton32(state)) { + case _QWERTY: + backlight_set(0); + break; + case _FN1: + backlight_set(3); + break; + case _DPAD: + backlight_set(3); + break; + } + + return state; +} + +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; + + +// Play audio upon switching Caps Lock and custom layers + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_leds() & (1<event.pressed) { + + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_off); + #endif + + layer_off(_DPAD); + } + } + 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) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +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; + } +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/readme.md b/keyboards/planck/keymaps/juno/readme.md new file mode 100644 index 000000000000..a93a0643d552 --- /dev/null +++ b/keyboards/planck/keymaps/juno/readme.md @@ -0,0 +1,8 @@ +# Juno Layout +created by Juno Nguyen +juno.ngx@gmail.com + +## Feature: +* Pok3r-inspired functional layer. +* Rearranged numerics for maximum efficiency. + diff --git a/keyboards/planck/keymaps/juno/rules.mk b/keyboards/planck/keymaps/juno/rules.mk new file mode 100644 index 000000000000..e9f1b1336065 --- /dev/null +++ b/keyboards/planck/keymaps/juno/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_ENABLE = yes + +SRC += muse.c + +MIDI_ENABLE=no +RGBLIGHT_ENABLE = no +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file diff --git a/keyboards/preonic/keymaps/juno/config.h b/keyboards/preonic/keymaps/juno/config.h new file mode 100644 index 000000000000..6387debbb17e --- /dev/null +++ b/keyboards/preonic/keymaps/juno/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 \ No newline at end of file diff --git a/keyboards/preonic/keymaps/juno/keymap.c b/keyboards/preonic/keymaps/juno/keymap.c new file mode 100644 index 000000000000..2e3152d299d6 --- /dev/null +++ b/keyboards/preonic/keymaps/juno/keymap.c @@ -0,0 +1,313 @@ +/* Juno's Preonic Layout */ + +#include QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, + + _FN1, + _DPAD +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT, + + FN1, + DP_ON, + DP_OFF +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN1 | 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_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, 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_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + MO(_FN1),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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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_preonic_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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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_preonic_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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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_preonic_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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 \ +), + +/* 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_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Function (personal function layer) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Vol- | | Vol+ | | | | PgUp | Up | PgDn | PScr | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | Home | Left | Down |Right | Ins | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Prev | Play | Next | Brite| | End | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Caps | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN1] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_VOLD, _______, KC_VOLU, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL , \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL , \ + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, _______, KC_END, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_CAPS, _______, KC_SPC, KC_SPC, _______, DP_ON, _______, _______, _______ \ +), + +/* DPAD layer, for active arrow cluster at the bottom right corner + * Use TG() to enable, but FUNC() to disable (defined at end of file) + * All layers clearing required + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |Lower | Space |Raise |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DPAD] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, 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_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , \ + KC_LCTL, KC_LGUI, KC_LALT, _______, LOWER, KC_SPC, KC_SPC, RAISE, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT \ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); + + float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); + float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); + + float dpad_song_on[][2] = SONG(ZELDA_PUZZLE); + float dpad_song_off[][2] = SONG(SONIC_RING); +#endif + +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) { + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + + + + // Additional personal custom functions + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_leds() & (1<event.pressed) { + + } else { + // activated upon release + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + // deactivated upon pressdown + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_off); + #endif + + //layer_off(_FN1); // do not put in this line + layer_off(_DPAD); + } + + } + return true; +}; diff --git a/keyboards/preonic/keymaps/juno/readme.md b/keyboards/preonic/keymaps/juno/readme.md new file mode 100644 index 000000000000..e911968dd964 --- /dev/null +++ b/keyboards/preonic/keymaps/juno/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/juno/rules.mk b/keyboards/preonic/keymaps/juno/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/vitamins_included/keymaps/juno/keymap.c b/keyboards/vitamins_included/keymaps/juno/keymap.c new file mode 100644 index 000000000000..5fa8b4cf7104 --- /dev/null +++ b/keyboards/vitamins_included/keymaps/juno/keymap.c @@ -0,0 +1,293 @@ +#include QMK_KEYBOARD_H +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +#define _FN1 5 +#define _DPAD 6 +#define _DPADNUM 7 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + + FN1, + DP_ON, + DP_OFF +}; + +#define XXXXXXX KC_NO + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | App | Ctrl | GUI | Alt |Lower | SpaceFn |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( \ + 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, RSFT_T(KC_ENT), \ + KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, LT(_FN1, KC_SPC), + LT(_FN1, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |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_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 , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |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_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 , \ + ADJUST, 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 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |RESET | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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, \ + RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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 | | | | |RESET | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB_MOD| + * `-----------------------------------------------------------------------------------' + */ + +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ +), + +// Two personal additional layers below +// There's no brite key + +/* Function (personal function layer) + * ,-----------------------------------------------------------------------------------. + * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Prev | Play | Next | | End | | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ + +[_FN1] = LAYOUT_ortho_4x12( \ + _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, \ + _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, \ + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ \ +), + +/* DPAD layer, for active arrow cluster at the bottom right corner + + * ,-----------------------------------------------------------------------------------. + * | 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 | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + +[_DPAD] = LAYOUT_ortho_4x12( \ + 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_UP, KC_ENT , \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), + KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT \ +), + +// Extended layer for weapon switchings + +[_DPADNUM] = LAYOUT_ortho_4x12( \ + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX , \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 , \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , \ + _______, _______, _______, XXXXXXX, MO(_DPADNUM), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + 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; + + // Additional personal custom functions + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_leds() & (1<event.pressed) { + + } else { + // activated upon release + #ifdef AUDIO_ENABLE + // PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + // deactivated upon pressdown + #ifdef AUDIO_ENABLE + // PLAY_SONG(dpad_song_off); + #endif + + //layer_off(_FN1); // do not put in this line + layer_off(_DPAD); + } + } + return true; +} diff --git a/keyboards/vitamins_included/keymaps/juno/rules.mk b/keyboards/vitamins_included/keymaps/juno/rules.mk new file mode 100644 index 000000000000..424b208b6613 --- /dev/null +++ b/keyboards/vitamins_included/keymaps/juno/rules.mk @@ -0,0 +1,16 @@ +MIDI_ENABLE=no +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no + +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no + +## BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration + +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend \ No newline at end of file From a872faa53e1b9b9651d3f6ffe6d671e0e211309c Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 28 Feb 2019 11:37:34 -0800 Subject: [PATCH 203/445] [Keymap] Userspace Keymap Updates (#5215) * enable velocikey for my userspace and explicitly for my 75% layout * add guards to only turn on RGB stuff if the RGB pin is actually defined * update 60_ansi keymap * update the 60_ansi_split_bs_rshift keymap * update 66_ansi keymap * update docs * Update layouts/community/60_ansi/mechmerlin-ansi/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/66_ansi/mechmerlin/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi/mechmerlin-ansi/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi/mechmerlin-ansi/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * remove my attempt to find a good way to detect this * move audio clicky into user space and do feature setting per keyboard * fixup 66_ansi keymap * update changelog * update readme --- .../60_ansi/mechmerlin-ansi/keymap.c | 10 ++++---- .../mechmerlin-split/keymap.c | 10 ++++---- layouts/community/66_ansi/mechmerlin/config.h | 11 --------- layouts/community/66_ansi/mechmerlin/keymap.c | 14 +++++------ .../75_ansi/mechmerlin-75_ansi/keymap.c | 14 +++++------ users/mechmerlin/changelog.md | 5 ++++ users/mechmerlin/config.h | 24 ++++++++++++++++++- users/mechmerlin/readme.md | 10 +++++++- users/mechmerlin/rules.mk | 2 +- 9 files changed, 62 insertions(+), 38 deletions(-) diff --git a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c index 12ed6868021d..b3c74da949fd 100644 --- a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c +++ b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c @@ -10,11 +10,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FNX, KC_RALT, KC_RGUI, KC_RCTL), [_FL] = LAYOUT_60_ansi( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - RGB_TOG, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, 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_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, 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), [_AL] = LAYOUT_60_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, \ diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c index 96c3a32f2692..98ba86e9415f 100644 --- a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c @@ -10,11 +10,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL), [_FL] = LAYOUT_60_ansi_split_bs_rshift( - 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_DEL, \ - RGB_TOG, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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_DEL, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, 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_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, 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), [_AL] = LAYOUT_60_ansi_split_bs_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/layouts/community/66_ansi/mechmerlin/config.h b/layouts/community/66_ansi/mechmerlin/config.h index f51361866cd4..6f70f09beec2 100644 --- a/layouts/community/66_ansi/mechmerlin/config.h +++ b/layouts/community/66_ansi/mechmerlin/config.h @@ -1,12 +1 @@ #pragma once - -#ifdef AUDIO_CLICKY - #define AUDIO_CLICKY_ON - #define AUDIO_CLICKY_FREQ_DEFAULT 261.63f - #define AUDIO_CLICKY_FREQ_MIN 65.41f - #define AUDIO_CLICKY_FREQ_MAX 1046.5f - //#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f - //#define AUDIO_CLICKY_FREQ_FACTOR 2.71828f // e - #define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio - #define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f -#endif diff --git a/layouts/community/66_ansi/mechmerlin/keymap.c b/layouts/community/66_ansi/mechmerlin/keymap.c index ea2e923b1cac..9f041e27ca67 100644 --- a/layouts/community/66_ansi/mechmerlin/keymap.c +++ b/layouts/community/66_ansi/mechmerlin/keymap.c @@ -8,20 +8,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_PGDN, \ KC_CTCP,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, KC_UP, \ + 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_LCTL,KC_LGUI,KC_LALT, KC_SPC, MO(_FL),KC_RGUI,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), [_FL] = LAYOUT_66_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_VOLD, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLU,KC_VOLD,_______, _______, KC_PGUP, \ + _______, _______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLD,KC_VOLU,_______, _______, KC_PGUP, \ _______,_______,_______, _______, _______,_______,_______,KC_HOME,KC_PGDN,KC_END), [_CL] = LAYOUT_66_ansi( BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, _______, RGB_VAI, \ - RGB_TOG,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - CK_TOGG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ - _______,_______,_______, RGB_MOD, _______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), + BL_TOGG,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + RGB_TOG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + VLK_TOG, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ + CK_TOGG,_______,_______, RGB_MOD, _______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c index e7b89516263d..f785cdf3fd9a 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c @@ -9,13 +9,13 @@ 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, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [_FL] = LAYOUT_75_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_TRNS, KC_TRNS, 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, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) + RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, 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_INC, BL_DEC, BL_STEP, 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_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) }; diff --git a/users/mechmerlin/changelog.md b/users/mechmerlin/changelog.md index 11b3ba708f6b..d5877cfdfecf 100644 --- a/users/mechmerlin/changelog.md +++ b/users/mechmerlin/changelog.md @@ -1,6 +1,11 @@ # Changelog All notable changes to my userspace will be documented in this file. +## [0.2.0] - 2019-02-27 +### Changed +- Moved `AUDIO_CLICKY` from community layout `66_ansi` into user space. +- + ## [0.1.1] - 2018-10-26 ### Added - Added a changelog, aka THIS VERY FILE! diff --git a/users/mechmerlin/config.h b/users/mechmerlin/config.h index 3d58c230af65..3c45162bcccf 100644 --- a/users/mechmerlin/config.h +++ b/users/mechmerlin/config.h @@ -1,5 +1,27 @@ #pragma once #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS #endif // RGBLIGHT_ENABLE + +#ifdef AUDIO_CLICKY + #define AUDIO_CLICKY_ON + #define AUDIO_CLICKY_FREQ_DEFAULT 261.63f + #define AUDIO_CLICKY_FREQ_MIN 65.41f + #define AUDIO_CLICKY_FREQ_MAX 1046.5f + //#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f + //#define AUDIO_CLICKY_FREQ_FACTOR 2.71828f // e + #define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio + #define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f +#endif + +// Enable features depending on keyboard +#if defined(KEYBOARD_clueboard_66_hotswap_prototype) + #define RGBLIGHT_ENABLE + #define AUDIO_CLICKY +#elif defined(KEYBOARD_clueboard_66_hotswap_gen1) + #define AUDIO_CLICKY +#else + #define RGBLIGHT_ENABLE +#endif diff --git a/users/mechmerlin/readme.md b/users/mechmerlin/readme.md index 1e86a64107fc..24335a7ce22d 100644 --- a/users/mechmerlin/readme.md +++ b/users/mechmerlin/readme.md @@ -1,4 +1,4 @@ -# MechMerlin's Userspace v0.1.1 +# MechMerlin's Userspace v0.2.0 This is a collection of my most commonly used QMK features. @@ -38,3 +38,11 @@ This is just a wrapper for `CTL_T(KC_CAPS)`. This is a hold for control and tap ### RGBLIGHT_SLEEP Ensures that when my computer is in sleep mode, the keyboard underglow lights will also be off. + +### Audio Clicky + +If a board has a speaker, enable beeps and boops per switch actuation. This is currently only available on prototype/gen1 clueboard 66_hotswaps. + +### Velocikey + +[Velocikey](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_velocikey.md) is an RGBLIGHT feature in which the faster you type, the faster the ARE GEE BEES. diff --git a/users/mechmerlin/rules.mk b/users/mechmerlin/rules.mk index 70c20ec71ecd..088743c4679c 100644 --- a/users/mechmerlin/rules.mk +++ b/users/mechmerlin/rules.mk @@ -1 +1 @@ -SRC += mechmerlin.c \ No newline at end of file +SRC += mechmerlin.c From 32b63d676fbfd3a71764459cd89c428ccbde7ddd Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu, 28 Feb 2019 15:02:22 -0500 Subject: [PATCH 204/445] [Keymap] Cleaning up my config and userspace files (#5265) * Removed since options are in userspace * Removed RGB option that was breaking one of my builds * Remove unused options * Removed options present in userspace, add board specific options here * Removed code also present in userspace * Turns out those lines were needed, added them back * Testing changes * Added code to ensure board read as ANSI instead of default ISO for HS60 * Setting \ key to "MOD" instead of "ALPHA" for lighting --- keyboards/hs60/v2/keymaps/stanrc85/config.h | 24 +++++++++++++++++++-- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 16 +------------- keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 3 --- users/stanrc85/config.h | 4 ---- users/stanrc85/rules.mk | 1 - 5 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 keyboards/hs60/v2/keymaps/stanrc85/rules.mk diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h index 4443dcd50ea7..4576211f1025 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/config.h +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -1,2 +1,22 @@ -#define TAPPING_TERM 200 -#define RETRO_TAPPING +#pragma once + +// Include overwrites for specific keymap +#define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 + +// disable backlight after timeout in minutes, 0 = no timeout +#undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 10 + +#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 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 //Setting \ key to "MOD" instead of "ALPHA" for lighting +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index add0609034c8..8d8d895f65a4 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -14,21 +14,7 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H - -#define DEFAULT 0 //Custom ANSI -#define LAYER1 1 //Default ANSI (enable with Fn2+D) -#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control -#define LAYER3 3 //RGB Underglow controls and RESET - -//Aliases for longer keycodes -#define KC_CAD LALT(LCTL(KC_DEL)) -#define KC_LOCK LGUI(KC_L) -#define CA_QUOT LCA(KC_QUOT) -#define CA_SCLN LCA(KC_SCLN) -#define KC_CTLE LCTL_T(KC_ESC) -#define LT_SPCF LT(2, KC_SPC) -#define TD_TESC TD(TD_ESC) -#define TD_TWIN TD(TD_WIN) +#include "stanrc85.h" //Tap Dance Declarations enum { diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk deleted file mode 100644 index 2a173b316c1d..000000000000 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -TAP_DANCE_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = no - diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index 628ec994b031..904a7f524e16 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h @@ -2,7 +2,3 @@ #define TAPPING_TERM 200 #define RETRO_TAPPING - -#ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP -#endif // RGBLIGHT_ENABLE diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 324e52674d6c..19ad624758a3 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -1,6 +1,5 @@ TAP_DANCE_ENABLE = yes EXTRAKEY_ENABLE = yes -RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no COMMAND_ENABLE = no BOOTMAGIC_ENABLE = no From 220551ed5fa3fc2a6ead4a182bad189b21ab40cc Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 1 Mar 2019 07:06:26 +1100 Subject: [PATCH 205/445] [Keyboard] GH60 Satan improvements (#5264) * GH60 Satan improvements * Link no worky * Accidentally a h * Use MOD_MASK_SHIFT from core * Remove nonexistent layouts from here --- keyboards/satan/config.h | 12 +- keyboards/satan/keymaps/default/keymap.c | 65 +++---- keyboards/satan/pinout.txt | 1 - keyboards/satan/readme.md | 30 +++- keyboards/satan/rules.mk | 23 +-- keyboards/satan/satan.c | 28 ++- keyboards/satan/satan.h | 213 +++++++++++------------ 7 files changed, 179 insertions(+), 193 deletions(-) delete mode 100644 keyboards/satan/pinout.txt diff --git a/keyboards/satan/config.h b/keyboards/satan/config.h index dbe98e87ef63..c15e5c37c168 100644 --- a/keyboards/satan/config.h +++ b/keyboards/satan/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -26,7 +25,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0003 #define MANUFACTURER SATAN #define PRODUCT GH60 -#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support +#define DESCRIPTION 60% keyboard with backlight and WS2812 support /* key matrix size */ #define MATRIX_ROWS 5 @@ -58,12 +57,11 @@ along with this program. If not, see . */ #define BACKLIGHT_LEVELS 4 -/* Underlight configuration +/* Underglow configuration */ - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs +#define RGBLED_NUM 8 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 @@ -85,5 +83,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/satan/keymaps/default/keymap.c index fc9d3b7ab76a..2dec5464ccf1 100644 --- a/keyboards/satan/keymaps/default/keymap.c +++ b/keyboards/satan/keymaps/default/keymap.c @@ -4,71 +4,64 @@ enum custom_keycodes { SFT_ESC = SAFE_RANGE }; -// Used for SHIFT_ESC -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // 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 _BL 0 -#define _FL 1 +enum layer_names { + _BL, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backsp| * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | * |-----------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | + * |Ctrl|GUI |Alt | Space | Alt| GUI| Fn | Ctrl| * `-----------------------------------------------------------' */ -[_BL] = LAYOUT_60_ansi( - SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL), + [_BL] = LAYOUT_60_ansi( + SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL + ), /* Keymap _FL: Function Layer * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | RESET| + * | ` | | | | | | | | | | | | | Reset | * |-----------------------------------------------------------| - * | | | | | | | | | | | |BL-|BL+|BL | + * | | | | | | | | | | | |BL-|BL+| BL | * |-----------------------------------------------------------| - * | | | | | | | | | | | | | + * | | | | | | | | | | | | | | * |-----------------------------------------------------------| - * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | + * | | | | | | | | | | | | | * |-----------------------------------------------------------| * | | | | | | | | | * `-----------------------------------------------------------' */ -[_FL] = LAYOUT_60_ansi( - #ifdef RGBLIGHT_ENABLE - KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______, _______), - #else - KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, BL_INC,BL_TOGG, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______,_______), - #endif + [_FL] = LAYOUT_60_ansi( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_TOGG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SFT_ESC: if (record->event.pressed) { - if (get_mods() & MODS_SHIFT_MASK) { + if (get_mods() & MOD_MASK_SHIFT) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -76,7 +69,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { send_keyboard_report(); } } else { - if (get_mods() & MODS_SHIFT_MASK) { + if (get_mods() & MOD_MASK_SHIFT) { del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/satan/pinout.txt b/keyboards/satan/pinout.txt deleted file mode 100644 index d1ad4ac88350..000000000000 --- a/keyboards/satan/pinout.txt +++ /dev/null @@ -1 +0,0 @@ -For WS2812B LED strip support, connect DIN from strip to PE2 on ATmega32u4 controller (see reference image controller.jpg) \ No newline at end of file diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md index a2552edf8db9..7eb272cf304b 100644 --- a/keyboards/satan/readme.md +++ b/keyboards/satan/readme.md @@ -1,15 +1,33 @@ -Satan GH60 -========== +# Satan GH60 -![controller](https://i.imgur.com/9vyRBoT.jpg) -![power](https://i.imgur.com/pHMZHLP.jpg) +A clone of the GH60 60% keyboard, with full backlighting support. Keyboard Maintainer: QMK Community Hardware Supported: Satan GH60 PCB -Hardware Availability: https://1upkeyboards.com/gh60-satan-pcb.html +Hardware Availability: https://www.1upkeyboards.com/shop/controllers/gh60-satan-pcb/ Make example for this keyboard (after setting up your build environment): make satan:default -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. +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). + +## RGB Underglow (WS2812B LED Strip) + +This board also supports underglow with a slight mod. + +Connect the DIN pad of the LED strip to PE2 on the ATmega32U4, like so: + +![controller](https://i.imgur.com/9vyRBoT.jpg) + +Then connect VCC and GND to pins 1 and 6 at the bottom of the PCB: + +![power](https://i.imgur.com/pHMZHLP.jpg) + +## ISP Header + +If you want to flash another bootloader (such as QMK-DFU), or can't get into the bootloader in the first place, the row of pins at the bottom can be used to ISP flash the board: + +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---|----|---|----|-----|---|----| +|VCC|MISO|SCK|MOSI|RESET|GND|*NC*| diff --git a/keyboards/satan/rules.mk b/keyboards/satan/rules.mk index 98200ab02ca0..51161490e4d2 100644 --- a/keyboards/satan/rules.mk +++ b/keyboards/satan/rules.mk @@ -1,6 +1,4 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -16,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -39,7 +36,6 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 @@ -48,21 +44,20 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # comment out to disable the options. # -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 = yes # Console for debug(+400) +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 = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls +MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift \ No newline at end of file +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/satan/satan.c b/keyboards/satan/satan.c index d2c5d5c2054a..8542a57c43a7 100644 --- a/keyboards/satan/satan.c +++ b/keyboards/satan/satan.c @@ -1,30 +1,24 @@ #include "satan.h" -#include "led.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); + matrix_init_user(); + led_init_ports(); }; void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); + matrix_scan_user(); }; void led_init_ports(void) { - // * Set our LED pins as output - DDRB |= (1<<2); + setPinOutput(B2); } void led_set_kb(uint8_t usb_led) { - if (usb_led & (1< Date: Thu, 28 Feb 2019 14:15:38 -0600 Subject: [PATCH 206/445] [Docs] Add note about using Unicode Hex Input (#5248) * Add note about using Unicode Hex Input * Update docs * remove extra return, oops --- docs/feature_unicode.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 7dd85c5c2e78..1bc3c89d2025 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -65,6 +65,8 @@ 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. + **Note:** Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as: Option + Left Arrow (`moveWordLeftAndModifySelection`) and Option + Right Arrow (`moveWordRightAndModifySelection`). + * **`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. @@ -121,7 +123,7 @@ For instance, you can add these definitions to your `config.h` file: ### Additional Customization -Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system. +Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system. #### Start and Finish input functions @@ -183,7 +185,7 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed. ### US International -If you enable the US International layout on the system, it will use punctuation to accent the characters. +If you enable the US International layout on the system, it will use punctuation to accent the characters. For instance, typing "`a" will result in à. From 7470317d95574487a7dd42f94421d5a954eb924c Mon Sep 17 00:00:00 2001 From: Tobias Schulte Date: Thu, 28 Feb 2019 21:33:02 +0100 Subject: [PATCH 207/445] [Keymap] use steno mode from base (#5220) --- keyboards/ergodox_ez/keymaps/steno/keymap.c | 106 ++++---------------- keyboards/ergodox_ez/keymaps/steno/rules.mk | 2 +- 2 files changed, 19 insertions(+), 89 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index d23b4447514f..45fc9f8ba99c 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -1,8 +1,7 @@ #include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" -#include "sendchar.h" -#include "virtser.h" +#include "keymap_steno.h" #define BASE 0 // default layer #define SYMB 1 // symbols @@ -137,35 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK ), -// TxBolt Codes -#define Sl 0b00000001 -#define Tl 0b00000010 -#define Kl 0b00000100 -#define Pl 0b00001000 -#define Wl 0b00010000 -#define Hl 0b00100000 -#define Rl 0b01000001 -#define Al 0b01000010 -#define Ol 0b01000100 -#define X 0b01001000 -#define Er 0b01010000 -#define Ur 0b01100000 -#define Fr 0b10000001 -#define Rr 0b10000010 -#define Pr 0b10000100 -#define Br 0b10001000 -#define Lr 0b10010000 -#define Gr 0b10100000 -#define Tr 0b11000001 -#define Sr 0b11000010 -#define Dr 0b11000100 -#define Zr 0b11001000 -#define NM 0b11010000 -#define GRPMASK 0b11000000 -#define GRP0 0b00000000 -#define GRP1 0b01000000 -#define GRP2 0b10000000 -#define GRP3 0b11000000 /* Keymap 3: TxBolt (Serial) * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -190,22 +160,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // TxBolt over Serial [TXBOLT] = LAYOUT_ergodox( KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO, - KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X), - KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X), KC_NO, + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_NO, + KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - M(Al), M(Ol), KC_NO, + STN_A, STN_O, KC_NO, // right hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM), - M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr), - KC_NO, M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr), + KC_TRNS, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, + STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + KC_NO, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, M(Er), M(Ur) + KC_NO, STN_E, STN_U ), /* Keymap 4: TxBolt (Serial) Alternative * @@ -230,69 +200,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // TxBolt over Serial [TXBOLT2] = LAYOUT_ergodox( - KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO, - KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X), KC_NO, - KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X), + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_NO, + KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, KC_NO, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, M(Al), M(Ol), + KC_NO, KC_NO, KC_NO, STN_A, STN_O, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, // right hand - KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM), - KC_TRNS, M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr), - M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr), + KC_NO, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, + KC_TRNS, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - M(Er), M(Ur), KC_NO, KC_NO, KC_NO, + STN_E, STN_U, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO ), }; -uint8_t chord[4] = {0,0,0,0}; -uint8_t pressed_count = 0; - -void send_chord(void) -{ - for(uint8_t i = 0; i < 4; i++) - { - if(chord[i]) - virtser_send(chord[i]); - } - virtser_send(0); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - // We need to track keypresses in all modes, in case the user - // changes mode whilst pressing other keys. - if (record->event.pressed) - pressed_count++; - else - pressed_count--; - return true; -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - - if (record->event.pressed) { - uint8_t grp = (id & GRPMASK) >> 6; - chord[grp] |= id; - } - else { - if (pressed_count == 0) { - send_chord(); - chord[0] = chord[1] = chord[2] = chord[3] = 0; - } - } - return MACRO_NONE; -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI }; // Runs constantly in the background, in a loop. diff --git a/keyboards/ergodox_ez/keymaps/steno/rules.mk b/keyboards/ergodox_ez/keymaps/steno/rules.mk index b6fb9b1a800b..4b64fd22de6a 100644 --- a/keyboards/ergodox_ez/keymaps/steno/rules.mk +++ b/keyboards/ergodox_ez/keymaps/steno/rules.mk @@ -1,3 +1,3 @@ -VIRTSER_ENABLE = yes +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER # Not enough interupts, so something has to go MOUSEKEY_ENABLE = no From 8dd1dab7cbeb5e149f71b63637574e8408475015 Mon Sep 17 00:00:00 2001 From: avatak <35812371+avatak@users.noreply.github.com> Date: Thu, 28 Feb 2019 20:35:42 +0000 Subject: [PATCH 208/445] Added two songs to song_list.h (FF Prelude and To Boldly Go) (#5252) Adds FF_Prelude (from most Final Fantasy games) and TO_BOLDLY_GO (a melody from the main themes of Star Trek TNG and the original series) --- quantum/audio/song_list.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 9946084977cf..126c0e59400d 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -501,5 +501,37 @@ H__NOTE(_F4), \ H__NOTE(_F4), \ W__NOTE(_C5), \ - W__NOTE(_BF4), + W__NOTE(_BF4), + +/* Prelude music from Final Fantasy */ +#define FF_PRELUDE \ + M__NOTE(_C3, 20), M__NOTE(_D3, 20), M__NOTE(_E3, 20), M__NOTE(_G3, 20), \ + M__NOTE(_C4, 20), M__NOTE(_D4, 20), M__NOTE(_E4, 20), M__NOTE(_G4, 20), \ + M__NOTE(_C5, 20), M__NOTE(_D5, 20), M__NOTE(_E5, 20), M__NOTE(_G5, 20), \ + M__NOTE(_C6, 20), M__NOTE(_D6, 20), M__NOTE(_E6, 20), M__NOTE(_G6, 20), \ + M__NOTE(_C7, 20), M__NOTE(_G6, 20), M__NOTE(_E6, 20), M__NOTE(_D6, 20), \ + M__NOTE(_C6, 20), M__NOTE(_G5, 20), M__NOTE(_E5, 20), M__NOTE(_D5, 20), \ + M__NOTE(_C5, 20), M__NOTE(_G4, 20), M__NOTE(_E4, 20), M__NOTE(_D4, 20), \ + M__NOTE(_C4, 20), M__NOTE(_G3, 20), M__NOTE(_E3, 20), M__NOTE(_D3, 20), \ + M__NOTE(_A2, 20), M__NOTE(_B2, 20), M__NOTE(_C3, 20), M__NOTE(_E3, 20), \ + M__NOTE(_A3, 20), M__NOTE(_B3, 20), M__NOTE(_C4, 20), M__NOTE(_E4, 20), \ + M__NOTE(_A4, 20), M__NOTE(_B4, 20), M__NOTE(_C5, 20), M__NOTE(_E5, 20), \ + M__NOTE(_A5, 20), M__NOTE(_B5, 20), M__NOTE(_C6, 20), M__NOTE(_E6, 20), \ + M__NOTE(_A6, 20), M__NOTE(_E6, 20), M__NOTE(_C6, 20), M__NOTE(_B5, 20), \ + M__NOTE(_A5, 20), M__NOTE(_E5, 20), M__NOTE(_C5, 20), M__NOTE(_B4, 20), \ + M__NOTE(_A4, 20), M__NOTE(_E4, 20), M__NOTE(_C4, 20), M__NOTE(_B3, 20), \ + M__NOTE(_A3, 20), M__NOTE(_E3, 20), M__NOTE(_C3, 20), M__NOTE(_B2, 20), + +/* Melody from the main themes of Star Trek TNG and the original series */ +#define TO_BOLDLY_GO \ + W__NOTE(_BF3 ), \ + Q__NOTE(_EF4 ), \ + WD_NOTE(_AF4 ), \ + W__NOTE(_REST), \ + H__NOTE(_G4 ), \ + Q__NOTE(_EF4 ), \ + H__NOTE(_C4 ), \ + W__NOTE(_REST), \ + QD_NOTE(_F4 ), \ + M__NOTE(_BF4, 128), #endif From beb292e7f01712f1b8dd7bd3a2d4469e814bb567 Mon Sep 17 00:00:00 2001 From: Luciano Malavasi Date: Thu, 28 Feb 2019 13:02:16 -0800 Subject: [PATCH 209/445] [Keymap] My TMO50 layout (#5116) * keymap + alpha * some fixes * keymap + alpha * some fixes * drashna changes * linked main Alpha repo in keyboards/alpha readme * missed a spot * there's another function called FUNC lol * keymap + alpha * some fixes * keymap + alpha * drashna changes * Fixed include * Revert "Fixed include" This reverts commit ea92f261f86d8433eab313cde498adca1682a006. * messed up my git, fixed include * starting work on TMO50 layout * Update keyboards/tmo50/keymaps/default/keymap.c Co-Authored-By: PyrooL --- keyboards/tmo50/keymaps/pyrol/keymap.c | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 keyboards/tmo50/keymaps/pyrol/keymap.c diff --git a/keyboards/tmo50/keymaps/pyrol/keymap.c b/keyboards/tmo50/keymaps/pyrol/keymap.c new file mode 100644 index 000000000000..a37370c389de --- /dev/null +++ b/keyboards/tmo50/keymaps/pyrol/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2019 funderburker + * + * 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_TRNS, 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_TRNS, 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_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_TRNS, KC_GESC, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3) + ), + + // Fn1 layer + [1] = LAYOUT( + KC_VOLU, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC, + KC_VOLD, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, + KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + KC_MUTE, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 layer + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 layer + [3] = LAYOUT( + 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, 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 f6a0ee85fd7c4a2452d0f42bd948746525194009 Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Fri, 1 Mar 2019 10:27:34 +1100 Subject: [PATCH 210/445] [Keymap] update: add extrakey support for macOS media keys (#5263) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add dusty keymap * change keymap folder to match my github username * initial keymap completed in comments only * layout without NAV completed in comments only * disable Command to prevent interference with Space Cadet keys * switch _ and \ in the symbol layer * Layers complete through _NAV * add thumb keys to _NAV * complete _NUM * all layouts complete; still needs `process_user_record()` * completed first draft of keymap; still needs config.h to match * corrected keycodes for Mac macro-volume keys * fix Mac mute keycode * add missing Mac keycodes for previous and next track * placeholder for qwerty layout, not yet completed; remove unnecessary breaks; add todos * eliminate Preonic branch before switching to Minidox branch: • delete dustypomerleau Preonic keymap folder • complete keymap.c (QWERTY layer, vanilla numbers layer) TODO: • add preferences to config.h • complete the README * edit commented keymap diagrams for clarity in dual function keys * define initial config.h and add rules.mk for mouse key support * fix redundant line after implementation of tap_code() * fixed key_timer declaration, added README and rules * formatting of keymap * add CTPC to config * cycle thumb keys to favor center position * modify config.h for temporary Pro Micro compatibility * remove superfluous call to use serial; homebrewed mod tap keys are still broken with OSL * merge _SYS and _MEDIA on new Z_SYS key * ALT_OP example of new MT macro complete * initial narze-inspired MT fixes in PRU * add (currently superfluous) custom keycode for the _SYS layer * rudimentary `OSL` symbol macros that immediately register the mod and fail to reset the oneshot layer, but do output the proper keys—fix both of these things * remove permissive hold to improve tapping performance * remove calls to `clear_oneshot_layer_state()`, as they have no effect inside `process_record_user()`. Tapdance appears to be the way forward. * final commit before tapdance code; correct layout in comments * initial tapdance code for shifted mod taps * add numeric and ergo NUM layers and pinky shifts for keycuts * add TD() wrappers to tapdance codes and clean up commented layout guides * add faux return to cur_dance to allow compilation - TODO: research what the default clause should be in cur_dance * update commented schematics for better readability * add backspace and delete to lockable layers, Z_SYS -> SYS_Z for consistency, fix schematic errors * add `DOUBLE_SINGLE_TAP` to tapdance cases to allow doubling of the single tap character without waiting tapping term * remove reduced oneshot tapping toggles * update README * newline tweak :) * Update keyboards/minidox/keymaps/dustypomerleau/keymap.c Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * remove `PREVENT_STUCK_MODIFIERS`, as this is default behavior * enable extrakey in rules to enable media keys * enable extrakeys for media key compatibility on macOS * add dash and slash to _NUM layers * change to universal volume keycodes * revert micro volume adjustments to macOS-specific codes due to lack of functionality (macro volume adjustments are still universal) --- keyboards/minidox/keymaps/dustypomerleau/config.h | 1 - keyboards/minidox/keymaps/dustypomerleau/keymap.c | 12 ++++++------ keyboards/minidox/keymaps/dustypomerleau/rules.mk | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/minidox/keymaps/dustypomerleau/config.h b/keyboards/minidox/keymaps/dustypomerleau/config.h index 5166e06d834b..b2169947b7a9 100644 --- a/keyboards/minidox/keymaps/dustypomerleau/config.h +++ b/keyboards/minidox/keymaps/dustypomerleau/config.h @@ -2,7 +2,6 @@ #pragma once - #define EE_HANDS #define IGNORE_MOD_TAP_INTERRUPT #define ONESHOT_TIMEOUT 1000 diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c index e8b1ca1b53bb..d0eab98b47de 100644 --- a/keyboards/minidox/keymaps/dustypomerleau/keymap.c +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -166,10 +166,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------' `------' */ [_SYS] = LAYOUT( \ - RESET, DEBUG, QWERTY, CMK_DHM, _______, _______, KC__VOLDOWN, KC__VOLUP, _______, _______, \ - KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_POWER, VOL_DN, VOL_UP, KC__MUTE, KC_MPLY, \ - _______, _______, AU_OFF, AU_ON, _______, _______, NUMLK_E, KC_MRWD, KC_MFFD, _______, \ - _______, _______, _______, _______, _______, _______ \ + RESET, DEBUG, QWERTY, CMK_DHM, _______, _______, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_POWER, VOL_DN, VOL_UP, KC__MUTE, KC_MPLY, \ + _______, _______, AU_OFF, AU_ON, _______, _______, NUMLK_E, KC_MRWD, KC_MFFD, _______, \ + _______, _______, _______, _______, _______, _______ \ ), /* Navigation + mouse keys @@ -212,7 +212,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUM_E] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \ - _______, _______, KC_F11, KC_F12, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, _______, \ + KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, _______, \ _______, KC_TAB, KC_ESC, _______, _______, _______ \ ), @@ -234,7 +234,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUM_N] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \ - _______, _______, KC_F11, KC_F12, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, _______, \ + KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, _______, \ _______, KC_TAB, KC_ESC, _______, _______, _______ \ ), diff --git a/keyboards/minidox/keymaps/dustypomerleau/rules.mk b/keyboards/minidox/keymaps/dustypomerleau/rules.mk index 5ed4c5446eb8..2a74d95536b3 100644 --- a/keyboards/minidox/keymaps/dustypomerleau/rules.mk +++ b/keyboards/minidox/keymaps/dustypomerleau/rules.mk @@ -1,4 +1,5 @@ # dustypomerleau, Minidox rules +EXTRAKEY_ENABLE = yes MOUSEKEY_ENABLE = yes TAP_DANCE_ENABLE = yes From a1de199aa9d86d0c325985825e07d5d769a5d786 Mon Sep 17 00:00:00 2001 From: yynmt <45400583+yynmt@users.noreply.github.com> Date: Fri, 1 Mar 2019 13:12:56 +0900 Subject: [PATCH 211/445] [Keyboard] Add Dozen0 (#5272) * Add Dozen0 macropad * Fix readme image * Add info.json * Fix keymap f12 * Fix copyright and replace include guards * remove IS_COMMAND at config.h --- keyboards/dozen0/config.h | 227 +++++++++++++++++++++ keyboards/dozen0/dozen0.c | 43 ++++ keyboards/dozen0/dozen0.h | 34 +++ keyboards/dozen0/info.json | 16 ++ keyboards/dozen0/keymaps/default/config.h | 19 ++ keyboards/dozen0/keymaps/default/keymap.c | 40 ++++ keyboards/dozen0/keymaps/default/readme.md | 8 + keyboards/dozen0/keymaps/f12/config.h | 19 ++ keyboards/dozen0/keymaps/f12/keymap.c | 40 ++++ keyboards/dozen0/readme.md | 15 ++ keyboards/dozen0/rules.mk | 81 ++++++++ 11 files changed, 542 insertions(+) create mode 100644 keyboards/dozen0/config.h create mode 100644 keyboards/dozen0/dozen0.c create mode 100644 keyboards/dozen0/dozen0.h create mode 100644 keyboards/dozen0/info.json create mode 100644 keyboards/dozen0/keymaps/default/config.h create mode 100644 keyboards/dozen0/keymaps/default/keymap.c create mode 100644 keyboards/dozen0/keymaps/default/readme.md create mode 100644 keyboards/dozen0/keymaps/f12/config.h create mode 100644 keyboards/dozen0/keymaps/f12/keymap.c create mode 100644 keyboards/dozen0/readme.md create mode 100644 keyboards/dozen0/rules.mk diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h new file mode 100644 index 000000000000..3c409350d553 --- /dev/null +++ b/keyboards/dozen0/config.h @@ -0,0 +1,227 @@ +/* +Copyright 2019 yynmt + +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 yynmt +#define PRODUCT Dozen0 +#define DESCRIPTION 12 keys macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #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/dozen0/dozen0.c b/keyboards/dozen0/dozen0.c new file mode 100644 index 000000000000..8b52aa898677 --- /dev/null +++ b/keyboards/dozen0/dozen0.c @@ -0,0 +1,43 @@ +/* Copyright 2019 yynmt + * + * 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 "dozen0.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/dozen0/dozen0.h b/keyboards/dozen0/dozen0.h new file mode 100644 index 000000000000..e2ab35bcef88 --- /dev/null +++ b/keyboards/dozen0/dozen0.h @@ -0,0 +1,34 @@ +/* Copyright 2019 yynmt + * + * 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( \ + K00, K01, K02, K03, K04, K05, \ + K06, K07, K08, K09, K10, K11 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11 }, \ +} diff --git a/keyboards/dozen0/info.json b/keyboards/dozen0/info.json new file mode 100644 index 000000000000..36eb8bec63c2 --- /dev/null +++ b/keyboards/dozen0/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Dozen0", + "url": "http://yynmt.com", + "maintainer": "yynmt", + "width": 6, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 12, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1} + ] + } + } +} diff --git a/keyboards/dozen0/keymaps/default/config.h b/keyboards/dozen0/keymaps/default/config.h new file mode 100644 index 000000000000..bab59c67e07a --- /dev/null +++ b/keyboards/dozen0/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 yynmt + * + * 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/dozen0/keymaps/default/keymap.c b/keyboards/dozen0/keymaps/default/keymap.c new file mode 100644 index 000000000000..da0aae0b02ba --- /dev/null +++ b/keyboards/dozen0/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 yynmt + * + * 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( + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_UP, KC_DEL, KC_BSPC, \ + KC_LCTRL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT \ + ), +}; + +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/dozen0/keymaps/default/readme.md b/keyboards/dozen0/keymaps/default/readme.md new file mode 100644 index 000000000000..bf63c1f1ae17 --- /dev/null +++ b/keyboards/dozen0/keymaps/default/readme.md @@ -0,0 +1,8 @@ +# The default keymap for Dozen0 + +``` + ,-------------------------------------------------. +| Ctrl+X | Ctrl+C | Ctrl+V | Up | Delete | Bksp | +| Ctrl | Shift | Left | Down | Right | Enter | +`--------------------------------------------------' +``` diff --git a/keyboards/dozen0/keymaps/f12/config.h b/keyboards/dozen0/keymaps/f12/config.h new file mode 100644 index 000000000000..bab59c67e07a --- /dev/null +++ b/keyboards/dozen0/keymaps/f12/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 yynmt + * + * 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/dozen0/keymaps/f12/keymap.c b/keyboards/dozen0/keymaps/f12/keymap.c new file mode 100644 index 000000000000..bc8cd4123dda --- /dev/null +++ b/keyboards/dozen0/keymaps/f12/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 yynmt + * + * 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 \ + ), +}; + +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/dozen0/readme.md b/keyboards/dozen0/readme.md new file mode 100644 index 000000000000..7ef119246199 --- /dev/null +++ b/keyboards/dozen0/readme.md @@ -0,0 +1,15 @@ +# Dozen0 + +![Dozen0](https://raw.githubusercontent.com/yynmt/Dozen0/master/images/main_image_mx.jpg) + +Dozen0 is 12 keys macropad. + +Keyboard Maintainer: [yynmt](https://github.com/yynmt) +Hardware Supported: Dozen0 PCBs, ProMicro supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make dozen0: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/dozen0/rules.mk b/keyboards/dozen0/rules.mk new file mode 100644 index 000000000000..383a3594b474 --- /dev/null +++ b/keyboards/dozen0/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 41d8be7e75e68f41cdc890d7b9f99ba8d58990d4 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 1 Mar 2019 11:28:46 -0500 Subject: [PATCH 212/445] [Keymap] DCompact Layout Updates pt. 3 (#5209) * Fix whitespace and Markdown errors * Add DCompact layout implementation for Levinson keyboard * Rename README.md to readme.md * Rename README.md to readme.md * Rename README.md to readme.md * Update keyboards/keebio/levinson/keymaps/dcompact/keymap.c Co-Authored-By: loksonarius * Update keyboards/keebio/levinson/keymaps/dcompact/keymap.c Co-Authored-By: loksonarius --- .../keymaps/dcompact/{README.md => readme.md} | 8 +- .../keebio/levinson/keymaps/dcompact/config.h | 28 +++ .../keebio/levinson/keymaps/dcompact/keymap.c | 238 ++++++++++++++++++ .../levinson/keymaps/dcompact/readme.md} | 8 +- .../keebio/levinson/keymaps/dcompact/rules.mk | 13 + keyboards/planck/keymaps/dcompact/keymap.c | 2 +- keyboards/planck/keymaps/dcompact/readme.md | 45 ++++ 7 files changed, 333 insertions(+), 9 deletions(-) rename keyboards/chimera_ortho/keymaps/dcompact/{README.md => readme.md} (84%) create mode 100644 keyboards/keebio/levinson/keymaps/dcompact/config.h create mode 100644 keyboards/keebio/levinson/keymaps/dcompact/keymap.c rename keyboards/{planck/keymaps/dcompact/README.md => keebio/levinson/keymaps/dcompact/readme.md} (84%) create mode 100644 keyboards/keebio/levinson/keymaps/dcompact/rules.mk create mode 100644 keyboards/planck/keymaps/dcompact/readme.md diff --git a/keyboards/chimera_ortho/keymaps/dcompact/README.md b/keyboards/chimera_ortho/keymaps/dcompact/readme.md similarity index 84% rename from keyboards/chimera_ortho/keymaps/dcompact/README.md rename to keyboards/chimera_ortho/keymaps/dcompact/readme.md index 18c23d66eda2..bf72567ef10b 100644 --- a/keyboards/chimera_ortho/keymaps/dcompact/README.md +++ b/keyboards/chimera_ortho/keymaps/dcompact/readme.md @@ -34,10 +34,10 @@ merge with those in the keyboard folder_ ## Relevant Links -- ![Online Dvorak Layout Trainer](https://learn.dvorak.nl/) -- ![Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) -- ![QMK Docs](https://docs.qmk.fm/#/) -- ![QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) ## Contact diff --git a/keyboards/keebio/levinson/keymaps/dcompact/config.h b/keyboards/keebio/levinson/keymaps/dcompact/config.h new file mode 100644 index 000000000000..be2d71e8f02f --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/dcompact/config.h @@ -0,0 +1,28 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 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 + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/keebio/levinson/keymaps/dcompact/keymap.c b/keyboards/keebio/levinson/keymaps/dcompact/keymap.c new file mode 100644 index 000000000000..a0556c09b4fc --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/dcompact/keymap.c @@ -0,0 +1,238 @@ +#include QMK_KEYBOARD_H + +#include "keymap_steno.h" + +// Custom Keycodes and Combinations Used +#define DEL_SHF SFT_T(KC_DEL) +#define QUAKE LCTL(KC_GRV) + +#define WKSP_L LALT(LCTL(KC_LEFT)) +#define WKSP_D LALT(LCTL(KC_DOWN)) +#define WKSP_U LALT(LCTL(KC_UP)) +#define WKSP_R LALT(LCTL(KC_RGHT)) + + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE, + _LOWER, + _RAISE, + _FUNC, + _PLOVER, + _ADJUST, + _MOUSE +}; + +enum planck_keycodes { + BASE = SAFE_RANGE, + PLOVER, + LOWER, + RAISE, + FUNC, + MOUSE, + ADJUST, + EXT_PLV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,-----------------------------------------------------------------------------------. + * | Tab | " ' | < , | > . | P | Y | F | G | C | R | L | ? / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | _ - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Del/Sf| : ; | Q | J | K | X | B | M | W | V | Z | Bspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Plover| GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = 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_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC, \ + KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | Home |PgDwn | PgUp | End | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |PrScr | Menu | | | | | Left | Down | Up |Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |CapsLk|NumLck| Ins | | | |WkLeft|WkDown| WkUp |WkRigh| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Raise | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, \ + XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \ + XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, \ + _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * |Quake | ` | ~ | \ | | | ( | ) | 7 | 8 | 9 | / | = | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | # | $ | { | } | 4 | 5 | 6 | * | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | % | ^ | & | * | [ | ] | 1 | 2 | 3 | - |Bkspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | < | > | | 0 | . | , | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL, \ + XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS, \ + XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC, \ + _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX \ +), + +/* Func + * ,-----------------------------------------------------------------------------------. + * | |Sleep |Prev-W|Ply/Ps|Next-W| | | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Wake | Mute | Vol- | Vol+ | | | F5 | F6 | F7 | F8 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Power |Prev-M|Ply/Ps|Next-M| | | F1 | F2 | F3 | F4 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT_ortho_4x12( \ + XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, \ + XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, \ + XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, \ + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX \ +), + +/* Mouse (Not Reachable on Planck) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Click1|Click3|Click2| | |MouseL|MouseD|MouseU|MouseR| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | |Accel0|Accel1|Accel2| | |ScrllL|ScrllD|ScrllU|ScrllR| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = LAYOUT_ortho_4x12( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, \ + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX \ +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = LAYOUT_ortho_4x12( \ + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , \ + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , \ + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , \ + EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|RGBTog|RGBMod| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|Light-|Light+| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, RGB_TOG, RGB_MOD, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_VAD, RGB_VAI, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + 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 FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + } else { + layer_off(_FUNC); + } + return false; + break; + case PLOVER: + if (!record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_on(_PLOVER); + } + 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; + case MOUSE: + if (record->event.pressed) { + layer_on(_MOUSE); + } else { + layer_off(_MOUSE); + } + return false; + break; + } + return true; +} + +void keyboard_post_init_user(void) { + steno_set_mode(STENO_MODE_GEMINI); +} diff --git a/keyboards/planck/keymaps/dcompact/README.md b/keyboards/keebio/levinson/keymaps/dcompact/readme.md similarity index 84% rename from keyboards/planck/keymaps/dcompact/README.md rename to keyboards/keebio/levinson/keymaps/dcompact/readme.md index d3e4c7a62d41..cd88c3fed34b 100644 --- a/keyboards/planck/keymaps/dcompact/README.md +++ b/keyboards/keebio/levinson/keymaps/dcompact/readme.md @@ -34,10 +34,10 @@ merge with those in the keyboard folder_ ## Relevant Links -- ![Online Dvorak Layout Trainer](https://learn.dvorak.nl/) -- ![Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) -- ![QMK Docs](https://docs.qmk.fm/#/) -- ![QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) ## Contact diff --git a/keyboards/keebio/levinson/keymaps/dcompact/rules.mk b/keyboards/keebio/levinson/keymaps/dcompact/rules.mk new file mode 100644 index 000000000000..cd031e0d36af --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/dcompact/rules.mk @@ -0,0 +1,13 @@ +# https://beta.docs.qmk.fm/reference/config-options#feature-options +# Features Specifically Wanted +EXTRAKEY_ENABLE = yes +STENO_ENABLE = yes +NKRO_ENABLE = yes +AUDIO_ENABLE = yes + +# Features taking up space +MOUSEKEY_ENABLE = no +MIDI_ENABLE = no +CONSOLE_ENABLE = no +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index 79c9831509a1..0893059a0d43 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { 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_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, { DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC}, - { KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT} + { KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT} }, /* Lower diff --git a/keyboards/planck/keymaps/dcompact/readme.md b/keyboards/planck/keymaps/dcompact/readme.md new file mode 100644 index 000000000000..cd88c3fed34b --- /dev/null +++ b/keyboards/planck/keymaps/dcompact/readme.md @@ -0,0 +1,45 @@ +# DCompact Layout + +**Dvorak, Layered, Mouse-Enabled, Compact -- now with Plover~** + +_See [the layout source](keymap.c) for the actual layout_ + +## Goals + +The following are the goals kept in mind when designing the DCompact +layout: + +- Provide minimal travel distance when typing English or coding +- Consistent muscle memory translation from standard QWERTY +- Stateless typing experience +- OS-agnostic features, macros, and key placement +- Minimize dependence on mouse usage + +These are generally all met or balanced within reason. This layout is +not intended at all to be a familiar layout for much of anyone (except +maybe those who already type in Dvorak) -- this is meant to amplify the +best parts of having limited, ortholinear keys with layering. + +## As Reference Material + +If you're reading this hoping to find reference material to implement +your own layout, then please feel free to copy over this layout and +make edits where you see fit. I removed a lot of the features I felt +extraneous to my usage and simplified style where I felt needed. This +would hopefully mean that my code should feel like a good base to +develop from for those new to QMK. + +_Remember that settings defined in the layout directory override and +merge with those in the keyboard folder_ + +## Relevant Links + +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) + +## Contact + +Maintainer: [Dan](https://github.com/loksonarius) + From 5c491da0e7d1c107e549acc7449afc081ef1b8c5 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 1 Mar 2019 08:33:29 -0800 Subject: [PATCH 213/445] [Keymap] Fix rgblight_enable ifdefs (#5283) --- users/mechmerlin/changelog.md | 5 ++++- users/mechmerlin/config.h | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/users/mechmerlin/changelog.md b/users/mechmerlin/changelog.md index d5877cfdfecf..ec4b20108f78 100644 --- a/users/mechmerlin/changelog.md +++ b/users/mechmerlin/changelog.md @@ -1,10 +1,13 @@ # Changelog All notable changes to my userspace will be documented in this file. +## [0.2.1] - 2019-03-01 +### Fixed +- `config.h` usage of `#ifdef RGBLIGHT_ENABLE` caused problems for other of my boards that had `RGBLIGHT_ENABLE`. + ## [0.2.0] - 2019-02-27 ### Changed - Moved `AUDIO_CLICKY` from community layout `66_ansi` into user space. -- ## [0.1.1] - 2018-10-26 ### Added diff --git a/users/mechmerlin/config.h b/users/mechmerlin/config.h index 3c45162bcccf..9ca39a12ac6e 100644 --- a/users/mechmerlin/config.h +++ b/users/mechmerlin/config.h @@ -18,10 +18,20 @@ // Enable features depending on keyboard #if defined(KEYBOARD_clueboard_66_hotswap_prototype) - #define RGBLIGHT_ENABLE - #define AUDIO_CLICKY + #ifndef RGBLIGHT_ENABLE + #define RGBLIGHT_ENABLE + #endif + + #ifndef AUDIO_CLICKY + #define AUDIO_CLICKY + #endif + #elif defined(KEYBOARD_clueboard_66_hotswap_gen1) - #define AUDIO_CLICKY + #ifndef AUDIO_CLICKY + #define AUDIO_CLICKY + #endif #else - #define RGBLIGHT_ENABLE + #ifndef RGBLIGHT_ENABLE + #define RGBLIGHT_ENABLE + #endif #endif From 7abf507cb67ea84022673e673c9dddf065975890 Mon Sep 17 00:00:00 2001 From: unausgeschlafen <44818163+unausgeschlafen@users.noreply.github.com> Date: Fri, 1 Mar 2019 17:45:42 +0100 Subject: [PATCH 214/445] [Keymap] unausgeschlafen quefrency keymap (#5273) * unausgeschlafen quefrency keymap * added build & flash instructions * review by drashna --- .../keymaps/unausgeschlafen/config.h | 27 ++++++++ .../keymaps/unausgeschlafen/keymap.c | 62 +++++++++++++++++++ .../keymaps/unausgeschlafen/readme.md | 26 ++++++++ .../keymaps/unausgeschlafen/rules.mk | 1 + 4 files changed, 116 insertions(+) create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h new file mode 100644 index 000000000000..f9efe78c5b56 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 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 diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c new file mode 100644 index 000000000000..e42c8651cd0f --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c @@ -0,0 +1,62 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap _BL: (Base Layer) Default Layer + * +-------------------------------------------------------------------------+ + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * +-------------------------------------------------------------------------+ + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * +-------------------------------------------------------------------------+ + * | FN | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | + * +-------------------------------------------------------------------------+ + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | FN | + * +-------------------------------------------------------------------------+ + * |LALT|LMETA|RCTRL| SPACE | FN | SPACE | RALT| MENU| RWIN|RCTRL| + * +-------------------------------------------------------------------------+ + */ + + [_BASE] = 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_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, \ + MO(_FN1), 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(_FN1), \ + KC_LALT, KC_LGUI, KC_LCTL, KC_SPC, MO(_FN1), KC_SPC, _______, KC_RALT, KC_APP, _______, KC_RGUI, KC_RCTL + ), + + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------. + * | ~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F0|F11|F12| DEL | + * |-----------------------------------------------------------| + * | | | UP| | MSL|MSD|MSU|MSR| | |PRT|PGD|PGU|PAUS | + * |-----------------------------------------------------------| + * | | LE| DN| RE| | | LE| DN| UP| RE| | | | + * |-----------------------------------------------------------| + * | |HOM|END| | |PRE|NXT|MUT|VOD|VOU| /|Shift | FN| + * |-----------------------------------------------------------| + * | | | | | PLAY | PLAY | | | | | + * `-----------------------------------------------------------' + */ + + [_FN1] = LAYOUT( + 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_DEL, \ + _______, _______, KC_UP, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, KC_PSCR, KC_PGUP, KC_PGDN, KC_PAUS, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ + _______, KC_HOME, KC_END, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, \ + _______, _______, _______, KC_MPLY, _______, KC_MPLY, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md new file mode 100644 index 000000000000..a8d0efed0c27 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md @@ -0,0 +1,26 @@ +## UNAUSGESCHLAFEN'S QUEFRENCY + +This is the keymap that goes with [unausgeschlafen's Quefrency](https://www.reddit.com/r/MechanicalKeyboards/comments/aquefb/my_daily_driver_quefrency/) + +If you are using Ardoinos, comment this line in `rules.mk`: +```make +BOOTLOADER = atmel-dfu # comment this line if you use arduinos +``` + +Although QMK offers one-shot build and flash, I personally build and flash separately (for the Elite C). +I used the QMK default for the Arduino Pro Micros. +However, I do not own them anymore. +Hence, only the instructions for the Elite C are provided. + +Build with: +```sh +make keebio/quefrency:unausgeschlafen +``` + +Flash with: + +```sh +sudo dfu-programmer atmega32u4 erase +sudo dfu-programmer atmega32u4 flash keebio_quefrency_rev1_unausgeschlafen.hex +sudo dfu-programmer atmega32u4 reset +``` diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk new file mode 100644 index 000000000000..98956243cd20 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = atmel-dfu # comment this line if you use arduinos From f4a2e58182dcccd418be07deff19bcdba88b7ddb Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 1 Mar 2019 18:12:20 +0100 Subject: [PATCH 215/445] HS60 v2: Instructions how to reset and flash (#5241) * HS60 v2: Instructions how to reset and flash * HS60v2 README using place holder for keymap --- keyboards/hs60/v2/readme.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/keyboards/hs60/v2/readme.md b/keyboards/hs60/v2/readme.md index e6658ced9a30..e838426a2d97 100644 --- a/keyboards/hs60/v2/readme.md +++ b/keyboards/hs60/v2/readme.md @@ -11,8 +11,27 @@ Hardware Availability: http://groupbuys.mechboards.co.uk/shop/hs60-hotswap-60-pc Due to the RGB implementation, the HS60 is currently not compatible with community layouts. +## Instructions + +### Build + Make example for this keyboard (after setting up your build environment): make hs60/v2:default -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. \ No newline at end of file +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. + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make hs60/v2::dfu-util`) From d5f01ad2f91e7eb8df46a936a73114469209cabc Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Fri, 1 Mar 2019 14:09:49 -0500 Subject: [PATCH 216/445] [Keymap] Added INSERT to my keymaps (#5284) * Add INSERT and EEP_RST to HS60 keymap * Add INSERT to keymap --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 4 ++-- layouts/community/60_ansi/stanrc85-ansi/keymap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index 8d8d895f65a4..f4dcf30f9f35 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -44,13 +44,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [2] = LAYOUT_60_ansi( KC_TILD, 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, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, RESET, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [3] = LAYOUT_60_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index d3b4d4e55f3f..27c3f16582fa 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [2] = LAYOUT_60_ansi( KC_TILD, 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, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, RESET, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), From d8ccabeeef6e2a2fc3c26b2e3da8b75306f98c4d Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 2 Mar 2019 03:33:05 +0000 Subject: [PATCH 217/445] [Keyboard] Convert mf68_ble to keymap (#5287) * Initial refactor of handwired bluetooth mod to keymap * Initial refactor of handwired bluetooth mod to keymap - strip out unnecessary duplicate config, update readme * Initial refactor of handwired bluetooth mod to keymap - reduce firmware size * Initial refactor of handwired bluetooth mod to keymap - update readme image --- keyboards/40percentclub/mf68/config.h | 22 +++ .../mf68/keymaps/mf68_ble/config.h | 43 +++++ .../keymaps/mf68_ble}/keymap.c | 0 .../{ => mf68/keymaps}/mf68_ble/readme.md | 4 +- .../{ => mf68/keymaps}/mf68_ble/rules.mk | 17 +- keyboards/40percentclub/mf68/rules.mk | 5 +- keyboards/40percentclub/mf68_ble/config.h | 154 ------------------ keyboards/40percentclub/mf68_ble/info.json | 12 -- keyboards/40percentclub/mf68_ble/mf68_ble.c | 8 - keyboards/40percentclub/mf68_ble/mf68_ble.h | 37 ----- 10 files changed, 72 insertions(+), 230 deletions(-) create mode 100644 keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h rename keyboards/40percentclub/{mf68_ble/keymaps/default => mf68/keymaps/mf68_ble}/keymap.c (100%) rename keyboards/40percentclub/{ => mf68/keymaps}/mf68_ble/readme.md (86%) rename keyboards/40percentclub/{ => mf68/keymaps}/mf68_ble/rules.mk (71%) delete mode 100644 keyboards/40percentclub/mf68_ble/config.h delete mode 100644 keyboards/40percentclub/mf68_ble/info.json delete mode 100644 keyboards/40percentclub/mf68_ble/mf68_ble.c delete mode 100644 keyboards/40percentclub/mf68_ble/mf68_ble.h diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 857205c37d8f..25252d160326 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -52,6 +52,28 @@ along with this program. If not, see . #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 diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h new file mode 100644 index 000000000000..7d96ab9e249c --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h @@ -0,0 +1,43 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* Overrides for Feather 32u4 Bluefruit */ + +/* USB Device descriptor parameter */ +#undef DESCRIPTION +#define DESCRIPTION Magicforce 68 BLE + +/* + * 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) + * +*/ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#undef UNUSED_PINS +#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 } +#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } +#define UNUSED_PINS {B5} diff --git a/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c similarity index 100% rename from keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c rename to keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c diff --git a/keyboards/40percentclub/mf68_ble/readme.md b/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md similarity index 86% rename from keyboards/40percentclub/mf68_ble/readme.md rename to keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md index 0e0f4b90d831..e590ae3e6db4 100644 --- a/keyboards/40percentclub/mf68_ble/readme.md +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md @@ -1,6 +1,6 @@ # mf68_ble -![mf68_ble](https://3.bp.blogspot.com/-0YCA3Hx2Rq0/WD3U3GWhyvI/AAAAAAAB_Uo/RWTeyCPblGcxDrDwT9WL9ck2ZRuR26DgACLcB/s640/IMG_20161129_063741.jpg) +![mf68_ble](https://i.imgur.com/zuTyy7k.jpg) === Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib). @@ -24,6 +24,6 @@ Below is how you wire the Feather to PCB Make example for this keyboard (after setting up your build environment): - make 40percentclub/mf68_ble:default + make 40percentclub/mf68:mf68_ble 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/40percentclub/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk similarity index 71% rename from keyboards/40percentclub/mf68_ble/rules.mk rename to keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk index 2ca811833c7e..2509d0bf4eb1 100644 --- a/keyboards/40percentclub/mf68_ble/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk @@ -1,3 +1,4 @@ +# Overrides for Feather 32u4 Bluefruit # MCU name MCU = atmega32u4 @@ -61,19 +62,5 @@ BOOTLOADER = caterina # 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 -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - BLUETOOTH = AdafruitBLE +BACKLIGHT_ENABLE = no diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index 38c9f517b9d4..27642d8604fe 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -63,13 +63,14 @@ BOOTLOADER = caterina 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 +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/40percentclub/mf68_ble/config.h b/keyboards/40percentclub/mf68_ble/config.h deleted file mode 100644 index 3d9bb360bf5e..000000000000 --- a/keyboards/40percentclub/mf68_ble/config.h +++ /dev/null @@ -1,154 +0,0 @@ -/* -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB -#define PRODUCT_ID 0x0510 -#define DEVICE_VER 0x0101 -#define MANUFACTURER di0ib -#define PRODUCT MF68 -#define DESCRIPTION Magicforce 68 BLE - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 9 - -/* - * 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 { D1, D0, C6, D7, B5, B6, B7, D6 } -#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } -#define UNUSED_PINS {B5} - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW -/* -#define BACKLIGHT_PIN B5 -#define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 3 -*/ - -/* 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 - -/* - * 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. - * - */ - -/* 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 diff --git a/keyboards/40percentclub/mf68_ble/info.json b/keyboards/40percentclub/mf68_ble/info.json deleted file mode 100644 index 4cd9b2c83c83..000000000000 --- a/keyboards/40percentclub/mf68_ble/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "MF68 BLE", - "url": "", - "maintainer": "qmk", - "width": 17.25, - "height": 5, - "layouts": { - "LAYOUT_68_ansi": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "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}, {"x":15.25, "y":1}, {"x":16.25, "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":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}] - } - } -} diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.c b/keyboards/40percentclub/mf68_ble/mf68_ble.c deleted file mode 100644 index 95f8592f8f15..000000000000 --- a/keyboards/40percentclub/mf68_ble/mf68_ble.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "mf68_ble.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.h b/keyboards/40percentclub/mf68_ble/mf68_ble.h deleted file mode 100644 index a34f9cde8deb..000000000000 --- a/keyboards/40percentclub/mf68_ble/mf68_ble.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define LAYOUT_68_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ - K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ - K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ - K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ - { K70, K71, K72, K73, K74 } \ -} - -#define LAYOUT_kc( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ - K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ - K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ - K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ -) LAYOUT_68_ansi( \ - KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \ - KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \ - KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \ - KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \ - KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \ - KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \ - KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ - KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ -) From 681db534f3e0e8efa3a9a03ae11b995e4a443ca9 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Sat, 2 Mar 2019 11:40:08 +0800 Subject: [PATCH 218/445] [Keyboard] add dz60rgb ansi and hhkb support; add dz40rgb (#5231) * add dz60rgb keyboard * add info.json * Update config.h * Update rules.mk * Update dz60rgb.h * Update dz60rgb.c * Update keymap.c * Update dz60rgb.h * Create readme.md * Update readme.md * Update keymap.c * Update dz60rgb.h * Update info.json * Update info.json * Update dz60rgb.c add dz60rgb ansi, iso and hhkb support * Update dz60rgb.h add dz60rgb ansi, iso and hhkb support * Add files via upload * Add files via upload * Delete config.h * Delete keymap.c * add ansi,iso and hhkb layout * add dz60rgb ansi,iso and hhkb layout * Update keyboards/dztech/dz40rgb/dz40rgb.c Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/hhkb/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/iso/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz40rgb/rules.mk Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/ansi/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/default/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz40rgb/keymaps/default/config.h Co-Authored-By: moyi4681 * Update dz40rgb.c --- keyboards/dztech/dz40rgb/bootloader_defs.h | 7 + keyboards/dztech/dz40rgb/chconf.h | 520 ++++++++++++++++ keyboards/dztech/dz40rgb/config.h | 34 + keyboards/dztech/dz40rgb/dz40rgb.c | 297 +++++++++ keyboards/dztech/dz40rgb/dz40rgb.h | 27 + keyboards/dztech/dz40rgb/halconf.h | 388 ++++++++++++ .../dztech/dz40rgb/keymaps/default/config.h | 3 + .../dztech/dz40rgb/keymaps/default/keymap.c | 75 +++ .../dz40rgb/keymaps/split_space/config.h | 5 + .../dz40rgb/keymaps/split_space/keymap.c | 102 +++ keyboards/dztech/dz40rgb/mcuconf.h | 257 ++++++++ keyboards/dztech/dz40rgb/rules.mk | 57 ++ keyboards/dztech/dz60rgb/config.h | 8 +- keyboards/dztech/dz60rgb/dz60rgb.c | 588 +++++++++++++++++- keyboards/dztech/dz60rgb/dz60rgb.h | 56 ++ .../dztech/dz60rgb/keymaps/ansi/config.h | 4 + .../dztech/dz60rgb/keymaps/ansi/keymap.c | 83 +++ .../dztech/dz60rgb/keymaps/default/config.h | 3 + .../dztech/dz60rgb/keymaps/default/keymap.c | 2 +- .../dztech/dz60rgb/keymaps/hhkb/config.h | 4 + .../dztech/dz60rgb/keymaps/hhkb/keymap.c | 84 +++ .../dztech/dz60rgb/keymaps/hhkb_iso/config.h | 4 + .../dztech/dz60rgb/keymaps/hhkb_iso/keymap.c | 84 +++ keyboards/dztech/dz60rgb/keymaps/iso/config.h | 4 + keyboards/dztech/dz60rgb/keymaps/iso/keymap.c | 83 +++ 25 files changed, 2771 insertions(+), 8 deletions(-) create mode 100644 keyboards/dztech/dz40rgb/bootloader_defs.h create mode 100644 keyboards/dztech/dz40rgb/chconf.h create mode 100644 keyboards/dztech/dz40rgb/config.h create mode 100644 keyboards/dztech/dz40rgb/dz40rgb.c create mode 100644 keyboards/dztech/dz40rgb/dz40rgb.h create mode 100644 keyboards/dztech/dz40rgb/halconf.h create mode 100644 keyboards/dztech/dz40rgb/keymaps/default/config.h create mode 100644 keyboards/dztech/dz40rgb/keymaps/default/keymap.c create mode 100644 keyboards/dztech/dz40rgb/keymaps/split_space/config.h create mode 100644 keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c create mode 100644 keyboards/dztech/dz40rgb/mcuconf.h create mode 100644 keyboards/dztech/dz40rgb/rules.mk create mode 100644 keyboards/dztech/dz60rgb/keymaps/ansi/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/default/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/iso/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/iso/keymap.c diff --git a/keyboards/dztech/dz40rgb/bootloader_defs.h b/keyboards/dztech/dz40rgb/bootloader_defs.h new file mode 100644 index 000000000000..3b0e9d20a6ab --- /dev/null +++ b/keyboards/dztech/dz40rgb/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/dztech/dz40rgb/chconf.h b/keyboards/dztech/dz40rgb/chconf.h new file mode 100644 index 000000000000..1d9f12ff1f8b --- /dev/null +++ b/keyboards/dztech/dz40rgb/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h new file mode 100644 index 000000000000..2ac7fbdc87e5 --- /dev/null +++ b/keyboards/dztech/dz40rgb/config.h @@ -0,0 +1,34 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1220 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZTECH +#define PRODUCT DZ40RGB +#define DESCRIPTION DZ40 ARM RGB keyboard +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { B13, B12, A2, A1 } +#define MATRIX_COL_PINS {A6, A7, B0, B1, C15, C14, C13, B9, B8, A8, B14, B15 } + +/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 +#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 0 +#define RGB_MATRIX_KEYPRESSES +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 + diff --git a/keyboards/dztech/dz40rgb/dz40rgb.c b/keyboards/dztech/dz40rgb/dz40rgb.c new file mode 100644 index 000000000000..b1a03760f85b --- /dev/null +++ b/keyboards/dztech/dz40rgb/dz40rgb.c @@ -0,0 +1,297 @@ +#include "dz40rgb.h" +#include "config.h" +#if defined (split_space) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, K_13, J_13, L_13}, + {0, K_14, J_14, L_14}, + + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, H_13, G_13, I_13}, + {0, H_14, G_14, I_14}, + + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, E_13, D_13, F_13}, + {0, E_14, D_14, F_14}, + + {0, B_12, A_12, C_12}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1} + +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + + {{0|(11<<4)}, {20.36*11, 0}, 1}, + {{0|(10<<4)}, {20.36*10, 0}, 1}, + {{0|(9<<4)}, {20.36*9, 0}, 1}, + {{0|(8<<4)}, {20.36*8, 0}, 1}, + {{0|(7<<4)}, {20.36*7, 0}, 1}, + {{0|(6<<4)}, { 20.36*6, 0}, 1}, + {{0|(5<<4)}, { 20.36*5, 0}, 1}, + {{0|(4<<4)}, { 20.36*4, 0}, 1}, + {{0|(3<<4)}, { 20.36*3, 0}, 1}, + {{0|(2<<4)}, { 20.36*2, 0}, 1}, + {{0|(1<<4)}, { 20.36*1, 0}, 1}, + {{0|(0<<4)}, { 20.36*0, 0}, 1}, + + {{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1}, + {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, + + {{1|(11<<4)}, {20.36*11, 21.33}, 1}, + {{1|(10<<4)}, {20.36*10, 21.33}, 0}, + {{1|(9<<4)}, {20.36*9, 21.33}, 0}, + {{1|(8<<4)}, {20.36*8, 21.33}, 0}, + {{1|(7<<4)}, {20.36*7, 21.33}, 0}, + {{1|(6<<4)}, { 20.36*6, 21.33}, 0}, + {{1|(5<<4)}, { 20.36*5, 21.33}, 0}, + {{1|(4<<4)}, { 20.36*4, 21.33}, 0}, + {{1|(3<<4)}, { 20.36*3, 21.33}, 0}, + {{1|(2<<4)}, { 20.36*2, 21.33}, 0}, + {{1|(1<<4)}, { 20.36*1, 21.33}, 0}, + {{1|(0<<4)}, { 20.36*0, 21.33}, 1}, + + {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, + {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, + + {{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, + {{2|(10<<4)}, {20.36*10, 21.33*2}, 0}, + {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, + {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, + {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, + {{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, + {{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, + {{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, + {{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, + {{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, + {{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, + {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, + + {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, + {{2|(13<<4)}, {20.36*0,21.33*2.5}, 1}, + + {{3|(11<<4)}, {20.36*11, 21.33*3}, 1}, + {{3|(10<<4)}, {20.36*10, 21.33*3}, 1}, + {{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, + {{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, + {{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, + {{3|(6<<4)}, { 20.36*6, 21.33*3}, 1}, + {{3|(5<<4)}, { 20.36*5, 21.33*3}, 1}, + {{3|(4<<4)}, { 20.36*4, 21.33*3}, 1}, + {{3|(3<<4)}, { 20.36*3, 21.33*3}, 1}, + {{3|(2<<4)}, { 20.36*2, 21.33*3}, 1}, + {{3|(1<<4)}, { 20.36*1, 21.33*3}, 1}, + {{3|(0<<4)}, { 20.36*0, 21.33*3}, 1} + +}; +#else +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, K_13, J_13, L_13}, + {0, K_14, J_14, L_14}, + + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, H_13, G_13, I_13}, + {0, H_14, G_14, I_14}, + + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, E_13, D_13, F_13}, + {0, E_14, D_14, F_14}, + + {0, B_12, A_12, C_12}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_13, A_13, C_13}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1} + +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + + {{0|(11<<4)}, {20.36*11, 0}, 1}, + {{0|(10<<4)}, {20.36*10, 0}, 1}, + {{0|(9<<4)}, {20.36*9, 0}, 1}, + {{0|(8<<4)}, {20.36*8, 0}, 1}, + {{0|(7<<4)}, {20.36*7, 0}, 1}, + {{0|(6<<4)}, { 20.36*6, 0}, 1}, + {{0|(5<<4)}, { 20.36*5, 0}, 1}, + {{0|(4<<4)}, { 20.36*4, 0}, 1}, + {{0|(3<<4)}, { 20.36*3, 0}, 1}, + {{0|(2<<4)}, { 20.36*2, 0}, 1}, + {{0|(1<<4)}, { 20.36*1, 0}, 1}, + {{0|(0<<4)}, { 20.36*0, 0}, 1}, + + {{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1}, + {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, + + {{1|(11<<4)}, {20.36*11, 21.33}, 1}, + {{1|(10<<4)}, {20.36*10, 21.33}, 0}, + {{1|(9<<4)}, {20.36*9, 21.33}, 0}, + {{1|(8<<4)}, {20.36*8, 21.33}, 0}, + {{1|(7<<4)}, {20.36*7, 21.33}, 0}, + {{1|(6<<4)}, { 20.36*6, 21.33}, 0}, + {{1|(5<<4)}, { 20.36*5, 21.33}, 0}, + {{1|(4<<4)}, { 20.36*4, 21.33}, 0}, + {{1|(3<<4)}, { 20.36*3, 21.33}, 0}, + {{1|(2<<4)}, { 20.36*2, 21.33}, 0}, + {{1|(1<<4)}, { 20.36*1, 21.33}, 0}, + {{1|(0<<4)}, { 20.36*0, 21.33}, 1}, + + {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, + {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, + + {{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, + {{2|(10<<4)}, {20.36*10, 21.33*2}, 0}, + {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, + {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, + {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, + {{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, + {{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, + {{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, + {{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, + {{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, + {{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, + {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, + + {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, + {{2|(13<<4)}, {20.36*0,21.33*2.5}, 1}, + + {{3|(11<<4)}, {20.36*11, 21.33*3}, 1}, + {{3|(10<<4)}, {20.36*10, 21.33*3}, 1}, + {{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, + {{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, + {{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, + {{3|(6<<4)}, { 20.36*5.5, 21.33*3}, 1}, + {{3|(4<<4)}, { 20.36*4, 21.33*3}, 1}, + {{3|(3<<4)}, { 20.36*3, 21.33*3}, 1}, + {{3|(2<<4)}, { 20.36*2, 21.33*3}, 1}, + {{3|(1<<4)}, { 20.36*1, 21.33*3}, 1}, + {{3|(0<<4)}, { 20.36*0, 21.33*3}, 1} + +}; +#endif + + +void matrix_init_kb(void) { + 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 suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} diff --git a/keyboards/dztech/dz40rgb/dz40rgb.h b/keyboards/dztech/dz40rgb/dz40rgb.h new file mode 100644 index 000000000000..5f88a6225ad3 --- /dev/null +++ b/keyboards/dztech/dz40rgb/dz40rgb.h @@ -0,0 +1,27 @@ +#pragma once +#include "quantum.h" +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k36, k36, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_SPLIT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/dztech/dz40rgb/halconf.h b/keyboards/dztech/dz40rgb/halconf.h new file mode 100644 index 000000000000..eda293c49b8b --- /dev/null +++ b/keyboards/dztech/dz40rgb/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/dztech/dz40rgb/keymaps/default/config.h b/keyboards/dztech/dz40rgb/keymaps/default/config.h new file mode 100644 index 000000000000..30bf11ed5d14 --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once +#define DRIVER_1_LED_TOTAL 53 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..6ea7421c928b --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +#include QMK_KEYBOARD_H +extern bool g_suspend_state; +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( /* Base */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_LAYER1] = LAYOUT( /* FN */ + 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, _______, + _______, _______, _______, _______, _______, _______, TO(3), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_LAYER2] = LAYOUT( /* FN2 */ + 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, _______, + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_LAYER3] = LAYOUT( /* FN3 */ + TO(0), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + rgb_led led; + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + if (led.matrix_co.raw < 0xFF) { + if (led.modifier) { + rgb_matrix_set_color( i, red, green, blue ); + } + } + } +} + +void rgb_matrix_indicators_user(void) { + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER3: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + } + } + +} + + + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } + diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/config.h b/keyboards/dztech/dz40rgb/keymaps/split_space/config.h new file mode 100644 index 000000000000..4f35bef37365 --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/split_space/config.h @@ -0,0 +1,5 @@ +#pragma once +#include "../../config.h" +#define split_space +#define DRIVER_1_LED_TOTAL 54 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c new file mode 100644 index 000000000000..bbbe5a8f0c0f --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c @@ -0,0 +1,102 @@ +#include QMK_KEYBOARD_H +extern bool g_suspend_state; +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +#define _LAYER5 5 +#define _LAYER6 6 +#define _LAYER7 7 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_SPLIT( /* Base */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER1] = LAYOUT_SPLIT( /* FN */ + 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), + [_LAYER2] = LAYOUT_SPLIT( /* LIGHT */ + 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), + [_LAYER3] = LAYOUT_SPLIT( /* NUMPAD */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER4] = LAYOUT_SPLIT( /* MAC */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER5] = LAYOUT_SPLIT( /* NEED TO DEFINE */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER6] = LAYOUT_SPLIT( /* NEED TO DEFINE */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER7] = LAYOUT_SPLIT( /* NEED TO DEFINE */ + 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_ESC, 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + }; + + + + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + rgb_led led; + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + if (led.matrix_co.raw < 0xFF) { + if (led.modifier) { + rgb_matrix_set_color( i, red, green, blue ); + } + } + } +} + +void rgb_matrix_indicators_user(void) { + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + case _LAYER5: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, false); break; + case _LAYER6: + rgb_matrix_layer_helper(0xFF, 0xFF, 0xFF, false); break; + } + } + +} + + + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } + diff --git a/keyboards/dztech/dz40rgb/mcuconf.h b/keyboards/dztech/dz40rgb/mcuconf.h new file mode 100644 index 000000000000..226da48d5936 --- /dev/null +++ b/keyboards/dztech/dz40rgb/mcuconf.h @@ -0,0 +1,257 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +#undef STM32_HSE_BYPASS +// #error "oh no" +// #endif + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#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_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#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_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/dztech/dz40rgb/rules.mk b/keyboards/dztech/dz40rgb/rules.mk new file mode 100644 index 000000000000..99cbafb8cc5c --- /dev/null +++ b/keyboards/dztech/dz40rgb/rules.mk @@ -0,0 +1,57 @@ +# project specific files + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in66666666666666666666666666 diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index 167b67a87d58..814cb6520f6f 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -6,7 +6,8 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1219 #define DEVICE_VER 0x0001 -#define MANUFACTURER DOU +#define MANUFACTURER DZTECH + #define PRODUCT DZ60RGB #define DESCRIPTION DZ60 ARM RGB keyboard #define MATRIX_ROWS 5 @@ -20,7 +21,6 @@ #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 3 - #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 0 @@ -30,7 +30,5 @@ #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - #define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 4a4893b8e41b..99e3b5646fab 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -1,4 +1,587 @@ #include "dz60rgb.h" +#include "config.h" +#if defined (dzrgb60_iso) + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, H_15, G_15, I_15}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, B_14, A_14, C_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16} +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + {{0|(13<<4)}, {16*13.5, 0}, 1}, + {{0|(12<<4)}, {16*12, 0}, 1}, + {{0|(11<<4)}, {16*11, 0}, 1}, + {{0|(10<<4)}, {16*10, 0}, 1}, + {{0|(9<<4)}, {16*9, 0}, 1}, + {{0|(8<<4)}, {16*8, 0}, 1}, + {{0|(7<<4)}, {16*7, 0}, 1}, + {{0|(6<<4)}, {16*6, 0}, 1}, + {{0|(5<<4)}, {16*5, 0}, 1}, + {{0|(4<<4)}, {16*4, 0}, 1}, + {{0|(3<<4)}, {16*3, 0}, 1}, + {{0|(2<<4)}, {16*2, 0}, 1}, + {{0|(1<<4)}, {16*1, 0}, 1}, + {{0|(0<<4)}, {16*0, 0}, 1}, + + {{2|(13<<4)}, {16*13.75, 24}, 1}, + {{1|(12<<4)}, {16*12.5, 16}, 0}, + {{1|(11<<4)}, {16*11.5, 16}, 0}, + {{1|(10<<4)}, {16*10.5, 16}, 0}, + {{1|(9<<4)}, { 16*9.5, 16}, 0}, + {{1|(8<<4)}, { 16*8.5, 16}, 0}, + {{1|(7<<4)}, { 16*7.5, 16}, 0}, + {{1|(6<<4)}, { 16*6.5, 16}, 0}, + {{1|(5<<4)}, { 16*5.5, 16}, 0}, + {{1|(4<<4)}, { 16*4.5, 16}, 0}, + {{1|(3<<4)}, { 16*3.5, 16}, 0}, + {{1|(2<<4)}, { 16*2.5, 16}, 0}, + {{1|(1<<4)}, { 16*1.5, 16}, 0}, + {{1|(0<<4)}, { 16*0.25, 16}, 1}, + + {{1|(13<<4)}, {16*12.75, 32}, 1}, + {{2|(11<<4)}, {16*11.75, 32}, 0}, + {{2|(10<<4)}, {16*10.75, 32}, 0}, + {{2|(9<<4)}, {16*9.75, 32}, 0}, + {{2|(8<<4)}, {16*8.75, 32}, 0}, + {{2|(7<<4)}, {16*7.75, 32}, 0}, + {{2|(6<<4)}, { 16*6.75, 32}, 0}, + {{2|(5<<4)}, { 16*5.75, 32}, 0}, + {{2|(4<<4)}, { 16*4.75, 32}, 0}, + {{2|(3<<4)}, { 16*3.75, 32}, 0}, + {{2|(2<<4)}, { 16*2.75, 32}, 0}, + {{2|(1<<4)}, { 16*1.75, 32}, 0}, + {{2|(0<<4)}, { 16*0.375, 32}, 1}, + + {{3|(11<<4)}, {16*13.125, 48}, 1}, + {{3|(10<<4)}, {16*11.25, 48}, 0}, + {{3|(9<<4)}, {16*10.25, 48}, 0}, + {{3|(8<<4)}, {16*9.25, 48}, 0}, + {{3|(7<<4)}, {16*8.25, 48}, 0}, + {{3|(6<<4)}, {16*7.25, 48}, 0}, + {{3|(5<<4)}, {16*6.25, 48}, 0}, + {{3|(4<<4)}, {16*5.25, 48}, 0}, + {{3|(3<<4)}, {16*4.25, 48}, 0}, + {{3|(2<<4)}, {16*3.25, 48}, 0}, + {{3|(1<<4)}, {16*1.25, 48}, 0}, + {{3|(0<<4)}, {16*0.625, 48}, 1}, + + {{4|(13<<4)}, {16*13.875, 64}, 1}, + {{4|(11<<4)}, {16*12.625, 64}, 1}, + {{4|(10<<4)}, {16*11.375, 64}, 1}, + {{4|(9<<4)}, {16*10.125, 64}, 1}, + {{4|(5<<4)}, { 16*6.375, 64}, 0}, + {{4|(2<<4)}, { 16*2.625, 64}, 1}, + {{4|(1<<4)}, { 16*1.375, 64}, 1}, + {{4|(0<<4)}, { 16*0.125, 64}, 1} + +}; + + + +#elif defined (dzrgb60_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, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16} +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + {{2|(12<<4)}, {16*14, 0}, 1}, + {{0|(13<<4)}, {16*13, 0}, 1}, + {{0|(12<<4)}, {16*12, 0}, 1}, + {{0|(11<<4)}, {16*11, 0}, 1}, + {{0|(10<<4)}, {16*10, 0}, 1}, + {{0|(9<<4)}, {16*9, 0}, 1}, + {{0|(8<<4)}, {16*8, 0}, 1}, + {{0|(7<<4)}, {16*7, 0}, 1}, + {{0|(6<<4)}, {16*6, 0}, 1}, + {{0|(5<<4)}, {16*5, 0}, 1}, + {{0|(4<<4)}, {16*4, 0}, 1}, + {{0|(3<<4)}, {16*3, 0}, 1}, + {{0|(2<<4)}, {16*2, 0}, 1}, + {{0|(1<<4)}, {16*1, 0}, 1}, + {{0|(0<<4)}, {16*0, 0}, 1}, + + {{1|(13<<4)}, {16*13.75, 16}, 1}, + {{1|(12<<4)}, {16*12.5, 16}, 0}, + {{1|(11<<4)}, {16*11.5, 16}, 0}, + {{1|(10<<4)}, {16*10.5, 16}, 0}, + {{1|(9<<4)}, { 16*9.5, 16}, 0}, + {{1|(8<<4)}, { 16*8.5, 16}, 0}, + {{1|(7<<4)}, { 16*7.5, 16}, 0}, + {{1|(6<<4)}, { 16*6.5, 16}, 0}, + {{1|(5<<4)}, { 16*5.5, 16}, 0}, + {{1|(4<<4)}, { 16*4.5, 16}, 0}, + {{1|(3<<4)}, { 16*3.5, 16}, 0}, + {{1|(2<<4)}, { 16*2.5, 16}, 0}, + {{1|(1<<4)}, { 16*1.5, 16}, 0}, + {{1|(0<<4)}, { 16*0.25, 16}, 1}, + + {{2|(13<<4)}, {16*12.75, 32}, 1}, + {{2|(11<<4)}, {16*11.75, 32}, 0}, + {{2|(10<<4)}, {16*10.75, 32}, 0}, + {{2|(9<<4)}, {16*9.75, 32}, 0}, + {{2|(8<<4)}, {16*8.75, 32}, 0}, + {{2|(7<<4)}, {16*7.75, 32}, 0}, + {{2|(6<<4)}, { 16*6.75, 32}, 0}, + {{2|(5<<4)}, { 16*5.75, 32}, 0}, + {{2|(4<<4)}, { 16*4.75, 32}, 0}, + {{2|(3<<4)}, { 16*3.75, 32}, 0}, + {{2|(2<<4)}, { 16*2.75, 32}, 0}, + {{2|(1<<4)}, { 16*1.75, 32}, 0}, + {{2|(0<<4)}, { 16*0.375, 32}, 1}, + + {{3|(13<<4)}, {16*14, 48}, 1}, + {{3|(11<<4)}, {16*12.625, 48}, 0}, + {{3|(10<<4)}, {16*11.25, 48}, 0}, + {{3|(9<<4)}, {16*10.25, 48}, 0}, + {{3|(8<<4)}, {16*9.25, 48}, 0}, + {{3|(7<<4)}, {16*8.25, 48}, 0}, + {{3|(6<<4)}, {16*7.25, 48}, 0}, + {{3|(5<<4)}, {16*6.25, 48}, 0}, + {{3|(4<<4)}, {16*5.25, 48}, 0}, + {{3|(3<<4)}, {16*4.25, 48}, 0}, + {{3|(2<<4)}, {16*3.25, 48}, 0}, + {{3|(1<<4)}, {16*1.25, 48}, 0}, + {{3|(0<<4)}, {16*0.625, 48}, 1}, + + {{4|(13<<4)}, {16*13.625, 64}, 1}, + {{4|(11<<4)}, {16*12.375, 64}, 1}, + {{4|(10<<4)}, {16*11.125, 64}, 1}, + {{4|(5<<4)}, { 16*7, 64}, 0}, + {{4|(2<<4)}, { 16*2.875, 64}, 1}, + {{4|(1<<4)}, { 16*1.625, 64}, 1}, + {{4|(0<<4)}, { 16*0.375, 64}, 1} + +}; +#elif defined (dzrgb60_hhkb_iso) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, K_15, J_15, L_15}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, E_15, D_15, F_15}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16} +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + {{2|(12<<4)}, {16*14, 0}, 1}, + {{0|(13<<4)}, {16*13, 0}, 1}, + {{0|(12<<4)}, {16*12, 0}, 1}, + {{0|(11<<4)}, {16*11, 0}, 1}, + {{0|(10<<4)}, {16*10, 0}, 1}, + {{0|(9<<4)}, {16*9, 0}, 1}, + {{0|(8<<4)}, {16*8, 0}, 1}, + {{0|(7<<4)}, {16*7, 0}, 1}, + {{0|(6<<4)}, {16*6, 0}, 1}, + {{0|(5<<4)}, {16*5, 0}, 1}, + {{0|(4<<4)}, {16*4, 0}, 1}, + {{0|(3<<4)}, {16*3, 0}, 1}, + {{0|(2<<4)}, {16*2, 0}, 1}, + {{0|(1<<4)}, {16*1, 0}, 1}, + {{0|(0<<4)}, {16*0, 0}, 1}, + + {{2|(13<<4)}, {16*13.75, 24}, 1}, + {{1|(12<<4)}, {16*12.5, 16}, 0}, + {{1|(11<<4)}, {16*11.5, 16}, 0}, + {{1|(10<<4)}, {16*10.5, 16}, 0}, + {{1|(9<<4)}, { 16*9.5, 16}, 0}, + {{1|(8<<4)}, { 16*8.5, 16}, 0}, + {{1|(7<<4)}, { 16*7.5, 16}, 0}, + {{1|(6<<4)}, { 16*6.5, 16}, 0}, + {{1|(5<<4)}, { 16*5.5, 16}, 0}, + {{1|(4<<4)}, { 16*4.5, 16}, 0}, + {{1|(3<<4)}, { 16*3.5, 16}, 0}, + {{1|(2<<4)}, { 16*2.5, 16}, 0}, + {{1|(1<<4)}, { 16*1.5, 16}, 0}, + {{1|(0<<4)}, { 16*0.25, 16}, 1}, + + {{1|(13<<4)}, {16*12.75, 32}, 1}, + {{2|(11<<4)}, {16*11.75, 32}, 0}, + {{2|(10<<4)}, {16*10.75, 32}, 0}, + {{2|(9<<4)}, {16*9.75, 32}, 0}, + {{2|(8<<4)}, {16*8.75, 32}, 0}, + {{2|(7<<4)}, {16*7.75, 32}, 0}, + {{2|(6<<4)}, { 16*6.75, 32}, 0}, + {{2|(5<<4)}, { 16*5.75, 32}, 0}, + {{2|(4<<4)}, { 16*4.75, 32}, 0}, + {{2|(3<<4)}, { 16*3.75, 32}, 0}, + {{2|(2<<4)}, { 16*2.75, 32}, 0}, + {{2|(1<<4)}, { 16*1.75, 32}, 0}, + {{2|(0<<4)}, { 16*0.375, 32}, 1}, + + {{3|(13<<4)}, {16*14, 48}, 1}, + {{3|(11<<4)}, {16*12.625, 48}, 0}, + {{3|(10<<4)}, {16*11.25, 48}, 0}, + {{3|(9<<4)}, {16*10.25, 48}, 0}, + {{3|(8<<4)}, {16*9.25, 48}, 0}, + {{3|(7<<4)}, {16*8.25, 48}, 0}, + {{3|(6<<4)}, {16*7.25, 48}, 0}, + {{3|(5<<4)}, {16*6.25, 48}, 0}, + {{3|(4<<4)}, {16*5.25, 48}, 0}, + {{3|(3<<4)}, {16*4.25, 48}, 0}, + {{3|(2<<4)}, {16*3.25, 48}, 0}, + {{3|(1<<4)}, {16*1.25, 48}, 0}, + {{3|(0<<4)}, {16*0.625, 48}, 1}, + + {{4|(13<<4)}, {16*13.625, 64}, 1}, + {{4|(11<<4)}, {16*12.375, 64}, 1}, + {{4|(10<<4)}, {16*11.125, 64}, 1}, + {{4|(5<<4)}, { 16*7, 64}, 0}, + {{4|(2<<4)}, { 16*2.875, 64}, 1}, + {{4|(1<<4)}, { 16*1.625, 64}, 1}, + {{4|(0<<4)}, { 16*0.375, 64}, 1} + +}; +#elif defined (dzrgb60_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, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16} +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + {{0|(13<<4)}, {16*13.5, 0}, 1}, + {{0|(12<<4)}, {16*12, 0}, 1}, + {{0|(11<<4)}, {16*11, 0}, 1}, + {{0|(10<<4)}, {16*10, 0}, 1}, + {{0|(9<<4)}, {16*9, 0}, 1}, + {{0|(8<<4)}, {16*8, 0}, 1}, + {{0|(7<<4)}, {16*7, 0}, 1}, + {{0|(6<<4)}, {16*6, 0}, 1}, + {{0|(5<<4)}, {16*5, 0}, 1}, + {{0|(4<<4)}, {16*4, 0}, 1}, + {{0|(3<<4)}, {16*3, 0}, 1}, + {{0|(2<<4)}, {16*2, 0}, 1}, + {{0|(1<<4)}, {16*1, 0}, 1}, + {{0|(0<<4)}, {16*0, 0}, 1}, + + {{1|(13<<4)}, {16*13.75, 16}, 1}, + {{1|(12<<4)}, {16*12.5, 16}, 0}, + {{1|(11<<4)}, {16*11.5, 16}, 0}, + {{1|(10<<4)}, {16*10.5, 16}, 0}, + {{1|(9<<4)}, { 16*9.5, 16}, 0}, + {{1|(8<<4)}, { 16*8.5, 16}, 0}, + {{1|(7<<4)}, { 16*7.5, 16}, 0}, + {{1|(6<<4)}, { 16*6.5, 16}, 0}, + {{1|(5<<4)}, { 16*5.5, 16}, 0}, + {{1|(4<<4)}, { 16*4.5, 16}, 0}, + {{1|(3<<4)}, { 16*3.5, 16}, 0}, + {{1|(2<<4)}, { 16*2.5, 16}, 0}, + {{1|(1<<4)}, { 16*1.5, 16}, 0}, + {{1|(0<<4)}, { 16*0.25, 16}, 1}, + + {{2|(13<<4)}, {16*13.375, 24}, 1}, + {{2|(11<<4)}, {16*11.75, 32}, 0}, + {{2|(10<<4)}, {16*10.75, 32}, 0}, + {{2|(9<<4)}, {16*9.75, 32}, 0}, + {{2|(8<<4)}, {16*8.75, 32}, 0}, + {{2|(7<<4)}, {16*7.75, 32}, 0}, + {{2|(6<<4)}, { 16*6.75, 32}, 0}, + {{2|(5<<4)}, { 16*5.75, 32}, 0}, + {{2|(4<<4)}, { 16*4.75, 32}, 0}, + {{2|(3<<4)}, { 16*3.75, 32}, 0}, + {{2|(2<<4)}, { 16*2.75, 32}, 0}, + {{2|(1<<4)}, { 16*1.75, 32}, 0}, + {{2|(0<<4)}, { 16*0.375, 32}, 1}, + + {{3|(11<<4)}, {16*13.125, 48}, 1}, + {{3|(10<<4)}, {16*11.25, 48}, 0}, + {{3|(9<<4)}, {16*10.25, 48}, 0}, + {{3|(8<<4)}, {16*9.25, 48}, 0}, + {{3|(7<<4)}, {16*8.25, 48}, 0}, + {{3|(6<<4)}, {16*7.25, 48}, 0}, + {{3|(5<<4)}, {16*6.25, 48}, 0}, + {{3|(4<<4)}, {16*5.25, 48}, 0}, + {{3|(3<<4)}, {16*4.25, 48}, 0}, + {{3|(2<<4)}, {16*3.25, 48}, 0}, + {{3|(1<<4)}, {16*1.25, 48}, 0}, + {{3|(0<<4)}, {16*0.625, 48}, 1}, + + {{4|(13<<4)}, {16*13.875, 64}, 1}, + {{4|(11<<4)}, {16*12.625, 64}, 1}, + {{4|(10<<4)}, {16*11.375, 64}, 1}, + {{4|(9<<4)}, {16*10.125, 64}, 1}, + {{4|(5<<4)}, { 16*6.375, 64}, 0}, + {{4|(2<<4)}, { 16*2.625, 64}, 1}, + {{4|(1<<4)}, { 16*1.375, 64}, 1}, + {{4|(0<<4)}, { 16*0.125, 64}, 1} +}; +#else + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver @@ -72,7 +655,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, B_16, A_16, C_16}, {0, E_16, D_16, F_16}, {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, + {0, K_16, J_16, L_16} }; const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { @@ -142,9 +725,10 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { {{4|(5<<4)}, { 17.23*5, 64}, 0}, {{4|(2<<4)}, { 17.23*2, 64}, 1}, {{4|(1<<4)}, { 17.23*1, 64}, 1}, - {{4|(0<<4)}, { 17.23*0, 64}, 1}, + {{4|(0<<4)}, { 17.23*0, 64}, 1} }; +#endif void matrix_init_kb(void) { matrix_init_user(); diff --git a/keyboards/dztech/dz60rgb/dz60rgb.h b/keyboards/dztech/dz60rgb/dz60rgb.h index a029933f1fff..1884ddfb0b8a 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.h +++ b/keyboards/dztech/dz60rgb/dz60rgb.h @@ -1,6 +1,7 @@ #pragma once #define XXX KC_NO #include "quantum.h" + #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ @@ -14,3 +15,58 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, XXX, K4D } \ } +#define LAYOUT_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} + +#define LAYOUT_HHKB( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,\ + K40, K41, K42, K45, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ +} + +#define LAYOUT_HHKB_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ +} + +#define LAYOUT_ANSI( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/config.h b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h new file mode 100644 index 000000000000..2e7122b3cc75 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h @@ -0,0 +1,4 @@ +#pragma once +#define dzrgb60_ansi +#define DRIVER_1_LED_TOTAL 61 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..fcdf29e4ee2b --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c @@ -0,0 +1,83 @@ +#include QMK_KEYBOARD_H +extern bool g_suspend_state; +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_ANSI( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL), + [_LAYER1] = LAYOUT_ANSI( /* FN */ + KC_GESC, 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_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER2] = LAYOUT_ANSI( /* FN2 */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER3] = LAYOUT_ANSI( /* FN3 */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ + CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TRNS,MO(4), KC_RALT, KC_RCTL), + [_LAYER4] = LAYOUT_ANSI( /* FN4 */ + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_HOME, KC_PGUP, KC_TRNS,\ + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + rgb_led led; + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + if (led.matrix_co.raw < 0xFF) { + if (led.modifier) { + rgb_matrix_set_color( i, red, green, blue ); + } + } + } +} + +void rgb_matrix_indicators_user(void) { + uint8_t this_led = host_keyboard_leds(); + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER3: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, false); break; + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + } + } + if ( this_led & (1< Date: Fri, 1 Mar 2019 21:14:24 -0800 Subject: [PATCH 219/445] [Keyboard] Initial commit for Prime_E w/ VIA config support (#5285) * Initial Prime_E commit * Via support for Prime_EXL * Backlight testing * update libs * Clean up and addition of VIA compatibility. * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * removed IS_COMMAND from config.h. updated GPIO commands * clean up libs --- keyboards/handwired/prime_exl/config.h | 24 ++++- .../prime_exl/keymaps/default/keymap.c | 42 ++++---- .../handwired/prime_exl/keymaps/via/keymap.c | 101 ++++++++++++++++++ .../handwired/prime_exl/keymaps/via/readme.md | 1 + .../handwired/prime_exl/keymaps/via/rules.mk | 86 +++++++++++++++ keyboards/handwired/prime_exl/prime_exl.c | 3 +- keyboards/handwired/prime_exl/prime_exl.h | 6 +- keyboards/primekb/prime_e/config.h | 72 +++++++++++++ keyboards/primekb/prime_e/info.json | 16 +++ .../primekb/prime_e/keymaps/default/keymap.c | 74 +++++++++++++ .../primekb/prime_e/keymaps/default/readme.md | 2 + .../primekb/prime_e/keymaps/via/keymap.c | 73 +++++++++++++ .../primekb/prime_e/keymaps/via/readme.md | 2 + .../primekb/prime_e/keymaps/via/rules.mk | 85 +++++++++++++++ keyboards/primekb/prime_e/prime_e.c | 22 ++++ keyboards/primekb/prime_e/prime_e.h | 34 ++++++ keyboards/primekb/prime_e/readme.md | 16 +++ keyboards/primekb/prime_e/rules.mk | 80 ++++++++++++++ 18 files changed, 712 insertions(+), 27 deletions(-) create mode 100644 keyboards/handwired/prime_exl/keymaps/via/keymap.c create mode 100644 keyboards/handwired/prime_exl/keymaps/via/readme.md create mode 100644 keyboards/handwired/prime_exl/keymaps/via/rules.mk create mode 100644 keyboards/primekb/prime_e/config.h create mode 100644 keyboards/primekb/prime_e/info.json create mode 100644 keyboards/primekb/prime_e/keymaps/default/keymap.c create mode 100644 keyboards/primekb/prime_e/keymaps/default/readme.md create mode 100644 keyboards/primekb/prime_e/keymaps/via/keymap.c create mode 100644 keyboards/primekb/prime_e/keymaps/via/readme.md create mode 100644 keyboards/primekb/prime_e/keymaps/via/rules.mk create mode 100644 keyboards/primekb/prime_e/prime_e.c create mode 100644 keyboards/primekb/prime_e/prime_e.h create mode 100644 keyboards/primekb/prime_e/readme.md create mode 100644 keyboards/primekb/prime_e/rules.mk diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index 948d6312becc..3201a8247ae2 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4024 +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x6578 #define DEVICE_VER 0x0001 #define MANUFACTURER PrimeKB #define PRODUCT Prime_EXL @@ -49,3 +49,23 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// 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 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*10*9*2)) = (35+720) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 755 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 269 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c index 0e1c60d4aafb..815090bd1939 100644 --- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - + [2] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_F9, 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_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(5), KC_SPC, KC_MINS, KC_EQL, KC_LGUI, MO(4), KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC ), - + [3] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - + [4] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - + [5] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, @@ -96,14 +96,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { // set CapsLock LED to output and low - DDRC |= (1 << 6); - PORTC &= ~(1 << 6); + setPinOutput(C6); + writePinHigh(C6); // set NumLock LED to output and low - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); + setPinOutput(B6); + writePinHigh(B6); // set ScrollLock LED to output and low - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); + setPinOutput(B5); + writePinHigh(B5); } void matrix_scan_user(void) { @@ -112,21 +112,21 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { - if (usb_led & (1<. + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_NLCK, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_BSPC, 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_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(2), KC_SPC, KC_MINS, KC_EQL, KC_LGUI, MO(3), + KC_F7, KC_F8, MO(1), KC_PDOT, KC_P0, KC_PENT + ), + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_F9, 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_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(2), KC_SPC, KC_MINS, KC_EQL, KC_LGUI, MO(3), + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC + ), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, + BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + // set CapsLock LED to output and low + setPinOutput(C6); + writePinHigh(C6); + // set NumLock LED to output and low + setPinOutput(B6); + writePinHigh(B6); + // set ScrollLock LED to output and low + setPinOutput(B5); + writePinHigh(B5); +} + +void matrix_scan_user(void) { + +} + + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B6); + } else { + writePinHigh(B6); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B5); + } else { + writePinHigh(B5); + } + /* + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + */ +} + +//function for layer indicator LED +uint32_t layer_state_set_user(uint32_t state) +{ + if (biton32(state) == 2) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + return state; +} diff --git a/keyboards/handwired/prime_exl/keymaps/via/readme.md b/keyboards/handwired/prime_exl/keymaps/via/readme.md new file mode 100644 index 000000000000..c2278bd4600f --- /dev/null +++ b/keyboards/handwired/prime_exl/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default keymap for prime_exl \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/keymaps/via/rules.mk b/keyboards/handwired/prime_exl/keymaps/via/rules.mk new file mode 100644 index 000000000000..e726a8a0e075 --- /dev/null +++ b/keyboards/handwired/prime_exl/keymaps/via/rules.mk @@ -0,0 +1,86 @@ +# 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 = 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 = 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 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) + +# This is the VIA magic +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c + diff --git a/keyboards/handwired/prime_exl/prime_exl.c b/keyboards/handwired/prime_exl/prime_exl.c index d088f6ad11ea..bae606ffbf5e 100644 --- a/keyboards/handwired/prime_exl/prime_exl.c +++ b/keyboards/handwired/prime_exl/prime_exl.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include "prime_exl.h" - +/* void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up @@ -41,3 +41,4 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +*/ \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/prime_exl.h b/keyboards/handwired/prime_exl/prime_exl.h index 727db5db8da7..03524da3c2a6 100644 --- a/keyboards/handwired/prime_exl/prime_exl.h +++ b/keyboards/handwired/prime_exl/prime_exl.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIME_EXL_H -#define PRIME_EXL_H +//#ifndef PRIME_EXL_H +//#define PRIME_EXL_H #include "quantum.h" @@ -37,4 +37,4 @@ { K090, K091, K092, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ } -#endif \ No newline at end of file +//#endif \ No newline at end of file diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h new file mode 100644 index 000000000000..331993f4b2e5 --- /dev/null +++ b/keyboards/primekb/prime_e/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2019 Holten Campbell + +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 0x5052 +#define PRODUCT_ID 0x0051 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PrimeKB +#define PRODUCT Prime_E +#define DESCRIPTION Ergo_45 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { E6, C7, B5, B4 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 5 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// 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 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*13*4*2)) = (35+416) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 451 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 573 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/primekb/prime_e/info.json b/keyboards/primekb/prime_e/info.json new file mode 100644 index 000000000000..0cca27565cd6 --- /dev/null +++ b/keyboards/primekb/prime_e/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Prime_E", + "url": "https://www.primekb.com", + "maintainer": "holtenc", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0,"y":0,"w":1,"h":1}, {"x":1,"y":0,"w":1,"h":1}, {"x":2,"y":0,"w":1,"h":1}, {"x":3,"y":0,"w":1,"h":1}, {"x":4,"y":0,"w":1,"h":1}, {"x":5,"y":0,"w":1,"h":1}, {"x":7,"y":0,"w":1,"h":1}, {"x":8,"y":0,"w":1,"h":1}, {"x":9,"y":0,"w":1,"h":1}, {"x":10,"y":0,"w":1,"h":1}, {"x":11,"y":0,"w":1,"h":1}, {"x":12,"y":0,"w":1,"h":1}, {"x":13,"y":0,"w":1,"h":1}, + {"x":0,"y":1,"w":1.25,"h":1}, {"x":1.25,"y":1,"w":1,"h":1}, {"x":2.25,"y":1,"w":1,"h":1}, {"x":3.25,"y":1,"w":1,"h":1}, {"x":4.25,"y":1,"w":1,"h":1}, {"x":5.25,"y":1,"w":1,"h":1}, {"x":7.25,"y":1,"w":1,"h":1}, {"x":8.25,"y":1,"w":1,"h":1}, {"x":9.25,"y":1,"w":1,"h":1}, {"x":10.25,"y":1,"w":1,"h":1}, {"x":11.25,"y":1,"w":1,"h":1}, {"x":12.25,"y":1,"w":1.75,"h":1}, + {"x":0,"y":2,"w":1.75,"h":1}, {"x":1.75,"y":2,"w":1,"h":1}, {"x":2.75,"y":2,"w":1,"h":1}, {"x":3.75,"y":2,"w":1,"h":1}, {"x":4.75,"y":2,"w":1,"h":1}, {"x":5.75,"y":2,"w":1,"h":1}, {"x":6.75,"y":2,"w":1,"h":1}, {"x":7.75,"y":2,"w":1,"h":1}, {"x":8.75,"y":2,"w":1,"h":1}, {"x":9.75,"y":2,"w":1,"h":1}, {"x":10.75,"y":2,"w":1,"h":1}, {"x":11.75,"y":2,"w":1,"h":1}, {"x":12.75,"y":2,"w":1.25,"h":1}, + {"x":0,"y":3,"w":1.25,"h":1}, {"x":1.25,"y":3,"w":1.25,"h":1}, {"x":3.5,"y":3,"w":1.25,"h":1}, {"x":4.75,"y":3,"w":2,"h":1}, {"x":6.75,"y":3,"w":2.25,"h":1}, {"x":9,"y":3,"w":1.25,"h":1}, {"x":11.5,"y":3,"w":1.25,"h":1}, {"x":12.75,"y":3,"w":1.25,"h":1} + ] + } + } +} diff --git a/keyboards/primekb/prime_e/keymaps/default/keymap.c b/keyboards/primekb/prime_e/keymaps/default/keymap.c new file mode 100644 index 000000000000..47692c5413f6 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2018 Holten Campbell + * + * 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] = { + LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LCTL, KC_LALT, KC_RBRC, MO(1), KC_SPC, KC_MINS, KC_LGUI, TO(1) + ) + +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(B1); + writePinHigh(B1); + // set NumLock LED to output and low + setPinOutput(B2); + writePinHigh(B2); + // set ScrollLock LED to output and low + setPinOutput(B3); + writePinHigh(B3); +} + +void matrix_scan_user(void) { + +} + + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } +/* + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B3); + } else { + writePinHigh(B3); + }*/ + +} + +//function for layer indicator LED +uint32_t layer_state_set_user(uint32_t state) +{ + if (biton32(state) == 1) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + return state; +} diff --git a/keyboards/primekb/prime_e/keymaps/default/readme.md b/keyboards/primekb/prime_e/keymaps/default/readme.md new file mode 100644 index 000000000000..5266526eec98 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for Prime_E +This is the default keymap for Prime_E. \ No newline at end of file diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c new file mode 100644 index 000000000000..9cc3e2f3d770 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2018 Holten Campbell + * + * 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] = { + LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LCTL, KC_LALT, KC_RBRC, MO(1), KC_SPC, KC_MINS, KC_LGUI, TO(1) + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(B1); + writePinHigh(B1); + // set NumLock LED to output and low + setPinOutput(B2); + writePinHigh(B2); + // set ScrollLock LED to output and low + setPinOutput(B3); + writePinHigh(B3); +} + +void matrix_scan_user(void) { + +} + + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } +/* + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B3); + } else { + writePinHigh(B3); + }*/ + +} + +//function for layer indicator LED +uint32_t layer_state_set_user(uint32_t state) +{ + if (biton32(state) == 1) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + return state; +} diff --git a/keyboards/primekb/prime_e/keymaps/via/readme.md b/keyboards/primekb/prime_e/keymaps/via/readme.md new file mode 100644 index 000000000000..bbd56c0cc71d --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA keymap for Prime_E +This keymap is for compatibility with the VIA configurator. \ No newline at end of file diff --git a/keyboards/primekb/prime_e/keymaps/via/rules.mk b/keyboards/primekb/prime_e/keymaps/via/rules.mk new file mode 100644 index 000000000000..93b2e70e7cfc --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/via/rules.mk @@ -0,0 +1,85 @@ +# 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 = 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 = 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # 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) + +# This is the VIA magic +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file diff --git a/keyboards/primekb/prime_e/prime_e.c b/keyboards/primekb/prime_e/prime_e.c new file mode 100644 index 000000000000..bd51ce0087eb --- /dev/null +++ b/keyboards/primekb/prime_e/prime_e.c @@ -0,0 +1,22 @@ +/* Copyright 2019 Holten Campbell + * + * 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 "prime_e.h" + +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/primekb/prime_e/prime_e.h b/keyboards/primekb/prime_e/prime_e.h new file mode 100644 index 000000000000..4af70fbe177e --- /dev/null +++ b/keyboards/primekb/prime_e/prime_e.h @@ -0,0 +1,34 @@ +/* Copyright 2019 Holten Campbell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#pragma once + +#include "quantum.h" + + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K112, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K303, K304, K306, K308, K311, K312 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, KC_NO, K112 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 }, \ + { K300, K301, KC_NO, K303, K304, KC_NO, K306, KC_NO, K308, KC_NO, KC_NO, K311, K312 } \ +} + diff --git a/keyboards/primekb/prime_e/readme.md b/keyboards/primekb/prime_e/readme.md new file mode 100644 index 000000000000..6abe0bed0195 --- /dev/null +++ b/keyboards/primekb/prime_e/readme.md @@ -0,0 +1,16 @@ +# Prime_E + +![Prime_E](https://imgur.com/7Rl4JOA.jpg) + +An ergonomic 45%. + +Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) +Hardware Supported: Prime_E PCB, ATMega32u4 +Hardware Availability: Group Buy, Retail + +Make example for this keyboard (after setting up your build environment): + + make prime_e:default + make prime_e:via (when using VIA configurator) + +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/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk new file mode 100644 index 000000000000..313bf3b3ecaa --- /dev/null +++ b/keyboards/primekb/prime_e/rules.mk @@ -0,0 +1,80 @@ +# 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 = 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 = yes # 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # 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) \ No newline at end of file From 6f386ca6ae82be9212700dbfeb73517d077bef5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 28 Jan 2019 09:04:47 +0100 Subject: [PATCH 220/445] Change how desktop commands work --- keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | 8 ++++---- keyboards/whitefox/keymaps/konstantin/keymap.c | 4 ++-- users/konstantin/konstantin.c | 12 ++++++++++++ users/konstantin/konstantin.h | 7 +++++++ users/konstantin/tap_dance.c | 2 +- users/konstantin/tap_dance.h | 6 ++---- 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index fa324be9a116..707515abb472 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ * │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │ │ │ MW↓ │MAcl2│ │ + * │DPR│DstNA│ MW↓ │MAcl2│ │ * └───┴─────┴───────────────────────────┴─────┴───┘ */ [L_FN] = LAYOUT( @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______, - XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX + XXXXXXX, DST_P_R, DST_N_A, KC_WH_D, KC_ACL2, _______, XXXXXXX ), /* RCtrl layer @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │Dst│Dstp←│ │Dstp→│ │ + * │DtR│DstA │ │ │ │ * └───┴─────┴───────────────────────────┴─────┴───┘ */ [L_RCTRL] = LAYOUT( @@ -87,6 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - XXXXXXX, DESKTOP, DSKTP_L, _______, DSKTP_R, _______, XXXXXXX + XXXXXXX, DST_RMV, DST_ADD, _______, _______, _______, XXXXXXX ), }; diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index e37097361a2e..a56d0a43e4f1 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │ │Dstp│Dst←│ MW↓ │Dst→│ │ │Hom│PgD│End│ + * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_FN] = LAYOUT_truefox( \ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \ _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ - _______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \ + _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* Numpad layer diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 47596279c363..bf92a503e6e2 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -28,6 +28,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; + case DST_P_R: + (record->event.pressed ? register_code16 : unregister_code16)( + (get_mods() & MOD_MASK_CTRL) ? DST_RMV : DST_PRV + ); + return false; + + case DST_N_A: + (record->event.pressed ? register_code16 : unregister_code16)( + (get_mods() & MOD_MASK_CTRL) ? DST_ADD : DST_NXT + ); + return false; + #ifdef LAYER_FN static bool fn_lock; diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index f67f9f1b7ef0..3ca4f401e01d 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -23,6 +23,11 @@ #define PRV_TAB LCTL(KC_PGUP) #define NXT_TAB LCTL(KC_PGDN) +#define DST_ADD LCTL(LGUI(KC_D)) +#define DST_RMV LCTL(LGUI(KC_F4)) +#define DST_PRV LCTL(LGUI(KC_LEFT)) +#define DST_NXT LCTL(LGUI(KC_RGHT)) + #define LCT_CPS LCTL_T(KC_CAPS) #ifdef SEND_STRING_CLEAN @@ -37,6 +42,8 @@ enum keycodes_user { CLEAR = SAFE_RANGE, + DST_P_R, + DST_N_A, #ifdef LAYER_NUMPAD NUMPAD, #endif diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index b13f33c024f2..e3f1729467f6 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -82,7 +82,7 @@ void td_lsft_fn_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop + [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_RMV), [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h index 922a63514166..1757e9b11356 100644 --- a/users/konstantin/tap_dance.h +++ b/users/konstantin/tap_dance.h @@ -2,9 +2,7 @@ #include "quantum.h" -#define DESKTOP TD(TD_DESKTOP) -#define DSKTP_L LCTL(LGUI(KC_LEFT)) -#define DSKTP_R LCTL(LGUI(KC_RGHT)) +#define DST_A_R TD(TD_DST_A_R) #define RAL_LAL TD(TD_RAL_LAL) #define RAL_RGU TD(TD_RAL_RGU) @@ -14,7 +12,7 @@ #define LSFT_FN TD(TD_LSFT_FN) enum tap_dance { - TD_DESKTOP, + TD_DST_A_R, TD_RAL_LAL, TD_RAL_RGU, From 6695c874fb8660989a129691bbffc6225be67362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 28 Jan 2019 09:05:35 +0100 Subject: [PATCH 221/445] Add DST_MOD_MASK as a config option --- users/konstantin/konstantin.c | 4 ++-- users/konstantin/konstantin.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index bf92a503e6e2..5861574cba72 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -30,13 +30,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DST_P_R: (record->event.pressed ? register_code16 : unregister_code16)( - (get_mods() & MOD_MASK_CTRL) ? DST_RMV : DST_PRV + (get_mods() & DST_MOD_MASK) ? DST_RMV : DST_PRV ); return false; case DST_N_A: (record->event.pressed ? register_code16 : unregister_code16)( - (get_mods() & MOD_MASK_CTRL) ? DST_ADD : DST_NXT + (get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT ); return false; diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index 3ca4f401e01d..a649e4f79d89 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -27,6 +27,9 @@ #define DST_RMV LCTL(LGUI(KC_F4)) #define DST_PRV LCTL(LGUI(KC_LEFT)) #define DST_NXT LCTL(LGUI(KC_RGHT)) +#ifndef DST_MOD_MASK + #define DST_MOD_MASK MOD_MASK_CTRL +#endif #define LCT_CPS LCTL_T(KC_CAPS) From f2543c3b9b63433f8f5f7aec9531f7ebddcce4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 29 Jan 2019 00:37:10 +0100 Subject: [PATCH 222/445] =?UTF-8?q?DST=5FRMV=20=E2=86=92=20DST=5FREM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | 2 +- users/konstantin/konstantin.c | 2 +- users/konstantin/konstantin.h | 2 +- users/konstantin/tap_dance.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index 707515abb472..b1e8bf058196 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -87,6 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - XXXXXXX, DST_RMV, DST_ADD, _______, _______, _______, XXXXXXX + XXXXXXX, DST_REM, DST_ADD, _______, _______, _______, XXXXXXX ), }; diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 5861574cba72..686ff32ecc2a 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -30,7 +30,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DST_P_R: (record->event.pressed ? register_code16 : unregister_code16)( - (get_mods() & DST_MOD_MASK) ? DST_RMV : DST_PRV + (get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV ); return false; diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index a649e4f79d89..48bd26cd5957 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -24,7 +24,7 @@ #define NXT_TAB LCTL(KC_PGDN) #define DST_ADD LCTL(LGUI(KC_D)) -#define DST_RMV LCTL(LGUI(KC_F4)) +#define DST_REM LCTL(LGUI(KC_F4)) #define DST_PRV LCTL(LGUI(KC_LEFT)) #define DST_NXT LCTL(LGUI(KC_RGHT)) #ifndef DST_MOD_MASK diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index e3f1729467f6..81f2d42e1fb6 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -82,7 +82,7 @@ void td_lsft_fn_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_RMV), + [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM), [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), From 012c5ef9bdccc8d752481c3c1d35a0ef47b075c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Thu, 31 Jan 2019 16:02:24 +0100 Subject: [PATCH 223/445] Update custom SEND_STRING --- users/konstantin/konstantin.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index 48bd26cd5957..989854c2e681 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -35,11 +35,11 @@ #ifdef SEND_STRING_CLEAN #undef SEND_STRING - #define SEND_STRING(...) { \ - uint8_t ss_mods = get_mods(); \ - clear_mods(); \ - send_string_P(PSTR(__VA_ARGS__)); \ - set_mods(ss_mods); \ + #define SEND_STRING(string) { \ + uint8_t ss_mods = get_mods(); \ + clear_mods(); \ + send_string_P(PSTR(string)); \ + set_mods(ss_mods); \ } #endif From db1ace5426ab08842cec23e0da190ab222de6088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 11 Jan 2019 07:55:47 +0100 Subject: [PATCH 224/445] Add melody96:konstantin keymap --- .../melody96/keymaps/konstantin/config.h | 3 ++ .../melody96/keymaps/konstantin/keymap.c | 52 +++++++++++++++++++ .../melody96/keymaps/konstantin/rules.mk | 1 + 3 files changed, 56 insertions(+) create mode 100644 keyboards/melody96/keymaps/konstantin/config.h create mode 100644 keyboards/melody96/keymaps/konstantin/keymap.c create mode 100644 keyboards/melody96/keymaps/konstantin/rules.mk diff --git a/keyboards/melody96/keymaps/konstantin/config.h b/keyboards/melody96/keymaps/konstantin/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c new file mode 100644 index 000000000000..df93cd702bce --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -0,0 +1,52 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│Hom│End│PgU│PgD│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Del│NLk│P/ │P* │P- │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │P7 │P8 │P9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤P+ │ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │P1 │P2 │P3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤PEn│ + * │LCtl│LGui│LAlt│ Space │RAlGu│RCtrl│ ← │ ↓ │ → │P0 │P. │ │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = 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_INS, KC_HOME, KC_END, 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_BSLS, KC_DEL, 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_BSPC, KC_P7, KC_P8, KC_P9, XXXXXXX, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │ │ │ │ │Clear│ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │ │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ │PgU│ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤ │ + * │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│ │ │ │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, _______, _______, XXXXXXX, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, _______, _______, _______, XXXXXXX, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, _______, _______, _______ + ), +}; diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk new file mode 100644 index 000000000000..7b30c0beff2a --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no From ef189da2439d8f0cf20a83756400a38310c1caeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 9 Feb 2019 21:45:25 +0100 Subject: [PATCH 225/445] Move feature flags from userspace into keyboard rules --- keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | 9 +++++++++ keyboards/melody96/keymaps/konstantin/rules.mk | 9 +++++++++ keyboards/whitefox/keymaps/konstantin/rules.mk | 9 +++++++++ users/konstantin/rules.mk | 9 --------- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index a45a631dc04a..38ccda621a2f 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk @@ -1,2 +1,11 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes + BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 7b30c0beff2a..c1d4c9a0373e 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -1 +1,10 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes + BACKLIGHT_ENABLE = no diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 1302f14ca84e..14a29380ce3e 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,2 +1,11 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes + BACKLIGHT_ENABLE = no VISUALIZER_ENABLE = no diff --git a/users/konstantin/rules.mk b/users/konstantin/rules.mk index d2522b952384..4af256e1eb56 100644 --- a/users/konstantin/rules.mk +++ b/users/konstantin/rules.mk @@ -1,12 +1,3 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes - SRC += konstantin.c ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dance.c From ea23035c53162ee88ca02533d49cb931fdce3bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 11 Feb 2019 22:03:14 +0100 Subject: [PATCH 226/445] Use "Vo-", "Vo+" instead of "VoD", "VoU" in keymap comments --- keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | 2 +- keyboards/melody96/keymaps/konstantin/keymap.c | 2 +- keyboards/whitefox/keymaps/konstantin/keymap.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index b1e8bf058196..3404cc4e491a 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ + * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │DPR│DstNA│ MW↓ │MAcl2│ │ * └───┴─────┴───────────────────────────┴─────┴───┘ diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index df93cd702bce..2f05e288b06e 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ │ │ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ - * │ │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ │PgU│ │ │ │ │ + * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│ │ │ │ │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤ │ * │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│ │ │ │ * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index a56d0a43e4f1..494300f2d62c 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│ + * │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ App │PgU│Btm│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ From d163b22dfbb4a9092e3b7fc2b18a679e03080a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 11 Feb 2019 22:04:59 +0100 Subject: [PATCH 227/445] Add RGB controls and numpad Unicode to Melody96 keymap --- .../melody96/keymaps/konstantin/keymap.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index 2f05e288b06e..11b687b55e33 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -30,23 +30,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RTg│ ÷ │ × │ − │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │ │ │ │ │Clear│ │ │ │ │ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │ │ │ │ │Clear│RH+│RS+│RV+│ │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ - * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ - * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤ │ - * │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│ │ │ │ + * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMB│RMK│RMG│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤RMP│ + * │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│RMR│RMF│ │ * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ */ [L_FN] = LAYOUT( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, _______, _______, XXXXXXX, - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, _______, _______, _______, XXXXXXX, - _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_B, RGB_M_K, RGB_M_G, XXXXXXX, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P ), }; From 2f07627a5dd38ab1370804f4feb1972250928803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 11 Feb 2019 22:41:51 +0100 Subject: [PATCH 228/445] Add RGB_SET keycode to Melody96 and RGB files to userspace --- .../melody96/keymaps/konstantin/keymap.c | 23 +++++++++++++++---- users/konstantin/konstantin.h | 3 +++ users/konstantin/rgb.c | 3 +++ users/konstantin/rgb.h | 17 ++++++++++++++ users/konstantin/rules.mk | 3 +++ 5 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 users/konstantin/rgb.c create mode 100644 users/konstantin/rgb.h diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index 11b687b55e33..4df856f8fbfb 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -1,6 +1,21 @@ #include QMK_KEYBOARD_H #include "konstantin.h" +enum keycodes_keymap { + RGB_SET = RANGE_KEYMAP, +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SET: + rgblight_sethsv(GODSPEED_BLUE.h, GODSPEED_BLUE.s, GODSPEED_BLUE.v); + return false; + + default: + return true; + } +} + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ @@ -32,8 +47,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RTg│ ÷ │ × │ − │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │ │ │ │ │Clear│RH+│RS+│RV+│ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │ │ │ │ │Clear│RH+│RS+│RV+│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMB│RMK│RMG│ │ @@ -44,8 +59,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [L_FN] = LAYOUT( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, _______, _______, _______, _______, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_B, RGB_M_K, RGB_M_G, XXXXXXX, _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P ), diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index 989854c2e681..d8b00c4c89d6 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -1,6 +1,9 @@ #pragma once #include "quantum.h" +#if defined(RGBLIGHT_ENABLE) || defined(RGBMATRIX_ENABLE) + #include "rgb.h" +#endif #ifdef TAP_DANCE_ENABLE #include "tap_dance.h" #endif diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c new file mode 100644 index 000000000000..a09057d282de --- /dev/null +++ b/users/konstantin/rgb.c @@ -0,0 +1,3 @@ +#include "rgb.h" + +const hsv_t GODSPEED_BLUE = { .h = 214, .s = 17, .v = 73 }; diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h new file mode 100644 index 000000000000..2ea10c67a7ad --- /dev/null +++ b/users/konstantin/rgb.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +typedef struct { + uint16_t h; + uint8_t s; + uint8_t v; +} hsv_t; + +typedef struct { + uint8_t r; + uint8_t g; + uint8_t b; +} rgb_t; + +extern const hsv_t GODSPEED_BLUE; diff --git a/users/konstantin/rules.mk b/users/konstantin/rules.mk index 4af256e1eb56..8913e575586a 100644 --- a/users/konstantin/rules.mk +++ b/users/konstantin/rules.mk @@ -1,4 +1,7 @@ SRC += konstantin.c +ifneq (,$(filter yes,$(RGBLIGHT_ENABLE) $(RGB_MATRIX_ENABLE))) # if either is yes + SRC += rgb.c +endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dance.c endif From ddb0f39ebf317c7a23c69ed45efb1882746a01b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 11 Feb 2019 23:21:41 +0100 Subject: [PATCH 229/445] Generate UNICODE and UNICODEMAP constants using macros --- users/konstantin/konstantin.h | 2 +- users/konstantin/rules.mk | 3 +++ users/konstantin/unicode.c | 7 +++++++ users/konstantin/unicode.h | 37 ++++++++++++++++++++++++++++------- 4 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 users/konstantin/unicode.c diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index d8b00c4c89d6..c32d674e8c79 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -7,7 +7,7 @@ #ifdef TAP_DANCE_ENABLE #include "tap_dance.h" #endif -#ifdef UNICODE_ENABLE +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) #include "unicode.h" #endif diff --git a/users/konstantin/rules.mk b/users/konstantin/rules.mk index 8913e575586a..6bda030fb0b3 100644 --- a/users/konstantin/rules.mk +++ b/users/konstantin/rules.mk @@ -5,5 +5,8 @@ endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dance.c endif +ifneq (,$(filter yes,$(UNICODE_ENABLE) $(UNICODEMAP_ENABLE))) # if either is yes + SRC += unicode.c +endif EXTRAFLAGS += -flto diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c new file mode 100644 index 000000000000..3b6164bc5135 --- /dev/null +++ b/users/konstantin/unicode.c @@ -0,0 +1,7 @@ +#include "unicode.h" + +#ifdef UNICODEMAP_ENABLE + const uint32_t PROGMEM unicode_map[] = { + FOREACH_UNICODE(X_ENTRY) + }; +#endif diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index 09af7e1c7f6c..d76f2a17004d 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -2,10 +2,33 @@ #include "quantum.h" -#define COMMA UC(0x002C) -#define L_PAREN UC(0x0028) -#define R_PAREN UC(0x0029) -#define EQUALS UC(0x003D) -#define TIMES UC(0x00D7) -#define DIVIDE UC(0x00F7) -#define MINUS UC(0x2212) +#define FOREACH_UNICODE(M) \ + M(COMMA, 0x002C) \ + M(L_PAREN, 0x0028) \ + M(R_PAREN, 0x0029) \ + M(EQUALS, 0x003D) \ + M(TIMES, 0x00D7) \ + M(DIVIDE, 0x00F7) \ + M(MINUS, 0x2212) + +#define UC_KEYCODE(name, code) name = UC(code), + +#define X_NAME(name, code) X_ ## name, +#define X_ENTRY(name, code) [X_ ## name] = code, +#define X_KEYCODE(name, code) name = X(X_ ## name), + +#if defined(UNICODE_ENABLE) + enum unicode_keycodes { + FOREACH_UNICODE(UC_KEYCODE) + }; +#elif defined(UNICODEMAP_ENABLE) + enum unicode_names { + FOREACH_UNICODE(X_NAME) + }; + + extern const uint32_t PROGMEM unicode_map[]; + + enum unicode_keycodes { + FOREACH_UNICODE(X_KEYCODE) + }; +#endif From 7b11d740eaad1aade1a8d1914aab54f2720ab7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 12 Feb 2019 00:18:52 +0100 Subject: [PATCH 230/445] Avoid collisions with X_* send string constants --- users/konstantin/unicode.c | 2 +- users/konstantin/unicode.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c index 3b6164bc5135..44b5be6c9180 100644 --- a/users/konstantin/unicode.c +++ b/users/konstantin/unicode.c @@ -2,6 +2,6 @@ #ifdef UNICODEMAP_ENABLE const uint32_t PROGMEM unicode_map[] = { - FOREACH_UNICODE(X_ENTRY) + FOREACH_UNICODE(UCM_ENTRY) }; #endif diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index d76f2a17004d..6bb908e0e266 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -13,9 +13,9 @@ #define UC_KEYCODE(name, code) name = UC(code), -#define X_NAME(name, code) X_ ## name, -#define X_ENTRY(name, code) [X_ ## name] = code, -#define X_KEYCODE(name, code) name = X(X_ ## name), +#define UCM_NAME(name, code) UCM_ ## name, +#define UCM_ENTRY(name, code) [UCM_ ## name] = code, +#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), #if defined(UNICODE_ENABLE) enum unicode_keycodes { @@ -23,12 +23,12 @@ }; #elif defined(UNICODEMAP_ENABLE) enum unicode_names { - FOREACH_UNICODE(X_NAME) + FOREACH_UNICODE(UCM_NAME) }; extern const uint32_t PROGMEM unicode_map[]; enum unicode_keycodes { - FOREACH_UNICODE(X_KEYCODE) + FOREACH_UNICODE(UCM_KEYCODE) }; #endif From 5a41c06cd7dcf04f5a27ac9b2fa95399c65367d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 05:01:24 +0100 Subject: [PATCH 231/445] Switch to UNICODEMAP in keyboard rules --- .../kbdfans/kbd6x/keymaps/konstantin/rules.mk | 16 ++++++++-------- keyboards/melody96/keymaps/konstantin/rules.mk | 16 ++++++++-------- keyboards/whitefox/keymaps/konstantin/rules.mk | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index 38ccda621a2f..4e485bf7667a 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk @@ -1,11 +1,11 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index c1d4c9a0373e..47a859d08917 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -1,10 +1,10 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = no -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes BACKLIGHT_ENABLE = no diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 14a29380ce3e..625ef346c8d5 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,11 +1,11 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes BACKLIGHT_ENABLE = no VISUALIZER_ENABLE = no From bd43df53bdf0009a152251582a05046bbefb0858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 16 Feb 2019 15:26:14 +0100 Subject: [PATCH 232/445] Use two spaces before inline comments --- users/konstantin/konstantin.c | 4 ++-- users/konstantin/rgb.h | 12 ++++++------ users/konstantin/tap_dance.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 686ff32ecc2a..239252d9c1db 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -6,7 +6,7 @@ static void toggle_numpad(void) { bool numpad_on = IS_LAYER_ON(L_NUMPAD); bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK); if (num_lock_on != numpad_on) { - tap_code(KC_NLCK); // Toggle Num Lock to match layer state + tap_code(KC_NLCK); // Toggle Num Lock to match layer state } } #endif @@ -45,7 +45,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case FN_FNLK: if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { - fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this + fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this } return true; #endif diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h index 2ea10c67a7ad..e296cf12e7ca 100644 --- a/users/konstantin/rgb.h +++ b/users/konstantin/rgb.h @@ -3,15 +3,15 @@ #include "quantum.h" typedef struct { - uint16_t h; - uint8_t s; - uint8_t v; + uint16_t h; // 0–360 + uint8_t s; // 0–255 + uint8_t v; // 0–255 } hsv_t; typedef struct { - uint8_t r; - uint8_t g; - uint8_t b; + uint8_t r; // 0–255 + uint8_t g; // 0–255 + uint8_t b; // 0–255 } rgb_t; extern const hsv_t GODSPEED_BLUE; diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index 81f2d42e1fb6..dffaeb20663c 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -30,7 +30,7 @@ void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { } struct { - bool fn_on; // Layer state when tap dance started + bool fn_on; // Layer state when tap dance started bool started; } td_fn_rctrl_data; From be65a0cc7921a0f6a6397bd7682720b5bd7d9128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 16 Feb 2019 18:03:59 +0100 Subject: [PATCH 233/445] Add _keymap versions of other custom Quantum functions Not added: eeconfig_update_keymap, eeconfig_read_keymap --- users/konstantin/konstantin.c | 80 ++++++++++++++++++++++++++++++++--- users/konstantin/konstantin.h | 12 ++++++ 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 239252d9c1db..f5c59f9eb12f 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -1,5 +1,45 @@ #include "konstantin.h" +__attribute__((weak)) +void keyboard_pre_init_keymap(void) {} + +void keyboard_pre_init_user(void) { + keyboard_pre_init_keymap(); +} + +__attribute__((weak)) +void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { + eeconfig_init_keymap(); +} + +__attribute__((weak)) +void matrix_init_keymap(void) {} + +void matrix_init_user(void) { + matrix_init_keymap(); +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { + keyboard_post_init_keymap(); +} + +__attribute__((weak)) +void matrix_scan_keymap(void) {} + +void matrix_scan_user(void) { + matrix_scan_keymap(); +} + +__attribute__((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + #ifdef LAYER_NUMPAD static void toggle_numpad(void) { layer_invert(L_NUMPAD); @@ -11,11 +51,6 @@ static void toggle_numpad(void) { } #endif -__attribute__((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (!process_record_keymap(keycode, record)) { return false; @@ -88,3 +123,38 @@ uint32_t layer_state_set_keymap(uint32_t state) { uint32_t layer_state_set_user(uint32_t state) { return layer_state_set_keymap(state); } + +__attribute__((weak)) +void led_set_keymap(uint8_t usb_led) {} + +void led_set_user(uint8_t usb_led) { + led_set_keymap(usb_led); +} + +__attribute__((weak)) +void suspend_power_down_keymap(void) {} + +void suspend_power_down_user(void) { + suspend_power_down_keymap(); +} + +__attribute__((weak)) +void suspend_wakeup_init_keymap(void) {} + +void suspend_wakeup_init_user(void) { + suspend_wakeup_init_keymap(); +} + +__attribute__((weak)) +void startup_keymap(void) {} + +void startup_user(void) { // Currently not called anywhere + startup_keymap(); +} + +__attribute__((weak)) +void shutdown_keymap(void) {} + +void shutdown_user(void) { + shutdown_keymap(); +} diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index c32d674e8c79..db90c4ef69e4 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -69,5 +69,17 @@ enum layers_user { L_RANGE_KEYMAP, }; +void keyboard_pre_init_keymap(void); +void eeconfig_init_keymap(void); +void matrix_init_keymap(void); +void keyboard_post_init_keymap(void); + +void matrix_scan_keymap(void); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); uint32_t layer_state_set_keymap(uint32_t state); +void led_set_keymap(uint8_t usb_led); + +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void startup_keymap(void); +void shutdown_keymap(void); From 784e2af062a9ef0c6d1a4ef7fcc20df79ad4fab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 16 Feb 2019 18:05:01 +0100 Subject: [PATCH 234/445] Make toggle_numpad a nested function in process_record_user --- users/konstantin/konstantin.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index f5c59f9eb12f..a567d9166fd1 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -40,22 +40,21 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef LAYER_NUMPAD -static void toggle_numpad(void) { - layer_invert(L_NUMPAD); - bool numpad_on = IS_LAYER_ON(L_NUMPAD); - bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK); - if (num_lock_on != numpad_on) { - tap_code(KC_NLCK); // Toggle Num Lock to match layer state - } -} -#endif - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (!process_record_keymap(keycode, record)) { return false; } +#ifdef LAYER_NUMPAD + void toggle_numpad(void) { + layer_invert(L_NUMPAD); + bool numpad = IS_LAYER_ON(L_NUMPAD), num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK); + if (num_lock != numpad) { + tap_code(KC_NLCK); // Toggle Num Lock to match layer state + } + } +#endif + switch (keycode) { case CLEAR: if (record->event.pressed) { From f09a237a07f2a3a341f6c6972d2f87eec3235254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 00:44:31 +0100 Subject: [PATCH 235/445] Remove most _keymap and _user definitions in userspace Some keyboards misuse _user functions by defining them in the base files instead of the corresponding _kb functions (especially led_set_user and matrix_init_user). Until this is fixed (#5148), I've removed definitions in my userspace that could cause linking collisions. --- users/konstantin/konstantin.c | 49 ----------------------------------- users/konstantin/konstantin.h | 8 ------ 2 files changed, 57 deletions(-) diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index a567d9166fd1..a8f2a5f2c958 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -14,13 +14,6 @@ void eeconfig_init_user(void) { eeconfig_init_keymap(); } -__attribute__((weak)) -void matrix_init_keymap(void) {} - -void matrix_init_user(void) { - matrix_init_keymap(); -} - __attribute__((weak)) void keyboard_post_init_keymap(void) {} @@ -28,13 +21,6 @@ void keyboard_post_init_user(void) { keyboard_post_init_keymap(); } -__attribute__((weak)) -void matrix_scan_keymap(void) {} - -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; @@ -122,38 +108,3 @@ uint32_t layer_state_set_keymap(uint32_t state) { uint32_t layer_state_set_user(uint32_t state) { return layer_state_set_keymap(state); } - -__attribute__((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); -} - -__attribute__((weak)) -void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) { - suspend_power_down_keymap(); -} - -__attribute__((weak)) -void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { - suspend_wakeup_init_keymap(); -} - -__attribute__((weak)) -void startup_keymap(void) {} - -void startup_user(void) { // Currently not called anywhere - startup_keymap(); -} - -__attribute__((weak)) -void shutdown_keymap(void) {} - -void shutdown_user(void) { - shutdown_keymap(); -} diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index db90c4ef69e4..d4e0e189910c 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -71,15 +71,7 @@ enum layers_user { void keyboard_pre_init_keymap(void); void eeconfig_init_keymap(void); -void matrix_init_keymap(void); void keyboard_post_init_keymap(void); -void matrix_scan_keymap(void); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); uint32_t layer_state_set_keymap(uint32_t state); -void led_set_keymap(uint8_t usb_led); - -void suspend_power_down_keymap(void); -void suspend_wakeup_init_keymap(void); -void startup_keymap(void); -void shutdown_keymap(void); From 8e0dfdfb5307e8b0abb2f6030c9147cfd12964c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 16 Feb 2019 18:26:27 +0100 Subject: [PATCH 236/445] Set Melody96 underglow color to Godspeed blue on EEPROM reset --- keyboards/melody96/keymaps/konstantin/keymap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index 4df856f8fbfb..ab876f2f2f7f 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -1,6 +1,10 @@ #include QMK_KEYBOARD_H #include "konstantin.h" +void eeconfig_init_keymap(void) { + rgblight_sethsv(GODSPEED_BLUE.h, GODSPEED_BLUE.s, GODSPEED_BLUE.v); +} + enum keycodes_keymap { RGB_SET = RANGE_KEYMAP, }; From de2e03650bd4d6056513991d4481679e246667bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 16 Feb 2019 17:26:39 +0100 Subject: [PATCH 237/445] Update GODSPEED_BLUE values and RGB mode keys --- keyboards/melody96/keymaps/konstantin/keymap.c | 6 +++--- users/konstantin/rgb.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index ab876f2f2f7f..02d84d693a9d 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -55,9 +55,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ - * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMB│RMK│RMG│ │ + * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤RMP│ - * │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│RMR│RMF│ │ + * │ │DtPR│DtNA│ MW↓ │ │ App │Hom│PgD│End│RM-│RM+│ │ * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ */ [L_FN] = LAYOUT( \ @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, _______, _______, _______, _______, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, - _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_B, RGB_M_K, RGB_M_G, XXXXXXX, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX, _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P ), }; diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c index a09057d282de..b69123be056a 100644 --- a/users/konstantin/rgb.c +++ b/users/konstantin/rgb.c @@ -1,3 +1,3 @@ #include "rgb.h" -const hsv_t GODSPEED_BLUE = { .h = 214, .s = 17, .v = 73 }; +const hsv_t GODSPEED_BLUE = { .h = 300, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; From fbe2eba4729a1d7b00b76243e146b5324d65976b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 03:16:21 +0100 Subject: [PATCH 238/445] Add GODSPEED_YELLOW color --- keyboards/melody96/keymaps/konstantin/keymap.c | 11 +++++++++-- users/konstantin/konstantin.c | 2 +- users/konstantin/rgb.c | 3 ++- users/konstantin/rgb.h | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index 02d84d693a9d..c8b6edb3d6b2 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -1,8 +1,12 @@ #include QMK_KEYBOARD_H #include "konstantin.h" +static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; +static size_t cnum = sizeof colors / sizeof *colors; +static size_t cidx; + void eeconfig_init_keymap(void) { - rgblight_sethsv(GODSPEED_BLUE.h, GODSPEED_BLUE.s, GODSPEED_BLUE.v); + rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); } enum keycodes_keymap { @@ -12,7 +16,10 @@ enum keycodes_keymap { bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case RGB_SET: - rgblight_sethsv(GODSPEED_BLUE.h, GODSPEED_BLUE.s, GODSPEED_BLUE.v); + if (record->event.pressed) { + cidx = (cidx + 1) % cnum; + rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); + } return false; default: diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index a8f2a5f2c958..753742fa7810 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -61,7 +61,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; #ifdef LAYER_FN - static bool fn_lock; + static bool fn_lock; case FN_FNLK: if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c index b69123be056a..37b1ab3d579e 100644 --- a/users/konstantin/rgb.c +++ b/users/konstantin/rgb.c @@ -1,3 +1,4 @@ #include "rgb.h" -const hsv_t GODSPEED_BLUE = { .h = 300, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; +const hsv_t GODSPEED_BLUE = { .h = 300, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; +const hsv_t GODSPEED_YELLOW = { .h = 35, .s = 165, .v = RGBLIGHT_LIMIT_VAL }; diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h index e296cf12e7ca..53b5821b0ee8 100644 --- a/users/konstantin/rgb.h +++ b/users/konstantin/rgb.h @@ -15,3 +15,4 @@ typedef struct { } rgb_t; extern const hsv_t GODSPEED_BLUE; +extern const hsv_t GODSPEED_YELLOW; From 45dddfa6c27123ec6b598d561d3c3859882ccbad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 04:34:55 +0100 Subject: [PATCH 239/445] Set preferred intervals for rgblight effects --- users/konstantin/rgb.c | 20 ++++++++++++++++++++ users/konstantin/unicode.c | 6 +++--- users/konstantin/unicode.h | 20 ++++++++++---------- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c index 37b1ab3d579e..ed6efe87a46c 100644 --- a/users/konstantin/rgb.c +++ b/users/konstantin/rgb.c @@ -1,4 +1,24 @@ #include "rgb.h" +#ifdef RGBLIGHT_EFFECT_BREATHING +const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {20, 30, 5, 10}; +#endif + +#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {20, 50, 100}; +#endif + +#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 50, 100}; +#endif + +#ifdef RGBLIGHT_EFFECT_SNAKE +const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {20, 50, 100}; +#endif + +#ifdef RGBLIGHT_EFFECT_KNIGHT +const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {20, 50, 100}; +#endif + const hsv_t GODSPEED_BLUE = { .h = 300, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; const hsv_t GODSPEED_YELLOW = { .h = 35, .s = 165, .v = RGBLIGHT_LIMIT_VAL }; diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c index 44b5be6c9180..144c0aaf75fb 100644 --- a/users/konstantin/unicode.c +++ b/users/konstantin/unicode.c @@ -1,7 +1,7 @@ #include "unicode.h" #ifdef UNICODEMAP_ENABLE - const uint32_t PROGMEM unicode_map[] = { - FOREACH_UNICODE(UCM_ENTRY) - }; +const uint32_t PROGMEM unicode_map[] = { + FOREACH_UNICODE(UCM_ENTRY) +}; #endif diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index 6bb908e0e266..c8eddabb7138 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -18,17 +18,17 @@ #define UCM_KEYCODE(name, code) name = X(UCM_ ## name), #if defined(UNICODE_ENABLE) - enum unicode_keycodes { - FOREACH_UNICODE(UC_KEYCODE) - }; +enum unicode_keycodes { + FOREACH_UNICODE(UC_KEYCODE) +}; #elif defined(UNICODEMAP_ENABLE) - enum unicode_names { - FOREACH_UNICODE(UCM_NAME) - }; +enum unicode_names { + FOREACH_UNICODE(UCM_NAME) +}; - extern const uint32_t PROGMEM unicode_map[]; +extern const uint32_t PROGMEM unicode_map[]; - enum unicode_keycodes { - FOREACH_UNICODE(UCM_KEYCODE) - }; +enum unicode_keycodes { + FOREACH_UNICODE(UCM_KEYCODE) +}; #endif From 1b3b9414b75e78db14daf61475c54007e8e5e0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 05:26:54 +0100 Subject: [PATCH 240/445] Update tap dance function names --- users/konstantin/tap_dance.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index dffaeb20663c..cdf7b731c578 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -60,7 +60,7 @@ void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { td_fn_rctrl_data.started = false; } -void td_lsft_fn_each(qk_tap_dance_state_t *state, void *user_data) { +void td_lshift_fn_each(qk_tap_dance_state_t *state, void *user_data) { // Single tap → LShift, double tap → Fn, triple tap etc. → Fn+LShift if (state->count == 1 || state->count == 3) { register_code(KC_LSFT); @@ -72,7 +72,7 @@ void td_lsft_fn_each(qk_tap_dance_state_t *state, void *user_data) { } } -void td_lsft_fn_reset(qk_tap_dance_state_t *state, void *user_data) { +void td_lshift_fn_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1 || state->count >= 3) { unregister_code(KC_LSFT); } @@ -88,6 +88,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), - [TD_LSFT_FN] = ACTION_TAP_DANCE_FN_ADVANCED(td_lsft_fn_each, NULL, td_lsft_fn_reset), + [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), + [TD_LSFT_FN] = ACTION_TAP_DANCE_FN_ADVANCED(td_lshift_fn_each, NULL, td_lshift_fn_reset), }; From b05a4b1a4be36e00095eac3188b3b748c5fe1362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 05:41:03 +0100 Subject: [PATCH 241/445] Replace td_lshift_fn with generic td_mod_layer, add TD_RCTL_FN Move TD_FN_RCTL after TD_RCTL_FN --- users/konstantin/tap_dance.c | 78 ++++++++++++++++++++---------------- users/konstantin/tap_dance.h | 6 ++- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index cdf7b731c578..166bb10a6960 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -1,31 +1,59 @@ #include "tap_dance.h" #include "konstantin.h" -#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ - .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ - .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ +#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ + .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ } void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 if (state->count == 1 || state->count == 3) { - register_code(mods->kc1); + register_code(data->kc1); } else if (state->count == 2) { - unregister_code(mods->kc1); - register_code(mods->kc2); + unregister_code(data->kc1); + register_code(data->kc2); } - // Prevent tap dance from sending kc1 and kc2 as weak mods - state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); + // Prevent tap dance from sending the mods as weak mods + state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2)); } void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; if (state->count == 1 || state->count >= 3) { - unregister_code(mods->kc1); + unregister_code(data->kc1); } if (state->count >= 2) { - unregister_code(mods->kc2); + unregister_code(data->kc2); + } +} + +#define ACTION_TAP_DANCE_MOD_LAYER(mod, layer) { \ + .fn = { td_mod_layer_each, NULL, td_mod_layer_reset }, \ + .user_data = &(qk_tap_dance_dual_role_t){ mod, layer }, \ + } + +void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + // Single tap → mod, double tap → layer, triple tap etc. → mod+layer + if (state->count == 1 || state->count == 3) { + register_code(data->kc); + } else if (state->count == 2) { + unregister_code(data->kc); + // Prevent tap dance from sending the mod as a weak mod + state->weak_mods &= ~MOD_BIT(data->kc); + layer_on(data->layer); + } +} + +void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + if (state->count == 1 || state->count >= 3) { + unregister_code(data->kc); + } + if (state->count >= 2) { + layer_off(data->layer); } } @@ -60,27 +88,6 @@ void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { td_fn_rctrl_data.started = false; } -void td_lshift_fn_each(qk_tap_dance_state_t *state, void *user_data) { - // Single tap → LShift, double tap → Fn, triple tap etc. → Fn+LShift - if (state->count == 1 || state->count == 3) { - register_code(KC_LSFT); - } else if (state->count == 2) { - unregister_code(KC_LSFT); - // Prevent tap dance from sending LShift as a weak mod - state->weak_mods &= ~MOD_BIT(KC_LSFT); - layer_on(L_FN); - } -} - -void td_lshift_fn_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1 || state->count >= 3) { - unregister_code(KC_LSFT); - } - if (state->count >= 2) { - layer_off(L_FN); - } -} - qk_tap_dance_action_t tap_dance_actions[] = { [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM), @@ -88,6 +95,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), - [TD_LSFT_FN] = ACTION_TAP_DANCE_FN_ADVANCED(td_lshift_fn_each, NULL, td_lshift_fn_reset), + [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), + [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), + [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), }; diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h index 1757e9b11356..ad7c04cb7f15 100644 --- a/users/konstantin/tap_dance.h +++ b/users/konstantin/tap_dance.h @@ -8,8 +8,9 @@ #define RAL_RGU TD(TD_RAL_RGU) #define RCT_RSF TD(TD_RCT_RSF) -#define FN_RCTL TD(TD_FN_RCTL) #define LSFT_FN TD(TD_LSFT_FN) +#define RCTL_FN TD(TD_RCTL_FN) +#define FN_RCTL TD(TD_FN_RCTL) enum tap_dance { TD_DST_A_R, @@ -18,6 +19,7 @@ enum tap_dance { TD_RAL_RGU, TD_RCT_RSF, - TD_FN_RCTL, TD_LSFT_FN, + TD_RCTL_FN, + TD_FN_RCTL, }; From 14908f86fb97bb7ddc269515a48e681799baccf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 06:00:05 +0100 Subject: [PATCH 242/445] Replace td_fn_rctrl with generic td_layer_mod --- users/konstantin/tap_dance.c | 47 +++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index 166bb10a6960..377a0889febc 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -57,35 +57,44 @@ void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { } } -struct { - bool fn_on; // Layer state when tap dance started - bool started; -} td_fn_rctrl_data; +#define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \ + .fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \ + .user_data = &(qk_tap_dance_layer_mod_t){ layer, mod }, \ + } + +typedef struct { + uint8_t layer; + uint16_t kc; + bool layer_on; // Layer state when tap dance started + bool started; +} qk_tap_dance_layer_mod_t; -void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) { - if (!td_fn_rctrl_data.started) { - td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN); - td_fn_rctrl_data.started = true; +void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; + if (!data->started) { + data->layer_on = IS_LAYER_ON(data->layer); + data->started = true; } - // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl + // Single tap → layer, double tap → mod, triple tap etc. → layer+mod if (state->count == 1 || state->count == 3) { - layer_on(L_FN); + layer_on(data->layer); } else if (state->count == 2) { - if (!td_fn_rctrl_data.fn_on) { - layer_off(L_FN); + if (!data->layer_on) { + layer_off(data->layer); } - register_code(KC_RCTL); + register_code(data->kc); } } -void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { - if ((state->count == 1 || state->count >= 3) && !td_fn_rctrl_data.fn_on) { - layer_off(L_FN); +void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; + if ((state->count == 1 || state->count >= 3) && !data->layer_on) { + layer_off(data->layer); } if (state->count >= 2) { - unregister_code(KC_RCTL); + unregister_code(data->kc); } - td_fn_rctrl_data.started = false; + data->started = false; } qk_tap_dance_action_t tap_dance_actions[] = { @@ -97,5 +106,5 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), + [TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL), }; From 6a088f7ff6b6e001fdac46252d75863b7611fd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 06:08:52 +0100 Subject: [PATCH 243/445] Add blank lines, prefer explicit initialization --- keyboards/melody96/keymaps/konstantin/keymap.c | 2 +- users/konstantin/tap_dance.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index c8b6edb3d6b2..de1b67e98b7d 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -3,7 +3,7 @@ static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; static size_t cnum = sizeof colors / sizeof *colors; -static size_t cidx; +static size_t cidx = 0; void eeconfig_init_keymap(void) { rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index 377a0889febc..c01b29bd5340 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -8,6 +8,7 @@ void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; + // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 if (state->count == 1 || state->count == 3) { register_code(data->kc1); @@ -21,6 +22,7 @@ void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; + if (state->count == 1 || state->count >= 3) { unregister_code(data->kc1); } @@ -36,6 +38,7 @@ void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + // Single tap → mod, double tap → layer, triple tap etc. → mod+layer if (state->count == 1 || state->count == 3) { register_code(data->kc); @@ -49,6 +52,7 @@ void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + if (state->count == 1 || state->count >= 3) { unregister_code(data->kc); } @@ -59,7 +63,7 @@ void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { #define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \ .fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \ - .user_data = &(qk_tap_dance_layer_mod_t){ layer, mod }, \ + .user_data = &(qk_tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \ } typedef struct { @@ -75,6 +79,7 @@ void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { data->layer_on = IS_LAYER_ON(data->layer); data->started = true; } + // Single tap → layer, double tap → mod, triple tap etc. → layer+mod if (state->count == 1 || state->count == 3) { layer_on(data->layer); @@ -88,12 +93,14 @@ void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; + if ((state->count == 1 || state->count >= 3) && !data->layer_on) { layer_off(data->layer); } if (state->count >= 2) { unregister_code(data->kc); } + data->started = false; } From 9baee84b36fbb9c506e593a2a9bca851ed67b8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 18 Feb 2019 12:11:37 +0100 Subject: [PATCH 244/445] =?UTF-8?q?ACTION=5FTAP=5FDANCE=5FDOUBLE=5FMODS=20?= =?UTF-8?q?=E2=86=92=20ACTION=5FTAP=5FDANCE=5FDOUBLE=5FMOD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/konstantin/tap_dance.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index c01b29bd5340..0b405939b34c 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -1,12 +1,12 @@ #include "tap_dance.h" #include "konstantin.h" -#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ - .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ - .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ +#define ACTION_TAP_DANCE_DOUBLE_MOD(mod1, mod2) { \ + .fn = { td_double_mod_each, NULL, td_double_mod_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ } -void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { +void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 @@ -20,7 +20,7 @@ void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2)); } -void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { +void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; if (state->count == 1 || state->count >= 3) { @@ -107,9 +107,9 @@ void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_action_t tap_dance_actions[] = { [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM), - [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), - [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), - [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), + [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_LALT), + [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI), + [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), From f9c070e1a492b60f1c475302e82b17d9bcfc298c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 19 Feb 2019 15:20:11 +0100 Subject: [PATCH 245/445] Update Godspeed colors --- users/konstantin/rgb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c index ed6efe87a46c..0f0c73c49eb5 100644 --- a/users/konstantin/rgb.c +++ b/users/konstantin/rgb.c @@ -20,5 +20,5 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {20, 50, 100}; const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {20, 50, 100}; #endif -const hsv_t GODSPEED_BLUE = { .h = 300, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; -const hsv_t GODSPEED_YELLOW = { .h = 35, .s = 165, .v = RGBLIGHT_LIMIT_VAL }; +const hsv_t GODSPEED_BLUE = { .h = 280, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; +const hsv_t GODSPEED_YELLOW = { .h = 38, .s = 153, .v = RGBLIGHT_LIMIT_VAL }; From 51182a4f03f2d0c6eef6a0bdd87529c7626e8eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 20 Feb 2019 00:28:34 +0100 Subject: [PATCH 246/445] Add media controls to Melody96 keymap --- keyboards/melody96/keymaps/konstantin/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index de1b67e98b7d..46dbc9ae7c32 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RTg│ ÷ │ × │ − │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │ │ │ │ │Clear│RH+│RS+│RV+│ │ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│RH+│RS+│RV+│ │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [L_FN] = LAYOUT( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, _______, _______, _______, _______, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX, _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P From be1d5c66093faa8885855a2d133ef20a408233bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 23 Feb 2019 00:47:42 +0100 Subject: [PATCH 247/445] Add SysRq, Break combos and other keys to Melody96 keymap --- keyboards/melody96/keymaps/konstantin/keymap.c | 4 ++-- keyboards/whitefox/keymaps/konstantin/keymap.c | 2 +- users/konstantin/konstantin.h | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index 46dbc9ae7c32..1150e5dc796d 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │RTg│ ÷ │ × │ − │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ */ [L_FN] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSR, KC_SLCK, KC_PAUS, KC_BRK, TOP, BOTTOM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 494300f2d62c..dddfb274e7f5 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│SLk│Pau│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index d4e0e189910c..0639b93a6dea 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -17,6 +17,10 @@ #define FN_FNLK TT(L_FN) #endif +#define KC_SYSR LALT(KC_PSCR) +#undef KC_BRK +#define KC_BRK LCTL(KC_PAUS) + #define MV_UP LCTL(KC_UP) #define MV_DOWN LCTL(KC_DOWN) #define MV_LEFT LCTL(KC_LEFT) From 79e0964d2194a26fc011547006a6fc3f8a99947a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 2 Mar 2019 17:08:42 -0800 Subject: [PATCH 248/445] handwired/terminus_mini: refactor, Configurator support, and readme cleanup (#5292) * handwired/terminus_mini: refactor - white space changes in terminus_mini.h (alignment) - keymap now uses #include QMK_KEYBOARD_H - refactored TMK macros into QMK process_record_user - refactored TMK layer functions into QMK keycodes - removed redundant keycode definitions * handwired/terminus_mini: Configurator support * handwired/terminus_mini: readme cleanup - completed keyboard description - removed Hardware Availability line (it was blank) - updated Docs links --- keyboards/handwired/terminus_mini/info.json | 59 +++++++++ .../terminus_mini/keymaps/default/keymap.c | 119 ++++++++---------- keyboards/handwired/terminus_mini/readme.md | 7 +- .../handwired/terminus_mini/terminus_mini.h | 16 +-- 4 files changed, 121 insertions(+), 80 deletions(-) create mode 100644 keyboards/handwired/terminus_mini/info.json diff --git a/keyboards/handwired/terminus_mini/info.json b/keyboards/handwired/terminus_mini/info.json new file mode 100644 index 000000000000..9271b413eb79 --- /dev/null +++ b/keyboards/handwired/terminus_mini/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "handwired/terminus_mini", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Del", "x":11, "y":0}, + {"label":"Backspace", "x":0, "y":1}, + {"label":"A", "x":1, "y":1}, + {"label":"S", "x":2, "y":1}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1}, + {"label":"G", "x":5, "y":1}, + {"label":"H", "x":6, "y":1}, + {"label":"J", "x":7, "y":1}, + {"label":"K", "x":8, "y":1}, + {"label":"L", "x":9, "y":1}, + {"label":";", "x":10, "y":1}, + {"label":"'", "x":11, "y":1}, + {"label":"Left Shift / (", "x":0, "y":2}, + {"label":"Z", "x":1, "y":2}, + {"label":"X", "x":2, "y":2}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2}, + {"label":"B", "x":5, "y":2}, + {"label":"N", "x":6, "y":2}, + {"label":"M", "x":7, "y":2}, + {"label":",", "x":8, "y":2}, + {"label":".", "x":9, "y":2}, + {"label":"/", "x":10, "y":2}, + {"label":"Right Shift / )", "x":11, "y":2}, + {"label":"LCtrl", "x":0, "y":3}, + {"label":"GUI", "x":1, "y":3}, + {"label":"Lower", "x":2, "y":3}, + {"label":"LAlt", "x":3, "y":3}, + {"label":"Space / Lower", "x":4, "y":3, "w":2}, + {"label":"Enter / Raise", "x":6, "y":3, "w":2}, + {"label":"MO(_FUNCTION)", "x":8, "y":3}, + {"label":"MO(_MOUSE)", "x":9, "y":3}, + {"label":"App", "x":10, "y":3}, + {"label":"RCtrl", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 8d9cc1b0082b..276475873ae8 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -13,12 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "terminus_mini.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -45,20 +40,14 @@ enum terminus_mini_keycodes { LOWER, RAISE, FUNCTION, - MOUSE -}; - -enum custom_macros { + MOUSE, + // Custom Macros R_PIPE, R_POINT }; #define SPC_LW LT(_LOWER, KC_SPC) #define ENT_RS LT(_RAISE, KC_ENT) -#define FNC MO(_FUNCTION) -#define MSE MO(_MOUSE) -#define PIPE M(R_PIPE) -#define POINT M(R_POINT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak - @@ -73,10 +62,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ [_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_DEL , \ - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ - KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, MO(5), MO(6), KC_APP, KC_RCTL \ ), /* QWERTY - @@ -91,10 +80,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ [_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_DEL , \ - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - 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_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + 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_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, MO(5), MO(6), KC_APP, KC_RCTL \ ), /* Dvorak @@ -109,10 +98,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_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_DEL, \ + 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_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, \ - KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, MO(5), MO(6), KC_APP, KC_RCTL \ ), /* Lower @@ -129,10 +118,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT( - KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSLS, KC_7, KC_8, KC_9, KC_PAST, XXXXXXX, _______, \ - _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_MINS, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, _______, \ - _______, _______, _______, _______, _______, KC_EQL, KC_1, KC_2, KC_3, KC_PENT, XXXXXXX, _______, \ - _______, _______, _______, _______, _______, KC_0, KC_DOT, FNC, RAISE, _______ \ + KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSLS, KC_7, KC_8, KC_9, KC_PAST, XXXXXXX, _______, \ + _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_MINS, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_EQL, KC_1, KC_2, KC_3, KC_PENT, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_0, KC_DOT, MO(5), RAISE, _______ \ ), /* Raise @@ -148,10 +137,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT( - KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - _______, POINT, PIPE, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \ - _______, _______, XXXXXXX, _______, SPC_LW, ENT_RS, FNC, MSE, _______, _______ \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, R_POINT, R_PIPE, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \ + _______, _______, XXXXXXX, _______, SPC_LW, ENT_RS, MO(5), MO(6), _______, _______ \ ), /*Function @@ -166,11 +155,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_FUNCTION] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS , \ - KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, \ - _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_PAUS \ +[_FUNCTION] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, \ + KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, \ + _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_PAUS \ ), /* MOUSE @@ -186,10 +175,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_MOUSE] = LAYOUT( - KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ - KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \ + KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ + KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL0, XXXXXXX, MO(6), XXXXXXX, KC_RCTL \ ), /* Adjust (Lower + Raise) @@ -205,10 +194,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, RESET, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ - _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, RESET, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; @@ -218,27 +207,6 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -// Macros to send R pointer & dplyr pipe -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - //R Pointer: <- - case R_POINT: - if (record->event.pressed) { // pointer - SEND_STRING("<- "); -// return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINS), END); - } - break; - //dplyr pipe: %>% - case R_PIPE: - if (record->event.pressed) { // dplyr pipe - SEND_STRING("%>% "); -// return MACRO(D(LSFT), T(5), T(DOT), T(5), U(LSFT), END); - } - break; - } - return MACRO_NONE; -} - // Cases to switch default layer to QWERTY, COLEMAK or DVORAK and to access ADJUST layer bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -253,13 +221,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_COLEMAK); } return false; - break; + break; case DVORAK: if (record->event.pressed) { set_single_persistent_default_layer(_DVORAK); } return false; - break; + break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -280,6 +248,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + // Macros to send R pointer & dplyr pipe + //R Pointer: <- + case R_POINT: + if (record->event.pressed) { // pointer + SEND_STRING("<- "); + //return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINS), END); + } + break; + //dplyr pipe: %>% + case R_PIPE: + if (record->event.pressed) { // dplyr pipe + SEND_STRING("%>% "); + //return MACRO(D(LSFT), T(5), T(DOT), T(5), U(LSFT), END); + } + break; } return true; } diff --git a/keyboards/handwired/terminus_mini/readme.md b/keyboards/handwired/terminus_mini/readme.md index 5f0271bb40b1..a5fc8eee61f0 100644 --- a/keyboards/handwired/terminus_mini/readme.md +++ b/keyboards/handwired/terminus_mini/readme.md @@ -1,13 +1,12 @@ # terminus_mini handwired -Custom handwired keyboard. +Custom handwired keyboard inspired by the UniKeyboard Terminus Mini 2. Keyboard Maintainer: [James Morgan](https://github.com/mogranjm) -Hardware Supported: Custom handwired keyboard -Hardware Availability: +Hardware Supported: Custom handwired keyboard Make example for this keyboard (after setting up your build environment): make handwired/terminus_mini:default -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. \ No newline at end of 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). diff --git a/keyboards/handwired/terminus_mini/terminus_mini.h b/keyboards/handwired/terminus_mini/terminus_mini.h index 846c98e2c087..27fb45098150 100644 --- a/keyboards/handwired/terminus_mini/terminus_mini.h +++ b/keyboards/handwired/terminus_mini/terminus_mini.h @@ -23,16 +23,16 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b } \ } #define KC_ KC_TRNS From 6aba3ce9d2bd108c5a7cc65625085505677fca17 Mon Sep 17 00:00:00 2001 From: Ray Cielencki Date: Sun, 3 Mar 2019 13:25:08 -0500 Subject: [PATCH 249/445] [Keyboard] Add support for matrix_scan_user to usb-usb converter (#5291) * [Keyboard] Add support for matrix_scan_user to usb-usb converter * update to matrix_scan_quantum * also add init calls --- keyboards/converter/usb_usb/custom_matrix.cpp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index fba107c7cbac..2f7703d05847 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -98,6 +98,7 @@ extern "C" kbd2.SetReportParser(0, (HIDReportParser*)&kbd_parser2); kbd3.SetReportParser(0, (HIDReportParser*)&kbd_parser3); kbd4.SetReportParser(0, (HIDReportParser*)&kbd_parser4); + matrix_init_quantum(); } static void or_report(report_keyboard_t report) { @@ -115,6 +116,25 @@ extern "C" } } + __attribute__ ((weak)) + void matrix_init_kb(void) { + matrix_init_user(); + } + + __attribute__ ((weak)) + void matrix_init_user(void) { + matrix_init_user(); + } + + __attribute__ ((weak)) + void matrix_scan_kb(void) { + matrix_scan_user(); + } + + __attribute__ ((weak)) + void matrix_scan_user(void) { + } + uint8_t matrix_scan(void) { static uint16_t last_time_stamp1 = 0; static uint16_t last_time_stamp2 = 0; @@ -169,6 +189,7 @@ extern "C" keyboard_set_leds(host_keyboard_leds()); } } + matrix_scan_quantum(); return 1; } From b5d85ddc90e248317fb12832f7072dfbcccd48e5 Mon Sep 17 00:00:00 2001 From: Adam Newbold Date: Sun, 3 Mar 2019 13:29:27 -0500 Subject: [PATCH 250/445] [Keyboard] Adding Numeric Keypad //e converter (#5294) * Adding Numeric Keypad //e to conversions * Update keyboards/converter/numeric_keypad_IIe/config.h //e -> IIe Co-Authored-By: newbold * Update keyboards/converter/numeric_keypad_IIe/config.h //e -> IIe and wrapped description in quotes for comma inclusion Co-Authored-By: newbold * Updating info.json for Configurator * Corrected legend * Update keyboards/converter/numeric_keypad_IIe/info.json Corrected layout Co-Authored-By: newbold --- .../converter/numeric_keypad_IIe/config.h | 101 ++++++++++++++++++ .../converter/numeric_keypad_IIe/info.json | 12 +++ .../keymaps/default/config.h | 19 ++++ .../keymaps/default/keymap.c | 62 +++++++++++ .../keymaps/default/readme.md | 3 + .../keymaps/newbold/config.h | 19 ++++ .../keymaps/newbold/keymap.c | 68 ++++++++++++ .../keymaps/newbold/readme.md | 28 +++++ .../numeric_keypad_IIe/numeric_keypad_IIe.c | 43 ++++++++ .../numeric_keypad_IIe/numeric_keypad_IIe.h | 30 ++++++ .../converter/numeric_keypad_IIe/readme.md | 16 +++ .../converter/numeric_keypad_IIe/rules.mk | 76 +++++++++++++ 12 files changed, 477 insertions(+) create mode 100644 keyboards/converter/numeric_keypad_IIe/config.h create mode 100644 keyboards/converter/numeric_keypad_IIe/info.json create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md create mode 100644 keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c create mode 100644 keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h create mode 100644 keyboards/converter/numeric_keypad_IIe/readme.md create mode 100644 keyboards/converter/numeric_keypad_IIe/rules.mk diff --git a/keyboards/converter/numeric_keypad_IIe/config.h b/keyboards/converter/numeric_keypad_IIe/config.h new file mode 100644 index 000000000000..8cf0eaa40fdc --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/config.h @@ -0,0 +1,101 @@ +/* +Copyright 2019 Adam Newbold + +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 Apple Inc. +#define PRODUCT Numeric Keypad IIe +#define DESCRIPTION "Numeric Keypad IIe, A2M2003" + +/* + +Pin Mappings +============ + +Dsub-15 Connection +------------------ + + Dsub-15 (female) + ,-------------------------. + \ 08 07 06 05 04 03 02 01 / + \ 15 14 13 12 11 10 09 / + `---------------------' + +Header Pins +----------- + _____________________________________ +| | +| 11 10 9 8 7 6 5 4 3 2 1 | +|_____________________________________| + + +Header / Matrix +--------------- + +Pin Name Description +-------------------------------------------------------------- +1,2,5,3,4,6 Y0-Y5 Y-direction key-matrix connections +7 NC +9,11,10,8 X4-X7 X-direction key-matrix connections + + +Microcontroller Configuration +----------------------------- + +(Pins are for an Arduino Micro) + ++-----------------------------------+ +| Dsub-15 | Header | Matrix | Micro | +|---------+--------+--------+-------| +| 12 | 11 | X5 | B0 | +| 11 | 10 | X6 | D3 | +| 10 | 9 | X4 | B2 | +| 9 | 8 | X7 | D2 | +| NC | 7 | NC | -- | +| 7 | 6 | Y5 | E6 | +| 6 | 5 | Y2 | D4 | +| 5 | 4 | Y4 | D7 | +| 3 | 3 | Y3 | C6 | +| 2 | 2 | Y1 | D0 | +| 1 | 1 | Y0 | D1 | ++-----------------------------------+ + +Note: Dsub-15 pins 4, 8, 13, 14, and 15 are unused + +Reference +--------- + +https://deskthority.net/wiki/Apple_Numeric_Keypad_IIe +https://geekhack.org/index.php?topic=78048.0 +http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_connector + +*/ + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { B0, B2, D2, D3 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D0 +#define DEBOUNCING_DELAY 5 diff --git a/keyboards/converter/numeric_keypad_IIe/info.json b/keyboards/converter/numeric_keypad_IIe/info.json new file mode 100644 index 000000000000..f1990698ae1c --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Numeric Keypad IIe", + "url": "", + "maintainer": "qmk", + "width": 7.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"7", "x":2, "y":0}, {"label":"8", "x":3, "y":0}, {"label":"9", "x":4, "y":0}, {"label":"(", "x":5.5, "y":0}, {"label":")", "x":6.5, "y":0}, {"label":"\u2190", "x":0, "y":1}, {"label":"4", "x":2, "y":1}, {"label":"5", "x":3, "y":1}, {"label":"6", "x":4, "y":1}, {"label":"\u2212", "x":5.5, "y":1}, {"label":"\u00f7", "x":6.5, "y":1}, {"label":"\u2192", "x":0, "y":2}, {"label":"1", "x":2, "y":2}, {"label":"2", "x":3, "y":2}, {"label":"3", "x":4, "y":2}, {"label":"+", "x":5.5, "y":2}, {"label":"\u00d7", "x":6.5, "y":2}, {"label":"Space", "x":0, "y":3}, {"label":"0", "x":1.5, "y":3, "w":1.5}, {"label":",", "x":3, "y":3}, {"label":".", "x":4, "y":3}, {"label":"Ret", "x":5.5, "y":3}, {"label":"Print", "x":6.5, "y":3}] + } + } +} diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h b/keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h new file mode 100644 index 000000000000..667668959a3f --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Adam Newbold + * + * 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/converter/numeric_keypad_IIe/keymaps/default/keymap.c b/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c new file mode 100644 index 000000000000..a8f45535569a --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2019 Adam Newbold + * + * 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] = { +/* + +-------+ +-------+-------+-------+ +-------+-------+ + | Esc | | 7 | 8 | 9 | | ( | ) | + +-------+ +-------+-------+-------+ +-------+-------+ + | <-- | | 4 | 5 | 6 | | - | / | + +-------+ +-------+-------+-------+ +-------+-------+ + | --> | | 1 | 2 | 3 | | + | * | + +-------+ +--+-------+-------+-------+ +-------+-------+ + | Space | | 0 | , | . | | Ret | Print | + +-------+ +----------+-------+-------+ +-------+-------+ +*/ + [0] = LAYOUT( + KC_ESCAPE, KC_KP_7, KC_KP_8, KC_KP_9, KC_LEFT_PAREN, KC_RIGHT_PAREN, \ + KC_LEFT, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_SLASH, \ + KC_RIGHT, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_KP_ASTERISK, \ + KC_SPACE, KC_KP_0, KC_KP_COMMA, KC_KP_DOT, KC_RETURN, KC_QUESTION \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void keyboard_post_init_user(void) { + +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md b/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md new file mode 100644 index 000000000000..c58b09d156c7 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Numeric Keypad //e Default Keymap + +All keys perform their default functions displayed on the stock keycaps. Note that the "Print" key presses a question mark (?), which was the default behavior on the Apple //e (with ? the shorthand for the AppleSoft BASIC PRINT command). diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h new file mode 100644 index 000000000000..667668959a3f --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Adam Newbold + * + * 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/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c new file mode 100644 index 000000000000..e0f04557c64c --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 Adam Newbold + * + * 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] = { +/* + +-------+ +-------+-------+-------+ +-------+-------+ + | Esc | | 7 | 8 | 9 | | ( | ) | + +-------+ +-------+-------+-------+ +-------+-------+ + | <-- | | 4 | 5 | 6 | | - | / | + +-------+ +-------+-------+-------+ +-------+-------+ + | --> | | 1 | 2 | 3 | | + | * | + +-------+ +--+-------+-------+-------+ +-------+-------+ + | Space | | 0 | , | . | | Ret | Print | + +-------+ +----------+-------+-------+ +-------+-------+ +*/ + [0] = LAYOUT( + KC__MUTE, KC_KP_7, KC_KP_8, KC_KP_9, KC_LEFT_PAREN, KC_RIGHT_PAREN, \ + KC__VOLDOWN, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_SLASH, \ + KC__VOLUP, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_KP_ASTERISK, \ + MO(1), KC_KP_0, KC_KP_COMMA, KC_KP_DOT, KC_RETURN, KC_QUESTION \ + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_BRMD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_BRMU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void keyboard_post_init_user(void) { + +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md new file mode 100644 index 000000000000..0bccfdb6cf81 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md @@ -0,0 +1,28 @@ +# @newbold's layout for the Numeric Keypad IIe + +Includes the standard layout for all keys except for the left-most column, which is remapped to these keys: + + +-----------------+ + | Mute | + +-----------------+ + | Volume Down | + +-----------------+ + | Volume Up | + +-----------------+ + | Function | + +-----------------+ + + With Function held down: + + +-----------------+ + | Mute | + +-----------------+ + | Brightness Down | + +-----------------+ + | Brightness Up | + +-----------------+ + | Function | + +-----------------+ + + And also with Function held down, "Print" (the lower right key) will trigger RESET (putting the controller into bootloader mode so it can be flashed). + \ No newline at end of file diff --git a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c new file mode 100644 index 000000000000..c29d85d488ef --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Adam Newbold + * + * 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 "numeric_keypad_IIe.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/converter/numeric_keypad_IIe/numeric_keypad_IIe.h b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h new file mode 100644 index 000000000000..8892b5553b79 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h @@ -0,0 +1,30 @@ +/* Copyright Adam Newbold + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#include "quantum.h" + +#define LAYOUT( \ + K_ESC, K_7, K_8, K_9, K_LEFT_PARENS, K_RIGHT_PARENS, \ + K_LEFT, K_4, K_5, K_6, K_MINUS, K_DIVIDE, \ + K_RIGHT, K_1, K_2, K_3, K_PLUS, K_MULTIPLY, \ + K_SPACE, K_0, K_COMMA, K_DOT, K_RETURN, K_PRINT \ +){ \ + { K_RIGHT_PARENS, K_ESC, K_4, K_5, K_6, K_7 },\ + { K_DIVIDE, K_LEFT, K_0, K_1, K_2, K_3 },\ + { K_PRINT, K_SPACE, K_LEFT_PARENS, K_MINUS, K_RETURN, K_COMMA },\ + { K_MULTIPLY, K_RIGHT, K_8, K_9, K_DOT, K_PLUS },\ +} diff --git a/keyboards/converter/numeric_keypad_IIe/readme.md b/keyboards/converter/numeric_keypad_IIe/readme.md new file mode 100644 index 000000000000..9eba41610a84 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/readme.md @@ -0,0 +1,16 @@ +# Numeric Keypad IIe + +![Numeric Keypad IIe](https://upload.wikimedia.org/wikipedia/commons/3/3b/Apple_Numeric_Keypad_IIe.jpg) + +This is a conversion project for the Numeric Keypad IIe, model A2M2003. This was an external keypad that connected to the Apple //e's motherboard (and as such, it lacked any kind of onboard controller). + +The reference conversion setup uses the keyboard's DB15 (VGA) fixed cable connected to a DB15 wiring terminal with breakout board ([this one](https://www.amazon.com/gp/product/B07437293Y/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1), specifically) and wired to an [Arduino Micro](https://store.arduino.cc/usa/arduino-micro). + +Keyboard Maintainer: [Adam Newbold](https://github.com/newbold) +Hardware Supported: Internal Numeric Keypad IIe PCB (Apple part 820.0081.c), ATmega32U4 microcontroller + +Make example for this keyboard (after setting up your build environment): + + make converter/numeric_keypad_IIe: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/converter/numeric_keypad_IIe/rules.mk b/keyboards/converter/numeric_keypad_IIe/rules.mk new file mode 100644 index 000000000000..f61a7d4501b8 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/rules.mk @@ -0,0 +1,76 @@ +# 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 + +# 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 98b87e6357038eeb6d7049782821a66f348b7f6d Mon Sep 17 00:00:00 2001 From: takashiski Date: Mon, 4 Mar 2019 03:33:19 +0900 Subject: [PATCH 251/445] [Keyboard] update Hecomi/alpha's info.json (#5295) * remove offset * update layout(I missed) * formatted --- keyboards/hecomi/alpha/info.json | 368 ++++++++++++++++++++++++++++++- 1 file changed, 360 insertions(+), 8 deletions(-) diff --git a/keyboards/hecomi/alpha/info.json b/keyboards/hecomi/alpha/info.json index 12472acbf1c8..49c8d4c467bf 100644 --- a/keyboards/hecomi/alpha/info.json +++ b/keyboards/hecomi/alpha/info.json @@ -1,12 +1,364 @@ { - "keyboard_name": "hecomi/alpha", - "url": "https://skyhigh-works.hatenablog.com/entry/2019/02/25/221959", - "maintainer": "takashiski", - "width": 19.25, - "height": 6.5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":11.25, "y":1.5}, {"label":"*", "x":12.25, "y":1.5}, {"label":"(", "x":13.25, "y":1.5}, {"label":")", "x":14.25, "y":1.5}, {"label":"_", "x":15.25, "y":1.5}, {"label":"+", "x":16.25, "y":1.5}, {"label":"|", "x":17.25, "y":1.5}, {"label":"~", "x":18.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"Y", "x":10.75, "y":2.5}, {"label":"U", "x":11.75, "y":2.5}, {"label":"I", "x":12.75, "y":2.5}, {"label":"O", "x":13.75, "y":2.5}, {"label":"P", "x":14.75, "y":2.5}, {"label":"{", "x":15.75, "y":2.5}, {"label":"}", "x":16.75, "y":2.5}, {"label":"Delete", "x":17.75, "y":2.5, "w":1.5}, {"label":"Control", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":11, "y":3.5}, {"label":"J", "x":12, "y":3.5}, {"label":"K", "x":13, "y":3.5}, {"label":"L", "x":14, "y":3.5}, {"label":":", "x":15, "y":3.5}, {"label":"\"", "x":16, "y":3.5}, {"label":"Return", "x":17, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"B", "x":10.5, "y":4.5}, {"label":"N", "x":11.5, "y":4.5}, {"label":"M", "x":12.5, "y":4.5}, {"label":"<", "x":13.5, "y":4.5}, {"label":">", "x":14.5, "y":4.5}, {"label":"?", "x":15.5, "y":4.5}, {"label":"Shift", "x":16.5, "y":4.5, "w":1.75}, {"label":"Fn", "x":18.25, "y":4.5}, {"label":"", "x":1.55, "y":5.5}, {"label":"\u25c7", "x":2.55, "y":5.5, "w":1.5}, {"x":4.05, "y":5.5, "w":1.5}, {"x":5.55, "y":5.5, "w":1.5}, {"x":11.3, "y":5.5, "w":1.5}, {"x":12.8, "y":5.5, "w":1.5}, {"label":"\u25c7", "x":14.3, "y":5.5, "w":1.5}, {"label":"", "x":15.8, "y":5.5}] + "keyboard_name": "hecomi/alpha", + "url": "https://skyhigh-works.hatenablog.com/entry/2019/02/25/221959", + "maintainer": "takashiski", + "width": 16.25, + "height": 5, + "key_count": 69, + "layouts": { + "LAYOUT": { + "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": 8.25, + "y": 0 + }, + { + "label": "*", + "x": 9.25, + "y": 0 + }, + { + "label": "(", + "x": 10.25, + "y": 0 + }, + { + "label": ")", + "x": 11.25, + "y": 0 + }, + { + "label": "_", + "x": 12.25, + "y": 0 + }, + { + "label": "+", + "x": 13.25, + "y": 0 + }, + { + "label": "|", + "x": 14.25, + "y": 0 + }, + { + "label": "~", + "x": 15.25, + "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": "Y", + "x": 7.75, + "y": 1 + }, + { + "label": "U", + "x": 8.75, + "y": 1 + }, + { + "label": "I", + "x": 9.75, + "y": 1 + }, + { + "label": "O", + "x": 10.75, + "y": 1 + }, + { + "label": "P", + "x": 11.75, + "y": 1 + }, + { + "label": "{", + "x": 12.75, + "y": 1 + }, + { + "label": "}", + "x": 13.75, + "y": 1 + }, + { + "label": "Delete", + "x": 14.75, + "y": 1, + "w": 1.5 + }, + { + "label": "Control", + "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": 8, + "y": 2 + }, + { + "label": "J", + "x": 9, + "y": 2 + }, + { + "label": "K", + "x": 10, + "y": 2 + }, + { + "label": "L", + "x": 11, + "y": 2 + }, + { + "label": ":", + "x": 12, + "y": 2 + }, + { + "label": "\"", + "x": 13, + "y": 2 + }, + { + "label": "Return", + "x": 14, + "y": 2, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "B", + "x": 7.5, + "y": 3 + }, + { + "label": "N", + "x": 8.5, + "y": 3 + }, + { + "label": "M", + "x": 9.5, + "y": 3 + }, + { + "label": "<", + "x": 10.5, + "y": 3 + }, + { + "label": ">", + "x": 11.5, + "y": 3 + }, + { + "label": "?", + "x": 12.5, + "y": 3 + }, + { + "label": "Shift", + "x": 13.5, + "y": 3, + "w": 1.75 + }, + { + "label": "Fn", + "x": 15.25, + "y": 3 + }, + { + "x": 0, + "y": 4, + "w": 1.5 + }, + { + "label": "", + "x": 1.5, + "y": 4 + }, + { + "label": "GUI", + "x": 2.5, + "y": 4 + }, + { + "label": "無変換", + "x": 3.5, + "y": 4 + }, + { + "label": "tab", + "x": 4.5, + "y": 4 + }, + { + "x": 5.5, + "y": 4 + }, + { + "label": "Enter", + "x": 7.75, + "y": 4 + }, + { + "label": "BS", + "x": 8.75, + "y": 4 + }, + { + "label": "変換", + "x": 9.75, + "y": 4 + }, + { + "label": "GUI", + "x": 10.75, + "y": 4 + }, + { + "label": "Menu", + "x": 11.75, + "y": 4 + }, + { + "label": "", + "x": 12.75, + "y": 4 } + ] } + } } From f9f04ff2a4318798a79e6ec242ae773fdb80b069 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Daisuke Date: Mon, 4 Mar 2019 03:33:52 +0900 Subject: [PATCH 252/445] [Keymap] Fix comment in the KBD67 default keymap. (#5296) --- .../kbd67/rev1/keymaps/default/keymap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c index 89fa9a534d33..13a8a420d2fa 100644 --- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c @@ -24,13 +24,13 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap (Base Layer) Default Layer * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| * |----------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | * |----------------------------------------------------------------| * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' @@ -44,15 +44,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap Fn Layer * ,----------------------------------------------------------------. - * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | * |----------------------------------------------------------------| - * | | |Up | | | | | | | | | | | |Hme | + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | * |----------------------------------------------------------------| - * | |<- |Dn | ->| | | | | | | | | |End | + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | * |----------------------------------------------------------------| - * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * | | | | | | | | |End|PDn|Dow| |PUp| | * |----------------------------------------------------------------| - * | | | | | | | |MsL|MsD|MsR | + * | | | | | | | |Hom|PDn|End | * `----------------------------------------------------------------' */ [1] = LAYOUT_65_ansi( From 33806947409e23dcba7cef75d2977d3cffc7cec8 Mon Sep 17 00:00:00 2001 From: yttyx Date: Sun, 3 Mar 2019 18:34:41 +0000 Subject: [PATCH 253/445] Update Atreus layout to match the Niu layout. Fix Niu comment typo. (#5297) --- keyboards/atreus/keymaps/yttyx/README.md | 158 +++++++++------- keyboards/atreus/keymaps/yttyx/config.h | 12 +- keyboards/atreus/keymaps/yttyx/keymap.c | 221 +++++++++++++--------- keyboards/niu_mini/keymaps/yttyx/keymap.c | 2 +- 4 files changed, 227 insertions(+), 166 deletions(-) diff --git a/keyboards/atreus/keymaps/yttyx/README.md b/keyboards/atreus/keymaps/yttyx/README.md index 9ed9d6239b78..aac02c6c11f7 100644 --- a/keyboards/atreus/keymaps/yttyx/README.md +++ b/keyboards/atreus/keymaps/yttyx/README.md @@ -1,77 +1,103 @@ # Overview -A Balance 12 layout for the Atreus keyboard. +This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) +for more information. It's designed for left-handers who use their right hand for the mouse. -Balance 12 was created by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) -for some background on the design of the layout. +## To build -* The variant used here is a mirror of the original for left-handers -* The central column of punctuation keys has been moved elsewhere -* Home positions for the left and right forefingers are *T* and *A* respectively +``` +sudo make atreus:yttyx +``` -## To build/flash +## To flash (example) -> make atreus:yttyx:avrdude +``` +sudo avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_yttyx.hex -P /dev/ttyACM0 +``` ## Layers ### Base: - .----------------------------------. .------------------------------. - | P | L | C | D | W | | U | O | Y | K | Q | - +------+------+------+-----+-------| |------+-----+-----+-----+-----| - | N | R | S | T | M | | A | E | I | H | V | - +------+------+------+-----+-------| |------+-----+-----+-----+-----| - | Z | J | F | G | B | | , | . | ; | X | - | - +------+------+------+-----+-------+---------+------+-----+-----+-----+-----| - | Shft | Ctl | Alt | BS | Space | L1 | R1 | Shft | R2 | Win | Ctl | Alt | - '---------------------------------------------------------------------------' - -### L1: - - .---------------------------------. .--------------------------------. - | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Tab | ? | = | - | _ | | ' | " | + | * | Enter | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Esc | ! | & | | | | , | . | ; | | - | - |------+------+------+----+-------+---------+------+----+-----+------+-------| - | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '----------------------------------------------------------------------------' - -### R1: - - .---------------------------------. .-------------------------------. - | < | > | { | } | @ | | $ | � | | | R3 | - +------+------+-----+-----|-------| |------+----+-----+------+------| - | [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps | - |------+------+-----+-----+-------| |------+----+-----+------+------| - | / | \ | ^ | | | % | | , | . | ; | | PScn | - |------+------+-----+-----+-------+---------+------+----+-----+------+------| - | Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '---------------------------------------------------------------------------' - -### R2: - - .-----------------------------------. .--------------------.-----------------. - | F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert | - |------+------+------+------+-------| |------+------+------+------+----------| - | F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter | - |------+------+------+------+-------| |------+------+------+------+----------| - | F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | | - |------+------+------+------+-------+---------+------+------+------+------+----------| - | Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight | - '------------------------------------------------------------------------------------' - -### R3: - - .----------------------------. .------------------------. - | RESET | | | | | | | | | | R3 | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----+---------+----+----+----+----+----| - | | | | | | | | | | | | | - '---------------------------------------------------------------' - + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + +### P1: Punctuation (1) + + + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | RS | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### P2: Punctuation (2) + + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' + +### P3: Punctuation (3) + + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### Numerals / Cursor control + + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' + +### FV: Function keys / Cursor control (Vim) + + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' + +### RS: Reset + + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | RESET | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | | BA | | | | | | + '-----'-------'-----' '-----'------'-------' diff --git a/keyboards/atreus/keymaps/yttyx/config.h b/keyboards/atreus/keymaps/yttyx/config.h index 68e0225e0087..b9e113ec0bb4 100644 --- a/keyboards/atreus/keymaps/yttyx/config.h +++ b/keyboards/atreus/keymaps/yttyx/config.h @@ -1,12 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#define ONESHOT_TIMEOUT 500 // Time (in ms) before the one shot key is released - -// Disable some options to reduce firmware size -#define NO_PRINT -#define NO_ACTION_TAPPING +#pragma once +#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/yttyx/keymap.c b/keyboards/atreus/keymaps/yttyx/keymap.c index 210bfd36bae7..dad36cad9288 100644 --- a/keyboards/atreus/keymaps/yttyx/keymap.c +++ b/keyboards/atreus/keymaps/yttyx/keymap.c @@ -2,115 +2,158 @@ #include QMK_KEYBOARD_H enum layers { - BASE, // Balance Twelve - L1, // (momentary) - R1, // (momentary) - R2, // (momentary) - R3 // (momentary) + BA, // Base (Balance Twelve mirror variant) + P1, // Punctuation (1) + P2, // Punctuation (2) + P3, // Punctuation (2) + NC, // Numerals / Cursor control + FV, // Function keys / Cursor control (Vim) + RS // Reset }; -// Aliases from replicaJunction's atreus layout -#define KCX_LST LSFT(KC_TAB) -#define KX_COPY LCTL(KC_C) -#define KX_CUT LCTL(KC_X) -#define KX_PAST LCTL(KC_V) -#define KX_UNDO LCTL(KC_Z) +// Abbreviations - base +#define KX_P1_BSPC LT(P1, KC_BSPC) +#define KX_P2_SPC LT(P2, KC_SPC) -#define KX_AT LSFT(KC_QUOT) -#define KX_PIPE LSFT(KC_NUBS) -#define KX_WINR LSFT(LGUI(KC_RGHT)) // Move window to next monitor (Windows) +#define KX_SFT_Z MT(MOD_LSFT, KC_Z) +#define KX_CTL_J MT(MOD_LCTL, KC_J) +#define KX_ALT_F MT(MOD_LALT, KC_F) +#define KX_ALT_DOT MT(MOD_LALT, KC_DOT) +#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN) +#define KX_SFT_X MT(MOD_LSFT, KC_X) +#define KX_AT LSFT(KC_QUOT) +#define KX_DQUOT LSFT(KC_2) +#define KX_PIPE LSFT(KC_NUBS) +#define KX_TILDA LSFT(KC_NUHS) + + const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = { + /* + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + */ + [BA] = LAYOUT( + KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q, + KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V, + KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI, + XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P1: Punctuation (1) + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | RS | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + */ + [P1] = LAYOUT( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, TO(RS), KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), - /* Balance Twelve mirror variant (left-handed) - .--------------------------------. .------------------------------. - | P | L | C | D | W | | U | O | Y | K | Q | - +------+------+-----+----+-------| |------+----+-----+------+-----| - | N | R | S | T | M | | A | E | I | H | V | - +------+------+-----+----+-------| |------+----+-----+------+-----| - | Z | J | F | G | B | | , | . | ; | X | - | - +------+------+-----+----+-------+---------+------+----+-----+------+-----| - | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Win | Ctrl | Alt | - '-------------------------------------------------------------------------' + /* P2: Punctuation (2) + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' */ - [BASE] = LAYOUT( - KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q, - KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V, - KC_Z, KC_J, KC_F, KC_G, KC_B, KC_COMM, KC_DOT, KC_SCLN, KC_X, KC_MINS, - KC_LSFT, KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, MO(L1), MO(R1), OSM(MOD_LSFT), MO(R2), KC_LWIN, KC_RCTL, KC_RALT + [P2] = LAYOUT( + KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX, + KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* L1 - .---------------------------------. .--------------------------------. - | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Tab | ? | = | - | _ | | ' | " | + | * | Enter | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Esc | ! | & | | | | , | . | ; | | - | - |------+------+------+----+-------+---------+------+----+-----+------+-------| - | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '----------------------------------------------------------------------------' + /* P3: Punctuation (3) + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' */ - [L1] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT, - KC_ESC, KC_EXLM, KC_AMPR, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + [P3] = LAYOUT( + KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL, + KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* R1 - .---------------------------------. .-------------------------------. - | < | > | { | } | @ | | $ | � | | | R3 | - +------+------+-----+-----|-------| |------+----+-----+------+------| - | [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps | - |------+------+-----+-----+-------| |------+----+-----+------+------| - | / | \ | ^ | | | % | | , | . | ; | | PScn | - |------+------+-----+-----+-------+---------+------+----+-----+------+------| - | Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '---------------------------------------------------------------------------' + /* NC: Numerals / Cursor control + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' */ - [R1] = LAYOUT( - KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, XXXXXXX, XXXXXXX, MO(R3), - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS, - KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, XXXXXXX, KC_PSCR, - _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______ + [NC] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* R2 - .-----------------------------------. .--------------------.-----------------. - | F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert | - |------+------+------+------+-------| |------+------+------+------+----------| - | F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter | - |------+------+------+------+-------| |------+------+------+------+----------| - | F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | | - |------+------+------+------+-------+---------+------+------+------+------+----------| - | Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight | - '------------------------------------------------------------------------------------' + /* FV: Function keys / Cursor control (Vim) + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' */ - [R2] = LAYOUT( - KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS, - KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT, - KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, XXXXXXX, KC_TAB, XXXXXXX, XXXXXXX, - _______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR + [FV] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* R3 - .----------------------------. .------------------------. - | RESET | | | | | | | | | | R3 | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----+---------+----+----+----+----+----| - | | | | | | | | | | | | | - '---------------------------------------------------------------' + /* RS: Reset + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | RESET | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | | BA | | | | | | + '-----'-------'-----' '-----'------'-------' */ - [R3] = LAYOUT( - RESET, 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 + [RS] = LAYOUT( + RESET, 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, TO(BA), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ) }; diff --git a/keyboards/niu_mini/keymaps/yttyx/keymap.c b/keyboards/niu_mini/keymaps/yttyx/keymap.c index 6a9398dff904..e299a53b4849 100644 --- a/keyboards/niu_mini/keymaps/yttyx/keymap.c +++ b/keyboards/niu_mini/keymaps/yttyx/keymap.c @@ -2,7 +2,7 @@ #include QMK_KEYBOARD_H enum layers { - BA, // Base (Balance Twelve mirror varian) + BA, // Base (Balance Twelve mirror variant) P1, // Punctuation (1) P2, // Punctuation (2) P3, // Punctuation (2) From be497126e8466ca3125261dd821572a1aa63edb0 Mon Sep 17 00:00:00 2001 From: omkbd Date: Mon, 4 Mar 2019 03:36:40 +0900 Subject: [PATCH 254/445] [Keymap] Update keymap.c (#5290) --- keyboards/ergodash/rev2/keymaps/default/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodash/rev2/keymaps/default/keymap.c b/keyboards/ergodash/rev2/keymaps/default/keymap.c index 399e22f77837..b709ab7e98a4 100644 --- a/keyboards/ergodash/rev2/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev2/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_SPC , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_SPC, KC_SPC,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SPC , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_SPC, KC_SPC,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), /* Raise @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SPC , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_SPC, KC_SPC,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), /* Adjust From 9b0a5486875089f64e21ef10a1c80503bed7bb80 Mon Sep 17 00:00:00 2001 From: Ray Cielencki Date: Sun, 3 Mar 2019 13:38:12 -0500 Subject: [PATCH 255/445] [Keyboard] matrix_init_user shouldn't call itself (#5298) --- keyboards/converter/usb_usb/custom_matrix.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index 2f7703d05847..6f381aabf405 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -123,7 +123,6 @@ extern "C" __attribute__ ((weak)) void matrix_init_user(void) { - matrix_init_user(); } __attribute__ ((weak)) From a2a2ba0eec6aa5fffcc24d25d29883ccc0ae1816 Mon Sep 17 00:00:00 2001 From: leico Date: Mon, 4 Mar 2019 03:49:27 +0900 Subject: [PATCH 256/445] [Keymap] layout/community/ortho4x12/symbolic update (#5274) * change readme.md * diy LayerTap function * fixed forgot update_tri_layer correspound permissive hold * update README * change No_event of general shift * update symbolic layout * merge symbolic_general_shift to symbolic layout * update README.md * following code style * delete excess codes, change codes that don't follows the code style --- .../community/ortho_4x12/symbolic/README.md | 23 +-- .../community/ortho_4x12/symbolic/config.h | 3 +- .../community/ortho_4x12/symbolic/keymap.c | 138 +++++++++++++----- 3 files changed, 116 insertions(+), 48 deletions(-) diff --git a/layouts/community/ortho_4x12/symbolic/README.md b/layouts/community/ortho_4x12/symbolic/README.md index 37fbcd56a471..2c69d5160e81 100644 --- a/layouts/community/ortho_4x12/symbolic/README.md +++ b/layouts/community/ortho_4x12/symbolic/README.md @@ -1,26 +1,24 @@ -# Symbolic ortho 4x12 layout +# Symbolic ortho 4x12 layout ## Features ### QWERTY based -![QWERTY layout](https://gist.githubusercontent.com/leico/cb50ecd12eb8ad906a69678f265cd52c/raw/4597497ecd00790312f1a3928b2e2c5cf17a6ac1/QWERTY.png) - +![QWERTY layout](https://gist.githubusercontent.com/leico/5bf4d9ff94f2068c5333739f7f1f88b4/raw/2af7fed6f282b6ac278e79433d15887f6b91ba3a/QWERTY.png) + * Default keymap * QWERTY layout * Hold and tap - * `Shift` and `Space` * `Left Ctrl` and `Tab` * Symmetric Modifiers * `Shift` * `Raise Layer` * `Lower Layer` * `GUI` - * `Reset` ### symbol charactor layer -![Raise layout](https://gist.githubusercontent.com/leico/cb50ecd12eb8ad906a69678f265cd52c/raw/4597497ecd00790312f1a3928b2e2c5cf17a6ac1/Raise.png) +![Raise layout](https://gist.githubusercontent.com/leico/5bf4d9ff94f2068c5333739f7f1f88b4/raw/2af7fed6f282b6ac278e79433d15887f6b91ba3a/Raise.png) * Raise Layer * assigned symbolic(punctuation) characters @@ -37,23 +35,31 @@ ### numbers and allows layer -![Lower layout](https://gist.githubusercontent.com/leico/cb50ecd12eb8ad906a69678f265cd52c/raw/4597497ecd00790312f1a3928b2e2c5cf17a6ac1/Lower.png) +![Lower layout](https://gist.githubusercontent.com/leico/5bf4d9ff94f2068c5333739f7f1f88b4/raw/2af7fed6f282b6ac278e79433d15887f6b91ba3a/Lower.png) * Lower Layer * entrust vim style arrows * also numkeys * additional, computer volume keys * transparent all modifiers +* **changed 2018/09/04** + * assign keys + * Home + * Page Down + * Page Up + * End + * Print Screen ### Numpads and F key layer -![Neutral layout](https://gist.githubusercontent.com/leico/cb50ecd12eb8ad906a69678f265cd52c/raw/4597497ecd00790312f1a3928b2e2c5cf17a6ac1/Neutral.png) +![Neutral layout](https://gist.githubusercontent.com/leico/5bf4d9ff94f2068c5333739f7f1f88b4/raw/2af7fed6f282b6ac278e79433d15887f6b91ba3a/Neutral.png) * visibled when Raise and Lower layer visibled * F keys assigned left hand side * Numpads assigned right hand side * for that reason, override `RGUI` key * transparent mostly modifiers +* visibled `Reset` key on both hands ### Goals @@ -63,7 +69,6 @@ * simple, minimal, easy learn * as soon as possible, don't disable any shortcuts - ### suggestions or find issues [post issues for my fork](https://github.com/leico/qmk_firmware/issues) diff --git a/layouts/community/ortho_4x12/symbolic/config.h b/layouts/community/ortho_4x12/symbolic/config.h index c29b0770622a..3f88b4cc17d9 100644 --- a/layouts/community/ortho_4x12/symbolic/config.h +++ b/layouts/community/ortho_4x12/symbolic/config.h @@ -20,8 +20,7 @@ along with this program. If not, see . #pragma once -// hold & tapping delay setting -#define TAPPING_TERM 100 + /* Use I2C or Serial, not both */ diff --git a/layouts/community/ortho_4x12/symbolic/keymap.c b/layouts/community/ortho_4x12/symbolic/keymap.c index 1e5494d96ef9..c29237371114 100644 --- a/layouts/community/ortho_4x12/symbolic/keymap.c +++ b/layouts/community/ortho_4x12/symbolic/keymap.c @@ -19,6 +19,7 @@ enum custom_keycodes { R_RAISE }; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -30,17 +31,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | A | S | D | F | G || H | J | K | L | ; |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | Z | X | C | V | B || N | M | , | . | ! | | + * |Shift | Z | X | C | V | B || N | M | , | . | ! |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI | |LLower|Space ||Space |RLower| | GUI | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_4x12( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_EXLM, XXXXXXX, \ - RESET, KC_LALT, KC_LGUI, L_LOWER, L_RAISE, LSFT_T( KC_SPC ), RSFT_T( KC_SPC ), R_RAISE, R_LOWER, KC_RGUI, KC_DEL, RESET \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_EXLM, KC_RSFT, \ + L_RAISE, KC_LALT, KC_LGUI, XXXXXXX, L_LOWER, KC_SPC, KC_SPC, R_LOWER, XXXXXXX, KC_RGUI, KC_DEL, R_RAISE \ ), /* Raise @@ -52,16 +53,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | ~ | | | ( | ) | * || / | < | > | ' | : |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | ` | ^ | @ | $ | + || - | = | _ | " | ? | | + * |Shift | ` | ^ | @ | $ | + || - | = | _ | " | ? |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI | |LLower|Space ||Space |RLower| | GUI | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_ortho_4x12( \ _______, XXXXXXX, KC_AMPR, KC_LCBR, KC_RCBR, KC_PERC, KC_BSLS, KC_LBRC, KC_RBRC, KC_HASH, XXXXXXX, _______, \ - _______, KC_TILD, KC_PIPE, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLSH, KC_LABK, KC_RABK, KC_QUOT, KC_COLN, _______, \ - _______, KC_GRV, KC_CIRC, KC_AT, KC_DLR, KC_PLUS, KC_MINS, KC_EQL, KC_UNDS, KC_DQUO, KC_QUES, _______, \ + _______, KC_TILD, KC_PIPE, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLSH, KC_LABK, KC_RABK, KC_DQUO, KC_COLN, _______, \ + _______, KC_GRV, KC_CIRC, KC_AT, KC_DLR, KC_PLUS, KC_MINS, KC_EQL, KC_UNDS, KC_QUOT, KC_QUES, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Lower @@ -73,16 +74,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | |VolDn |VolUp | Mute | || Left | Down | Up |Right | |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | | | | | || | | | | | | + * |Shift | | | | | PrSc || Home | PgDn | PgUp | End | |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI | |LLower|Space ||Space |RLower| | GUI | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_4x12( \ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ _______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -95,55 +96,113 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | F5 | F6 | F7 | F8 | || * | / | 4 | 5 | 6 |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | F9 | F10 | F11 | F12 | || . | , | 7 | 8 | 9 | | + * |Shift | F9 | F10 | F11 | F12 | || . | , | 7 | 8 | 9 |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| 0 | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI |Reset |LLower|Space ||Space |RLower|Reset | 0 | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_NEUTRAL] = LAYOUT_ortho_4x12( \ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_PPLS, KC_PMNS, KC_P1, KC_P2, KC_P3, _______, \ _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_PAST, KC_PSLS, KC_P4, KC_P5, KC_P6, _______, \ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PDOT, KC_COMM, KC_P7, KC_P8, KC_P9, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, _______, _______ \ + _______, _______, _______, RESET, _______, _______, _______, _______, RESET, KC_P0, _______, _______ \ ) }; -void DualKeyPressed ( bool brother_state, uint8_t target ){ - if( brother_state ) return; +/**** Raise Layer functions *****/ + + /* RaisePressed function */ + /* called RaiseSwitch */ +void RaisePressed ( keyevent_t *event, bool brother_state ){ + + if( brother_state ) { return; } + + layer_on( _RAISE ); + update_tri_layer( _LOWER, _RAISE, _NEUTRAL ); + return; + +} + + + /* RaiseReleased function */ + /* called RaiseSwitch */ +void RaiseReleased ( bool brother_state ){ + + if( brother_state ) { return; } - layer_on( target ); + layer_off( _RAISE ); + update_tri_layer( _LOWER, _RAISE, _NEUTRAL ); return; } -void DualKeyReleased ( bool brother_state, uint8_t target1 ){ - if( brother_state ) return ; + /* RaiseSwitch function */ + /* called process_record_user */ +bool RaiseSwitch ( keyrecord_t *record, bool *key_state, bool brother ){ + + if( record -> event.pressed ) { + *key_state = true; + RaisePressed( &(record -> event), brother ); + } else { + *key_state = false; + RaiseReleased( brother ); + } + return false; + +} + + - layer_off( target1 ); + + + +/**** Lower layer functions ****/ + + /* LowerPressed function */ + /* call from LowerSwitch */ +void LowerPressed ( bool brother_state ){ + + if( brother_state ) { return; } + + layer_on( _LOWER ); + update_tri_layer(_LOWER, _RAISE, _NEUTRAL ); + return; +} + + /* LowerReleased function */ + /* call from LowerSwitch */ +void LowerReleased ( bool brother_state ){ + + if( brother_state ) { return; } + + layer_off( _LOWER ); + update_tri_layer(_LOWER, _RAISE, _NEUTRAL ); return ; } -bool LayerSwitch ( keyrecord_t *record, bool *key_state, bool brother, uint8_t layer ){ + /* LowerSwitch function */ + /* call from process_record_user */ +bool LowerSwitch ( keyrecord_t *record, bool *key_state, bool brother ){ if ( record -> event.pressed ) { *key_state = true; - DualKeyPressed( brother, layer ); - } - else { + LowerPressed( brother ); + } else { *key_state = false; - DualKeyReleased( brother, layer ); + LowerReleased( brother ); } - update_tri_layer(_LOWER, _RAISE, _NEUTRAL ); return false; - } + + +/**** process_record_user ****/ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool l_lower = false; @@ -155,11 +214,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case L_LOWER : return LayerSwitch( record, &l_lower, r_lower, _LOWER ); break; - case R_LOWER : return LayerSwitch( record, &r_lower, l_lower, _LOWER ); break; - case L_RAISE : return LayerSwitch( record, &l_raise, r_raise, _RAISE ); break; - case R_RAISE : return LayerSwitch( record, &r_raise, l_raise, _RAISE ); break; + case L_LOWER : return LowerSwitch( record, &l_lower, r_lower ); break; + case R_LOWER : return LowerSwitch( record, &r_lower, l_lower ); break; + case L_RAISE : return RaiseSwitch( record, &l_raise, r_raise ); break; + case R_RAISE : return RaiseSwitch( record, &r_raise, l_raise ); break; + + default: break; } return true; } + + + From 3305df8e79e02fb785650e9720923ea11e6bcf09 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 3 Mar 2019 15:29:29 -0800 Subject: [PATCH 257/445] Add LED Matrix to Features list for easy reference (#5280) --- docs/_summary.md | 1 + docs/features.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/_summary.md b/docs/_summary.md index 09ea9e6e7967..35936df00d13 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -60,6 +60,7 @@ * [Key Lock](feature_key_lock.md) * [Layouts](feature_layouts.md) * [Leader Key](feature_leader_key.md) + * [LED Matrix](feature_led_matrix.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) diff --git a/docs/features.md b/docs/features.md index 9030500a2bb1..014d6ef107bd 100644 --- a/docs/features.md +++ b/docs/features.md @@ -17,6 +17,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. * [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout. * [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior. +* [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB). * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it. From 043ef40b92deee76a048612e82436c1b25f03433 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sun, 3 Mar 2019 18:31:12 -0500 Subject: [PATCH 258/445] [Keymap] Add RGB config and controls to userspace (#5299) * Add INSERT and EEP_RST to HS60 keymap * Add INSERT to keymap * Layer based RGB colors * Move RGB code to layer_rgb.c * New file with layer based RGB colors * Use RGB code if RGBLIGHT is enabled * Set RGB options in config.h * Remove rgb enable from init user --- users/stanrc85/config.h | 5 +++++ users/stanrc85/layer_rgb.c | 26 ++++++++++++++++++++++++++ users/stanrc85/rules.mk | 5 +++++ 3 files changed, 36 insertions(+) create mode 100644 users/stanrc85/layer_rgb.c diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index 904a7f524e16..14284435bef7 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h @@ -2,3 +2,8 @@ #define TAPPING_TERM 200 #define RETRO_TAPPING + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_LIMIT_VAL 175 + #define RGBLIGHT_SLEEP +#endif diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c new file mode 100644 index 000000000000..ac5d18122433 --- /dev/null +++ b/users/stanrc85/layer_rgb.c @@ -0,0 +1,26 @@ +#include "stanrc85.h" + +void matrix_init_user(void) { + rgblight_setrgb(0xFF, 0x00, 0x00); +}; + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case 0: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case 1: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + case 2: + rgblight_setrgb (0x00, 0x00, 0xFF); + break; + case 3: + rgblight_setrgb (0xFF, 0xFF, 0xFF); + break; + default: // for any other layers, or the default layer + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + } + return state; +} diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 19ad624758a3..c94dca0b7cf0 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -7,3 +7,8 @@ MOUSEKEY_ENABLE = no AUDIO_ENABLE = no CONSOLE_ENABLE = no NKRO_ENABLE = no + +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + # Include my fancy rgb functions source here + SRC += layer_rgb.c +endif From 7bfe0879bfa21c041ba256826158d5d03c8bcfe4 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 4 Mar 2019 14:28:33 +0000 Subject: [PATCH 259/445] Separate keymaps to VIA enabled/dissabled. (#5302) * Separate keymaps to VIA enabled/dissabled. - Default rules.mk has been changed to disable via. - VIA keymaps have been added for default keymaps. * Update naming --- keyboards/hs60/v2/keymaps/ansi/readme.md | 6 +- keyboards/hs60/v2/keymaps/ansi_via/config.h | 23 +++++++ keyboards/hs60/v2/keymaps/ansi_via/keymap.c | 60 +++++++++++++++++ keyboards/hs60/v2/keymaps/ansi_via/readme.md | 6 ++ keyboards/hs60/v2/keymaps/ansi_via/rules.mk | 66 +++++++++++++++++++ keyboards/hs60/v2/keymaps/default/readme.md | 4 +- .../hs60/v2/keymaps/default_via/keymap.c | 60 +++++++++++++++++ .../hs60/v2/keymaps/default_via/readme.md | 6 ++ .../hs60/v2/keymaps/default_via/rules.mk | 66 +++++++++++++++++++ keyboards/hs60/v2/keymaps/hhkb/readme.md | 4 +- keyboards/hs60/v2/keymaps/hhkb_via/config.h | 34 ++++++++++ keyboards/hs60/v2/keymaps/hhkb_via/keymap.c | 60 +++++++++++++++++ keyboards/hs60/v2/keymaps/hhkb_via/readme.md | 6 ++ keyboards/hs60/v2/keymaps/hhkb_via/rules.mk | 66 +++++++++++++++++++ keyboards/hs60/v2/keymaps/iso_andys8/rules.mk | 66 +++++++++++++++++++ keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 66 +++++++++++++++++++ .../hs60/v2/keymaps/win_osx_dual/rules.mk | 65 ++++++++++++++++++ 17 files changed, 657 insertions(+), 7 deletions(-) create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/config.h create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/readme.md create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/default_via/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/default_via/readme.md create mode 100644 keyboards/hs60/v2/keymaps/default_via/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/config.h create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/readme.md create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/iso_andys8/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/rules.mk diff --git a/keyboards/hs60/v2/keymaps/ansi/readme.md b/keyboards/hs60/v2/keymaps/ansi/readme.md index 650871a5e689..3afd8afb33d6 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 V2 -=================================== +The default keymap for ANSI HS60 V2. VIA support disabled. +========================================================== ![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 +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/ansi_via/config.h b/keyboards/hs60/v2/keymaps/ansi_via/config.h new file mode 100644 index 000000000000..96adaf56884e --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* Include overwrites for specific keymap */ + +#define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 diff --git a/keyboards/hs60/v2/keymaps/ansi_via/keymap.c b/keyboards/hs60/v2/keymaps/ansi_via/keymap.c new file mode 100644 index 000000000000..ba649470b41d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi( /* FN */ + 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) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/ansi_via/readme.md b/keyboards/hs60/v2/keymaps/ansi_via/readme.md new file mode 100644 index 000000000000..a462da6619ed --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for ANSI HS60 V2. VIA support enabled. +========================================================= + +![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/ansi_via/rules.mk b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk new file mode 100644 index 000000000000..a2850a83057d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk @@ -0,0 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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/keymaps/default/readme.md b/keyboards/hs60/v2/keymaps/default/readme.md index f0b29900e6bf..9aa0a3a2b5a2 100644 --- a/keyboards/hs60/v2/keymaps/default/readme.md +++ b/keyboards/hs60/v2/keymaps/default/readme.md @@ -1,5 +1,5 @@ -The default keymap for ISO HS60 V2 -================================== +The default keymap for ISO HS60 V2. VIA support disabled. +========================================================= ![Layout image](https://imgur.com/6go4vQV.png) diff --git a/keyboards/hs60/v2/keymaps/default_via/keymap.c b/keyboards/hs60/v2/keymaps/default_via/keymap.c new file mode 100644 index 000000000000..c1e575769fea --- /dev/null +++ b/keyboards/hs60/v2/keymaps/default_via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \ + KC_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso( /* FN */ + 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, 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) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/default_via/readme.md b/keyboards/hs60/v2/keymaps/default_via/readme.md new file mode 100644 index 000000000000..2a440f708c1f --- /dev/null +++ b/keyboards/hs60/v2/keymaps/default_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO HS60 V2. VIA support enabled. +======================================================== + +![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/default_via/rules.mk b/keyboards/hs60/v2/keymaps/default_via/rules.mk new file mode 100644 index 000000000000..a2850a83057d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/default_via/rules.mk @@ -0,0 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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/keymaps/hhkb/readme.md b/keyboards/hs60/v2/keymaps/hhkb/readme.md index 69b812c60724..5259a584d201 100644 --- a/keyboards/hs60/v2/keymaps/hhkb/readme.md +++ b/keyboards/hs60/v2/keymaps/hhkb/readme.md @@ -1,5 +1,5 @@ -The default keymap for HHKB HS60 V2 -=================================== +The default keymap for HHKB HS60 V2. VIA support disabled. +========================================================== ![Layout image](https://imgur.com/usbrQWL.png) diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/config.h b/keyboards/hs60/v2/keymaps/hhkb_via/config.h new file mode 100644 index 000000000000..fc1b6d8f47bb --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* 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_via/keymap.c b/keyboards/hs60/v2/keymaps/hhkb_via/keymap.c new file mode 100644 index 000000000000..9641eedb4929 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the HHKB version of the PCB + +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 ), + +[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, 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) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/readme.md b/keyboards/hs60/v2/keymaps/hhkb_via/readme.md new file mode 100644 index 000000000000..ea9803cc0bbb --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for HHKB HS60 V2. VIA support enabled. +========================================================= + +![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/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk new file mode 100644 index 000000000000..a2850a83057d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk @@ -0,0 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk new file mode 100644 index 000000000000..a2850a83057d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk @@ -0,0 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk new file mode 100644 index 000000000000..a2850a83057d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -0,0 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk index cca15190a5b1..c89d90969572 100644 --- a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk @@ -1 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BOOTMAGIC_ENABLE = yes # 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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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 From cdfcbfc92dba8198847e26056d8135a5feb0b5ec Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 4 Mar 2019 14:29:29 +0000 Subject: [PATCH 260/445] Fix aanzee Configurator config file (#5286) --- keyboards/westfoxtrot/aanzee/info.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/westfoxtrot/aanzee/info.json b/keyboards/westfoxtrot/aanzee/info.json index d6734d620b42..96d0c1c36c32 100644 --- a/keyboards/westfoxtrot/aanzee/info.json +++ b/keyboards/westfoxtrot/aanzee/info.json @@ -12,7 +12,6 @@ "LAYOUT_iso": { "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":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"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}, {"x":12.75, "y":2}, {"label":"PgDn", "x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"Fn", "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, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - }, + } } } -} From c7c4937eef9cb34b73e765390b842282ad9f0544 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Tue, 5 Mar 2019 01:44:46 +1000 Subject: [PATCH 261/445] Clean up debounce a bit (#5255) --- common_features.mk | 14 ++------- docs/config_options.md | 4 +-- docs/feature_debounce_type.md | 31 +++++++------------ docs/getting_started_make_guide.md | 4 +-- .../{debounce_eager_pk.c => eager_pk.c} | 0 quantum/debounce/readme.md | 18 +++++------ .../debounce/{debounce_sym_g.c => sym_g.c} | 0 show_options.mk | 2 +- 8 files changed, 29 insertions(+), 44 deletions(-) rename quantum/debounce/{debounce_eager_pk.c => eager_pk.c} (100%) rename quantum/debounce/{debounce_sym_g.c => sym_g.c} (100%) diff --git a/common_features.mk b/common_features.mk index f5bef3d5dd68..20c38ae82e50 100644 --- a/common_features.mk +++ b/common_features.mk @@ -298,19 +298,11 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce -# Debounce Modules. If implemented in matrix.c, don't use these. +# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually. DEBOUNCE_TYPE?= sym_g -VALID_DEBOUNCE_TYPES := sym_g eager_pk custom -ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),) - $(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm) +ifneq ($(strip $(DEBOUNCE_TYPE)), custom) + QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif -ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) - QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c -else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) - QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c -endif - - ifeq ($(strip $(SPLIT_KEYBOARD)), yes) OPT_DEFS += -DSPLIT_KEYBOARD diff --git a/docs/config_options.md b/docs/config_options.md index 8fa6e944f067..336feee8fd80 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -307,8 +307,8 @@ Use these to enable or disable building certain features. The more you have enab * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common * `CUSTOM_MATRIX` * Allows replacing the standard matrix scanning routine with a custom one. -* `CUSTOM_DEBOUNCE` - * Allows replacing the standard key debouncing routine with a custom one. +* `DEBOUNCE_TYPE` + * Allows replacing the standard key debouncing routine with an alternative or custom one. * `WAIT_FOR_USB` * Forces the keyboard to wait for a USB connection to be established before it starts up * `NO_USB_STARTUP_CHECK` diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md index 82b3d7de1237..5d4343f08b9b 100644 --- a/docs/feature_debounce_type.md +++ b/docs/feature_debounce_type.md @@ -2,45 +2,38 @@ QMK supports multiple debounce algorithms through its debounce API. -The underlying debounce algorithm is determined by which matrix.c file you are using. - The logic for which debounce method called is below. It checks various defines that you have set in rules.mk ``` +DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce DEBOUNCE_TYPE?= sym_g -VALID_DEBOUNCE_TYPES := sym_g eager_pk custom -ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),) - $(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm) -endif -ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) - QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c -else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) - QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c +ifneq ($(strip $(DEBOUNCE_TYPE)), custom) + QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif ``` # Debounce selection -| DEBOUNCE_ALGO | Description | What to do | -| ------------- | --------------------------------------------------- | ----------------------------- | -| Not defined | You are using the included matrix.c and debounce.c | Nothing. Debounce_sym_g will be compiled, and used if necessary | -| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | -| sym_g / eager_pk | You are using the included matrix.c and debounce.c | Use an alternative debounce algorithm | +| DEBOUNCE_TYPE | Description | What else is needed | +| ------------- | --------------------------------------------------- | ----------------------------- | +| Not defined | Use the default algorithm, currently sym_g | Nothing | +| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | +| anything_else | Use another algorithm from quantum/debounce/* | Nothing | -**Regarding split keyboards**: +**Regarding split keyboards**: The debounce code is compatible with split keyboards. # Use your own debouncing code * Set ```DEBOUNCE_TYPE = custom ```. * Add ```SRC += debounce.c``` -* Add your own ```debounce.c```. Look at included ```debounce_sym_g.c```s for sample implementations. +* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples. * Debouncing occurs after every raw matrix scan. * Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly. # Changing between included debouncing methods You can either use your own code, by including your own debounce.c, or switch to another included one. Included debounce methods are: -* debounce_eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key -* debounce_sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed. +* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key +* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index bb7e1e7e3b6f..75eafd42ccca 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -143,9 +143,9 @@ As there is no standard split communication driver for ARM-based split keyboards Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan(). -`CUSTOM_DEBOUNCE` +`DEBOUNCE_TYPE` -Lets you replace the default key debouncing routine with your own code. You will need to provide your own implementation of debounce(). +Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation. ## Customizing Makefile Options on a Per-Keymap Basis diff --git a/quantum/debounce/debounce_eager_pk.c b/quantum/debounce/eager_pk.c similarity index 100% rename from quantum/debounce/debounce_eager_pk.c rename to quantum/debounce/eager_pk.c diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md index 1a77d44df53a..5b318d845e91 100644 --- a/quantum/debounce/readme.md +++ b/quantum/debounce/readme.md @@ -6,10 +6,10 @@ Here are a few ideas * Per key - one timer per key * Per row - one timer per row -2) Eager vs symmetric vs assymetric +2) Eager vs symmetric vs asymmetric * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. * Symmetric - wait for no changes for DEBOUNCE ms before reporting change - * Assymetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. + * Asymmetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. 3) Timestamp vs cycles * old old old code waits n cycles, decreasing count by one each matrix_scan @@ -19,10 +19,10 @@ Here are a few ideas The default algorithm is symmetric and global. Here are a few that could be implemented: -debounce_sym_g.c -debounce_sym_pk.c -debounce_sym_pr.c -debounce_sym_pr_cycles.c //currently used in ergo-dox -debounce_eager_g.c -debounce_eager_pk.c -debounce_eager_pr.c //could be used in ergo-dox! +sym_g.c +sym_pk.c +sym_pr.c +sym_pr_cycles.c //currently used in ergo-dox +eager_g.c +eager_pk.c +eager_pr.c //could be used in ergo-dox! diff --git a/quantum/debounce/debounce_sym_g.c b/quantum/debounce/sym_g.c similarity index 100% rename from quantum/debounce/debounce_sym_g.c rename to quantum/debounce/sym_g.c diff --git a/show_options.mk b/show_options.mk index e72dd75cfaab..c72059118f78 100644 --- a/show_options.mk +++ b/show_options.mk @@ -7,7 +7,7 @@ BUILD_OPTION_NAMES = \ NKRO_ENABLE \ TERMINAL_ENABLE \ CUSTOM_MATRIX \ - CUSTOM_DEBOUNCE \ + DEBOUNCE_TYPE \ SPLIT_KEYBOARD \ DYNAMIC_KEYMAP_ENABLE \ USB_HID_ENABLE From 3e8ee96b2cf7187ab6923a844627bc37b4de9b81 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 4 Mar 2019 16:34:08 +0000 Subject: [PATCH 262/445] Fixed default to dissable VIA (#5309) This should have gone into previous PR but I am dumb --- keyboards/hs60/v2/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index a2850a83057d..5659d28c9ff1 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk @@ -61,6 +61,6 @@ 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 +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no CIE1931_CURVE = yes From a903893883c4827daca73e6e170276e4e586f6e0 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 4 Mar 2019 10:09:37 -0800 Subject: [PATCH 263/445] Dactyl Manuform 5x6, 5x7, and 6x6: QMK Configurator fixes and partial code clean-up (#5307) * Tidy up 5x6.h - replaced tabs with spaces (QMK convention) - aligned layout macro visually * Fix Configurator support for Dactyl Manuform 5x6 - layout macro had the wrong name in info.json * Tidy up 5x7.h - replaced tabs with spaces (QMK convention) - aligned layout macro visually * Fix Configurator support for Dactyl Manuform 5x7 - corrected keyboard height - layout macro had the wrong name in info.json * Tidy up 6x6.h - replaced tabs with spaces (QMK convention) - aligned layout macro visually * Fix Configurator support for Dactyl Manuform 6x6 - layout macro had the wrong name in info.json --- keyboards/handwired/dactyl_manuform/5x6/5x6.h | 54 ++++++++------- .../handwired/dactyl_manuform/5x6/info.json | 2 +- keyboards/handwired/dactyl_manuform/5x7/5x7.h | 66 +++++++++---------- .../handwired/dactyl_manuform/5x7/info.json | 4 +- keyboards/handwired/dactyl_manuform/6x6/6x6.h | 60 ++++++++--------- .../handwired/dactyl_manuform/6x6/info.json | 2 +- 6 files changed, 92 insertions(+), 96 deletions(-) diff --git a/keyboards/handwired/dactyl_manuform/5x6/5x6.h b/keyboards/handwired/dactyl_manuform/5x6/5x6.h index 72045cc29189..5292ca0972ee 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/5x6.h +++ b/keyboards/handwired/dactyl_manuform/5x6/5x6.h @@ -6,35 +6,33 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_5x6(\ - 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, \ - L42, L43, R42, R43, \ - L44, L45, R40, R41, \ - L54, L55, R50, R51, \ - L52, L53, R52, R53 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { KC_NO, KC_NO, L42, L43, L44, L45 }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ -\ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, KC_NO, KC_NO },\ - { R50, R51, R52, R53, KC_NO, KC_NO }, \ - } - - + 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, \ + L42, L43, R42, R43, \ + L44, L45, R40, R41, \ + L54, L55, R50, R51, \ + L52, L53, R52, R53 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, L42, L43, L44, L45 }, \ + { KC_NO, KC_NO, L52, L53, L54, L55 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, KC_NO, KC_NO }, \ + { R50, R51, R52, R53, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x6/info.json b/keyboards/handwired/dactyl_manuform/5x6/info.json index d7aa3acee399..14afc704cd2e 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/info.json +++ b/keyboards/handwired/dactyl_manuform/5x6/info.json @@ -5,7 +5,7 @@ "width": 17, "height": 8, "layouts": { - "LAYOUT": { + "LAYOUT_5x6": { "layout": [ {"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, diff --git a/keyboards/handwired/dactyl_manuform/5x7/5x7.h b/keyboards/handwired/dactyl_manuform/5x7/5x7.h index 95fd5bb10244..88b68b31e660 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/5x7.h +++ b/keyboards/handwired/dactyl_manuform/5x7/5x7.h @@ -6,40 +6,40 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_5x7( \ - L11, L12, L13, L14, L15, L16, L17, \ - L21, L22, L23, L24, L25, L26, L27, \ - L31, L32, L33, L34, L35, L36, L37, \ - L41, L42, L43, L44, L45, L46, \ - L51, L52, L53, L54, \ - L55, L56, \ - L65, L66, \ - L63, L64, \ - R11, R12, R13, R14, R15, R16, R17, \ - R21, R22, R23, R24, R25, R26, R27, \ - R31, R32, R33, R34, R35, R36, R37, \ - R42, R43, R44, R45, R46, R47, \ - R54, R55, R56, R57, \ - R52, R53, \ - R62, R63, \ - R64, R65 \ - ) \ - { \ - { L11, L12, L13, L14, L15, L16, L17 }, \ - { L21, L22, L23, L24, L25, L26, L27 }, \ - { L31, L32, L33, L34, L35, L36, L37 }, \ - { L41, L42, L43, L44, L45, L46, KC_NO }, \ - { L51, L52, L53, L54, L55, L56, KC_NO }, \ - { KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \ - { R11, R12, R13, R14, R15, R16, R17 }, \ - { R21, R22, R23, R24, R25, R26, R27 }, \ - { R31, R32, R33, R34, R35, R36, R37 }, \ - { KC_NO, R42, R43, R44, R45, R46, R47 }, \ - { KC_NO, R52, R53, R54, R55, R56, R57 }, \ - { KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \ - } + L11, L12, L13, L14, L15, L16, L17, \ + L21, L22, L23, L24, L25, L26, L27, \ + L31, L32, L33, L34, L35, L36, L37, \ + L41, L42, L43, L44, L45, L46, \ + L51, L52, L53, L54, \ + L55, L56, \ + L65, L66, \ + L63, L64, \ + R11, R12, R13, R14, R15, R16, R17, \ + R21, R22, R23, R24, R25, R26, R27, \ + R31, R32, R33, R34, R35, R36, R37, \ + R42, R43, R44, R45, R46, R47, \ + R54, R55, R56, R57, \ + R52, R53, \ + R62, R63, \ + R64, R65 \ + ) \ + { \ + { L11, L12, L13, L14, L15, L16, L17 }, \ + { L21, L22, L23, L24, L25, L26, L27 }, \ + { L31, L32, L33, L34, L35, L36, L37 }, \ + { L41, L42, L43, L44, L45, L46, KC_NO }, \ + { L51, L52, L53, L54, L55, L56, KC_NO }, \ + { KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \ + { R11, R12, R13, R14, R15, R16, R17 }, \ + { R21, R22, R23, R24, R25, R26, R27 }, \ + { R31, R32, R33, R34, R35, R36, R37 }, \ + { KC_NO, R42, R43, R44, R45, R46, R47 }, \ + { KC_NO, R52, R53, R54, R55, R56, R57 }, \ + { KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x7/info.json b/keyboards/handwired/dactyl_manuform/5x7/info.json index b4b2c7b797f9..33ba1b0e796b 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/info.json +++ b/keyboards/handwired/dactyl_manuform/5x7/info.json @@ -3,9 +3,9 @@ "url": "", "maintainer": "qmk", "width": 17, - "height": 16, + "height": 8, "layouts": { - "LAYOUT": { + "LAYOUT_5x7": { "layout": [ {"label":"L11", "x":0, "y":0}, {"label":"L12", "x":1, "y":0}, diff --git a/keyboards/handwired/dactyl_manuform/6x6/6x6.h b/keyboards/handwired/dactyl_manuform/6x6/6x6.h index c2980b3d318c..039e6b40dfb0 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/6x6.h +++ b/keyboards/handwired/dactyl_manuform/6x6/6x6.h @@ -7,38 +7,36 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_6x6(\ - 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, \ - L52, L53, R52, R53, \ - L54, L55, R50, R51, \ - L64, L65, R60, R61, \ - L62, L63, R62, R63 \ - ) \ - { \ - { 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 }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ - { KC_NO, KC_NO, L62, L63, L64, L65 }, \ -\ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, R44, R45 }, \ - { R50, R51, R52, R53, KC_NO, KC_NO },\ - { R60, R61, R62, R63, KC_NO, KC_NO }, \ - } - - + 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, \ + L52, L53, R52, R53, \ + L54, L55, R50, R51, \ + L64, L65, R60, R61, \ + L62, L63, R62, R63 \ + ) \ + { \ + { 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 }, \ + { KC_NO, KC_NO, L52, L53, L54, L55 }, \ + { KC_NO, KC_NO, L62, L63, L64, L65 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, KC_NO, KC_NO }, \ + { R60, R61, R62, R63, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/6x6/info.json b/keyboards/handwired/dactyl_manuform/6x6/info.json index 2ae91d4694bd..e617b39a82db 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/info.json +++ b/keyboards/handwired/dactyl_manuform/6x6/info.json @@ -5,7 +5,7 @@ "width": 17, "height": 9, "layouts": { - "LAYOUT": { + "LAYOUT_6x6": { "layout": [ {"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, From a8a9a2066e28895c65ed50fa0e76bc0ed70abbfd Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 4 Mar 2019 20:19:05 -0800 Subject: [PATCH 264/445] Correct keyboard and layout dimensions for 40percent.club Foobar (#5310) --- keyboards/40percentclub/foobar/info.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/40percentclub/foobar/info.json b/keyboards/40percentclub/foobar/info.json index cb7f29b25613..6d722ae6ee86 100644 --- a/keyboards/40percentclub/foobar/info.json +++ b/keyboards/40percentclub/foobar/info.json @@ -2,10 +2,12 @@ "keyboard_name": "foobar", "url": "", "maintainer": "qmk", - "width": 6, - "height": 2, + "width": 10, + "height": 3, "layouts": { "LAYOUT_macro": { + "width": 5, + "height": 3, "key_count": 15, "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, From 4c62c7bd6ed41966467985bc22b6b07350ff3991 Mon Sep 17 00:00:00 2001 From: lf Date: Tue, 5 Mar 2019 00:08:09 -0600 Subject: [PATCH 265/445] [Docs] Fix function signature (layer_state_set_*) (#5313) `void uint32_t` is not a return type. --- docs/custom_quantum_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index cc84e141f928..f291fc2d2141 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -321,7 +321,7 @@ uint32_t layer_state_set_user(uint32_t state) { ``` ### `layer_state_set_*` Function Documentation -* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)` +* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)` * Keymap: `uint32_t layer_state_set_user(uint32_t state)` The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status) From 69d6298f6ba4140dc7b3cec9da141ba9e533a367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Tue, 5 Mar 2019 12:28:35 -0300 Subject: [PATCH 266/445] Add DZ60 Tsangan Layout + Fn layer (#5319) * Fix Mac mute keycode * Add DZ60 Tsangan layout with Fn layer * Add new line at end of the file --- keyboards/dz60/keymaps/edulpn/README.md | 10 ++++++++++ keyboards/dz60/keymaps/edulpn/keymap.c | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 keyboards/dz60/keymaps/edulpn/README.md create mode 100644 keyboards/dz60/keymaps/edulpn/keymap.c diff --git a/keyboards/dz60/keymaps/edulpn/README.md b/keyboards/dz60/keymaps/edulpn/README.md new file mode 100644 index 000000000000..221be722b1b2 --- /dev/null +++ b/keyboards/dz60/keymaps/edulpn/README.md @@ -0,0 +1,10 @@ +# Edulpn Tsangan Keymap for the DZ60 PCB + +## Additional Notes +Tsangan 60% Keymap for DZ60 + Fn layer. + +### Layout +![Edulpn Tsangan Keymap for the DZ60](https://i.imgur.com/z7HHeH7.png) + +## Build +To build the default keymap, simply run `make dz60:edulpn`. diff --git a/keyboards/dz60/keymaps/edulpn/keymap.c b/keyboards/dz60/keymaps/edulpn/keymap.c new file mode 100644 index 000000000000..74d7ca4f21d3 --- /dev/null +++ b/keyboards/dz60/keymaps/edulpn/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + 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_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_60_tsangan_hhkb( + 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_TRNS, RESET, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_DEL, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, 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_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; From 8c2a23dee16077b5906ea090cd6fac268d0079f2 Mon Sep 17 00:00:00 2001 From: Mitchel van Eijgen Date: Tue, 5 Mar 2019 16:31:54 +0100 Subject: [PATCH 267/445] Add more "decent" text editors (#5308) I'm a web designer and know there are several "decent" code editors out there, but I would figure not everyone into keyboards is, so I found Sublime text a bit of a hard sell for someone who just need to manipulate some text files. VS Code or Atom would b a much better suit for them instead of dropping $80 on a "decent" text editor. --- docs/hand_wire.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 697a50805211..d2cba770e27f 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -196,7 +196,7 @@ If you're more of a visual learner, or want some additional tips and something m From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. -To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). +To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: From dbfbe0d7f0d829fdebb3be5dff1c1dcc4b677568 Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Tue, 5 Mar 2019 15:22:51 -0500 Subject: [PATCH 268/445] Adopted LAYOUT, added some keys (#5320) * Add HOME/END keys as upper/lower on arrow-up/down * Reduce .hex file size by turning off unneeded options * Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand * Latest super latest version merge * cbbrowne keymap for XD75re * starting notes on XD75re keymap plans * First draft of bottom row of QWERTY * Switch my special bottom line over to QCENT * Dunno * Filling in wanted keys, bit by bit... * Add copyright, extra macro * Clean up comments, remove some experimental code I didn't like * TODO plans for xd75re * clean up keyboard layout * QCENT2 is my new experiment for the main keyboard... * Add a few more main layer keys, and modify LOWER to shift things outwards to conform with main layer * Clean up RAISE layer to conform with main layer, remove QCENT layer as QCENT2 is the new thing * More xd75 changes, now that I actually have it in hand * shift keymap around, as original attempt was a bit too aggressive in keeping to the edges * more revs to XD75 * Dropping parts of the centre keypad in favor of Keys I Really Need * Improve documentation to conform with how builds are done now * Improve documentation to conform with how builds are done now * Add cbbrowne rules file as alternative to having the rules in Makefile * Makefile not needed anymore for individual keymap * Some revs to my keymapping * Add {} * Add PGUP/PGDN * Shifted some middle-range keys around * Needed Tilde, Backquote, and to shift RESET onto FUNCTION layer * Wanted ~ * cbbrowne hasn't anything to do with hadron keymaps * trim unneeded bits * I prefer OrgMode for my notes * Have a right-alt * Layer keys make LED colors change * Add sample user rules for cbbrowne * Add source of xd75 rules * Individualized xd75 rules * Adopt LAYOUT to genericize the layout as an ortholinear 5x15 keyboard --- keyboards/hadron/ver2/keymaps/readme.md | 1 - .../cbbrowne/{readme.md => readme.org} | 63 ++++---- keyboards/xd75/keymaps/cbbrowne/keymap.c | 141 ++++++++++-------- keyboards/xd75/keymaps/cbbrowne/rules.mk | 24 +++ users/cbbrowne/cbbrowne.c | 0 users/cbbrowne/cbbrowne.h | 39 +++++ users/cbbrowne/rules.mk | 1 + 7 files changed, 173 insertions(+), 96 deletions(-) rename keyboards/planck/keymaps/cbbrowne/{readme.md => readme.org} (70%) create mode 100644 keyboards/xd75/keymaps/cbbrowne/rules.mk create mode 100644 users/cbbrowne/cbbrowne.c create mode 100644 users/cbbrowne/cbbrowne.h create mode 100644 users/cbbrowne/rules.mk diff --git a/keyboards/hadron/ver2/keymaps/readme.md b/keyboards/hadron/ver2/keymaps/readme.md index 54fb5f6d9e07..2f7641d185f5 100644 --- a/keyboards/hadron/ver2/keymaps/readme.md +++ b/keyboards/hadron/ver2/keymaps/readme.md @@ -20,4 +20,3 @@ When adding your keymap to this list, keep it organised alphabetically (select l # List of Planck keymaps * **default** default Planck layout -* **cbbrowne** cbbrowne's Planck layout \ No newline at end of file diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.org similarity index 70% rename from keyboards/planck/keymaps/cbbrowne/readme.md rename to keyboards/planck/keymaps/cbbrowne/readme.org index e55b130efffc..2b1005858439 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.org @@ -1,20 +1,18 @@ -cbbrowne custom keyboard -============================== +* cbbrowne custom keyboard -Due to cbbrowne@acm.org -Christopher Browne + Due to cbbrowne@acm.org + Christopher Browne -This was originally based on the default keyboard map, but I have been -doing sundry experimentation: + This was originally based on the default keyboard map, but I have + been doing sundry experimentation: -1. Useful Experiments ----------------------------------------- +** Useful Experiments - * It made sense to mess around some with keyboard maps. + - It made sense to mess around some with keyboard maps. - I added a keypad, originally based on keymaps/numpad.c, but mighty substantially revised, as that one seems to be rotated 90 degrees from usual conventions for number pads - * The keypad layer also includes some sample "hacks" of cool things, + - The keypad layer also includes some sample "hacks" of cool things, all using actions attached in using the function action_get_macro() - Key [1][2] aka "q" types out my name, cbbrowne, as a fun example of a key generating a bunch of keystrokes. The keystroke is @@ -24,7 +22,7 @@ doing sundry experimentation: - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number - * Trying out sgoodwin's "hold Enter down to get Shift" + - Trying out sgoodwin's "hold Enter down to get Shift" - Liking this Quite Well Enough... - Applied this to both Shift and Quote - It seems likely that Alt should get a right-hand-side, akin to this... @@ -33,11 +31,11 @@ doing sundry experimentation: - Emacs likes this!!! :-) - I'm suspicious that I'll want to shift ROT_LED another location over, so some modifier can replace the OS/KC_LGUI key - * I have added an alternate ADJUST layer that is activated via update_tri_layer() + - I have added an alternate ADJUST layer that is activated via update_tri_layer() - e.g. - LOWER+RAISE simultaneously - This seems entirely more useful for handling my "special keys" like the random numbers, user name, and such, than the keypad layer - * The _ADJUST layer provides a good place to have RESET + - The _ADJUST layer provides a good place to have RESET - But this isn't strictly enough; I want RESET somewhat accessible from main layer lest an error hide that layer - I never use the OS/KC_LGUI key (that's Command on MacOS, Windows @@ -45,8 +43,7 @@ doing sundry experimentation: some sort -2. Some code structure ideas ---------------------------------------------------- +** Some code structure ideas Each layer is given a name to aid in readability, which is then used in the keymap matrix below. The underscores do not denote @@ -65,57 +62,55 @@ doing sundry experimentation: to care (beyond "start at 0", and arguably even that's not needed) about their values. -3. Things I did not like about the default mapping ---------------------------------------------------------- +** Things I did not like about the default mapping - * I found control too hard to get to. I use it more than Tab, so + + - I found control too hard to get to. I use it more than Tab, so switched it there. - * Having dash on [lower-j] is a bit nonintuitive, but may be OK - * I switched ESC/TAB/M(0) around - * I'm suspicious that I want to shift M(0) from [4][1] to [4][2], + - Having dash on [lower-j] is a bit nonintuitive, but may be OK + - I switched ESC/TAB/M(0) around + - I'm suspicious that I want to shift M(0) from [4][1] to [4][2], and shift ESC off the first column so KC_LCTL and KC_LALT can be on the first column. - * I needed to swap ' and ENTER + - I needed to swap ' and ENTER -4. Unuseful experiments ---------------------------------------------------------- +** Unuseful experiments I have tried some things out that didn't turn out particularly well. I'll note some of these for posterity, hopefully helpful in not doing unwise things again... - * I tried added Workman alongside Dvorak and Colemak + - I tried added Workman alongside Dvorak and Colemak - Boy, oh boy, these don't help!!! - I have done 30 years of learning of Emacs key mappings, and these alternative keyboards massively mess me up - * Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I + - Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I just hit SHIFT, I get a left parens. In principle, this is great for Lisping. - Unfortunately, there are times when mouse interfaces use SHIFT to allow selecting multiple items, and this really interferes with that -5. TODO ---------------------------------------------------------- +** TODO - * I use tmux quite a lot; the mollat keymap seems to have some + - I use tmux quite a lot; the mollat keymap seems to have some interesting helpers. It might be interesting to add a "tmux layer," or to have a few keys in a layer oriented towards that - Keys for... - Picking windows 0 thru 8 - next/prev/new window - * The mollat tmux layer also suggests some thoughts about Emacs + - The mollat tmux layer also suggests some thoughts about Emacs helpers. - * I do not presently have anything that handles X11 screen + - I do not presently have anything that handles X11 screen switching, as with Control-Alt-various - * I ought to probably look into KC_LEAD, to have some key combos + - I ought to probably look into KC_LEAD, to have some key combos that do not need to be concurrent - * The jeebak keymap seems to have some neat ideas: + - The jeebak keymap seems to have some neat ideas: - Number layer which is aggressive about having numbers in several places - TouchCursor layer seems interesting - It sets up a layer with cursor keys on the home keys - * The jeremy-dev keymap has some very interesting concepts + - The jeremy-dev keymap has some very interesting concepts - Shift hands outwards; the special keys go in the center - Symbol layer has some compound keys for C operators like /=, *=, -=, +=, ... - This is likely what I'll use for my XD75re, and maybe I'll fork a diff --git a/keyboards/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c index 1bebf2d11f37..b20cafabc99c 100644 --- a/keyboards/xd75/keymaps/cbbrowne/keymap.c +++ b/keyboards/xd75/keymaps/cbbrowne/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 Christopher B Browne * * 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 @@ -62,12 +62,7 @@ enum macro_id { #define FUNCTION MO(_FUNCTION) #define MRAISE MO(_RAISE) #define MLOWER MO(_LOWER) -#define ALTBSP ALT_T(KC_BSPC) - -/* More modifiers for QCENT2... */ -#define PALT MT(KC_RALT, KC_P) -#define SCTL MT(KC_RCTL, KC_SCLN) -#define SSHF MT(KC_RSFT, KC_SLSH) +#define ALTPLUS ALT_T(KC_PLUS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -84,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | * '--------------------------------------------------------------------------------------------------------------------------------------' */ - + /* layout for centred keypad + qwerty... |ESC| 1 | 2 | 3 | 4 | 5 | ? | ? | ? | ? | 6 | 7 | 8 | 9 | 0 | @@ -94,40 +89,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |ALT|LED| | | | | | | | | | | | | | - - keys needing to be assigned: -11 - KC_TAB - tab -52 - ROT_LED - rotate LED +51 - KC_TAB - tab + - ROT_LED - rotate LED 15 - KC_LALT - Left ALT - - KC_LGUI - this is the windows/command key, which I think I do not use... - - M_LOWER - switch to LOWER layer - - KC_SPC - space - - M_UPPER - switch to UPPER layer, maybe unneeded for 15x5 - - KC_LEFT - famous arrows - - KC_DOWN - famous arrows - - KC_UP - famous arrows - - KC_RIGHT - famous arrows - - KC_ENT - enter +53,55 - M_RAISE - switch to RAISE layer +5b - M_LOWER - switch to LOWER layer +56,59,5a - KC_SPC - space +5c - KC_LEFT - famous arrows +5d - KC_DOWN - famous arrows +5e - KC_UP - famous arrows +5f - KC_RIGHT - famous arrows +3f - KC_ENT - enter - KC_GRV - leftwards quote - - KC_QUOT - rightwards quote - - KC_BSPC - backspace - - KC_ESC +4f - KC_QUOT - rightwards quote +1f - KC_BSPC - backspace +11 - KC_ESC +19 - KC_GRV - ` - raised +19 - KC_TILD - ~ - lowered -Missing still... - KC_LBRC and KC_LCBR - KC_RBRC and KC_RCBR + */ - */ +[_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY, with keypad in the centre */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , + KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, ALTPLUS , + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC,KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_EQL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE , + KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC,KC_PGDN, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), - [_QWERTY] = { /* QWERTY, with keypad in the centre */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PLUS }, - { KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, - { KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC, KC_0, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } - }, - /* LOWER * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | @@ -142,13 +132,13 @@ Missing still... * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_LOWER] = { /* LOWERED */ - { ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - { ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS }, - { ___T___, 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, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, +[_LOWER] = LAYOUT_ortho_5x15( /* LOWERED */ + ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_TILD, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , + ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS , + ___T___, 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, _______, _______, _______, _______, _______, ___T___, ___T___, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* RAISED * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. @@ -164,13 +154,13 @@ Missing still... * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_RAISE] = { /* RAISED */ - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ }, - { KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_INS }, - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ }, - { KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, +[_RAISE] = LAYOUT_ortho_5x15 ( /* RAISED */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MVERSION, _______, KC_GRV, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ , + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, USERNAME, _______, KC_7, KC_8, KC_LCBR, KC_RCBR, _______, _______, KC_INS , + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RANDDIG, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ , + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RANDALP, _______, _______, _______, _______, ___T___, ___T___, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* FUNCTION * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. @@ -178,21 +168,21 @@ Missing still... * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX | | WHEEL+ | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS Un | WHEEL- | + * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX | | MOUS U | WHEEL- | * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_FUNCTION] = { /* FUNCTION */ - { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, 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, ___T___, ___T___, KC_MS_U, KC_WH_D }, - { RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, - }, +[_FUNCTION] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, RESET, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR , + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, 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, ___T___, ___T___, KC_MS_U, KC_WH_D , + RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ) }; /* This bit of logic seeds a wee linear congruential random number generator */ @@ -223,8 +213,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case M_VERSION: if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@"); - // SEND_STRING(QMK_VERSION "@" QMK_BUILDDATE); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP); } break; case M_RANDDIGIT: @@ -289,3 +278,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO_NONE; }; + +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(325,255,255); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch(biton32(state)) { + case _QWERTY: + rgblight_sethsv_white(); + break; + case _LOWER: + rgblight_sethsv_blue(); + break; + case _RAISE: + rgblight_sethsv_green(); + break; + case _ADJUST: + rgblight_sethsv_orange(); + break; + case _FUNCTION: + rgblight_sethsv_red(); + break; + default: + rgblight_sethsv(325,255,255); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk new file mode 100644 index 000000000000..0968298a0a7f --- /dev/null +++ b/keyboards/xd75/keymaps/cbbrowne/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 +# +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 = 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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/users/cbbrowne/cbbrowne.c b/users/cbbrowne/cbbrowne.c new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/users/cbbrowne/cbbrowne.h b/users/cbbrowne/cbbrowne.h new file mode 100644 index 000000000000..301636c0533f --- /dev/null +++ b/users/cbbrowne/cbbrowne.h @@ -0,0 +1,39 @@ +#ifndef USERSPACE +#define USERSPACE + +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#include "quantum.h" +#include "config.h" + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#ifndef NO_DEBUG +#define NO_DEBUG +#endif +#ifndef NO_PRINT +#define NO_PRINT +#endif + +/* cbbrowne user configuration */ + +#define randadd 53 +#define randmul 181 +#define randmod 167 + +/* Filler to make layering a bit clearer * + * borrowed from basic keymap */ + +#define _______ KC_TRNS +#define _____ KC_NO + +#define LEADER_TIMEOUT 300 +#ifndef LIGHT_CONFIG_H +#define BACKLIGHT_BREATHING +#endif + +#endif + +#endif diff --git a/users/cbbrowne/rules.mk b/users/cbbrowne/rules.mk new file mode 100644 index 000000000000..497638cdb368 --- /dev/null +++ b/users/cbbrowne/rules.mk @@ -0,0 +1 @@ +SRC += cbbrowne.c From 73d8593352b910d9fba0953b54141875f0689486 Mon Sep 17 00:00:00 2001 From: Marco Monaco Date: Tue, 26 Feb 2019 00:38:21 -0500 Subject: [PATCH 269/445] increase size of note counter variable to avoid overflow --- quantum/audio/audio.c | 2 +- quantum/audio/audio_arm.c | 2 +- quantum/audio/audio_pwm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index 6d6833ec11f1..3da164c736ef 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -141,7 +141,7 @@ uint16_t notes_count; bool notes_repeat; bool note_resting = false; -uint8_t current_note = 0; +uint16_t current_note = 0; uint8_t rest_counter = 0; #ifdef VIBRATO_ENABLE diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index a3a403957045..6760015ef462 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -54,7 +54,7 @@ uint16_t notes_count; bool notes_repeat; bool note_resting = false; -uint8_t current_note = 0; +uint16_t current_note = 0; uint8_t rest_counter = 0; #ifdef VIBRATO_ENABLE diff --git a/quantum/audio/audio_pwm.c b/quantum/audio/audio_pwm.c index ded86edeea9e..ed67136099a8 100644 --- a/quantum/audio/audio_pwm.c +++ b/quantum/audio/audio_pwm.c @@ -94,7 +94,7 @@ bool notes_repeat; float notes_rest; bool note_resting = false; -uint8_t current_note = 0; +uint16_t current_note = 0; uint8_t rest_counter = 0; #ifdef VIBRATO_ENABLE From 2e8e465423a92c97273431f8cf65c7333f2d98e7 Mon Sep 17 00:00:00 2001 From: vxid <16440823+vxid@users.noreply.github.com> Date: Wed, 6 Mar 2019 00:05:32 +0100 Subject: [PATCH 270/445] [Keymap] Add vxid planck layout (#5271) --- keyboards/planck/keymaps/vxid/config.h | 1 + keyboards/planck/keymaps/vxid/keymap.c | 49 +++++++++++++++++++++++++ keyboards/planck/keymaps/vxid/readme.md | 13 +++++++ 3 files changed, 63 insertions(+) create mode 100644 keyboards/planck/keymaps/vxid/config.h create mode 100644 keyboards/planck/keymaps/vxid/keymap.c create mode 100644 keyboards/planck/keymaps/vxid/readme.md diff --git a/keyboards/planck/keymaps/vxid/config.h b/keyboards/planck/keymaps/vxid/config.h new file mode 100644 index 000000000000..6f70f09beec2 --- /dev/null +++ b/keyboards/planck/keymaps/vxid/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/planck/keymaps/vxid/keymap.c b/keyboards/planck/keymaps/vxid/keymap.c new file mode 100644 index 000000000000..51d1daa70a09 --- /dev/null +++ b/keyboards/planck/keymaps/vxid/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_MINS, KC_SPC, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, KC_GRV +), + +[_LOWER] = LAYOUT_planck_grid( + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_ADJUST] = LAYOUT_planck_grid( + RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/vxid/readme.md b/keyboards/planck/keymaps/vxid/readme.md new file mode 100644 index 000000000000..9e0ae33423bb --- /dev/null +++ b/keyboards/planck/keymaps/vxid/readme.md @@ -0,0 +1,13 @@ +# vxid planck layout + +## Layout + +This planck layout aims at proviging most symbols on the base layer while remaining usable. +The minus and space keys become alt and gui modifiers when pressed. +Arrow keys are located on hjkl on the lower layer. + +## Building + +``` + make planck/rev6:vxid:dfu-util +``` From 3aa4d55beefc37e8f02e49a97424fd507d033d9b Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Wed, 6 Mar 2019 10:46:05 +1100 Subject: [PATCH 271/445] [Keymap] update: simplify tapdance code for Minidox/keymaps/dustypomerleau (#5315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add dusty keymap * change keymap folder to match my github username * initial keymap completed in comments only * layout without NAV completed in comments only * disable Command to prevent interference with Space Cadet keys * switch _ and \ in the symbol layer * Layers complete through _NAV * add thumb keys to _NAV * complete _NUM * all layouts complete; still needs `process_user_record()` * completed first draft of keymap; still needs config.h to match * corrected keycodes for Mac macro-volume keys * fix Mac mute keycode * add missing Mac keycodes for previous and next track * placeholder for qwerty layout, not yet completed; remove unnecessary breaks; add todos * eliminate Preonic branch before switching to Minidox branch: • delete dustypomerleau Preonic keymap folder • complete keymap.c (QWERTY layer, vanilla numbers layer) TODO: • add preferences to config.h • complete the README * edit commented keymap diagrams for clarity in dual function keys * define initial config.h and add rules.mk for mouse key support * fix redundant line after implementation of tap_code() * fixed key_timer declaration, added README and rules * formatting of keymap * add CTPC to config * cycle thumb keys to favor center position * modify config.h for temporary Pro Micro compatibility * remove superfluous call to use serial; homebrewed mod tap keys are still broken with OSL * merge _SYS and _MEDIA on new Z_SYS key * ALT_OP example of new MT macro complete * initial narze-inspired MT fixes in PRU * add (currently superfluous) custom keycode for the _SYS layer * rudimentary `OSL` symbol macros that immediately register the mod and fail to reset the oneshot layer, but do output the proper keys—fix both of these things * remove permissive hold to improve tapping performance * remove calls to `clear_oneshot_layer_state()`, as they have no effect inside `process_record_user()`. Tapdance appears to be the way forward. * final commit before tapdance code; correct layout in comments * initial tapdance code for shifted mod taps * add numeric and ergo NUM layers and pinky shifts for keycuts * add TD() wrappers to tapdance codes and clean up commented layout guides * add faux return to cur_dance to allow compilation - TODO: research what the default clause should be in cur_dance * update commented schematics for better readability * add backspace and delete to lockable layers, Z_SYS -> SYS_Z for consistency, fix schematic errors * add `DOUBLE_SINGLE_TAP` to tapdance cases to allow doubling of the single tap character without waiting tapping term * remove reduced oneshot tapping toggles * update README * newline tweak :) * Update keyboards/minidox/keymaps/dustypomerleau/keymap.c Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * remove `PREVENT_STUCK_MODIFIERS`, as this is default behavior * enable extrakey in rules to enable media keys * enable extrakeys for media key compatibility on macOS * add dash and slash to _NUM layers * change to universal volume keycodes * revert micro volume adjustments to macOS-specific codes due to lack of functionality (macro volume adjustments are still universal) * fix image of _SYS layer in comments * more diagram fixes in comments * fix typo * simplify tapdance code * match _NUM_N to _NUM_E * move slash to allow better use of comma in number layers * match layer and keycode enums to the docs * correct qwerty numlock to match numeric numlock layer --- .../minidox/keymaps/dustypomerleau/keymap.c | 104 ++++++------------ 1 file changed, 35 insertions(+), 69 deletions(-) diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c index d0eab98b47de..9cfbbfc6c90d 100644 --- a/keyboards/minidox/keymaps/dustypomerleau/keymap.c +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -5,7 +5,7 @@ extern keymap_config_t keymap_config; -enum custom_layers { +enum my_layers { _CMK_DHM, _QWERTY, _SYS, @@ -15,7 +15,7 @@ enum custom_layers { _SYM }; -enum custom_keycodes { +enum my_keycodes { CMK_DHM = SAFE_RANGE, QWERTY, SYS, @@ -25,25 +25,21 @@ enum custom_keycodes { SYM }; -typedef struct { - bool is_press_action; - int state; -} tap; - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_SINGLE_TAP = 3 -}; - -enum { - ALT_OP = 0, +enum td_keycodes { + ALT_OP, CTL_CCB, GUI_CP, SFT_OCB, SFT_PLS }; +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP +} td_state_t; + +static td_state_t td_state; int cur_dance (qk_tap_dance_state_t *state); void altop_finished (qk_tap_dance_state_t *state, void *user_data); void altop_reset (qk_tap_dance_state_t *state, void *user_data); @@ -153,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * If you use QWERTY + the Vanilla numbers primarily, change NUMLK_E to NUMLK_N here. * * ,----------------------------------. ,----------------------------------. - * | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++| | | + * | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++|BRITE-|BRITE+| * |------+------+------+------+------| |------+------+------+------+------| * | SHIFT| CTRL | ALT | GUI |NAV LK| | POWER| VOL- | VOL+ | MUTE | MPLY | * |------+------+------+------+------| |------+------+------+------+------| @@ -201,7 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | SFT/7| CTL/5| ALT/3| GUI/1| 9 | | 8 | GUI/0| ALT/2| CTL/4| SFT/6| * |------+------+------+------+------| |------+------+------+------+------| - * | | | F11 | F12 | BSPC | | DEL |NUM LK| | | | + * | F11 | F12 | - | SPACE| BSPC | | DEL |NUM LK| | | / | * `----------------------------------' `----------------------------------' * ,--------------------. ,--------------------. * | | TAB | | | | | | @@ -212,7 +208,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUM_E] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \ - KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, _______, \ + KC_F11, KC_F12, KC_MINS, KC_SPC, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, KC_SLSH, \ _______, KC_TAB, KC_ESC, _______, _______, _______ \ ), @@ -223,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------| |------+------+------+------+------| * | SFT/1| CTL/2| ALT/3| GUI/4| 5 | | 6 | GUI/7| ALT/8| CTL/9| SFT/0| * |------+------+------+------+------| |------+------+------+------+------| - * | | | F11 | F12 | BSPC | | DEL |NUM LK| | | | + * | F11 | F12 | - | SPACE| BSPC | | DEL |NUM LK| | | / | * `----------------------------------' `----------------------------------' * ,--------------------. ,--------------------. * | | TAB | | | | | | @@ -232,10 +228,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------' `------' */ [_NUM_N] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ - SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \ - KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, _______, \ - _______, KC_TAB, KC_ESC, _______, _______, _______ \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \ + KC_F11, KC_F12, KC_MINS, KC_SPC, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, KC_SLSH, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ ), @@ -286,17 +282,12 @@ int cur_dance (qk_tap_dance_state_t *state) { else return SINGLE_HOLD; } if (state->count == 2) return DOUBLE_SINGLE_TAP; - else return 8; + else return 3; } -static tap altop_tap_state = { - .is_press_action = true, - .state = 0 -}; - void altop_finished (qk_tap_dance_state_t *state, void *user_data) { - altop_tap_state.state = cur_dance(state); - switch (altop_tap_state.state) { + td_state = cur_dance(state); + switch (td_state) { case SINGLE_TAP: register_mods(MOD_BIT(KC_LSFT)); register_code(KC_9); @@ -312,7 +303,7 @@ void altop_finished (qk_tap_dance_state_t *state, void *user_data) { } void altop_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (altop_tap_state.state) { + switch (td_state) { case SINGLE_TAP: unregister_code(KC_9); unregister_mods(MOD_BIT(KC_LSFT)); @@ -324,17 +315,11 @@ void altop_reset (qk_tap_dance_state_t *state, void *user_data) { unregister_code(KC_9); unregister_mods(MOD_BIT(KC_LSFT)); } - altop_tap_state.state = 0; } -static tap ctlccb_tap_state = { - .is_press_action = true, - .state = 0 -}; - void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data) { - ctlccb_tap_state.state = cur_dance(state); - switch (ctlccb_tap_state.state) { + td_state = cur_dance(state); + switch (td_state) { case SINGLE_TAP: register_mods(MOD_BIT(KC_LSFT)); register_code(KC_RBRC); @@ -350,7 +335,7 @@ void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data) { } void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (ctlccb_tap_state.state) { + switch (td_state) { case SINGLE_TAP: unregister_code(KC_RBRC); unregister_mods(MOD_BIT(KC_LSFT)); @@ -362,17 +347,11 @@ void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data) { unregister_code(KC_RBRC); unregister_mods(MOD_BIT(KC_LSFT)); } - ctlccb_tap_state.state = 0; } -static tap guicp_tap_state = { - .is_press_action = true, - .state = 0 -}; - void guicp_finished (qk_tap_dance_state_t *state, void *user_data) { - guicp_tap_state.state = cur_dance(state); - switch (guicp_tap_state.state) { + td_state = cur_dance(state); + switch (td_state) { case SINGLE_TAP: register_mods(MOD_BIT(KC_LSFT)); register_code(KC_0); @@ -388,7 +367,7 @@ void guicp_finished (qk_tap_dance_state_t *state, void *user_data) { } void guicp_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (guicp_tap_state.state) { + switch (td_state) { case SINGLE_TAP: unregister_code(KC_0); unregister_mods(MOD_BIT(KC_LSFT)); @@ -400,17 +379,11 @@ void guicp_reset (qk_tap_dance_state_t *state, void *user_data) { unregister_code(KC_0); unregister_mods(MOD_BIT(KC_LSFT)); } - guicp_tap_state.state = 0; } -static tap sftocb_tap_state = { - .is_press_action = true, - .state = 0 -}; - void sftocb_finished (qk_tap_dance_state_t *state, void *user_data) { - sftocb_tap_state.state = cur_dance(state); - switch (sftocb_tap_state.state) { + td_state = cur_dance(state); + switch (td_state) { case SINGLE_TAP: register_mods(MOD_BIT(KC_LSFT)); register_code(KC_LBRC); @@ -426,7 +399,7 @@ void sftocb_finished (qk_tap_dance_state_t *state, void *user_data) { } void sftocb_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (sftocb_tap_state.state) { + switch (td_state) { case SINGLE_TAP: unregister_code(KC_LBRC); unregister_mods(MOD_BIT(KC_LSFT)); @@ -438,17 +411,11 @@ void sftocb_reset (qk_tap_dance_state_t *state, void *user_data) { unregister_code(KC_LBRC); unregister_mods(MOD_BIT(KC_LSFT)); } - sftocb_tap_state.state = 0; } -static tap sftpls_tap_state = { - .is_press_action = true, - .state = 0 -}; - void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) { - sftpls_tap_state.state = cur_dance(state); - switch (sftpls_tap_state.state) { + td_state = cur_dance(state); + switch (td_state) { case SINGLE_TAP: register_mods(MOD_BIT(KC_LSFT)); register_code(KC_EQL); @@ -464,7 +431,7 @@ void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) { } void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (sftpls_tap_state.state) { + switch (td_state) { case SINGLE_TAP: unregister_code(KC_EQL); unregister_mods(MOD_BIT(KC_LSFT)); @@ -476,7 +443,6 @@ void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) { unregister_code(KC_EQL); unregister_mods(MOD_BIT(KC_LSFT)); } - sftpls_tap_state.state = 0; } qk_tap_dance_action_t tap_dance_actions[] = { From da2eedc0c2587ee8d11ee94cb61e17b4e8717265 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Tue, 5 Mar 2019 20:59:11 -0300 Subject: [PATCH 272/445] [Keyboard] re-arrange the pinout for backlight support (#5321) --- keyboards/handwired/jotanck/config.h | 6 +++--- keyboards/handwired/jotanck/readme.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h index 7e022eeb0257..d7707d48fb1b 100644 --- a/keyboards/handwired/jotanck/config.h +++ b/keyboards/handwired/jotanck/config.h @@ -15,14 +15,14 @@ #define MATRIX_COLS 12 /* pro_micro pin-out */ -#define MATRIX_ROW_PINS { B4, B5, B6, B2 } +#define MATRIX_ROW_PINS { D7, E6, B6, B2 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } #define UNUSED_PINS /* leds */ -#define QMK_LED E6 +#define QMK_LED B4 #define BACKLIGHT_LEVELS 3 -#define BACKLIGHT_PIN B7 +#define BACKLIGHT_PIN B5 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md index 41b0ea401e00..e06cce8cf116 100644 --- a/keyboards/handwired/jotanck/readme.md +++ b/keyboards/handwired/jotanck/readme.md @@ -12,8 +12,8 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA- | Rows | 0 | 1 | 2 | 3 | |-------------|----|----|----|----| -| Arduino pin | 8 | 9 | 10 | 16 | -| QMK pin | B4 | B5 | B6 | B2 | +| Arduino pin | 6 | 7 | 10 | 16 | +| QMK pin | D7 | E6 | B6 | B2 | | Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | |-------------|----|----|----|----|----|----|-----|-----|----|----|----|----| @@ -22,8 +22,8 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA- | | QMK led | Backlight | |-------------|-----------|-----------| -| Arduino pin | 7 | 6 | -| QMK pin | E6 | D7 | +| Arduino pin | 8 | 9 | +| QMK pin | B4 | B5 | ### Compiling the Firmware From be8257f0a784a07e7dd93ecafe96c1d7774383f7 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 6 Mar 2019 11:51:41 -0800 Subject: [PATCH 273/445] [Keyboard] handwired/trackpoint: refactor and readme cleanup (#5325) * handwired/trackpoint: refactor - layout macro KEYMAP renamed to LAYOUT - keymap now uses #include QMK_KEYBOARD_H * handwired/trackpoint: readme cleanup - fix wiring layout image URL - update readme structure * handwired/trackpoint: rename readme to lowercase * handwired/trackpoint: update header files to use #pragma once --- keyboards/handwired/trackpoint/README.md | 10 -- keyboards/handwired/trackpoint/config.h | 119 +++++++++--------- .../trackpoint/keymaps/default/keymap.c | 4 +- keyboards/handwired/trackpoint/readme.md | 19 +++ keyboards/handwired/trackpoint/trackpoint.h | 11 +- 5 files changed, 83 insertions(+), 80 deletions(-) delete mode 100644 keyboards/handwired/trackpoint/README.md create mode 100644 keyboards/handwired/trackpoint/readme.md diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md deleted file mode 100644 index bbfcaab0c3c4..000000000000 --- a/keyboards/handwired/trackpoint/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# IBM Trackpoint demonstration - -This is just a simple demo to show how to integrate IBM Trackpoint in QMK. - -Wiring used in the demonstration: -![Wiring example](http://imgur.com/8ghG2U8) - -Some documentation: -* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint) -* [QMK documentation](https://docs.qmk.fm/) diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 22ec75f761d4..cecb6a509459 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -1,70 +1,67 @@ -#ifndef CONFIG_H - #define CONFIG_H +#pragma once - #include "config_common.h" +#include "config_common.h" - #define VENDOR_ID 0x1234 - #define PRODUCT_ID 0x5678 - #define DEVICE_VER 0x0001 - #define MANUFACTURER QMK - #define PRODUCT TRACKPOINT-DEMO - #define DESCRIPTION Simple demonstration for IBM Trackpoint integration +#define VENDOR_ID 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK +#define PRODUCT TRACKPOINT-DEMO +#define DESCRIPTION Simple demonstration for IBM Trackpoint integration - #define MATRIX_ROWS 1 - #define MATRIX_COLS 3 +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 - #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#ifdef PS2_USE_USART + #define PS2_CLOCK_PORT PORTD + #define PS2_CLOCK_PIN PIND + #define PS2_CLOCK_DDR DDRD + #define PS2_CLOCK_BIT 5 + #define PS2_DATA_PORT PORTD + #define PS2_DATA_PIN PIND + #define PS2_DATA_DDR DDRD + #define PS2_DATA_BIT 2 - /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ - /* set DDR of CLOCK as input to be slave */ - #define PS2_USART_INIT() do { \ - PS2_CLOCK_DDR &= ~(1< Date: Wed, 6 Mar 2019 15:20:51 -0500 Subject: [PATCH 274/445] [Keymap] Add KC_MAKE keycode to my userspace and keymaps (#5324) * Add keycode for KC_MAKE * Add KC_MAKE keycode * Add stanrc85.c file with KC_MAKE * Remove unused include * Improved KC_MAKE stolen from Drashna * Define mod mask for new KC_MAKE code * RESET board to flash after compiling * Remove send_string * RESET fixed in KC_MAKE --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 4 +- .../community/60_ansi/stanrc85-ansi/keymap.c | 4 +- users/stanrc85/rules.mk | 2 + users/stanrc85/stanrc85.c | 41 +++++++++++++++++++ users/stanrc85/stanrc85.h | 9 ++++ 5 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 users/stanrc85/stanrc85.c diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index f4dcf30f9f35..276adfe297ca 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_60_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, - TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, _______, + TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; @@ -65,6 +65,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // S2_INC, S2_DEC, // Color 2 saturation increase/decrease // BR_INC, BR_DEC, // backlight brightness increase/decrease -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index 27c3f16582fa..00d6f5ede498 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -52,11 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_60_ansi( _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index c94dca0b7cf0..4b66f9692db0 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -8,6 +8,8 @@ AUDIO_ENABLE = no CONSOLE_ENABLE = no NKRO_ENABLE = no +SRC += stanrc85.c + ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) # Include my fancy rgb functions source here SRC += layer_rgb.c diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c new file mode 100644 index 000000000000..ecf36411728f --- /dev/null +++ b/users/stanrc85/stanrc85.c @@ -0,0 +1,41 @@ +#include "stanrc85.h" + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MAKE: + 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 ) { + //RESET board for flashing if SHIFT held or tapped with KC_MAKE + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), 10); + wait_ms(100); + reset_keyboard(); + #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); + #else + reset_keyboard(); + #endif // bootloader options + } + 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); + } + return false; + break; + } + return process_record_keymap(keycode, record); +} diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index 7e581f993eea..091c810707fe 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -1,12 +1,21 @@ #pragma once #include "quantum.h" +#include "version.h" #define DEFAULT 0 //Custom ANSI #define LAYER1 1 //Default ANSI (enable with Fn2+CAPS) #define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control #define LAYER3 3 //RGB Underglow controls and RESET +enum custom_keycodes { + KC_MAKE = SAFE_RANGE, + NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes +}; + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) + //Aliases for longer keycodes #define KC_CAD LALT(LCTL(KC_DEL)) #define KC_LOCK LGUI(KC_L) From ba11a1c8072fd5d2f2d2914e76e9416be9ca1e11 Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Wed, 6 Mar 2019 17:49:16 -0300 Subject: [PATCH 275/445] [Keyboard] Adds Gray Studio HB85 Initial Support (#5311) * Gray Studio HB85 Initial Support * Fixed README image * Updated README * Disabled Bootmagic and Console for HB85 * Fixed Numpad 4 matrix place * Fixes board crashing with RGB enabled * Moved HB85 files to gray_studio folder * Uses old i2c library since this version makes RGB underglow work * Improved default keymap with underglow control layer * Removes obsolete program and uses generic script instead As per zvecr feedback * Uses GPIO Functions to initialise and set RGB underglow PINS --- keyboards/gray_studio/hb85/config.h | 39 ++ keyboards/gray_studio/hb85/hb85.c | 74 ++++ keyboards/gray_studio/hb85/hb85.h | 48 +++ keyboards/gray_studio/hb85/i2c.c | 106 +++++ keyboards/gray_studio/hb85/i2c.h | 27 ++ .../gray_studio/hb85/keymaps/default/keymap.c | 46 ++ keyboards/gray_studio/hb85/readme.md | 60 +++ keyboards/gray_studio/hb85/rules.mk | 48 +++ keyboards/gray_studio/hb85/usbconfig.h | 396 ++++++++++++++++++ 9 files changed, 844 insertions(+) create mode 100644 keyboards/gray_studio/hb85/config.h create mode 100644 keyboards/gray_studio/hb85/hb85.c create mode 100644 keyboards/gray_studio/hb85/hb85.h create mode 100644 keyboards/gray_studio/hb85/i2c.c create mode 100644 keyboards/gray_studio/hb85/i2c.h create mode 100644 keyboards/gray_studio/hb85/keymaps/default/keymap.c create mode 100644 keyboards/gray_studio/hb85/readme.md create mode 100644 keyboards/gray_studio/hb85/rules.mk create mode 100644 keyboards/gray_studio/hb85/usbconfig.h diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h new file mode 100644 index 000000000000..d68860d20282 --- /dev/null +++ b/keyboards/gray_studio/hb85/config.h @@ -0,0 +1,39 @@ +/* +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 . +*/ + +#pragma once + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422F +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER Gray Studio +#define PRODUCT HB85 + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW + +#define RGBLED_NUM 5 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c new file mode 100644 index 000000000000..1bc0222379a4 --- /dev/null +++ b/keyboards/gray_studio/hb85/hb85.c @@ -0,0 +1,74 @@ +/* +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 "rgblight.h" + +#include "i2c.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} +#endif + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/gray_studio/hb85/hb85.h b/keyboards/gray_studio/hb85/hb85.h new file mode 100644 index 000000000000..a505705b4727 --- /dev/null +++ b/keyboards/gray_studio/hb85/hb85.h @@ -0,0 +1,48 @@ +/* +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K12, K11, K10, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K13, \ + K28, K27, K26, K25, K24, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K77, K76, K75, \ + K43, K42, K41, K40, K39, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K74, K73, \ + K57, K56, K55, K54, K53, K44, K45, K46, K47, K48, K49, K50, K51, K52, K88, K87, \ + K72, K71, K70, K69, K68, K58, K59, K60, K61, K62, K63, K66, K64, K65, K67, K90, K89, \ + K86, K85, K78, K79, K80, K81, K82, K83, K84, K91 \ +) \ +{ \ + { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , KC_NO, K13 }, \ + { K14 , K15 , K16 , K17 , K18 , K19 , K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 }, \ + { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , K42 , K43 }, \ + { K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , KC_NO, K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K58 , K59 , K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 , K68 , K69 , K70 , K71 , K72 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K73 , K74 , K75 , K76 , K77 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K78 , KC_NO, KC_NO, K79 , K80 , K81 , K82 , K83 , K84 , KC_NO, KC_NO, K85 , K86 , KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87 , K88 , K89 , K90 , K91 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +// F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F2 F1 ESC FN +// 5 6 7 8 9 0 - = BS BS 4 3 2 1 ~ +// T Y U I O P [ ] | PAD7 R E W Q Tab +// G H J K L ; ' ENTR PAD4 F D S A CAPS +// V B N M , . RSFT UP / PAD1 C X Z EUR2 LSFT +// PAD9 PAD8 PAD- PAD* PAD/ +// SPC RALT RCTL LEFT DOWN RGHT PAD0 LALT LGUI +// PAD6 PAD5 PAD3 PAD2 PAD. diff --git a/keyboards/gray_studio/hb85/i2c.c b/keyboards/gray_studio/hb85/i2c.c new file mode 100644 index 000000000000..a4f95213524f --- /dev/null +++ b/keyboards/gray_studio/hb85/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 + +#ifndef __I2C_H__ +#define __I2C_H__ + +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); + +#endif diff --git a/keyboards/gray_studio/hb85/keymaps/default/keymap.c b/keyboards/gray_studio/hb85/keymaps/default/keymap.c new file mode 100644 index 000000000000..f2409ea137e3 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +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 QMK_KEYBOARD_H + +// Layer shorthand +enum layers { + _BASE = 0, // Base + _CTRL // Multimedia and RGB +}; + +#define KC_TGCT MO(_CTRL) // Toggles CTRL layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_TGCT, \ +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_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_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_P4 , KC_P5 , KC_P6 , \ +KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , \ + KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT \ + ), + + [_CTRL] = LAYOUT( + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md new file mode 100644 index 000000000000..4e93607df3b9 --- /dev/null +++ b/keyboards/gray_studio/hb85/readme.md @@ -0,0 +1,60 @@ +# Gray Studio HB85 + +![Gray Studio HB85](https://i.imgur.com/Sk3cupR.jpg) + +A HitBit MSX Computer inspired Keyboard. + +Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +Hardware Supported: Gray Studio HB85 +Hardware Availability: Group buy finished + +Make example for this keyboard (after setting up your build environment): + + make hb85:default + +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. + + +ps2avrGB keyboard firmware +========================== + +This keyboard uses the port of the QMK firmware for boards that are based on the +ps2avrGB firmware. + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. + +## Installing + +First, install the requirements. These commands are for OSX, but all you +need is the AVR toolchain and `bootloadHID` for flashing: + +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +$ pip install pyusb +``` + +Then, with the keyboard plugged in, simply run this command from the +`qmk_firmware` directory: + +``` +$ make hb85 +$ bootloadHID -r hb85_default.hex +``` + +## Setting the board to bootloader mode + +Hold the F3 key while plugging the USB cable. + +## 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/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk new file mode 100644 index 000000000000..f9061057660e --- /dev/null +++ b/keyboards/gray_studio/hb85/rules.mk @@ -0,0 +1,48 @@ +# 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 . + +# 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 = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/gray_studio/hb85/usbconfig.h b/keyboards/gray_studio/hb85/usbconfig.h new file mode 100644 index 000000000000..3d5aaa7708db --- /dev/null +++ b/keyboards/gray_studio/hb85/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 'G', 'r', 'a', 'y', ' ', 'S', 't', 'u', 'd', 'i', 'o' +#define USB_CFG_VENDOR_NAME_LEN 11 +/* 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 'H', 'B', '8', '5' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* 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 6d4f6f3f4965e3e71d878c36da71b745cc18e345 Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Fri, 8 Mar 2019 07:30:02 +1100 Subject: [PATCH 276/445] [Docs] Add Tap Dance example to the docs (#5326) * add a tapdance example for creating advanced mod-tap and layer-tap keys * add optional curly braces to match QMK conventions * change example to use `register_code16()` and tapdance keycodes more closely matching QMK variants --- docs/contributing.md | 14 ++++++ docs/feature_advanced_keycodes.md | 2 +- docs/feature_tap_dance.md | 83 +++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index 88b9d7d9b471..15066185bc6a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -129,6 +129,20 @@ Documentation is one of the easiest ways to get started contributing to QMK. Fin You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/. +When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + ## Keymaps Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap. diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index b20acf3c44ec..a6ddf458cc9f 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -15,7 +15,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it mo ## Caveats -Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. +Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two. diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index f2f2749440a2..b5e5218b093d 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -314,3 +314,86 @@ qk_tap_dance_action_t tap_dance_actions[] = { And then simply use `TD(X_CTL)` anywhere in your keymap. If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace. + +### Example 5: Using tap dance for advanced mod-tap and layer-tap keys + +Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`. + +Below your layers and custom keycodes, add the following: + +```c +// tapdance keycodes +enum td_keycodes { + ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP +} td_state_t; + +// create a global instance of the tapdance state type +static td_state_t td_state; + +// declare your tapdance functions: + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void altlp_finished (qk_tap_dance_state_t *state, void *user_data); +void altlp_reset (qk_tap_dance_state_t *state, void *user_data); +``` + +Below your `LAYOUT`, define each of the tapdance functions: + +```c +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + else { return SINGLE_HOLD; } + } + if (state->count == 2) { return DOUBLE_SINGLE_TAP; } + else { return 3; } // any number higher than the maximum state value you return above +} + +// handle the possible states for each tapdance keycode you define: + +void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_LPRN); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + break; + case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term + tap_code16(KC_LPRN); + register_code16(KC_LPRN); + } +} + +void altlp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_LPRN); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_LPRN); + } +} + +// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) +}; +``` + +Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`. From 234c117613fc85c17a1281980f85fef39feba917 Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Fri, 8 Mar 2019 12:03:29 +1100 Subject: [PATCH 277/445] Keymap update: Use `register_code16()` and its variants in lieu of separate mod registration (#5333) * use `register_code16` and relatives for tapdance code * rename tapdance keys to more closely mirror the `KC` names in QMK * additional naming change to match QMK style --- .../minidox/keymaps/dustypomerleau/keymap.c | 124 ++++++++---------- 1 file changed, 52 insertions(+), 72 deletions(-) diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c index 9cfbbfc6c90d..e93a09f64a6d 100644 --- a/keyboards/minidox/keymaps/dustypomerleau/keymap.c +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -26,10 +26,10 @@ enum my_keycodes { }; enum td_keycodes { - ALT_OP, - CTL_CCB, - GUI_CP, - SFT_OCB, + ALT_LP, + CTL_RCB, + GUI_RP, + SFT_LCB, SFT_PLS }; @@ -41,14 +41,14 @@ typedef enum { static td_state_t td_state; int cur_dance (qk_tap_dance_state_t *state); -void altop_finished (qk_tap_dance_state_t *state, void *user_data); -void altop_reset (qk_tap_dance_state_t *state, void *user_data); -void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data); -void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data); -void guicp_finished (qk_tap_dance_state_t *state, void *user_data); -void guicp_reset (qk_tap_dance_state_t *state, void *user_data); -void sftocb_finished (qk_tap_dance_state_t *state, void *user_data); -void sftocb_reset (qk_tap_dance_state_t *state, void *user_data); +void altlp_finished (qk_tap_dance_state_t *state, void *user_data); +void altlp_reset (qk_tap_dance_state_t *state, void *user_data); +void ctlrcb_finished (qk_tap_dance_state_t *state, void *user_data); +void ctlrcb_reset (qk_tap_dance_state_t *state, void *user_data); +void guirp_finished (qk_tap_dance_state_t *state, void *user_data); +void guirp_reset (qk_tap_dance_state_t *state, void *user_data); +void sftlcb_finished (qk_tap_dance_state_t *state, void *user_data); +void sftlcb_reset (qk_tap_dance_state_t *state, void *user_data); void sftpls_finished (qk_tap_dance_state_t *state, void *user_data); void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); @@ -58,7 +58,7 @@ void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); #define ALT_D LALT_T(KC_D) #define ALT_E LALT_T(KC_E) #define ALT_K LALT_T(KC_K) -#define ALT_OB LALT_T(KC_LBRC) +#define ALT_LB LALT_T(KC_LBRC) #define ALT_S LALT_T(KC_S) #define CTRL_2 LCTL_T(KC_2) #define CTRL_4 LCTL_T(KC_4) @@ -73,7 +73,7 @@ void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); #define GUI_1 LGUI_T(KC_1) #define GUI_4 LGUI_T(KC_4) #define GUI_7 LGUI_T(KC_7) -#define GUI_CB LGUI_T(KC_RBRC) +#define GUI_RB LGUI_T(KC_RBRC) #define GUI_F LGUI_T(KC_F) #define GUI_J LGUI_T(KC_J) #define GUI_N LGUI_T(KC_N) @@ -252,7 +252,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYM] = LAYOUT( \ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_QUOT, \ - TD(SFT_PLS), CTRL_EQ, TD(ALT_OP), TD(GUI_CP), KC_DQT, KC_COLN, GUI_CB, ALT_OB, TD(CTL_CCB), TD(SFT_OCB), \ + TD(SFT_PLS), CTRL_EQ, TD(ALT_LP), TD(GUI_RP), KC_DQT, KC_COLN, GUI_RB, ALT_LB, TD(CTL_RCB), TD(SFT_LCB), \ KC_LT, KC_PIPE, KC_MINS, KC_GT, KC_BSLS, KC_GRV, KC_UNDS, KC_SLSH, KC_TILD, KC_SCLN, \ _______, MAC_EN, _______, _______, MAC_EM, _______ \ ) @@ -285,131 +285,115 @@ int cur_dance (qk_tap_dance_state_t *state) { else return 3; } -void altop_finished (qk_tap_dance_state_t *state, void *user_data) { +void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); switch (td_state) { case SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - register_code(KC_9); + register_code16(KC_LPRN); break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LALT)); break; case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_9); - register_code(KC_9); + tap_code16(KC_LPRN); + register_code16(KC_LPRN); } } -void altop_reset (qk_tap_dance_state_t *state, void *user_data) { +void altlp_reset (qk_tap_dance_state_t *state, void *user_data) { switch (td_state) { case SINGLE_TAP: - unregister_code(KC_9); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_LPRN); break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LALT)); break; case DOUBLE_SINGLE_TAP: - unregister_code(KC_9); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_LPRN); } } -void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data) { +void ctlrcb_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); switch (td_state) { case SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - register_code(KC_RBRC); + register_code16(KC_RCBR); break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LCTL)); break; case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_RBRC); - register_code(KC_RBRC); + tap_code16(KC_RCBR); + register_code16(KC_RCBR); } } -void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data) { +void ctlrcb_reset (qk_tap_dance_state_t *state, void *user_data) { switch (td_state) { case SINGLE_TAP: - unregister_code(KC_RBRC); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_RCBR); break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LCTL)); break; case DOUBLE_SINGLE_TAP: - unregister_code(KC_RBRC); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_RCBR); } } -void guicp_finished (qk_tap_dance_state_t *state, void *user_data) { +void guirp_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); switch (td_state) { case SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - register_code(KC_0); + register_code16(KC_RPRN); break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LGUI)); break; case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_0); - register_code(KC_0); + tap_code16(KC_RPRN); + register_code16(KC_RPRN); } } -void guicp_reset (qk_tap_dance_state_t *state, void *user_data) { +void guirp_reset (qk_tap_dance_state_t *state, void *user_data) { switch (td_state) { case SINGLE_TAP: - unregister_code(KC_0); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_RPRN); break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LGUI)); break; case DOUBLE_SINGLE_TAP: - unregister_code(KC_0); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_RPRN); } } -void sftocb_finished (qk_tap_dance_state_t *state, void *user_data) { +void sftlcb_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); switch (td_state) { case SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - register_code(KC_LBRC); + register_code16(KC_LCBR); break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LSFT)); break; case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_LBRC); - register_code(KC_LBRC); + tap_code16(KC_LCBR); + register_code16(KC_LCBR); } } -void sftocb_reset (qk_tap_dance_state_t *state, void *user_data) { +void sftlcb_reset (qk_tap_dance_state_t *state, void *user_data) { switch (td_state) { case SINGLE_TAP: - unregister_code(KC_LBRC); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_LCBR); break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LSFT)); break; case DOUBLE_SINGLE_TAP: - unregister_code(KC_LBRC); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_LCBR); } } @@ -417,38 +401,34 @@ void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); switch (td_state) { case SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - register_code(KC_EQL); + register_code16(KC_PLUS); break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LSFT)); break; case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_LSFT)); - tap_code(KC_EQL); - register_code(KC_EQL); + tap_code16(KC_PLUS); + register_code16(KC_PLUS); } } void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) { switch (td_state) { case SINGLE_TAP: - unregister_code(KC_EQL); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_PLUS); break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LSFT)); break; case DOUBLE_SINGLE_TAP: - unregister_code(KC_EQL); - unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code16(KC_PLUS); } } qk_tap_dance_action_t tap_dance_actions[] = { - [ALT_OP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altop_finished, altop_reset), - [CTL_CCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlccb_finished, ctlccb_reset), - [GUI_CP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guicp_finished, guicp_reset), - [SFT_OCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftocb_finished, sftocb_reset), + [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset), + [CTL_RCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlrcb_finished, ctlrcb_reset), + [GUI_RP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guirp_finished, guirp_reset), + [SFT_LCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftlcb_finished, sftlcb_reset), [SFT_PLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftpls_finished, sftpls_reset) }; From 81fae5c3063933d6a62d20e63b0dcd197130e183 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 7 Mar 2019 17:06:04 -0800 Subject: [PATCH 278/445] Add in mekanist's keymap. Thanks to MatthewRobo for assisting in creating some of his features (#5335) --- .../dztech/dz60rgb/keymaps/mekanist/config.h | 3 + .../dztech/dz60rgb/keymaps/mekanist/keymap.c | 181 ++++++++++++++++++ .../dztech/dz60rgb/keymaps/mekanist/readme.md | 34 ++++ 3 files changed, 218 insertions(+) create mode 100644 keyboards/dztech/dz60rgb/keymaps/mekanist/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/config.h b/keyboards/dztech/dz60rgb/keymaps/mekanist/config.h new file mode 100644 index 000000000000..558b6023d575 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/config.h @@ -0,0 +1,3 @@ +#pragma once +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c new file mode 100644 index 000000000000..2784f6fa672d --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -0,0 +1,181 @@ +#include QMK_KEYBOARD_H +extern bool g_suspend_state; +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +#define _LAYER5 5 +#define _LAYER6 6 +#define _LAYER7 7 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER1] = LAYOUT( /* FN */ + TO(3), 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_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN, KC_VOLU, KC_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [_LAYER2] = LAYOUT( /* LIGHT */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , \ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER3] = LAYOUT( /* NUMPAD */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, \ + KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, TO(0), \ + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT, \ + KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER4] = LAYOUT( /* MAC */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(5) , KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER5] = LAYOUT( /* FN */ + TO(3), 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_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN, KC_VOLU, KC_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), +} +; + + + +void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool default_layer) +{ + rgb_led led; + + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + + if (led.matrix_co.raw < 0xFF) { + if (led.modifier) { + rgb_matrix_set_color(i, red, green, blue); + } + } + } +} + +void rgb_matrix_indicators_user(void) +{ + uint8_t this_led = host_keyboard_leds(); + + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + } + } + + if (this_led & (1 << USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); + } + + switch (biton32(layer_state)) { + case _LAYER3: + if (this_led & (1 << USB_LED_NUM_LOCK)) { + rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); + } else { + rgb_matrix_set_color(13, 0x00, 0x00, 0x00); + } + + rgb_matrix_set_color(0, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(1, 0x00, 0x00, 0x00); + rgb_matrix_set_color(1, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(2, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(3, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(4, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(5, 0x00, 0x00, 0x00); + rgb_matrix_set_color(6, 0x00, 0x00, 0x00); + rgb_matrix_set_color(7, 0x00, 0x00, 0x00); + rgb_matrix_set_color(8, 0x00, 0x00, 0x00); + rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(14, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(15, 0x00, 0x00, 0x00); + rgb_matrix_set_color(16, 0x00, 0x00, 0x00); + rgb_matrix_set_color(17, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(18, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(19, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(20, 0x00, 0x00, 0x00); + rgb_matrix_set_color(21, 0x00, 0x00, 0x00); + rgb_matrix_set_color(22, 0x00, 0x00, 0x00); + rgb_matrix_set_color(23, 0x00, 0x00, 0x00); + rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(27, 0x00, 0x00, 0x00); + rgb_matrix_set_color(28, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(29, 0x00, 0x00, 0x00); + rgb_matrix_set_color(30, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(31, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(33, 0x00, 0x00, 0x00); + rgb_matrix_set_color(34, 0x00, 0x00, 0x00); + rgb_matrix_set_color(35, 0x00, 0x00, 0x00); + rgb_matrix_set_color(36, 0x00, 0x00, 0x00); + rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(40, 0x00, 0x00, 0x00); + rgb_matrix_set_color(41, 0x00, 0x00, 0x00); + rgb_matrix_set_color(42, 0x00, 0x00, 0x00); + rgb_matrix_set_color(43, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(44, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(45, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(46, 0x00, 0x00, 0x00); + rgb_matrix_set_color(47, 0x00, 0x00, 0x00); + rgb_matrix_set_color(48, 0x00, 0x00, 0x00); + rgb_matrix_set_color(49, 0x00, 0x00, 0x00); + rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(53, 0x00, 0x00, 0x00); + rgb_matrix_set_color(54, 0x00, 0x00, 0x00); + rgb_matrix_set_color(55, 0x00, 0x00, 0x00); + rgb_matrix_set_color(56, 0x00, 0x00, 0x00); + rgb_matrix_set_color(57, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(58, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(59, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(62, 0x00, 0x00, 0x00); + break; + } +} + + + + + +void matrix_init_user(void) +{ + //user initialization +} + +void matrix_scan_user(void) +{ + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) +{ + return true; +} diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md b/keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md new file mode 100644 index 000000000000..e85200457e3f --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md @@ -0,0 +1,34 @@ +# mekanist keymap instructions + +## Dev Environment setup (macOS) + +1. Install Homebrew by copy pasting the following into a terminal: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` + +2. Refer to the [QMK macOS Instructions](https://github.com/qmk/qmk_firmware/blob/master/docs/getting_started_build_tools.md#macos) and install the list of tools using the `brew` command in terminal. + +3. While in terminal, issue the following command within the directory you wish to clone qmk_firmware in. + + ``` + git clone https://github.com/qmk/qmk_firmware.git + ``` + +## Creating the mekanist dz60rgb firmware file + +1. While in the `qmk_firmware` directory, issue the following command + + ``` + make git-submodule + ``` + + This will download the chibi-os submoduled needed to create firmware for ARM based boards such as the dz60rgb. + +2. While in the `qmk_firmware` directory, issue the followng command + + ``` + make dztech/dz60rgb:mekanist + ``` + + This will result in a file called `dztech_dz60rgb_mekanist.bin` that you can flash onto your board using QMK Toolbox. From 4a597e031fb2b4e9129f4e719bc20f2e72b0bbdf Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu, 7 Mar 2019 20:13:02 -0500 Subject: [PATCH 279/445] [Keymap] Smarter KC_MAKE code and removed duplicate MOD_MASK entries (#5331) * Change to predefined MOD_MASK codes * Remove duplicate predefined codes * Better reset keybaord logic * Cleaned up code as requested --- users/stanrc85/stanrc85.c | 18 ++++++++---------- users/stanrc85/stanrc85.h | 3 --- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index ecf36411728f..bddc14d7e2d8 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -9,30 +9,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); + uint8_t mods = get_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 (mods & MOD_MASK_SHIFT) { //RESET board for flashing if SHIFT held or tapped with KC_MAKE #if defined(__arm__) send_string_with_delay_P(PSTR(":dfu-util"), 10); - wait_ms(100); - reset_keyboard(); #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); - #else - reset_keyboard(); #endif // bootloader options + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + reset_keyboard(); + } + if (mods & MOD_MASK_CTRL) { + send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); } - 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); + set_mods(mods); } return false; break; diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index 091c810707fe..1d9602a05e5a 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -13,9 +13,6 @@ enum custom_keycodes { NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes }; -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) - //Aliases for longer keycodes #define KC_CAD LALT(LCTL(KC_DEL)) #define KC_LOCK LGUI(KC_L) From 98b68bec53ee814310cfc003b5b51504951601ec Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 7 Mar 2019 17:58:49 -0800 Subject: [PATCH 280/445] [Keyboard] New Keyboard: MK60 (#5327) * intial commit * fix up some of the cookie cutter code * define pins used and size of switch matrix * enable lighting settings and bootmagic lite * create the appropriate LAYOUT macro * remove a comma for compilation errors * provide a suitable keymap * disable console and command due to firmware being too large * add Caps Lock LED support * Add QMK Configurator support * fix markdown rendering * fix mechmerlin to mechkeys --- keyboards/mechkeys/mk60/config.h | 245 ++++++++++++++++++ keyboards/mechkeys/mk60/info.json | 83 ++++++ .../mechkeys/mk60/keymaps/default/config.h | 19 ++ .../mechkeys/mk60/keymaps/default/keymap.c | 74 ++++++ .../mechkeys/mk60/keymaps/default/readme.md | 1 + keyboards/mechkeys/mk60/mk60.c | 50 ++++ keyboards/mechkeys/mk60/mk60.h | 41 +++ keyboards/mechkeys/mk60/readme.md | 13 + keyboards/mechkeys/mk60/rules.mk | 81 ++++++ 9 files changed, 607 insertions(+) create mode 100644 keyboards/mechkeys/mk60/config.h create mode 100644 keyboards/mechkeys/mk60/info.json create mode 100644 keyboards/mechkeys/mk60/keymaps/default/config.h create mode 100644 keyboards/mechkeys/mk60/keymaps/default/keymap.c create mode 100644 keyboards/mechkeys/mk60/keymaps/default/readme.md create mode 100644 keyboards/mechkeys/mk60/mk60.c create mode 100644 keyboards/mechkeys/mk60/mk60.h create mode 100644 keyboards/mechkeys/mk60/readme.md create mode 100644 keyboards/mechkeys/mk60/rules.mk diff --git a/keyboards/mechkeys/mk60/config.h b/keyboards/mechkeys/mk60/config.h new file mode 100644 index 000000000000..9d6a2565d6e0 --- /dev/null +++ b/keyboards/mechkeys/mk60/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mechkeys +#define PRODUCT mechkeys mk60 +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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 { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 6 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 12 + #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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/mechkeys/mk60/info.json b/keyboards/mechkeys/mk60/info.json new file mode 100644 index 000000000000..06ed337260ce --- /dev/null +++ b/keyboards/mechkeys/mk60/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "MK60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 68, + "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":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0}, + {"label":"K0E", "x":14, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K12", "x":1.5, "y":1}, + {"label":"K13", "x":2.5, "y":1}, + {"label":"K14", "x":3.5, "y":1}, + {"label":"K15", "x":4.5, "y":1}, + {"label":"K16", "x":5.5, "y":1}, + {"label":"K17", "x":6.5, "y":1}, + {"label":"K18", "x":7.5, "y":1}, + {"label":"K19", "x":8.5, "y":1}, + {"label":"K1A", "x":9.5, "y":1}, + {"label":"K1B", "x":10.5, "y":1}, + {"label":"K1C", "x":11.5, "y":1}, + {"label":"K1D", "x":12.5, "y":1}, + {"label":"K1E", "x":13.5, "y":1, "w":1.5}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K22", "x":1.75, "y":2}, + {"label":"K23", "x":2.75, "y":2}, + {"label":"K24", "x":3.75, "y":2}, + {"label":"K25", "x":4.75, "y":2}, + {"label":"K26", "x":5.75, "y":2}, + {"label":"K27", "x":6.75, "y":2}, + {"label":"K28", "x":7.75, "y":2}, + {"label":"K29", "x":8.75, "y":2}, + {"label":"K2A", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2}, + {"label":"K2C", "x":11.75, "y":2}, + {"label":"K2D", "x":12.75, "y":2, "w":2.25}, + {"label":"K30", "x":0, "y":3}, + {"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":"K35", "x":5, "y":3}, + {"label":"K36", "x":6, "y":3}, + {"label":"K37", "x":7, "y":3}, + {"label":"K38", "x":8, "y":3}, + {"label":"K39", "x":9, "y":3}, + {"label":"K3A", "x":10, "y":3}, + {"label":"K3B", "x":11, "y":3}, + {"label":"K3C", "x":12, "y":3}, + {"label":"K3D", "x":13, "y":3}, + {"label":"K3E", "x":14, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.75}, + {"label":"K42", "x":1.75, "y":4, "w":1.25}, + {"label":"K43", "x":3, "y":4, "w":1.25}, + {"label":"K44", "x":4.25, "y":4, "w":1.25}, + {"label":"K47", "x":5.5, "y":4, "w":3}, + {"label":"K49", "x":8.5, "y":4, "w":1.5}, + {"label":"K4A", "x":10, "y":4}, + {"label":"K4B", "x":11, "y":4}, + {"label":"K4C", "x":12, "y":4}, + {"label":"K4D", "x":13, "y":4}, + {"label":"K4E", "x":14, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/mechkeys/mk60/keymaps/default/config.h b/keyboards/mechkeys/mk60/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/mechkeys/mk60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/mechkeys/mk60/keymaps/default/keymap.c b/keyboards/mechkeys/mk60/keymaps/default/keymap.c new file mode 100644 index 000000000000..ea566d4b557c --- /dev/null +++ b/keyboards/mechkeys/mk60/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 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_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, \ + KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_DEL, KC_LCTL, KC_LGUI, KC_LALT, \ + MO(1), KC_SPC, KC_RALT, KC_PGUP, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( \ + 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_DEL, KC_TRNS, \ + BL_TOGG, BL_DEC, BL_INC, BL_STEP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + 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/mechkeys/mk60/keymaps/default/readme.md b/keyboards/mechkeys/mk60/keymaps/default/readme.md new file mode 100644 index 000000000000..8a01d9475e81 --- /dev/null +++ b/keyboards/mechkeys/mk60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for mk60 diff --git a/keyboards/mechkeys/mk60/mk60.c b/keyboards/mechkeys/mk60/mk60.c new file mode 100644 index 000000000000..4c6a059f4cfa --- /dev/null +++ b/keyboards/mechkeys/mk60/mk60.c @@ -0,0 +1,50 @@ +/* Copyright 2019 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 "mk60.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(B7); + + 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 + + if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){ + writePinLow(B7); + }else { + writePinHigh(B7); + } + + led_set_user(usb_led); +} diff --git a/keyboards/mechkeys/mk60/mk60.h b/keyboards/mechkeys/mk60/mk60.h new file mode 100644 index 000000000000..66eb416a6fae --- /dev/null +++ b/keyboards/mechkeys/mk60/mk60.h @@ -0,0 +1,41 @@ +/* Copyright 2019 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 . + */ +#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( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k42, k43, k44, k47, k49, k4A, k4B, k4C, k4D, k4E \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E}, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E}, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO}, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E}, \ + { k40, KC_NO, k42, k43, k44, KC_NO, KC_NO, k47, KC_NO, k49, k4A, k4B, k4C, k4D, k4E}, \ +} diff --git a/keyboards/mechkeys/mk60/readme.md b/keyboards/mechkeys/mk60/readme.md new file mode 100644 index 000000000000..d3093349a17e --- /dev/null +++ b/keyboards/mechkeys/mk60/readme.md @@ -0,0 +1,13 @@ +# mechkeys mk60 + +60% keyboard with RGB underglow and backlights + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: MK60 +Hardware Availability: The MK60 was discontinued by [mechkeys.ca](https://mechkeys.ca/) + +Make example for this keyboard (after setting up your build environment): + + make mk60: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/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk new file mode 100644 index 000000000000..e5a48d853f8a --- /dev/null +++ b/keyboards/mechkeys/mk60/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 = lite # 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 +# 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # 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) \ No newline at end of file From fc87d9b0d5ff66b3ef71dcc1e87b7b2670970b83 Mon Sep 17 00:00:00 2001 From: linyaofred <46751111+linyaofred@users.noreply.github.com> Date: Fri, 8 Mar 2019 23:50:46 +0800 Subject: [PATCH 281/445] fix wrong key order in qmk configurator. (#5342) --- keyboards/sirius/unigo66/info.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json index f80dbe3be70f..7482ef5b8113 100644 --- a/keyboards/sirius/unigo66/info.json +++ b/keyboards/sirius/unigo66/info.json @@ -41,8 +41,6 @@ {"label":"D", "x":3.5, "y":2}, {"label":"F", "x":4.5, "y":2}, {"label":"G", "x":5.5, "y":2}, - {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, - {"label":"]", "x":9.5, "y":2.5, "h":1.5}, {"label":"H", "x":10.5, "y":2}, {"label":"J", "x":11.5, "y":2}, {"label":"K", "x":12.5, "y":2}, @@ -55,6 +53,8 @@ {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":",", "x":12.5, "y":3}, @@ -68,12 +68,12 @@ {"label":"Down", "x":14.5, "y":4}, {"label":"Right", "x":15.5, "y":4}, {"label":"Space", "x":5.5, "y":5}, - {"label":"Space", "x":5.5, "y":6}, {"label":"Ins", "x":6.5, "y":5}, - {"label":"Del", "x":6.5, "y":6}, {"label":"Home", "x":9.5, "y":5}, - {"label":"End", "x":9.5, "y":6}, {"label":"Space", "x":10.5, "y":5}, + {"label":"Space", "x":5.5, "y":6}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"End", "x":9.5, "y":6}, {"label":"Space", "x":10.5, "y":6} ] }, @@ -113,8 +113,6 @@ {"label":"D", "x":3.5, "y":2}, {"label":"F", "x":4.5, "y":2}, {"label":"G", "x":5.5, "y":2}, - {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, - {"label":"]", "x":9.5, "y":2.5, "h":1.5}, {"label":"H", "x":10.5, "y":2}, {"label":"J", "x":11.5, "y":2}, {"label":"K", "x":12.5, "y":2}, @@ -127,6 +125,8 @@ {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":",", "x":12.5, "y":3}, @@ -141,11 +141,11 @@ {"label":"Right", "x":15.5, "y":4}, {"label":"Space", "x":5.5, "y":5, "h":2}, {"label":"Ins", "x":6.5, "y":5}, - {"label":"Del", "x":6.5, "y":6}, {"label":"Home", "x":9.5, "y":5}, - {"label":"End", "x":9.5, "y":6}, - {"label":"Space", "x":10.5, "y":5, "h":2} + {"label":"Space", "x":10.5, "y":5, "h":2}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"End", "x":9.5, "y":6} ] } } -} \ No newline at end of file +} From 3d446c6050b8dbb60e6d9be9247ed06b2af9d37a Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 8 Mar 2019 07:56:08 -0800 Subject: [PATCH 282/445] [Docs] Update the KC_MAKE example in Userspace docs (#5337) This includes a much more feature rich version of the code, as well as updating for changes that have occurred in QMK Firmware --- docs/feature_userspace.md | 54 ++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 5a9fc287b3e1..d82d43138d77 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -201,27 +201,51 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu " -#elif defined(BOOTLOADER_HALFKAY) - ":teensy " -#elif defined(BOOTLOADER_CATERINA) - ":avrdude " -#endif - SS_TAP(X_ENTER)); - } - return false; - 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(); + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); + #ifndef FLASH_BOOTLOADER + if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) + #endif + { // + #if defined(__arm__) // only run for ARM boards + SEND_STRING(":dfu-util"); + #elif defined(BOOTLOADER_DFU) // only run for DFU boards + SEND_STRING(":dfu"); + #elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards + SEND_STRING(":teensy"); + #elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros + SEND_STRING(":avrdude"); + #endif // bootloader options + } + if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) { + SEND_STRING(" -j8 --output-sync"); + } + SEND_STRING(SS_TAP(X_ENTER)); + set_mods(temp_mod); + } + break; + } return process_record_keymap(keycode, record); } ``` +For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder: + +```make +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif +``` + This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. -Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead). +Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once. +And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. +?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader. From 7b768be784684ed9806374011c4f636aff3d243e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sat, 9 Mar 2019 00:58:40 +0900 Subject: [PATCH 283/445] Shallow clone submodules. (#5279) There's no need to fetch the entire submodule history if we only need the latest revision. Speeds up the download a fair bit. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 610f53b4d42d..bf3abbe52895 100644 --- a/Makefile +++ b/Makefile @@ -536,9 +536,9 @@ endef cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT - if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi - if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi - if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi + if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi + if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi + if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ case "$$x" in \ From fef206f661cc5d572549e91faa2d628493314510 Mon Sep 17 00:00:00 2001 From: enkore Date: Fri, 8 Mar 2019 17:11:08 +0100 Subject: [PATCH 284/445] getting_started_build_tools: dfu-{util,programmer} now available from arch repo See https://www.archlinux.org/packages/extra/x86_64/dfu-programmer/ --- docs/getting_started_build_tools.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index eb9f5b370fb2..1f771b1a04bf 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -44,9 +44,7 @@ Fedora / Red Hat example: Arch / Manjaro example: - pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git - -(the `dfu-programmer` package is availble on AUR only so you should download from there or use an AUR helper) + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util ## Nix From cd9e15036e692477d37a3c1a82c5ba1f29b8a11e Mon Sep 17 00:00:00 2001 From: Vyolle <44031868+Vyolle@users.noreply.github.com> Date: Fri, 8 Mar 2019 16:37:40 -0600 Subject: [PATCH 285/445] Swapped Gui keys and Shift Keys. I think it's more ergonomic in this configuration. (#5347) --- keyboards/keebio/iris/keymaps/vyolle/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/vyolle/keymap.c b/keyboards/keebio/iris/keymaps/vyolle/keymap.c index 33e17182117f..431def355ee9 100644 --- a/keyboards/keebio/iris/keymaps/vyolle/keymap.c +++ b/keyboards/keebio/iris/keymaps/vyolle/keymap.c @@ -22,9 +22,9 @@ 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, KC_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RGUI, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RGUI, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL // └────────┴────────┴────────┘ └────────┴────────┴────────┘ From 9d915ed051c43edd828d6cdb784a5d094e9b312d Mon Sep 17 00:00:00 2001 From: epaew Date: Sun, 10 Mar 2019 01:22:21 +0900 Subject: [PATCH 286/445] Update edvorak keymap simplify (#5350) * Update edvorakjp layouts * swap master hand * update tapping_term --- keyboards/crkbd/keymaps/edvorakjp/config.h | 7 +- keyboards/crkbd/keymaps/edvorakjp/keymap.c | 140 ++++--------- keyboards/crkbd/keymaps/edvorakjp/oled.c | 18 +- .../helix/rev2/keymaps/edvorakjp/config.h | 18 +- .../helix/rev2/keymaps/edvorakjp/keymap.c | 27 +-- .../rev2/keymaps/edvorakjp/keymap_4rows.c | 102 +++------- .../rev2/keymaps/edvorakjp/keymap_5rows.c | 122 ++++-------- .../rev2/keymaps/edvorakjp/keymap_xrows.h | 31 ++- keyboards/helix/rev2/keymaps/edvorakjp/oled.c | 14 +- .../helix/rev2/keymaps/edvorakjp/rules.mk | 1 + .../keebio/iris/keymaps/edvorakjp/config.h | 19 +- .../keebio/iris/keymaps/edvorakjp/keymap.c | 187 +++++------------- .../keebio/iris/keymaps/edvorakjp/rules.mk | 26 +-- users/edvorakjp/edvorakjp.c | 6 - users/edvorakjp/edvorakjp.h | 26 +-- users/edvorakjp/edvorakjp_process_record.c | 129 +----------- users/edvorakjp/edvorakjp_status.c | 13 +- users/edvorakjp/edvorakjp_tap_dance.c | 36 ++-- users/edvorakjp/readme.md | 54 +---- 19 files changed, 249 insertions(+), 727 deletions(-) diff --git a/keyboards/crkbd/keymaps/edvorakjp/config.h b/keyboards/crkbd/keymaps/edvorakjp/config.h index 515591a4292f..b8662aca092d 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/config.h +++ b/keyboards/crkbd/keymaps/edvorakjp/config.h @@ -3,15 +3,16 @@ /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT +// #define MASTER_LEFT +#define MASTER_RIGHT // #define EE_HANDS #define SSD1306OLED #define SWAP_SCLN // #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 120 +#define TAPPING_TERM 300 +#define IGNORE_MOD_TAP_INTERRUPT #undef RGBLED_NUM #define RGBLIGHT_EFFECT_STATIC_GRADIENT diff --git a/keyboards/crkbd/keymaps/edvorakjp/keymap.c b/keyboards/crkbd/keymaps/edvorakjp/keymap.c index ae2f710a03a0..32001f22daad 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/keymap.c +++ b/keyboards/crkbd/keymaps/edvorakjp/keymap.c @@ -16,113 +16,61 @@ #define KC_ KC_TRNS -#define KC_TMB1 LGUI_T(KC_TAB) -#define KC_TMB2 LSFT_T(KC_SPC) +#define KC_TMB1 KC_LA(TAB) +#define KC_TMB2 KC_LS(SPC) #define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped #define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped -#define KC_TMB5 RCTL_T(KC_BSPC) -#define KC_TMB6 RALT_T(KC_ENT) -#define KC_TMB7 KC_DEL -#define KC_TMB8 RALT(KC_ENT) -#define KC_TMB9 LGUI(KC_TAB) - -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_EDJP EDVORAK -#define KC_QWER QWERTY +#define KC_TMB5 KC_RC(BSPC) +#define KC_TMB6 KC_RG(ENT) +#define KC_TMB7 KC_RC(DEL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ESC ,QUOT,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV ,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH, - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - TMB1,TMB2,TMB3, TMB4,TMB5,TMB6 - // `----+----+----' `----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS, - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + ESC ,SCLN, X , C , V , Z , H , J , K , L , B ,SLSH, + //`----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----' + TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 + // `-----+----+----' `----+----+-----' ), [_LOWER] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , 1 ,EXLM, AT ,HASH,DLR , PERC,CIRC,AMPR,ASTR, 0 , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , LT ,LCBR,LPRN,LBRC, RBRC,RPRN,RCBR, GT , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , ,TMB7,TMB8 - // `----+----+----' `----+----+----' + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + PSCR, , HOME , PGDN , PGUP ,END , LEFT, DOWN , UP , RGHT , , , + //`----+----+------+------+------+----+----| |----+----+------+------+-------+----+----' + , , NO , MAC ,TMB7, + // `-----+----+----' `----+----+-----' ), [_RAISE] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,F11 ,F12 ,PSCR,SLCK,PAUS, ,HOME,PGDN,PGUP,END , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , ,LEFT,DOWN, UP ,RGHT, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - TMB9, , , , , - // `----+----+----' `----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , ,QWER,WIN ,RST , RTOG,MAC ,EDJP, , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + PSCR, ,HOME ,PGDN ,PGUP ,END , LEFT,DOWN , UP ,RGHT , , , + //`----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----' + , ,WIN , NO , , + // `-----+----+----' `----+----+----' ) }; #ifdef SSD1306OLED void matrix_init_keymap(void) { //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - iota_gfx_init(!has_usb()); // turns on the display +#ifdef MASTER_RIGHT + iota_gfx_init(has_usb()); // turns on the display +#else + iota_gfx_init(!has_usb()); +#endif // MASTER_RIGHT } void matrix_scan_user(void) { @@ -134,23 +82,15 @@ void matrix_scan_user(void) { uint32_t layer_state_set_keymap(uint32_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch (biton32(state)) { - case _EDVORAKJ1: - case _EDVORAKJ2: - // _EDVORAKJ1 & J2 are same colored - rgblight_sethsv_noeeprom_white(); - break; case _LOWER: rgblight_sethsv_noeeprom_red(); break; case _RAISE: - rgblight_sethsv_noeeprom_blue(); - break; - case _ADJUST: rgblight_sethsv_noeeprom_green(); break; - default: // for any other layers, or the default layer - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); - rgblight_sethsv_noeeprom_red(); + default: // for any other layers, or the default layer + rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + rgblight_sethsv_red(); break; } return state; diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index e4cccf3e7f83..cbb43d06156d 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -21,11 +21,7 @@ const char *read_layer_state(void) { switch (biton32(layer_state)) { case L_BASE: - strcpy(layer_name, default_layer_state == 1UL<<_EDVORAK ? "EDVORAK" : "QWERTY"); - break; - case _EDVORAKJ1: - case _EDVORAKJ2: - strcpy(layer_name, "JP_EXT"); + strcpy(layer_name, "Default"); break; case _RAISE: strcpy(layer_name, "Raise"); @@ -33,9 +29,6 @@ const char *read_layer_state(void) { case _LOWER: strcpy(layer_name, "Lower"); break; - case _ADJUST: - strcpy(layer_name, "Adjust"); - break; default: snprintf(layer_name, sizeof(layer_name), "Undef-%ld", layer_state); } @@ -49,10 +42,7 @@ const char *read_layer_state(void) { const char *read_host_led_state(void) { static char led_str[24]; - bool ext_status = get_enable_jp_extra_layer() && get_japanese_mode(); - strcpy(led_str, ext_status ? "EXT" : " "); - - strcat(led_str, (host_keyboard_leds() & (1<event.pressed) { - if (get_enable_kc_lang()) { - SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); - } else { - SEND_STRING( SS_LGUI("l") ); - } - } - return false; - } - return true; -} - #ifdef SSD1306OLED void matrix_init_keymap(void) { //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h @@ -37,23 +22,15 @@ void matrix_scan_user(void) { uint32_t layer_state_set_keymap(uint32_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch (biton32(state)) { - case _EDVORAKJ1: - case _EDVORAKJ2: - // _EDVORAKJ1 & J2 are same colored - rgblight_sethsv_noeeprom_white(); - break; case _LOWER: rgblight_sethsv_noeeprom_red(); break; case _RAISE: rgblight_sethsv_noeeprom_blue(); break; - case _ADJUST: - rgblight_sethsv_noeeprom_green(); - break; default: // for any other layers, or the default layer - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); - rgblight_sethsv_noeeprom_red(); + rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + rgblight_sethsv_red(); break; } return state; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c index 805e6b17b752..f2befc03b584 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c @@ -4,86 +4,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - QUOT,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LEFT,DOWN, UP ,RGHT,TMB1,TMB2,TMB3, TMB6,TMB7,TMB8,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - RBRC, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + ESC ,SCLN, X , C , V , Z , H , J , K , L , B ,SLSH, + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + HOME,PGDN,PGUP , END ,TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 ,LEFT ,DOWN , UP ,RGHT + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ), [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS,SLSH, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS,ASTR, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC, RBRC, 1 , 2 , 3 , NO , NO , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - HOME,PGDN,PGUP,END , , , , ,ESC , 0 ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+------+------+------+----. ,----+------+------+-------+----+----. + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + PSCR, , HOME , PGDN , PGUP ,END , LEFT, DOWN , UP , RGHT , , , + //|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----| + , , , , , , NO , MAC ,TMB7, , , , , + //`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----' ), [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, NO , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , NO , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - HOME,PGDN,PGUP,END ,TMB9,ESC , , , , ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + PSCR, ,HOME ,PGDN ,PGUP ,END , LEFT,DOWN , UP ,RGHT , , , + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + , , , , , ,WIN , NO , , , , , , + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ) }; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c index ef1b9d358c6a..642ba8c635b4 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c @@ -4,100 +4,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - QUOT,SCLN, X , C , V , Z ,TMB4, TMB5, B , H , J , K , L ,SLSH, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LEFT,DOWN, UP ,RGHT,TMB1,TMB2,TMB3, TMB6,TMB7,TMB8,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - RBRC, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,BSLS, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + ESC ,EXLM, AT ,HASH , DLR ,PERC, CIRC,AMPR ,ASTR ,LPRN ,RPRN,BSPC, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + TAB ,SCLN, X , C , V , Z , NO , NO , H , J , K , L , B ,SLSH, + //|----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----| + HOME,PGDN,PGUP , END ,TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 ,LEFT ,DOWN , UP ,RGHT + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ), [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , ,SLSH,ASTR, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS, , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS, , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC, 1 , 2 , 3 , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - HOME,PGDN,PGUP,END ,TMB9, , , , , 0 ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+------+------+------+----. ,----+------+------+-------+----+----. + PSCR, , , , , , , , , , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----| + , , HOME , PGDN , PGUP ,END , , ,LEFT, DOWN , UP , RGHT , , , + //|----+----+------+------+------+----+----| |----+----+------+------+-------+----+----| + , , , , , , NO , MAC ,TMB7, , , , , + //`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----' ), [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , ,SLSH,ASTR, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS, , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS, , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC, 1 , 2 , 3 , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - HOME,PGDN,PGUP,END ,TMB9, , , , , 0 ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + PSCR, , , , , , , , , , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + , ,HOME ,PGDN ,PGUP ,END , , ,LEFT,DOWN , UP ,RGHT , , , + //|----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----| + , , , , , ,WIN , NO , , , , , , + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ) }; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h index 6a0e581024fb..d9561d0b707f 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h @@ -2,27 +2,20 @@ #define KEYMAP_XROWS_H #include "edvorakjp.h" - -enum custom_keycodes { - KC_LOCK = NEW_SAFE_RANGE, -}; +/* + * enum custom_keycodes { + * KC_LOCK = NEW_SAFE_RANGE, + * }; + */ #define KC_ KC_TRNS -#define KC_TMB1 LGUI_T(KC_TAB) -#define KC_TMB2 LSFT_T(KC_SPC) -#define KC_TMB3 LOWER // act as LOWER when hold, as KC_LANG2(=English) when tapped -#define KC_TMB4 LCTL_T(KC_ESC) -#define KC_TMB5 RSFT_T(KC_DEL) -#define KC_TMB6 RAISE // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped -#define KC_TMB7 RCTL_T(KC_BSPC) -#define KC_TMB8 RALT_T(KC_ENT) -#define KC_TMB9 LGUI(KC_TAB) - -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_EDJP EDVORAK -#define KC_QWER QWERTY +#define KC_TMB1 KC_LA(TAB) +#define KC_TMB2 KC_LS(SPC) +#define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped +#define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped +#define KC_TMB5 KC_RC(BSPC) +#define KC_TMB6 KC_RG(ENT) +#define KC_TMB7 KC_RC(DEL) #endif diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 227e2c56f82f..b931b72b7ccb 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -34,13 +34,7 @@ void render_status(struct CharacterMatrix *matrix) { matrix_write_P(matrix, PSTR("\nLayer: ")); switch (biton32(layer_state)) { case L_BASE: - matrix_write_P(matrix, - default_layer_state == 1UL<<_EDVORAK ? PSTR("EDVORAK") : PSTR("QWERTY") - ); - break; - case _EDVORAKJ1: - case _EDVORAKJ2: - matrix_write_P(matrix, PSTR("JP_EXT")); + matrix_write_P(matrix, PSTR("Default")); break; case _RAISE: matrix_write_P(matrix, PSTR("Raise")); @@ -48,17 +42,13 @@ void render_status(struct CharacterMatrix *matrix) { case _LOWER: matrix_write_P(matrix, PSTR("Lower")); break; - case _ADJUST: - matrix_write_P(matrix, PSTR("Adjust")); - break; default: matrix_write(matrix, buf); } // Host Keyboard LED Status char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s %s", - get_enable_jp_extra_layer() && get_japanese_mode() ? "EXT" : " ", + snprintf(led, sizeof(led), "\n%s %s %s", (host_keyboard_leds() & (1<event.pressed) { - if (get_enable_kc_lang()) { - SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); - } else { - SEND_STRING( SS_LGUI("l") ); - } - } - return false; - } - return true; -} - +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT uint32_t layer_state_set_keymap(uint32_t state) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch (biton32(state)) { - case _EDVORAKJ1: - case _EDVORAKJ2: - // _EDVORAKJ1 & J2 are same colored - rgblight_setrgb (0xFF, 0xFF, 0xFF); - break; case _LOWER: - rgblight_setrgb (0xFF, 0x00, 0x00); + rgblight_sethsv_noeeprom_red(); break; case _RAISE: - rgblight_setrgb (0x00, 0x00, 0xFF); - break; - case _ADJUST: - rgblight_setrgb (0x00, 0xFF, 0x00); + rgblight_sethsv_noeeprom_blue(); break; - default: // for any other layers, or the default layer - rgblight_mode(28); + default: // for any other layers, or the default layer + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + get_japanese_mode() ? rgblight_sethsv_noeeprom_red() : rgblight_sethsv_noeeprom_green(); break; } return state; } +#endif diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk index 58d244c38954..4ee94a9832e5 100644 --- a/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk +++ b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk @@ -2,15 +2,17 @@ # 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 = 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 -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +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 = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c index 1ac61079426a..892ce4be3bae 100644 --- a/users/edvorakjp/edvorakjp.c +++ b/users/edvorakjp/edvorakjp.c @@ -1,10 +1,5 @@ #include "edvorakjp.h" -void dvorakj_layer_off(void) { - layer_off(_EDVORAKJ1); - layer_off(_EDVORAKJ2); -} - void matrix_init_user(void) { edvorakjp_status_init(); matrix_init_keymap(); @@ -25,7 +20,6 @@ uint32_t layer_state_set_keymap(uint32_t state) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return process_record_keymap(keycode, record) &&\ - process_record_edvorakjp_ext(keycode, record) &&\ process_record_edvorakjp_swap_scln(keycode, record) &&\ process_record_edvorakjp_config(keycode, record) &&\ process_record_layer(keycode, record) &&\ diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h index e781bf2378e8..688cdeffb3a9 100644 --- a/users/edvorakjp/edvorakjp.h +++ b/users/edvorakjp/edvorakjp.h @@ -10,9 +10,6 @@ extern keymap_config_t keymap_config; enum edvorakjp_layers { _EDVORAK = 0, - _EDVORAKJ1, - _EDVORAKJ2, - _QWERTY, _LOWER, _RAISE, _ADJUST, @@ -21,26 +18,24 @@ enum edvorakjp_layers { enum edvorakjp_keycodes { EDVORAK = SAFE_RANGE, - QWERTY, LOWER, RAISE, KC_MAC, KC_WIN, - KC_EXTON, - KC_EXTOFF, KC_JPN, KC_ENG, - KC_AI, - KC_OU, - KC_EI, - KC_ANN, - KC_ONN, - KC_ENN, - KC_INN, - KC_UNN, NEW_SAFE_RANGE }; +#define KC_LC(k) LCTL_T(KC_##k) +#define KC_LS(k) LSFT_T(KC_##k) +#define KC_LA(k) LALT_T(KC_##k) +#define KC_LG(k) LGUI_T(KC_##k) +#define KC_RC(k) RCTL_T(KC_##k) +#define KC_RS(k) RSFT_T(KC_##k) +#define KC_RG(k) RGUI_T(KC_##k) +#define KC_RA(k) RALT_T(KC_##k) + enum tap_dance_code { TD_LOWER = 0, TD_RAISE @@ -57,8 +52,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); // status void edvorakjp_status_init(void); -bool get_enable_jp_extra_layer(void); -void set_enable_jp_extra_layer(bool new_state); bool get_enable_kc_lang(void); void set_enable_kc_lang(bool new_state); bool get_japanese_mode(void); @@ -69,7 +62,6 @@ void set_japanese_mode(bool new_state); * return false if processed, or return true if not processed. * You can add your original macros in process_record_keymap() in keymap.c. */ -bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record); bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record); bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record); bool process_record_layer(uint16_t keycode, keyrecord_t *record); diff --git a/users/edvorakjp/edvorakjp_process_record.c b/users/edvorakjp/edvorakjp_process_record.c index 2dcdab2a25f9..ecc8db93637d 100644 --- a/users/edvorakjp/edvorakjp_process_record.c +++ b/users/edvorakjp/edvorakjp_process_record.c @@ -7,114 +7,6 @@ static uint16_t time_on_pressed; * Each process_record_* methods defined here are * return false if handle edvorak_keycodes, or return true others. */ -bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record) { - if (!(default_layer_state == 1UL<<_EDVORAK && - get_enable_jp_extra_layer() && get_japanese_mode())) { - return true; - } - - // consonant keys - // layer_on(J1) or layer_on(J2) are defined based on key positions. - switch (keycode) { - // right hand's left side w/o N - case KC_F: - case KC_G: - case KC_R: - case KC_D: - case KC_T: - case KC_B: - case KC_H: - case KC_J: - if (record->event.pressed) { - layer_on(_EDVORAKJ1); - } - return true; - - // N: toggle layer - case KC_N: - if (record->event.pressed) { - biton32(layer_state) == _EDVORAK ? layer_on(_EDVORAKJ1) : dvorakj_layer_off(); - } - return true; - - // left hand up and right hand's right side - case KC_Y: - case KC_P: - case KC_W: - case KC_Q: - case KC_S: - case KC_M: - case KC_K: - case KC_L: - if (record->event.pressed) { - layer_on(_EDVORAKJ2); - } - return true; - // left hand down - // If return true, QMK sends keycode in new layer, - // but these keys are only available in old layer. - case KC_X: - case KC_C: - case KC_V: - case KC_Z: - if (record->event.pressed) { - layer_on(_EDVORAKJ2); - tap_code(keycode); - } - return false; - } - - // vowel keys, symbol keys and modifier keys - if (record->event.pressed) { - dvorakj_layer_off(); - } - switch (keycode) { - // combination vowel keys - case KC_AI: - if (record->event.pressed) { - SEND_STRING("ai"); - } - return false; - case KC_OU: - if (record->event.pressed) { - SEND_STRING("ou"); - } - return false; - case KC_EI: - if (record->event.pressed) { - SEND_STRING("ei"); - } - return false; - case KC_ANN: - if (record->event.pressed) { - SEND_STRING("ann"); - } - return false; - case KC_ONN: - if (record->event.pressed) { - SEND_STRING("onn"); - } - return false; - case KC_ENN: - if (record->event.pressed) { - SEND_STRING("enn"); - } - return false; - case KC_INN: - if (record->event.pressed) { - SEND_STRING("inn"); - } - return false; - case KC_UNN: - if (record->event.pressed) { - SEND_STRING("unn"); - } - return false; - } - // AOEIU and other (symbol, modifier) keys - return true; -} - bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record) { #ifdef SWAP_SCLN static const uint8_t shift_bits = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); @@ -146,30 +38,13 @@ bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record) { set_enable_kc_lang(keycode == KC_MAC); } return false; - case KC_EXTON: - case KC_EXTOFF: - if (record->event.pressed) { - set_enable_jp_extra_layer(keycode == KC_EXTON); - } - return false; } return true; } bool process_record_layer(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case EDVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_EDVORAK); - } - return false; - case QWERTY: - if (record->event.pressed) { - dvorakj_layer_off(); - set_single_persistent_default_layer(_QWERTY); - } - return false; #if TAP_DANCE_ENABLE != yes + switch (keycode) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -196,8 +71,8 @@ bool process_record_layer(uint16_t keycode, keyrecord_t *record) { time_on_pressed = 0; } return false; -#endif } +#endif return true; } diff --git a/users/edvorakjp/edvorakjp_status.c b/users/edvorakjp/edvorakjp_status.c index a60c8d853b0a..128fc3bd28eb 100644 --- a/users/edvorakjp/edvorakjp_status.c +++ b/users/edvorakjp/edvorakjp_status.c @@ -4,8 +4,7 @@ typedef union { uint8_t raw; struct { - bool enable_jp_extra_layer : 1; - bool enable_kc_lang : 1; // for macOS + bool enable_kc_lang; // for macOS }; } edvorakjp_config_t; static edvorakjp_config_t edvorakjp_config; @@ -34,15 +33,6 @@ void edvorakjp_status_init(void) { edvorakjp_config.raw = eeconfig_read_edvorakjp(); } -bool get_enable_jp_extra_layer(void) { - return edvorakjp_config.enable_jp_extra_layer; -} - -void set_enable_jp_extra_layer(bool new_state) { - edvorakjp_config.enable_jp_extra_layer = new_state; - eeconfig_update_edvorakjp(edvorakjp_config.raw); -} - bool get_enable_kc_lang(void) { return edvorakjp_config.enable_kc_lang; } @@ -65,7 +55,6 @@ void set_japanese_mode(bool new_state) { SEND_STRING(SS_LALT("`")); } } else { - dvorakj_layer_off(); if (edvorakjp_config.enable_kc_lang) { SEND_STRING(SS_TAP(X_LANG2)); } else { diff --git a/users/edvorakjp/edvorakjp_tap_dance.c b/users/edvorakjp/edvorakjp_tap_dance.c index 62c0c100a22b..d5369f9266e6 100644 --- a/users/edvorakjp/edvorakjp_tap_dance.c +++ b/users/edvorakjp/edvorakjp_tap_dance.c @@ -8,8 +8,11 @@ enum tap_state { HOLD }; -static int td_status_lower = NONE; -static int td_status_raise = NONE; +typedef struct { + uint8_t lower; + uint8_t raise; +} td_status_t; +static td_status_t td_status = {NONE, NONE}; int cur_dance(qk_tap_dance_state_t *state) { if (state->interrupted || !state->pressed) { @@ -20,14 +23,14 @@ int cur_dance(qk_tap_dance_state_t *state) { } void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) { - td_status_lower = cur_dance(state); - switch(td_status_lower) { + td_status.lower = cur_dance(state); + switch(td_status.lower) { case SINGLE_TAP: set_japanese_mode(false); - register_code(KC_ESC); break; case DOUBLE_TAP: set_japanese_mode(false); + register_code(KC_ESC); break; case HOLD: break; @@ -36,18 +39,19 @@ void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) { } void td_lower_reset(qk_tap_dance_state_t *state, void *user_data) { - if (td_status_lower == SINGLE_TAP) { + if (td_status.lower == DOUBLE_TAP) { unregister_code(KC_ESC); } layer_off(_LOWER); - td_status_lower = NONE; + td_status.lower = NONE; } void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) { - td_status_raise = cur_dance(state); - switch(td_status_raise) { - case SINGLE_TAP: + td_status.raise = cur_dance(state); + switch(td_status.raise) { case DOUBLE_TAP: + // same as single + case SINGLE_TAP: set_japanese_mode(true); break; case HOLD: @@ -58,14 +62,12 @@ void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) { void td_raise_reset(qk_tap_dance_state_t *state, void *user_data) { layer_off(_RAISE); - td_status_raise = NONE; + td_status.raise = NONE; } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME( - NULL, td_lower_finished, td_lower_reset, TAPPING_TERM * 1.5 - ), - [TD_RAISE] = ACTION_TAP_DANCE_FN_ADVANCED_TIME( - NULL, td_raise_finished, td_raise_reset, TAPPING_TERM * 1.5 - ) + [TD_LOWER] = + ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_lower_finished, td_lower_reset, 100), + [TD_RAISE] = + ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_raise_finished, td_raise_reset, 100) }; diff --git a/users/edvorakjp/readme.md b/users/edvorakjp/readme.md index 077ba4abdcfc..679d84b3deff 100644 --- a/users/edvorakjp/readme.md +++ b/users/edvorakjp/readme.md @@ -5,49 +5,20 @@ epaew's Enhanced Dvorak layout for Japanese Programmer ## Layout overview This is a sample. You can swap any symbol keys and modifier keys. -- Base layer (for ansi layout) +- Basic layout (for ansi) ``` //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - TAB , ' , , , . , Y , P , F , G , R , W , Q , / , = , \ , + TAB , ' , , , . , Y , Q , F , G , R , W , P , / , = , \ , //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ CAPS , A , O , E , I , U , D , T , N , S , M , - , ENT , //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ - LSFT , ; , X , C , V , Z , B , H , J , K , L , RSFT , + LSFT , : , X , C , V , Z , H , J , K , L , B , RSFT , //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL //+------+------+------+-------------------------+------+------+------+------+ ``` -- Base layer (for iso layout) - - Two C keys are placed, it's on purpose. -``` - //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ - ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , - //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - TAB , ' , , , . , Y , P , F , G , R , W , C , / , = , - //+------++---++---++---++---++---++---++---++---++---++---++---++---++ - CAPS , A , O , E , I , U , D , T , N , S , M , ; , - , ENT , - //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+------+ - LSFT , Q , X , C , V , Z , B , H , J , K , L , \ , RSFT , - //+------+--+---++----++---+----+----+----+----+-+--+---++----++---+--+------+ - LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL - //+------+------+------+-------------------------+------+------+------+------+ -``` -- Additional layer (common, blanks are transparent) -``` - //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ - , , , , , , , , , , , , , , - //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - , AI , OU , EI , , , , , , , , , , , - //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ - , A , O , E , I , U , , Y1 , N , Y2 , , , , - //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ - , , , , , , , - //+------+------+------+-------------------------+------+------+------+------+ -``` And you can see [my iris keyboard layout](../../keyboards/iris/keymaps/edvorakjp/keymap.c) for sample implementation, too. @@ -57,36 +28,25 @@ This is a sample. You can swap any symbol keys and modifier keys. - IME 切り替えキー - 長押しでレイヤー切り替え、短押しでIME切り替え - macOS(かな/英数)、Windows(Alt+\`)の両方に対応 - - DvorakJP()を参考にした日本語入力用キーの導入 - - 拗音入力用のYキーを追加配置 - - 二重母音入力用のキー(AI, OU, EI) - - 撥音入力用のキー(ANN, ONN, ENN, INN, UNN) - - いずれかの子音を押下することで Additional layer が出現し、いずれかの母音を押下することで Base layer に戻ります(※1※2) - - ※1促音の入力に使うため、また連続で同じ指での打鍵を減らすために、 - FGRDTNBHJ を押下した場合はy1が、それ以外の子音を押下した場合はy2が出現しません - - ※2撥音の入力のため、nを2連打すると、Base layerに戻ります - Define some custom keys for typing Japanese - IME switching - act as LOWER/RAISE when hold, act as IME switching when tapped - for macOS(かな/英数), for Windows(Alt+\`) - - oneshot combination keys, inspired from DvorakJP () - - additional Y key to enter a contracted sound - - diphthong keys (AI, OU, EI) - - syllabic nasal (ANN, ONN, ENN, INN, UNN) - - Additional layer is appeared when you taps any consonant keys, and disappeared when you taps any diphthong keys. ## for Programmer - Dvorak 配列をベースに、ショートカットでよく利用される XCV は QWERTY 配列の位置を維持 - 一部にVimユーザ用のキー配置を実施 - HJKL キーを横並びで配置 - - Shift押下時と非押下時で、";"キーの挙動を入れ替え(`config.h` 内で `#define SWAP_SCLN` の宣言が必要です) + - Shift押下時と非押下時で、";"キーの挙動を入れ替え + (`config.h` 内で `#define SWAP_SCLN` の宣言が必要です) - デフォルトレイヤーには、数字キーの代わりに記号 `!@#$%^&*()` を配置 - mainly based on Dvorak layout, but XCV is available in the same position of QWERTY layout - for Vim users - HJKL is lining side by side - - swap the ";" key behavior. i.e. send ":" normally and send ";" when you hold shift. (need `#define SWAP_SCLN` in your `config.h`) + - swap the ";" key behavior. i.e. send ":" normally and send ";" when you hold shift. + (need `#define SWAP_SCLN` in your `config.h`) - we can type `!@#$%^&*()` keys without shift keys in base layer ## License From ff95c60e464256261777f3a5b159f121fa5d655d Mon Sep 17 00:00:00 2001 From: Jarred Steenvoorden Date: Mon, 11 Mar 2019 04:00:55 +1100 Subject: [PATCH 287/445] Keymap / userspace update (#5358) * Update userspace with common config.h * Add my dz60, satan and xd75 keyboard keymaps * Fixing executable bits changed during last upstream merge * Cleanup unnecessary files and defines * Remove unnecessary defines from userspace config * Add underglow controls to dz60 function layer * Fixing merge conflicts * Fixing exectable bits changed during merge * Userspace update --- keyboards/planck/keymaps/jarred/keymap.c | 3 +- users/jarred/config.h | 1 + users/jarred/jarred.c | 69 +++++++++++++++++++- users/jarred/jarred.h | 83 ++++++++++++++++++------ 4 files changed, 133 insertions(+), 23 deletions(-) diff --git a/keyboards/planck/keymaps/jarred/keymap.c b/keyboards/planck/keymaps/jarred/keymap.c index 6697c4ea482e..5911669086cf 100644 --- a/keyboards/planck/keymaps/jarred/keymap.c +++ b/keyboards/planck/keymaps/jarred/keymap.c @@ -19,6 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_planck_grid_wrapper(QWERTY_4x12), + [_GAME] = LAYOUT_planck_grid_wrapper(GAME_4x12), [_LW] = LAYOUT_planck_grid_wrapper(LOWER_4x12), [_NV] = LAYOUT_planck_grid_wrapper(NAV_4x12), [_NP] = LAYOUT_planck_grid_wrapper(NUMPAD_4x12), @@ -30,4 +31,4 @@ void rgb_matrix_indicators_user(void) { // Disable light in middle of 2U position rgb_matrix_set_color(42, 0, 0, 0); } -#endif \ No newline at end of file +#endif diff --git a/users/jarred/config.h b/users/jarred/config.h index f282088144d8..e63ec4d9b7aa 100644 --- a/users/jarred/config.h +++ b/users/jarred/config.h @@ -39,6 +39,7 @@ #undef TAPPING_TERM #undef IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 #define IGNORE_MOD_TAP_INTERRUPT diff --git a/users/jarred/jarred.c b/users/jarred/jarred.c index 33162b6891a4..b37c4cfbb759 100644 --- a/users/jarred/jarred.c +++ b/users/jarred/jarred.c @@ -17,16 +17,81 @@ #include "jarred.h" #include "version.h" +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool lowerPressed, raisePressed; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case LOWER: + case RAISE: + // Both lower and raise activate the same layer + if (record->event.pressed) { + layer_on(_LW); + } else { + layer_off(_LW); + } + + // But keep track of each to active adjust layer + if (keycode == LOWER) { + lowerPressed = record->event.pressed; + } else { + raisePressed = record->event.pressed; + } + + // When both are pressed, activate adjust + if (lowerPressed && raisePressed) { + layer_on(_NP); + } else { + layer_off(_NP); + } + + break; + + case NUMPAD: + if (record->event.pressed) { + layer_on(_NP); + } else { + layer_off(_NP); + } + break; + + case NAVI: + if (record->event.pressed) { + layer_on(_NV); + } else { + layer_off(_NV); + + // Release mods set by ALT_TAB and CTL_TAB + unregister_code(KC_LALT); + unregister_code(KC_LCTL); + } + break; + case VRSN: // Prints firmware version if (record->event.pressed) { send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER); } - return false; + break; + + case ALT_TAB: + if (record->event.pressed) { + register_code(KC_LALT); + tap_code(KC_TAB); + } + break; + + case CTL_TAB: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_TAB); + } break; } - return true; + return process_record_keymap(keycode, record); } diff --git a/users/jarred/jarred.h b/users/jarred/jarred.h index a6774ce264e7..3f27163ab1e4 100644 --- a/users/jarred/jarred.h +++ b/users/jarred/jarred.h @@ -13,6 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +// TODO: Add Alt-Tab to nav + W layer #ifndef USERSPACE #define USERSPACE @@ -20,31 +22,58 @@ #include "quantum.h" enum userspace_custom_keycodes { - VRSN = SAFE_RANGE // Prints QMK Firmware and board info + VRSN = SAFE_RANGE, // Prints QMK Firmware and board info + ALT_TAB, + CTL_TAB, + + // Layer keys + NAVI, + LOWER, + RAISE, + NUMPAD }; // Layers -#define _QW 0 -#define _LW 1 -#define _NV 2 -#define _NP 3 -#define _MS 4 // Mouse +enum { + _QW = 0, + _GAME, + _LW, + _NV, + _NP, + _MS, +}; + +#define MS_A LT(_MS,KC_A) -#define MS_A LT(_MS,KC_A) +#define WIN_Z LGUI_T(KC_Z) +#define CTL_SLH RCTL_T(KC_SLSH) // Wrappers #define LAYOUT_planck_grid_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__) /* Qwerty Layer */ #define QWERTY_L1 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define QWERTY_L2 MO(_NV), KC_A, KC_S, KC_D, KC_F, KC_G -#define QWERTY_L3 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B -#define QWERTY_L4 KC_LCTL, KC_LGUI, MO(_NP), KC_LALT, MO(_LW), KC_SPC +#define QWERTY_L2 NAVI, KC_A, KC_S, KC_D, KC_F, KC_G +#define QWERTY_L3 KC_LSFT, WIN_Z, KC_X, KC_C, KC_V, KC_B +#define QWERTY_L4 KC_LCTL, KC_LGUI, NUMPAD, KC_LALT, LOWER, KC_SPC #define QWERTY_R1 KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC #define QWERTY_R2 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define QWERTY_R3 KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT -#define QWERTY_R4 KC_ENT, MO(_LW), KC_RALT, MO(_MS), KC_APP, KC_RCTL +#define QWERTY_R3 KC_N, KC_M, KC_COMM, KC_DOT, CTL_SLH, KC_RSFT +#define QWERTY_R4 KC_ENT, RAISE, KC_RALT, MO(_MS), KC_APP, KC_RCTL + +#define QWERTY_4_DOX KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT + +/* Game Layer */ +#define GAME_L1 _______, _______, _______, _______, _______, _______ +#define GAME_L2 _______, _______, _______, _______, _______, _______ +#define GAME_L3 _______, _______, _______, _______, _______, _______ +#define GAME_L4 _______, _______, KC_LALT, LOWER, KC_SPC, KC_SPC + +#define GAME_R1 _______, _______, _______, _______, _______, _______ +#define GAME_R2 _______, _______, _______, _______, _______, _______ +#define GAME_R3 _______, _______, _______, _______, _______, _______ +#define GAME_R4 _______, _______, _______, _______, _______, _______ /* Lower / Upper Layer */ #define LOWER_L1 KC_ESC , KC_1, KC_2, KC_3, KC_4, KC_5 @@ -57,27 +86,33 @@ enum userspace_custom_keycodes { #define LOWER_R3 KC_F12, KC_GRV, _______, _______, _______, _______ #define LOWER_R4 _______, _______, _______, _______, _______, _______ +#define LOWER_4_DOX _______, _______, _______, _______, _______, _______ + /* Navigation Layer */ #define NAV_L1 _______, _______, _______, KC_LGUI, KC_DEL, KC_BSPC #define NAV_L2 _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT #define NAV_L3 _______, _______, _______, _______, _______, _______ -#define NAV_L4 _______, _______, _______, _______, _______, _______ +#define NAV_L4 _______, _______, _______, CTL_TAB, ALT_TAB, _______ #define NAV_R1 _______, KC_HOME, KC_UP , KC_END , KC_INS, _______ #define NAV_R2 _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, _______ #define NAV_R3 _______, KC_PGUP, KC_PGDN, _______, _______, _______ -#define NAV_R4 _______, _______, _______, _______, _______, _______ +#define NAV_R4 _______, KC_APP, _______, _______, _______, _______ + +#define NAV_4_DOX CTL_TAB, ALT_TAB, _______, _______, KC_APP, _______ /* Numpad Layer */ -#define NUMPAD_L1 RGB_TOG, RGB_MOD, _______, _______, RGB_HUD, RGB_HUI +#define NUMPAD_L1 RGB_TOG, RGB_MOD,RGB_RMOD, _______, RGB_HUD, RGB_HUI #define NUMPAD_L2 BL_TOGG, BL_STEP, BL_BRTG, _______, RGB_SAD, RGB_SAI #define NUMPAD_L3 _______, _______, _______, _______, RGB_VAD, RGB_VAI -#define NUMPAD_L4 RESET, VRSN, _______, _______, RGB_SPD, RGB_SPI +#define NUMPAD_L4 _______, _______, _______, _______, RGB_SPD, RGB_SPI + +#define NUMPAD_R1 DF(_QW),DF(_GAME), _______, _______, _______, RESET +#define NUMPAD_R2 _______, _______, _______, _______, _______, _______ +#define NUMPAD_R3 VRSN, _______, _______, _______, _______, _______ +#define NUMPAD_R4 _______, _______, _______, _______, _______, _______ -#define NUMPAD_R1 _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______ -#define NUMPAD_R2 _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______ -#define NUMPAD_R3 _______, KC_P1, KC_P2, KC_P3, KC_PAST, KC_ENT -#define NUMPAD_R4 _______, KC_P0, XXXXXXX, KC_PDOT, KC_PSLS, KC_ENT +#define NUMPAD_4_DOX _______, _______, _______, _______, _______, _______ /* Mouse Layer */ #define MOUSE_L1 _______, _______, _______, _______, _______, _______ @@ -90,11 +125,18 @@ enum userspace_custom_keycodes { #define MOUSE_R3 _______, _______, _______, _______, _______, _______ #define MOUSE_R4 KC_BTN2, _______, _______, _______, _______, _______ +#define MOUSE_4_DOX _______, _______, _______, _______, _______, _______ + #define QWERTY_1_12 QWERTY_L1, QWERTY_R1 #define QWERTY_2_12 QWERTY_L2, QWERTY_R2 #define QWERTY_3_12 QWERTY_L3, QWERTY_R3 #define QWERTY_4_12 QWERTY_L4, QWERTY_R4 +#define GAME_1_12 GAME_L1, GAME_R1 +#define GAME_2_12 GAME_L2, GAME_R2 +#define GAME_3_12 GAME_L3, GAME_R3 +#define GAME_4_12 GAME_L4, GAME_R4 + #define LOWER_1_12 LOWER_L1, LOWER_R1 #define LOWER_2_12 LOWER_L2, LOWER_R2 #define LOWER_3_12 LOWER_L3, LOWER_R3 @@ -116,6 +158,7 @@ enum userspace_custom_keycodes { #define MOUSE_4_12 MOUSE_L4, MOUSE_R4 #define QWERTY_4x12 QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_4_12 +#define GAME_4x12 GAME_1_12, GAME_2_12, GAME_3_12, GAME_4_12 #define LOWER_4x12 LOWER_1_12, LOWER_2_12, LOWER_3_12, LOWER_4_12 #define NAV_4x12 NAV_1_12, NAV_2_12, NAV_3_12, NAV_4_12 #define NUMPAD_4x12 NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_4_12 From 2b1b5fed2a4b9986efb268a4788dee404d061c84 Mon Sep 17 00:00:00 2001 From: FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> Date: Sun, 10 Mar 2019 13:04:10 -0400 Subject: [PATCH 288/445] 412_64 move to handwired (#5359) * 412_64 move to handwired 412_64 and its second printing, Mark Zero Stand Aside, are now obsolesced by new hardware. As only two units exist in the wild not owned by me, I'm moving the definition to handwired. * Mark 3 Stand Aside ready for production. Uploading firmware, compiled and tested, for Mark 3 Stand Aside. The hardware's ready, now the software is too. * Whoops. Should've branched before pushing Stand Aside. Sorry 'bout that. * Revert "Whoops." This reverts commit d222046cfe6183ed0c42286ec9ebb5034a5d1009. * Revert "Mark 3 Stand Aside ready for production." This reverts commit c790899af7a6d92855aebe6a96003f1fe9be66b3. --- keyboards/{ => handwired}/412_64/412_64.c | 0 keyboards/{ => handwired}/412_64/412_64.h | 0 keyboards/{ => handwired}/412_64/config.h | 0 keyboards/{ => handwired}/412_64/keymaps/default/config.h | 0 keyboards/{ => handwired}/412_64/keymaps/default/keymap.c | 0 keyboards/{ => handwired}/412_64/keymaps/default/rules.mk | 0 keyboards/{ => handwired}/412_64/readme.md | 8 ++++---- keyboards/{ => handwired}/412_64/rules.mk | 0 8 files changed, 4 insertions(+), 4 deletions(-) rename keyboards/{ => handwired}/412_64/412_64.c (100%) rename keyboards/{ => handwired}/412_64/412_64.h (100%) rename keyboards/{ => handwired}/412_64/config.h (100%) rename keyboards/{ => handwired}/412_64/keymaps/default/config.h (100%) rename keyboards/{ => handwired}/412_64/keymaps/default/keymap.c (100%) rename keyboards/{ => handwired}/412_64/keymaps/default/rules.mk (100%) rename keyboards/{ => handwired}/412_64/readme.md (67%) rename keyboards/{ => handwired}/412_64/rules.mk (100%) diff --git a/keyboards/412_64/412_64.c b/keyboards/handwired/412_64/412_64.c similarity index 100% rename from keyboards/412_64/412_64.c rename to keyboards/handwired/412_64/412_64.c diff --git a/keyboards/412_64/412_64.h b/keyboards/handwired/412_64/412_64.h similarity index 100% rename from keyboards/412_64/412_64.h rename to keyboards/handwired/412_64/412_64.h diff --git a/keyboards/412_64/config.h b/keyboards/handwired/412_64/config.h similarity index 100% rename from keyboards/412_64/config.h rename to keyboards/handwired/412_64/config.h diff --git a/keyboards/412_64/keymaps/default/config.h b/keyboards/handwired/412_64/keymaps/default/config.h similarity index 100% rename from keyboards/412_64/keymaps/default/config.h rename to keyboards/handwired/412_64/keymaps/default/config.h diff --git a/keyboards/412_64/keymaps/default/keymap.c b/keyboards/handwired/412_64/keymaps/default/keymap.c similarity index 100% rename from keyboards/412_64/keymaps/default/keymap.c rename to keyboards/handwired/412_64/keymaps/default/keymap.c diff --git a/keyboards/412_64/keymaps/default/rules.mk b/keyboards/handwired/412_64/keymaps/default/rules.mk similarity index 100% rename from keyboards/412_64/keymaps/default/rules.mk rename to keyboards/handwired/412_64/keymaps/default/rules.mk diff --git a/keyboards/412_64/readme.md b/keyboards/handwired/412_64/readme.md similarity index 67% rename from keyboards/412_64/readme.md rename to keyboards/handwired/412_64/readme.md index 08110310750b..042bacfaf1b0 100644 --- a/keyboards/412_64/readme.md +++ b/keyboards/handwired/412_64/readme.md @@ -1,15 +1,15 @@ # 412-64 -![412-64](image_here) +![412-64](https://i.imgur.com/ixuv3OM.jpg) A compact 60% keyboard designed by Fate Everywhere and sold on a limited basis. Born out of the desire for a Planck with a numpad for technical work. Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere) -Hardware Supported: 4x16 T&E Prototype, 412-64 Mk. 0, Mk. 1. -Hardware Availability: Highly limited, contact /u/FateEverywhere on reddit for availability. +Hardware Supported: 4x16 T&E Prototype, Mark Zero Stand Aside. +Hardware Availability: No longer available, was a tester for Stand Aside. Build definitions are in handwired because two units are in the wild. Make example for this keyboard (after setting up your build environment): - make 412-64:default + make handwired/412_64: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/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk similarity index 100% rename from keyboards/412_64/rules.mk rename to keyboards/handwired/412_64/rules.mk From c8ad13d0f970c7f424ea5da48181ad449f4ae09f Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Mon, 11 Mar 2019 01:15:53 +0800 Subject: [PATCH 289/445] fix dz60rgb config.qmk.fm non-combile (#5356) * Update config.h * Update config.h * Update config.h * Delete config.h * Update config.h * Update config.h * Update config.h * Delete config.h --- keyboards/dztech/dz60rgb/config.h | 3 ++- keyboards/dztech/dz60rgb/keymaps/ansi/config.h | 2 ++ keyboards/dztech/dz60rgb/keymaps/default/config.h | 3 --- keyboards/dztech/dz60rgb/keymaps/hhkb/config.h | 2 ++ keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h | 2 ++ keyboards/dztech/dz60rgb/keymaps/iso/config.h | 2 ++ keyboards/dztech/dz60rgb/keymaps/mekanist/config.h | 3 --- 7 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 keyboards/dztech/dz60rgb/keymaps/default/config.h delete mode 100644 keyboards/dztech/dz60rgb/keymaps/mekanist/config.h diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index 814cb6520f6f..a1b3a19d9fc6 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -31,4 +31,5 @@ #define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 2 - +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/config.h b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h index 2e7122b3cc75..3ca582e84b42 100644 --- a/keyboards/dztech/dz60rgb/keymaps/ansi/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h @@ -1,4 +1,6 @@ #pragma once #define dzrgb60_ansi +#undef DRIVER_1_LED_TOTAL +#undef DRIVER_LED_TOTAL #define DRIVER_1_LED_TOTAL 61 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/default/config.h b/keyboards/dztech/dz60rgb/keymaps/default/config.h deleted file mode 100644 index 558b6023d575..000000000000 --- a/keyboards/dztech/dz60rgb/keymaps/default/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb/config.h b/keyboards/dztech/dz60rgb/keymaps/hhkb/config.h index a0a0e899f8fa..70f4bde25fea 100644 --- a/keyboards/dztech/dz60rgb/keymaps/hhkb/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/hhkb/config.h @@ -1,4 +1,6 @@ #pragma once #define dzrgb60_hhkb +#undef DRIVER_1_LED_TOTAL +#undef DRIVER_LED_TOTAL #define DRIVER_1_LED_TOTAL 62 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h index bdafd9cd6026..2bc3519de71e 100644 --- a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h @@ -1,4 +1,6 @@ #pragma once #define dzrgb60_hhkb_iso +#undef DRIVER_1_LED_TOTAL +#undef DRIVER_LED_TOTAL #define DRIVER_1_LED_TOTAL 62 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/iso/config.h b/keyboards/dztech/dz60rgb/keymaps/iso/config.h index bc830ff18d66..7ad810a162f0 100644 --- a/keyboards/dztech/dz60rgb/keymaps/iso/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/iso/config.h @@ -1,4 +1,6 @@ #pragma once #define dzrgb60_iso +#undef DRIVER_1_LED_TOTAL +#undef DRIVER_LED_TOTAL #define DRIVER_1_LED_TOTAL 61 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/config.h b/keyboards/dztech/dz60rgb/keymaps/mekanist/config.h deleted file mode 100644 index 558b6023d575..000000000000 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL From ad12acd3c049e1eef02ac21bb749eda375e09cec Mon Sep 17 00:00:00 2001 From: the-frey Date: Sun, 10 Mar 2019 17:17:43 +0000 Subject: [PATCH 290/445] Add personal keymap for crkbd (#5208) * Add a crkbd layout with nkro on by default, and an emacs-friendly layout for clojure * Added readme and image * Add changes as requested on PR --- keyboards/crkbd/keymaps/thefrey/README.md | 16 ++ keyboards/crkbd/keymaps/thefrey/config.h | 45 ++++ keyboards/crkbd/keymaps/thefrey/keymap.c | 244 ++++++++++++++++++++++ keyboards/crkbd/keymaps/thefrey/rules.mk | 31 +++ 4 files changed, 336 insertions(+) create mode 100644 keyboards/crkbd/keymaps/thefrey/README.md create mode 100644 keyboards/crkbd/keymaps/thefrey/config.h create mode 100644 keyboards/crkbd/keymaps/thefrey/keymap.c create mode 100644 keyboards/crkbd/keymaps/thefrey/rules.mk diff --git a/keyboards/crkbd/keymaps/thefrey/README.md b/keyboards/crkbd/keymaps/thefrey/README.md new file mode 100644 index 000000000000..69b20cfcd6a3 --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/README.md @@ -0,0 +1,16 @@ +![the-frey-layout](https://raw.githubusercontent.com/the-frey/the-frey.github.com/master/assets/images/keyboard-layout.jpg) + +# Keyboard layout by the-frey + +This is a layout that allows access to all the paren keys easily, has a tab on the lower layer (for SUPER-TAB app switching) and some utility features like PGUP/PGDOWN and HOME/END. + +In addition, the arrows are on the lower layer and are bound to the vim keys (h,j,k,l). I've found this a productive layout for programming in emacs and hopefully you will too. + +The layout image above shows the keymap, with each key marked with all three layers: + +- The top indicates the raise layer +- The middle indicates the default layer +- The bottom indicates the lower layer + +All the keys respond as you'd expect to the 'shift' key - i.e. on a UK/GB keyboard, `/` becomes `?` and so on. + diff --git a/keyboards/crkbd/keymaps/thefrey/config.h b/keyboards/crkbd/keymaps/thefrey/config.h new file mode 100644 index 000000000000..cee901fc816e --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/config.h @@ -0,0 +1,45 @@ +/* +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C +#define FORCE_NKRO + +/* Select hand configuration */ + +#define MASTER_LEFT +// #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 diff --git a/keyboards/crkbd/keymaps/thefrey/keymap.c b/keyboards/crkbd/keymaps/thefrey/keymap.c new file mode 100644 index 000000000000..5077bfc87cf5 --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/keymap.c @@ -0,0 +1,244 @@ +#include QMK_KEYBOARD_H +#include "bootloader.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; + +// 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, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#define KC_CTLTB CTL_T(KC_TAB) +#define KC_GUIEI GUI_T(KC_LANG2) +#define KC_ALTKN ALT_T(KC_LANG1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, MUTE, VOLD, VOLU, PGUP, PGDN, LEFT, DOWN, UP, RIGHT, HOME, END,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ) +}; + +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) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + 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; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + 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; +} + diff --git a/keyboards/crkbd/keymaps/thefrey/rules.mk b/keyboards/crkbd/keymaps/thefrey/rules.mk new file mode 100644 index 000000000000..16deaf45d1de --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/rules.mk @@ -0,0 +1,31 @@ + +# 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 = 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 + +# 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 \ From 9bea41c9b239916ae8786e7df02c29fad79ef459 Mon Sep 17 00:00:00 2001 From: ai03 Date: Sun, 10 Mar 2019 19:57:36 -0700 Subject: [PATCH 291/445] [Keyboard] Add Orbit keyboard (#5306) * Get things working except indicators * Attempt to get things working * hmm * Compiles but doesn't run * Make data transfer work * Get all indicators working * Remove old transport * Prepare for pullreq * Revert keymap from testing to production * Final error checking for pull request * Remove autogenerated is_command from config.h * Rewrite pin toggles using qmk functions --- keyboards/ai03/orbit/config.h | 249 ++++++++ keyboards/ai03/orbit/info.json | 0 keyboards/ai03/orbit/keymaps/default/keymap.c | 91 +++ .../ai03/orbit/keymaps/default/readme.md | 3 + keyboards/ai03/orbit/matrix.c | 328 +++++++++++ keyboards/ai03/orbit/matrix.h | 3 + keyboards/ai03/orbit/orbit.c | 228 ++++++++ keyboards/ai03/orbit/orbit.h | 65 +++ keyboards/ai03/orbit/readme.md | 15 + keyboards/ai03/orbit/rules.mk | 92 +++ keyboards/ai03/orbit/serial.c | 546 ++++++++++++++++++ keyboards/ai03/orbit/serial.h | 62 ++ keyboards/ai03/orbit/split_flags.c | 5 + keyboards/ai03/orbit/split_flags.h | 15 + keyboards/ai03/orbit/split_util.c | 87 +++ keyboards/ai03/orbit/split_util.h | 10 + keyboards/ai03/orbit/transport.c | 238 ++++++++ keyboards/ai03/orbit/transport.h | 42 ++ 18 files changed, 2079 insertions(+) create mode 100644 keyboards/ai03/orbit/config.h create mode 100644 keyboards/ai03/orbit/info.json create mode 100644 keyboards/ai03/orbit/keymaps/default/keymap.c create mode 100644 keyboards/ai03/orbit/keymaps/default/readme.md create mode 100644 keyboards/ai03/orbit/matrix.c create mode 100644 keyboards/ai03/orbit/matrix.h create mode 100644 keyboards/ai03/orbit/orbit.c create mode 100644 keyboards/ai03/orbit/orbit.h create mode 100644 keyboards/ai03/orbit/readme.md create mode 100644 keyboards/ai03/orbit/rules.mk create mode 100644 keyboards/ai03/orbit/serial.c create mode 100644 keyboards/ai03/orbit/serial.h create mode 100644 keyboards/ai03/orbit/split_flags.c create mode 100644 keyboards/ai03/orbit/split_flags.h create mode 100644 keyboards/ai03/orbit/split_util.c create mode 100644 keyboards/ai03/orbit/split_util.h create mode 100644 keyboards/ai03/orbit/transport.c create mode 100644 keyboards/ai03/orbit/transport.h diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h new file mode 100644 index 000000000000..f4dc4fd636c5 --- /dev/null +++ b/keyboards/ai03/orbit/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2018 Ryota Goto + +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 0xA103 +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0003 +#define MANUFACTURER ai03 Keyboard Designs +#define PRODUCT Orbit +#define DESCRIPTION Split ergonomic keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 // Double rows for split keyboards. Orbit has 5, so define 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 { F7, F6, F5, F4, D3 } +#define MATRIX_COL_PINS { C7, B4, D7, D6, D4, F1, F0 } +#define MATRIX_ROW_PINS_RIGHT { B6, B5, B4, D7, E6 } +#define MATRIX_COL_PINS_RIGHT { D4, D6, F1, F0, F4, F5, C6 } + +#define SPLIT_HAND_PIN D5 + +//#define USE_I2C + +#define SELECT_SOFT_SERIAL_SPEED 1 + +#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. + * + */ + +/* 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/ai03/orbit/info.json b/keyboards/ai03/orbit/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/ai03/orbit/keymaps/default/keymap.c b/keyboards/ai03/orbit/keymaps/default/keymap.c new file mode 100644 index 000000000000..4c8c39fb0f22 --- /dev/null +++ b/keyboards/ai03/orbit/keymaps/default/keymap.c @@ -0,0 +1,91 @@ +/* Copyright 2018 Ryota Goto + * + * 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 { + MANUAL = SAFE_RANGE, + DBLZERO +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + TO(1), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_BSPC, \ + TO(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS, \ + KC_NO, 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_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_DEL, \ + KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_GRV, KC_MENU, KC_MINS, KC_EQL + ), + [1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */ + TO(2), _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU, _______, \ + TO(2), _______, _______, KC_PGUP, _______, _______, KC_F11, KC_F12, _______, KC_UP, _______, _______, KC_VOLD, BL_STEP, \ + TO(0), _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \ + TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( /* Mousekeys and Numpad */ + KC_NO, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, \ + KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, \ + TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, \ + TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MANUAL: + if (record->event.pressed) + { + // Keypress + SEND_STRING("https://kb.ai03.me/redir/orbit"); + } + else + { + // Key release + } + break; + case DBLZERO: + if (record->event.pressed) + { + // Keypress + SEND_STRING("00"); + } + else + { + // Key release + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +uint32_t layer_state_set_user(uint32_t state) { + + return state; +} diff --git a/keyboards/ai03/orbit/keymaps/default/readme.md b/keyboards/ai03/orbit/keymaps/default/readme.md new file mode 100644 index 000000000000..63c528abfa58 --- /dev/null +++ b/keyboards/ai03/orbit/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Orbit + +[KLE of layout](http://www.keyboard-layout-editor.com/#/gists/53ebf59524de12515cb7e2e6de94f0d6) \ No newline at end of file diff --git a/keyboards/ai03/orbit/matrix.c b/keyboards/ai03/orbit/matrix.c new file mode 100644 index 000000000000..a1509666cd5b --- /dev/null +++ b/keyboards/ai03/orbit/matrix.c @@ -0,0 +1,328 @@ +/* +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 "wait.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "config.h" +#include "split_flags.h" +#include "quantum.h" +#include "debounce.h" +#include "transport.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +//#define ROWS_PER_HAND (MATRIX_ROWS / 2) + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#else +static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t raw_matrix[ROWS_PER_HAND]; + +// row offsets for each hand +uint8_t thisHand, thatHand; + +// user-defined overridable functions + +__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) {} + +__attribute__((weak)) void matrix_slave_scan_user(void) {} + +// helper functions + +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } + +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } + +bool matrix_is_modified(void) { + if (debounce_active()) return false; + return true; +} + +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } + +inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } + +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == COL2ROW) + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index])) { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } else { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +#endif + +void matrix_init(void) { + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + + // Set pinout for right half if pinout for that half is defined + if (!isLeftHand) { +#ifdef MATRIX_ROW_PINS_RIGHT + const uint8_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + row_pins[i] = row_pins_right[i]; + } +#endif +#ifdef MATRIX_COL_PINS_RIGHT + const uint8_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_COLS; i++) { + col_pins[i] = col_pins_right[i]; + } +#endif + } + + thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); + thatHand = ROWS_PER_HAND - thisHand; + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + + debounce_init(ROWS_PER_HAND); + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } +#endif + + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + + return 1; +} + +uint8_t matrix_scan(void) { + uint8_t ret = _matrix_scan(); + + if (is_keyboard_master()) { + static uint8_t error_count; + + if (!transport_master(matrix + thatHand)) { + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[thatHand + i] = 0; + } + } + } else { + error_count = 0; + } + + matrix_scan_quantum(); + } else { + transport_slave(matrix + thisHand); + matrix_slave_scan_user(); + } + + return ret; +} diff --git a/keyboards/ai03/orbit/matrix.h b/keyboards/ai03/orbit/matrix.h new file mode 100644 index 000000000000..c2bdd3098c1d --- /dev/null +++ b/keyboards/ai03/orbit/matrix.h @@ -0,0 +1,3 @@ +#pragma once + +#include diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c new file mode 100644 index 000000000000..2f149875b1cb --- /dev/null +++ b/keyboards/ai03/orbit/orbit.c @@ -0,0 +1,228 @@ +/* Copyright 2018 Ryota Goto + * + * 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 "orbit.h" +#include "split_util.h" +#include "transport.h" + + +// Call led_toggle to set LEDs easily +// LED IDs: +// +// (LEFT) 0 1 2 | 3 4 5 (RIGHT) + +void led_toggle(int id, bool on) { + + if (isLeftHand) { + switch(id) { + case 0: + // Left hand C6 + if (on) + //PORTC |= (1<<6); + writePinHigh(C6); + else + //PORTC &= ~(1<<6); + writePinLow(C6); + break; + case 1: + // Left hand B6 + if (on) + //PORTB |= (1<<6); + writePinHigh(B6); + else + //PORTB &= ~(1<<6); + writePinLow(B6); + break; + case 2: + // Left hand B5 + if (on) + //PORTB |= (1<<5); + writePinHigh(B5); + else + //PORTB &= ~(1<<5); + writePinLow(B5); + break; + default: + break; + } + } else { + switch(id) { + case 3: + // Right hand F6 + if (on) + //PORTF |= (1<<6); + writePinHigh(F6); + else + //PORTF &= ~(1<<6); + writePinLow(F6); + break; + case 4: + // Right hand F7 + if (on) + //PORTF |= (1<<7); + writePinHigh(F7); + else + //PORTF &= ~(1<<7); + writePinLow(F7); + break; + case 5: + // Right hand C7 + if (on) + //PORTC |= (1<<7); + writePinHigh(C7); + else + //PORTC &= ~(1<<7); + writePinLow(C7); + break; + default: + break; + } + } +} + +// Set all LEDs at once using an array of 6 booleans +// LED IDs: +// +// (LEFT) 0 1 2 | 3 4 5 (RIGHT) +// +// Ex. set_all_leds({ false, false, false, true, true, true }) would turn off left hand, turn on right hand + +void set_all_leds(bool leds[6]) { + for (int i = 0; i < 6; i++) { + led_toggle(i, leds[i]); + } +} + +void set_layer_indicators(uint8_t layer) { + + switch (layer) + { + case 0: + led_toggle(0, true); + led_toggle(1, false); + led_toggle(2, false); + break; + case 1: + led_toggle(0, true); + led_toggle(1, true); + led_toggle(2, false); + break; + case 2: + led_toggle(0, true); + led_toggle(1, true); + led_toggle(2, true); + break; + case 3: + led_toggle(0, false); + led_toggle(1, true); + led_toggle(2, true); + break; + case 4: + led_toggle(0, false); + led_toggle(1, false); + led_toggle(2, true); + break; + default: + led_toggle(0, true); + led_toggle(1, false); + led_toggle(2, true); + break; + } + +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // Initialize indicator LEDs to output + if (isLeftHand) + { + setPinOutput(C6); + setPinOutput(B6); + setPinOutput(B5); + //DDRC |= (1<<6); + //DDRB |= (1<<6); + //DDRB |= (1<<5); + } + else + { + setPinOutput(F6); + setPinOutput(F7); + setPinOutput(C7); + //DDRF |= (1<<6); + //DDRF |= (1<<7); + //DDRC |= (1<<7); + } + + set_layer_indicators(0); + + 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 + + if (is_keyboard_master()) { + + serial_m2s_buffer.nlock_led = IS_LED_ON(usb_led, USB_LED_NUM_LOCK); + serial_m2s_buffer.clock_led = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK); + serial_m2s_buffer.slock_led = IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK); + + led_toggle(3, IS_LED_ON(usb_led, USB_LED_NUM_LOCK)); + led_toggle(4, IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)); + led_toggle(5, IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)); + + } + + led_set_user(usb_led); +} + +uint32_t layer_state_set_kb(uint32_t state) { + + if (is_keyboard_master()) + { + + current_layer = biton32(state); + serial_m2s_buffer.current_layer = biton32(state); + + // If left half, do the LED toggle thing + if (isLeftHand) + { + set_layer_indicators(biton32(state)); + } + + } + // NOTE: Do not set slave LEDs here. + // This is not called on slave + + return layer_state_set_user(state); +} + + diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h new file mode 100644 index 000000000000..211b9ebca9e2 --- /dev/null +++ b/keyboards/ai03/orbit/orbit.h @@ -0,0 +1,65 @@ +/* Copyright 2018 Ryota Goto + * + * 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 ORBIT_H +#define ORBIT_H + +#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. + */ + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + + +#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, \ + L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45 \ +) \ +{ \ + { 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, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, KC_NO } \ +} + +uint8_t current_layer; + +extern void led_toggle(int id, bool on); +void set_all_leds(bool leds[6]); +extern void set_layer_indicators(uint8_t layer); + +#endif diff --git a/keyboards/ai03/orbit/readme.md b/keyboards/ai03/orbit/readme.md new file mode 100644 index 000000000000..58ba2079d5de --- /dev/null +++ b/keyboards/ai03/orbit/readme.md @@ -0,0 +1,15 @@ +# Orbit + +![Orbit](https://raw.githubusercontent.com/ai03-2725/Orbit/master/Images/PCB-R2.0.jpg) + +A split ergonomic keyboard project. + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: The [Orbit PCB](https://github.com/ai03-2725/Orbit) +Hardware Availability: [This repository](https://github.com/ai03-2725/Orbit) has PCB files. Case group buy orders are currently closed. + +Make example for this keyboard (after setting up your build environment): + + make ai03/orbit: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/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk new file mode 100644 index 000000000000..4b40e47cb7e8 --- /dev/null +++ b/keyboards/ai03/orbit/rules.mk @@ -0,0 +1,92 @@ +SRC += split_util.c \ + split_flags.c \ + serial.c \ + transport.c \ + matrix.c + +# 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 = 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # 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) +USE_I2C = no # I2C for split communication +CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c) +# SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files + + diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c new file mode 100644 index 000000000000..1315377a3459 --- /dev/null +++ b/keyboards/ai03/orbit/serial.c @@ -0,0 +1,546 @@ +/* + * 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 +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_AVR_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 + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// 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 (Experimental only) +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#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 + #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 + #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 + #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 + #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 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 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#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) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#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); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + 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); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +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, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +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 = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +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 = 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(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + 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) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + 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 + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + 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; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +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(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#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(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // 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; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // 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; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#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) +// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669) diff --git a/keyboards/ai03/orbit/serial.h b/keyboards/ai03/orbit/serial.h new file mode 100644 index 000000000000..1c1e640069c9 --- /dev/null +++ b/keyboards/ai03/orbit/serial.h @@ -0,0 +1,62 @@ +#pragma once + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #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 (using signle-type transaction function) +// /* nothing */ +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + 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, int sstd_table_size); +// target is interrupt accept side +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 +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif diff --git a/keyboards/ai03/orbit/split_flags.c b/keyboards/ai03/orbit/split_flags.c new file mode 100644 index 000000000000..1f5825d65020 --- /dev/null +++ b/keyboards/ai03/orbit/split_flags.c @@ -0,0 +1,5 @@ +#include "split_flags.h" + +volatile bool RGB_DIRTY = false; + +volatile bool BACKLIT_DIRTY = false; \ No newline at end of file diff --git a/keyboards/ai03/orbit/split_flags.h b/keyboards/ai03/orbit/split_flags.h new file mode 100644 index 000000000000..aaac474a7dbf --- /dev/null +++ b/keyboards/ai03/orbit/split_flags.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +/** +* Global Flags +**/ + +//RGB Stuff +extern volatile bool RGB_DIRTY; + + +//Backlight Stuff +extern volatile bool BACKLIT_DIRTY; diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c new file mode 100644 index 000000000000..5095cb8fdce1 --- /dev/null +++ b/keyboards/ai03/orbit/split_util.c @@ -0,0 +1,87 @@ +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" +#include "split_flags.h" +#include "transport.h" +#include "quantum.h" + +#ifdef EE_HANDS +# include "tmk_core/common/eeprom.h" +# include "eeconfig.h" +#endif + +volatile bool isLeftHand = true; + +__attribute__((weak)) +bool is_keyboard_left(void) { + #ifdef SPLIT_HAND_PIN + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInput(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); + #else + #ifdef EE_HANDS + return eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + #ifdef MASTER_RIGHT + return !is_keyboard_master(); + #else + return is_keyboard_master(); + #endif + #endif + #endif +} + +bool is_keyboard_master(void) +{ +#ifdef __AVR__ + static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; + + // only check once, as this is called often + if (usbstate == UNKNOWN) + { + USBCON |= (1 << OTGPADE); // enables VBUS pad + wait_us(5); + + usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS + } + + return (usbstate == MASTER); +#else + return true; +#endif +} + +static void keyboard_master_setup(void) { +#if defined(USE_I2C) || defined(EH) + #ifdef SSD1306OLED + matrix_master_OLED_init (); + #endif +#endif + transport_master_init(); + + // For master the Backlight info needs to be sent on startup + // Otherwise the salve won't start with the proper info until an update + BACKLIT_DIRTY = true; +} + +static void keyboard_slave_setup(void) +{ + transport_slave_init(); +} + +// this code runs before the usb and keyboard is initialized +void matrix_setup(void) +{ + isLeftHand = is_keyboard_left(); + + if (is_keyboard_master()) + { + keyboard_master_setup(); + } + else + { + keyboard_slave_setup(); + } +} diff --git a/keyboards/ai03/orbit/split_util.h b/keyboards/ai03/orbit/split_util.h new file mode 100644 index 000000000000..20f7535bf44b --- /dev/null +++ b/keyboards/ai03/orbit/split_util.h @@ -0,0 +1,10 @@ +#pragma once + +#include +#include +#include +#include + +extern volatile bool isLeftHand; + +void matrix_master_OLED_init (void); diff --git a/keyboards/ai03/orbit/transport.c b/keyboards/ai03/orbit/transport.c new file mode 100644 index 000000000000..adedf2432205 --- /dev/null +++ b/keyboards/ai03/orbit/transport.c @@ -0,0 +1,238 @@ + +#include "transport.h" + +#include "config.h" +#include "matrix.h" +#include "quantum.h" + +#include "orbit.h" + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif + +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" + extern backlight_config_t backlight_config; +#endif + +#if defined(USE_I2C) || defined(EH) + +#include "i2c.h" + +#ifndef SLAVE_I2C_ADDRESS +# define SLAVE_I2C_ADDRESS 0x32 +#endif + +#if (MATRIX_COLS > 8) +# error "Currently only supports 8 COLS" +#endif + +// Get rows from other half over i2c +bool transport_master(matrix_row_t matrix[]) { + int err = 0; + + // write backlight info +#ifdef BACKLIGHT_ENABLE + if (BACKLIT_DIRTY) { + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) { goto i2c_error; } + + // Backlight location + err = i2c_master_write(I2C_BACKLIT_START); + if (err) { goto i2c_error; } + + // Write backlight + i2c_master_write(get_backlight_level()); + + BACKLIT_DIRTY = false; + } +#endif + + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) { goto i2c_error; } + + // start of matrix stored at I2C_KEYMAP_START + err = i2c_master_write(I2C_KEYMAP_START); + 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[i] = i2c_master_read(I2C_ACK); + } + matrix[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 false; + } + +#ifdef RGBLIGHT_ENABLE + if (RGB_DIRTY) { + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) { goto i2c_error; } + + // RGB Location + err = i2c_master_write(I2C_RGB_START); + if (err) { goto i2c_error; } + + uint32_t dword = eeconfig_read_rgblight(); + + // Write RGB + err = i2c_master_write_data(&dword, 4); + if (err) { goto i2c_error; } + + RGB_DIRTY = false; + i2c_master_stop(); + } +#endif + + return true; +} + +void transport_slave(matrix_row_t matrix[]) { + + for (int i = 0; i < ROWS_PER_HAND; ++i) + { + i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i]; + } + // Read Backlight Info + #ifdef BACKLIGHT_ENABLE + if (BACKLIT_DIRTY) + { + backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]); + BACKLIT_DIRTY = false; + } + #endif + #ifdef RGBLIGHT_ENABLE + if (RGB_DIRTY) + { + // Disable interupts (RGB data is big) + cli(); + // Create new DWORD for RGB data + uint32_t dword; + + // Fill the new DWORD with the data that was sent over + uint8_t * dword_dat = (uint8_t *)(&dword); + for (int i = 0; i < 4; i++) + { + dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i]; + } + + // Update the RGB now with the new data and set RGB_DIRTY to false + rgblight_update_dword(dword); + RGB_DIRTY = false; + // Re-enable interupts now that RGB is set + sei(); + } + #endif +} + +void transport_master_init(void) { + i2c_master_init(); +} + +void transport_slave_init(void) { + i2c_slave_init(SLAVE_I2C_ADDRESS); +} + +#else // USE_SERIAL + +#include "serial.h" + + + +volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; +volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; +uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer, + sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer + } +}; + +uint8_t slave_layer_cache; +uint8_t slave_nlock_cache; +uint8_t slave_clock_cache; +uint8_t slave_slock_cache; + +void transport_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void transport_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); + slave_layer_cache = 255; + slave_nlock_cache = 255; + slave_clock_cache = 255; + slave_slock_cache = 255; +} + +bool transport_master(matrix_row_t matrix[]) { + + if (soft_serial_transaction()) { + return false; + } + + // TODO: if MATRIX_COLS > 8 change to unpack() + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[i] = serial_s2m_buffer.smatrix[i]; + } + + #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // Code to send RGB over serial goes here (not implemented yet) + #endif + + #ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; + #endif + + return true; +} + +void transport_slave(matrix_row_t matrix[]) { + + // TODO: if MATRIX_COLS > 8 change to pack() + for (int i = 0; i < ROWS_PER_HAND; ++i) + { + serial_s2m_buffer.smatrix[i] = matrix[i]; + } + #ifdef BACKLIGHT_ENABLE + backlight_set(serial_m2s_buffer.backlight_level); + #endif + #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // Add serial implementation for RGB here + #endif + + if (slave_layer_cache != serial_m2s_buffer.current_layer) { + slave_layer_cache = serial_m2s_buffer.current_layer; + set_layer_indicators(slave_layer_cache); + } + + if (slave_nlock_cache != serial_m2s_buffer.nlock_led) { + slave_nlock_cache = serial_m2s_buffer.nlock_led; + led_toggle(3, slave_nlock_cache); + } + if (slave_clock_cache != serial_m2s_buffer.clock_led) { + slave_clock_cache = serial_m2s_buffer.clock_led; + led_toggle(4, slave_clock_cache); + } + if (slave_slock_cache != serial_m2s_buffer.slock_led) { + slave_slock_cache = serial_m2s_buffer.slock_led; + led_toggle(5, slave_slock_cache); + } + +} + +#endif diff --git a/keyboards/ai03/orbit/transport.h b/keyboards/ai03/orbit/transport.h new file mode 100644 index 000000000000..422e2ecb9902 --- /dev/null +++ b/keyboards/ai03/orbit/transport.h @@ -0,0 +1,42 @@ +#pragma once + +#include + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +typedef struct _Serial_s2m_buffer_t { + // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack + matrix_row_t smatrix[ROWS_PER_HAND]; +} Serial_s2m_buffer_t; + +typedef struct _Serial_m2s_buffer_t { +#ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +#endif +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + rgblight_config_t rgblight_config; //not yet use + // + // When MCUs on both sides drive their respective RGB LED chains, + // it is necessary to synchronize, so it is necessary to communicate RGB information. + // In that case, define the RGBLIGHT_SPLIT macro. + // + // Otherwise, if the master side MCU drives both sides RGB LED chains, + // there is no need to communicate. +#endif + + uint8_t current_layer; + uint8_t nlock_led; + uint8_t clock_led; + uint8_t slock_led; + +} Serial_m2s_buffer_t; + +extern volatile Serial_s2m_buffer_t serial_s2m_buffer; +extern volatile Serial_m2s_buffer_t serial_m2s_buffer; + +void transport_master_init(void); +void transport_slave_init(void); + +// returns false if valid data not received from slave +bool transport_master(matrix_row_t matrix[]); +void transport_slave(matrix_row_t matrix[]); From eb48e5ebdb03231c29ab2eea06a996fd077daa69 Mon Sep 17 00:00:00 2001 From: Joel Yauk Date: Sun, 10 Mar 2019 22:09:56 -0500 Subject: [PATCH 292/445] [Keyboard] Add ISO backslash key position to facew matrix and keymap files (#5190) * Add ISO backslash key position to matrix and keymap files * Use KC_NO instead of KC_BSLS for unused position in custom keymap * Add new key position to json layout file used by online configurator --- keyboards/facew/facew.h | 4 ++-- keyboards/facew/info.json | 2 +- keyboards/facew/keymaps/default/keymap.c | 6 +++--- keyboards/facew/keymaps/mechmerlin/keymap.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/facew/facew.h b/keyboards/facew/facew.h index 7d949de98e36..215e06090cc0 100644 --- a/keyboards/facew/facew.h +++ b/keyboards/facew/facew.h @@ -23,7 +23,7 @@ along with this program. If not, see . #define LAYOUT_all( \ K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ - K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ + K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K48, K40, \ K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\ K09, K00, K39, K30, K59, K69, K57, K29\ ){ \ @@ -31,7 +31,7 @@ along with this program. If not, see . { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \ { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K40}, \ { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \ { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ diff --git a/keyboards/facew/info.json b/keyboards/facew/info.json index 3f94985b2dd2..b7b6acca7856 100644 --- a/keyboards/facew/info.json +++ b/keyboards/facew/info.json @@ -6,7 +6,7 @@ "height": 5, "layouts": { "LAYOUT_all": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi": { diff --git a/keyboards/facew/keymaps/default/keymap.c b/keyboards/facew/keymaps/default/keymap.c index a237f8489e76..6e91fba238b8 100644 --- a/keyboards/facew/keymaps/default/keymap.c +++ b/keyboards/facew/keymaps/default/keymap.c @@ -21,21 +21,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_NO, 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_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL ), [1] = LAYOUT_all( 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, - MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, 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_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [2] = LAYOUT_all( KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/facew/keymaps/mechmerlin/keymap.c b/keyboards/facew/keymaps/mechmerlin/keymap.c index 35b59e6a42f3..d7fb7a7aed3f 100644 --- a/keyboards/facew/keymaps/mechmerlin/keymap.c +++ b/keyboards/facew/keymaps/mechmerlin/keymap.c @@ -21,21 +21,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( 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_NO, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2), KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL ), [1] = LAYOUT_all( 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_NO, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 ), [2] = LAYOUT_all( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_LEFT, KC_DOWN, KC_RIGHT ), @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_all( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 61accb87942c4a314e0d2279943f3ec4e4823042 Mon Sep 17 00:00:00 2001 From: Eric <34169078+elpeterson@users.noreply.github.com> Date: Sun, 10 Mar 2019 23:11:45 -0400 Subject: [PATCH 293/445] [Keymap] Underglow support for Launchpad (#5340) * added my launchpad * updated keymap with legends and fixed layout errors * Added default keymap with added layer for RGB controls and included the necessary config code * fixed layer orders * removed my personal keymap to clean PR * missed an underscore * updated readme * removed more unnecessary code * moved RGB code to its own config phone * moved underglow info to its own readme * removed redundant code from default_rgb config.h file, included QMK KEYBOARD H in place of initial defines in keymap.c * reverted launchpad config * removing the = because I can't figure out why its there * Revert "removing the = because I can't figure out why its there" This reverts commit e3b5e6d568e7225635844ba617aaef4f77727ce6. * reverted rev1/config.h * reverted all files I should not have touched * removing redundant code in rules.mk * readibility improvements to keymap --- .../launchpad/keymaps/default_rgb/config.h | 9 +++ .../launchpad/keymaps/default_rgb/keymap.c | 76 +++++++++++++++++++ .../launchpad/keymaps/default_rgb/readme.md | 41 ++++++++++ .../launchpad/keymaps/default_rgb/rules.mk | 1 + 4 files changed, 127 insertions(+) create mode 100644 keyboards/launchpad/keymaps/default_rgb/config.h create mode 100644 keyboards/launchpad/keymaps/default_rgb/keymap.c create mode 100644 keyboards/launchpad/keymaps/default_rgb/readme.md create mode 100644 keyboards/launchpad/keymaps/default_rgb/rules.mk diff --git a/keyboards/launchpad/keymaps/default_rgb/config.h b/keyboards/launchpad/keymaps/default_rgb/config.h new file mode 100644 index 000000000000..cae1450c15bb --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/config.h @@ -0,0 +1,9 @@ +#pragma once + +/* Underlight Configuration */ +#define RGB_DI_PIN F4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 \ No newline at end of file diff --git a/keyboards/launchpad/keymaps/default_rgb/keymap.c b/keyboards/launchpad/keymaps/default_rgb/keymap.c new file mode 100644 index 000000000000..50fef532c031 --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/keymap.c @@ -0,0 +1,76 @@ +// Below layout is based upon /u/That-Canadian's planck layout +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _RGB 1 +#define _FUNC 15 + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-------------. + * | 1 | 2 | + * |------+------| + * | 3 | 4 | + * |------+------| + * | 5 | 6 | + * |------+------| + * | FUNC | RGB | + * `-------------' + */ + [_QWERTY] = LAYOUT( \ + KC_1, KC_2, \ + KC_3, KC_4, \ + KC_5, KC_6, \ + MO(_FUNC), TG(_RGB) \ + ), + + /* RGB + * ,-------------. + * | Mode-| Mode+| + * |------+------| + * | HUE- | HUE+ | + * |------+------| + * | SAT- | SAT+ | + * |------+------| + * |RGBTOG| | + * `-------------' + */ + [_RGB] = LAYOUT( \ + RGB_RMOD, RGB_MOD, \ + RGB_HUD, RGB_HUI, \ + RGB_SAD, RGB_SAI, \ + RGB_TOG, KC_TRNS \ + ), + + /* Function + * ,-------------. + * | Q |CALDEL| + * |------+------| + * | A |TSKMGR| + * |------+------| + * | Z | X | + * |------+------| + * | | C | + * `-------------' + */ + [_FUNC] = LAYOUT( \ + KC_Q, CALTDEL, \ + KC_A, TSKMGR, \ + KC_Z, KC_X, \ + _______, KC_C \ + ) + +}; + +void matrix_init_user(void) {} diff --git a/keyboards/launchpad/keymaps/default_rgb/readme.md b/keyboards/launchpad/keymaps/default_rgb/readme.md new file mode 100644 index 000000000000..3f15ff9bc392 --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/readme.md @@ -0,0 +1,41 @@ +# Launch Pad + +![Launch Pad](https://i.imgur.com/WVTe0Ku.png) + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +A budget-minded, 4-8 key macro-pad with built in legs, plate & case. + +Supports MX & Alps switches. 2x 1u or 1x 2u supported for each row. + +Supports 2u PCB-Mount stabilizers. + +Runs off of 1x Pro Micro & 8x diodes (1n4148). + +Optional "Reset" switch can be used on the PCB. + +A fantastic project for beginners to learn to solder, veteran's of the hobby who want to add an easy macro-pad to their collection, and everyone in between. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Make example for this keyboard (after setting up your build environment): + + make launchpad/rev1:default + +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. + +# Under Glow + +![Underglow](https://i.imgur.com/3zFIOmu.jpg) + +SpaceCat now provides an underglow add-on kit. Please refer to the picture above for wiring. + +Make example for this keyboard (after setting up your build environment): + + make launchpad/rev1:default_rgb + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Due to PCB tolerance issues outside of our control, the snap-apart legs included on the PCB may need extra padding to prevent a small amount of wobbling once placed properly. We have included small, clear, and semi-permanent "glue dots" in each order (PCB Only -and- Full Kit) to help with this. You may also use plastic wrap, tape, Elmer's glue, hot glue, rubber cement, etc. We advise against using anything more "permanent" in case you wish to make changes to your Launch Pad in the future. It is also best to attach legs after all of your soldering and building is finished, to get the most accurate feel for your Launch Pad. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- diff --git a/keyboards/launchpad/keymaps/default_rgb/rules.mk b/keyboards/launchpad/keymaps/default_rgb/rules.mk new file mode 100644 index 000000000000..164232f3398c --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file From 0f67232035bc7d9129ab0b91edd3316841ef8cf2 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 10 Mar 2019 20:21:59 -0700 Subject: [PATCH 294/445] QMK Configurator bugfix for KBDfans KBD19x (#5362) Configurator was assigning keys in the wrong order around the arrow keys and numpad. Rebuilt the layout contents from scratch. --- keyboards/kbdfans/kbd19x/info.json | 415 +++++++++++++++-------------- 1 file changed, 209 insertions(+), 206 deletions(-) diff --git a/keyboards/kbdfans/kbd19x/info.json b/keyboards/kbdfans/kbd19x/info.json index 31f2f9cf57eb..c24ed9caa5cf 100644 --- a/keyboards/kbdfans/kbd19x/info.json +++ b/keyboards/kbdfans/kbd19x/info.json @@ -1,218 +1,221 @@ { "keyboard_name": "KBD19x", - "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbd19x", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd19x", "maintainer": "qmk", "width": 19.5, "height": 6.75, "layouts": { "LAYOUT_ansi": { - "key_count": 99, - "layout": [{"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"BkLgt Step", "x":14, "y":0}, - {"label":"Print Screen", "x":15.5, "y":0}, - {"label":"Scroll Lock", "x":16.5, "y":0}, - {"label":"Pause Break", "x":17.5, "y":0}, - {"label":"PgDn", "x":18.5, "y":0}, - {"label":"~", "x":0, "y":1.5}, - {"label":"!", "x":1, "y":1.5}, - {"label":"@", "x":2, "y":1.5}, - {"label":"#", "x":3, "y":1.5}, - {"label":"$", "x":4, "y":1.5}, - {"label":"%", "x":5, "y":1.5}, - {"label":"^", "x":6, "y":1.5}, - {"label":"&", "x":7, "y":1.5}, - {"label":"*", "x":8, "y":1.5}, - {"label":"(", "x":9, "y":1.5}, - {"label":")", "x":10, "y":1.5}, - {"label":"_", "x":11, "y":1.5}, - {"label":"+", "x":12, "y":1.5}, - {"label":"Backspace", "x":13, "y":1.5, "w":2}, - {"label":"Num Lock", "x":15.5, "y":1.5}, - {"label":"/", "x":16.5, "y":1.5}, - {"label":"*", "x":17.5, "y":1.5}, - {"label":"-", "x":18.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"{", "x":11.5, "y":2.5}, - {"label":"}", "x":12.5, "y":2.5}, - {"label":"|", "x":13.5, "y":2.5, "w":1.5}, - {"label":"7", "x":15.5, "y":2.5}, - {"label":"8", "x":16.5, "y":2.5}, - {"label":"9", "x":17.5, "y":2.5}, - {"label":"+", "x":18.5, "y":2.5, "h":2}, - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":":", "x":10.75, "y":3.5}, - {"label":"\"", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - {"label":"4", "x":15.5, "y":3.5}, - {"label":"5", "x":16.5, "y":3.5}, - {"label":"6", "x":17.5, "y":3.5}, - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":"<", "x":9.25, "y":4.5}, - {"label":">", "x":10.25, "y":4.5}, - {"label":"?", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, - {"label":"1", "x":15.5, "y":4.5}, - {"label":"2", "x":16.5, "y":4.5}, - {"label":"3", "x":17.5, "y":4.5}, - {"label":"Enter", "x":18.5, "y":4.5, "h":2}, - {"label":"\u2191", "x":14.25, "y":4.75}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"Win", "x":1.25, "y":5.5}, - {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, - {"x":3.5, "y":5.5, "w":6.25}, - {"label":"Alt", "x":9.75, "y":5.5}, - {"label":"MO(1)", "x":10.75, "y":5.5}, - {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25}, - {"label":"0", "x":16.5, "y":5.5}, - {"label":".", "x":17.5, "y":5.5}, - {"label":"\u2190", "x":13.25, "y":5.75}, - {"label":"\u2193", "x":14.25, "y":5.75}, - {"label":"\u2192", "x":15.25, "y":5.75}] + "key_count": 99, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Extra Esc", "x":14, "y":0}, + {"label":"PrtSc", "x":15.5, "y":0}, + {"label":"Pause", "x":16.5, "y":0}, + {"label":"Insert", "x":17.5, "y":0}, + {"label":"Home", "x":18.5, "y":0}, + {"label":"`~", "x":0, "y":1.5}, + {"label":"1!", "x":1, "y":1.5}, + {"label":"2@", "x":2, "y":1.5}, + {"label":"3#", "x":3, "y":1.5}, + {"label":"4$", "x":4, "y":1.5}, + {"label":"5%", "x":5, "y":1.5}, + {"label":"6^", "x":6, "y":1.5}, + {"label":"7&", "x":7, "y":1.5}, + {"label":"8*", "x":8, "y":1.5}, + {"label":"9(", "x":9, "y":1.5}, + {"label":"0)", "x":10, "y":1.5}, + {"label":"-_", "x":11, "y":1.5}, + {"label":"=+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Num Lock", "x":15.5, "y":1.5}, + {"label":"/", "x":16.5, "y":1.5}, + {"label":"*", "x":17.5, "y":1.5}, + {"label":"-", "x":18.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[{", "x":11.5, "y":2.5}, + {"label":"]}", "x":12.5, "y":2.5}, + {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"7", "x":15.5, "y":2.5}, + {"label":"8", "x":16.5, "y":2.5}, + {"label":"9", "x":17.5, "y":2.5}, + {"label":"+", "x":18.5, "y":2.5, "h":2}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";:", "x":10.75, "y":3.5}, + {"label":"'\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"4", "x":15.5, "y":3.5}, + {"label":"5", "x":16.5, "y":3.5}, + {"label":"6", "x":17.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",<", "x":9.25, "y":4.5}, + {"label":".>", "x":10.25, "y":4.5}, + {"label":"/?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, + {"label":"Up", "x":14.25, "y":4.75}, + {"label":"1", "x":15.5, "y":4.5}, + {"label":"2", "x":16.5, "y":4.5}, + {"label":"3", "x":17.5, "y":4.5}, + {"label":"Enter", "x":18.5, "y":4.5, "h":2}, + {"label":"Control", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5}, + {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.5, "y":5.5, "w":6.25}, + {"label":"Alt", "x":9.75, "y":5.5}, + {"label":"Fn", "x":10.75, "y":5.5}, + {"label":"Control", "x":11.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":13.25, "y":5.75}, + {"label":"Right", "x":14.25, "y":5.75}, + {"label":"Down", "x":15.25, "y":5.75}, + {"label":"0", "x":16.5, "y":5.5}, + {"label":".", "x":17.5, "y":5.5} + ] }, "LAYOUT_all": { - "key_count": 103, - "layout": [{"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"BkLgt Step", "x":14, "y":0}, - {"label":"Print Screen", "x":15.5, "y":0}, - {"label":"Scroll Lock", "x":16.5, "y":0}, - {"label":"Pause Break", "x":17.5, "y":0}, - {"label":"PgDn", "x":18.5, "y":0}, - {"label":"~", "x":0, "y":1.5}, - {"label":"!", "x":1, "y":1.5}, - {"label":"@", "x":2, "y":1.5}, - {"label":"#", "x":3, "y":1.5}, - {"label":"$", "x":4, "y":1.5}, - {"label":"%", "x":5, "y":1.5}, - {"label":"^", "x":6, "y":1.5}, - {"label":"&", "x":7, "y":1.5}, - {"label":"*", "x":8, "y":1.5}, - {"label":"(", "x":9, "y":1.5}, - {"label":")", "x":10, "y":1.5}, - {"label":"_", "x":11, "y":1.5}, - {"label":"+", "x":12, "y":1.5}, - {"x":13, "y":1.5}, - {"label":"BS", "x":14, "y":1.5}, - {"label":"Num Lock", "x":15.5, "y":1.5}, - {"label":"/", "x":16.5, "y":1.5}, - {"label":"*", "x":17.5, "y":1.5}, - {"label":"-", "x":18.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"{", "x":11.5, "y":2.5}, - {"label":"}", "x":12.5, "y":2.5}, - {"label":"|", "x":13.5, "y":2.5, "w":1.5}, - {"label":"7", "x":15.5, "y":2.5}, - {"label":"8", "x":16.5, "y":2.5}, - {"label":"9", "x":17.5, "y":2.5}, - {"label":"+", "x":18.5, "y":2.5}, - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":":", "x":10.75, "y":3.5}, - {"label":"\"", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - {"label":"4", "x":15.5, "y":3.5}, - {"label":"5", "x":16.5, "y":3.5}, - {"label":"6", "x":17.5, "y":3.5}, - {"x":18.5, "y":3.5}, - {"label":"Shift", "x":0, "y":4.5, "w":1.25}, - {"x":1.25, "y":4.5}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":"<", "x":9.25, "y":4.5}, - {"label":">", "x":10.25, "y":4.5}, - {"label":"?", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, - {"label":"1", "x":15.5, "y":4.5}, - {"label":"2", "x":16.5, "y":4.5}, - {"label":"3", "x":17.5, "y":4.5}, - {"label":"Enter", "x":18.5, "y":4.5}, - {"label":"\u2191", "x":14.25, "y":4.75}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"Win", "x":1.25, "y":5.5}, - {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, - {"x":3.5, "y":5.5, "w":6.25}, - {"label":"Alt", "x":9.75, "y":5.5}, - {"label":"Menu", "x":10.75, "y":5.5}, - {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25}, - {"label":"0", "x":16.5, "y":5.5}, - {"label":".", "x":17.5, "y":5.5}, - {"x":18.5, "y":5.5}, - {"label":"\u2190", "x":13.25, "y":5.75}, - {"label":"\u2193", "x":14.25, "y":5.75}, - {"label":"\u2192", "x":15.25, "y":5.75}] + "key_count": 103, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Extra Esc", "x":14, "y":0}, + {"label":"PrtSc", "x":15.5, "y":0}, + {"label":"Pause", "x":16.5, "y":0}, + {"label":"Insert", "x":17.5, "y":0}, + {"label":"Home", "x":18.5, "y":0}, + {"label":"`~", "x":0, "y":1.5}, + {"label":"1!", "x":1, "y":1.5}, + {"label":"2@", "x":2, "y":1.5}, + {"label":"3#", "x":3, "y":1.5}, + {"label":"4$", "x":4, "y":1.5}, + {"label":"5%", "x":5, "y":1.5}, + {"label":"6^", "x":6, "y":1.5}, + {"label":"7&", "x":7, "y":1.5}, + {"label":"8*", "x":8, "y":1.5}, + {"label":"9(", "x":9, "y":1.5}, + {"label":"0)", "x":10, "y":1.5}, + {"label":"-_", "x":11, "y":1.5}, + {"label":"=+", "x":12, "y":1.5}, + {"label":"Split Backspace (Left)", "x":13, "y":1.5}, + {"label":"Split Backspace (Right)", "x":14, "y":1.5}, + {"label":"Num Lock", "x":15.5, "y":1.5}, + {"label":"/", "x":16.5, "y":1.5}, + {"label":"*", "x":17.5, "y":1.5}, + {"label":"-", "x":18.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[{", "x":11.5, "y":2.5}, + {"label":"]}", "x":12.5, "y":2.5}, + {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"7", "x":15.5, "y":2.5}, + {"label":"8", "x":16.5, "y":2.5}, + {"label":"9", "x":17.5, "y":2.5}, + {"label":"Split + (Top)", "x":18.5, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";:", "x":10.75, "y":3.5}, + {"label":"'\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"4", "x":15.5, "y":3.5}, + {"label":"5", "x":16.5, "y":3.5}, + {"label":"6", "x":17.5, "y":3.5}, + {"label":"Split + (Bottom)", "x":18.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"ISO Backslash", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",<", "x":9.25, "y":4.5}, + {"label":".>", "x":10.25, "y":4.5}, + {"label":"/?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, + {"label":"Up", "x":14.25, "y":4.75}, + {"label":"1", "x":15.5, "y":4.5}, + {"label":"2", "x":16.5, "y":4.5}, + {"label":"3", "x":17.5, "y":4.5}, + {"label":"Split Enter (Top)", "x":18.5, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5}, + {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.5, "y":5.5, "w":6.25}, + {"label":"Alt", "x":9.75, "y":5.5}, + {"label":"Fn", "x":10.75, "y":5.5}, + {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":13.25, "y":5.75}, + {"label":"Down", "x":14.25, "y":5.75}, + {"label":"Right", "x":15.25, "y":5.75}, + {"label":"0", "x":16.5, "y":5.5}, + {"label":".", "x":17.5, "y":5.5}, + {"label":"Split Enter (Bottom)", "x":18.5, "y":5.5} + ] } } } - From 5e093ad224fad5497f4f5360c8e430ea267ecac5 Mon Sep 17 00:00:00 2001 From: zk-phi Date: Mon, 11 Mar 2019 13:49:08 +0900 Subject: [PATCH 295/445] [Keyboard] Add keyboard hifumi (#5341) * Add keyboard hifumi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Update keyboards/hifumi/keymaps/default/keymap.c Co-Authored-By: zk-phi * Update keyboards/hifumi/keymaps/test/keymap.c Co-Authored-By: zk-phi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Add DIODE_DIRECTION * Rename readme.md --- keyboards/hifumi/config.h | 56 ++++++++++++++++++++ keyboards/hifumi/hifumi.h | 31 ++++++++++++ keyboards/hifumi/info.json | 12 +++++ keyboards/hifumi/keymaps/default/keymap.c | 47 +++++++++++++++++ keyboards/hifumi/keymaps/test/keymap.c | 32 ++++++++++++ keyboards/hifumi/readme.md | 13 +++++ keyboards/hifumi/rules.mk | 62 +++++++++++++++++++++++ 7 files changed, 253 insertions(+) create mode 100644 keyboards/hifumi/config.h create mode 100644 keyboards/hifumi/hifumi.h create mode 100644 keyboards/hifumi/info.json create mode 100644 keyboards/hifumi/keymaps/default/keymap.c create mode 100644 keyboards/hifumi/keymaps/test/keymap.c create mode 100644 keyboards/hifumi/readme.md create mode 100644 keyboards/hifumi/rules.mk diff --git a/keyboards/hifumi/config.h b/keyboards/hifumi/config.h new file mode 100644 index 000000000000..dccb0352df70 --- /dev/null +++ b/keyboards/hifumi/config.h @@ -0,0 +1,56 @@ +/* +Copyright 2019 zk-phi + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER riconken +#define PRODUCT hifumi +#define DESCRIPTION A macropad with 6 keys + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * 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 } +#define MATRIX_COL_PINS { F4, F5, F6 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 6 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/hifumi/hifumi.h b/keyboards/hifumi/hifumi.h new file mode 100644 index 000000000000..389ce206e0ad --- /dev/null +++ b/keyboards/hifumi/hifumi.h @@ -0,0 +1,31 @@ +/* Copyright 2019 zk-phi + * + * 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 following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 } \ +} diff --git a/keyboards/hifumi/info.json b/keyboards/hifumi/info.json new file mode 100644 index 000000000000..2466838a0485 --- /dev/null +++ b/keyboards/hifumi/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "hifumi", + "url": "https://github.com/zk-phi/1x2x3-keyboard", + "maintainer": "riconken", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [{"label":"F5", "x":0, "y":0}, {"label":"Up", "x":1, "y":0}, {"label":"PrSc", "x":2, "y":0}, {"label":"Left", "x":0, "y":1}, {"label":"Down", "x":1, "y":1}, {"label":"Right", "x":2, "y":1}] + } + } +} diff --git a/keyboards/hifumi/keymaps/default/keymap.c b/keyboards/hifumi/keymaps/default/keymap.c new file mode 100644 index 000000000000..9a4330398fc2 --- /dev/null +++ b/keyboards/hifumi/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 zk-phi + * + * 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 + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +enum layers { + DEFAULT, + RAISE, + LOWER, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT] = LAYOUT( + LT(RAISE, KC_F5), KC_UP, LT(LOWER, KC_PSCR), + KC_LEFT, KC_DOWN, KC_RIGHT + ), + [RAISE] = LAYOUT( + _______, KC_PGUP, MO(ADJUST), + KC_HOME, KC_PGDN, KC_END + ), + [LOWER] = LAYOUT( + MO(ADJUST), _______, _______, + _______, _______, _______ + ), + [ADJUST] = LAYOUT( + _______, RGB_TOG, _______, + RGB_MODE_SNAKE, RGB_MODE_PLAIN, RGB_HUI + ) +}; diff --git a/keyboards/hifumi/keymaps/test/keymap.c b/keyboards/hifumi/keymaps/test/keymap.c new file mode 100644 index 000000000000..7aec009ebf71 --- /dev/null +++ b/keyboards/hifumi/keymaps/test/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2019 zk-phi + * + * 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 + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +enum layers { + DEFAULT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT] = LAYOUT( + KC_1, KC_2, KC_3, + KC_A, KC_B, KC_C + ) +}; diff --git a/keyboards/hifumi/readme.md b/keyboards/hifumi/readme.md new file mode 100644 index 000000000000..2911c124443d --- /dev/null +++ b/keyboards/hifumi/readme.md @@ -0,0 +1,13 @@ +# hifumi + +A macro pad with 6 keys. + +Keyboard Maintainer: riconken, [zk-phi](https://github.com/zk-phi) +Hardware Supported: hifumi PCB, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/zk-phi/1x2x3-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make hifumi: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/hifumi/rules.mk b/keyboards/hifumi/rules.mk new file mode 100644 index 000000000000..98560f058032 --- /dev/null +++ b/keyboards/hifumi/rules.mk @@ -0,0 +1,62 @@ +# 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) + +# 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 +# +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 = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing From d2311afb664c5d640b446b11b43e5d47cddab60e Mon Sep 17 00:00:00 2001 From: Jarred Steenvoorden Date: Tue, 12 Mar 2019 01:15:08 +1100 Subject: [PATCH 296/445] Add crkbd keymap (#5366) --- keyboards/crkbd/keymaps/jarred/config.h | 44 ++++++ keyboards/crkbd/keymaps/jarred/keymap.c | 182 +++++++++++++++++++++++ keyboards/crkbd/keymaps/jarred/readme.md | 9 ++ keyboards/crkbd/keymaps/jarred/rules.mk | 31 ++++ 4 files changed, 266 insertions(+) create mode 100644 keyboards/crkbd/keymaps/jarred/config.h create mode 100644 keyboards/crkbd/keymaps/jarred/keymap.c create mode 100644 keyboards/crkbd/keymaps/jarred/readme.md create mode 100644 keyboards/crkbd/keymaps/jarred/rules.mk diff --git a/keyboards/crkbd/keymaps/jarred/config.h b/keyboards/crkbd/keymaps/jarred/config.h new file mode 100644 index 000000000000..ac4c1cc88f50 --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/config.h @@ -0,0 +1,44 @@ +/* +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #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 diff --git a/keyboards/crkbd/keymaps/jarred/keymap.c b/keyboards/crkbd/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..f00a735bfc56 --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/keymap.c @@ -0,0 +1,182 @@ +#include QMK_KEYBOARD_H +#include "jarred.h" + +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; +extern uint8_t is_master; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#define LAYOUT_crkbd_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K31, K32, K33, K34, K35, K36 \ + ) + +#define LAYOUT_crkbd_wrapper(...) LAYOUT(__VA_ARGS__) + +#define QWERTY_4_CRKBD KC_LCTL, MO(_LW), KC_SPC, KC_ENT, MO(_LW), KC_RALT + +#define BLANK_4_CRKBD KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_crkbd_wrapper( + QWERTY_1_12, + QWERTY_2_12, + QWERTY_3_12, + QWERTY_4_DOX + ), + + [_LW] = LAYOUT_crkbd_wrapper( + LOWER_1_12, + LOWER_2_12, + LOWER_3_12, + LOWER_4_DOX + ), + + [_NV] = LAYOUT_crkbd_wrapper( + NAV_1_12, + NAV_2_12, + NAV_3_12, + NAV_4_DOX + ), + + [_NP] = LAYOUT_crkbd_wrapper( + NUMPAD_1_12, + NUMPAD_2_12, + NUMPAD_3_12, + NUMPAD_4_DOX + ), + + [_MS] = LAYOUT_crkbd_wrapper( + MOUSE_1_12, + MOUSE_2_12, + MOUSE_3_12, + MOUSE_4_DOX + ) +}; + +void matrix_init_user(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 +} + +//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_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +char matrix_line_str[24]; + +const char *read_layer_state(void) { + uint8_t layer = biton32(layer_state); + + strcpy(matrix_line_str, "Layer: "); + + switch (layer) + { + case _QW: + strcat(matrix_line_str, "Default"); + break; + case _LW: + strcat(matrix_line_str, "Lower"); + break; + case _NV: + strcat(matrix_line_str, "Navigation"); + break; + case _NP: + strcat(matrix_line_str, "Adjust"); + break; + case _MS: + strcat(matrix_line_str, "Mouse"); + break; + default: + sprintf(matrix_line_str + strlen(matrix_line_str), "Unknown (%d)", layer); + } + + return matrix_line_str; +} + +const char *read_usb_state(void) { + + strcpy(matrix_line_str, "USB : "); + + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + strcat(matrix_line_str, "Unattached"); + break; + case DEVICE_STATE_Suspended: + strcat(matrix_line_str, "Suspended"); + break; + case DEVICE_STATE_Configured: + strcat(matrix_line_str, "Connected"); + break; + case DEVICE_STATE_Powered: + strcat(matrix_line_str, "Powered"); + break; + case DEVICE_STATE_Default: + strcat(matrix_line_str, "Default"); + break; + case DEVICE_STATE_Addressed: + strcat(matrix_line_str, "Addressed"); + break; + default: + strcat(matrix_line_str, "Invalid"); + } + + return matrix_line_str; +} + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_usb_state()); + matrix_write_ln(matrix, read_keylogs()); + } 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_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + + return true; +} diff --git a/keyboards/crkbd/keymaps/jarred/readme.md b/keyboards/crkbd/keymaps/jarred/readme.md new file mode 100644 index 000000000000..15e355bbca1d --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/readme.md @@ -0,0 +1,9 @@ +# Jarred's CRKBD Layout + +Check out [user space readme](../../../../users/jarred/readme.md) for more info + +# Build + +``` +make crkbd:jarred:avrdude +``` diff --git a/keyboards/crkbd/keymaps/jarred/rules.mk b/keyboards/crkbd/keymaps/jarred/rules.mk new file mode 100644 index 000000000000..ab6329f0ebfb --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/rules.mk @@ -0,0 +1,31 @@ + +# 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 = 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 + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + #./lib/layer_state_reader.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ From bf1e51ec22a8016aa02d84993241c6a85c562a0e Mon Sep 17 00:00:00 2001 From: trinity1561 <47289299+trinity1561@users.noreply.github.com> Date: Mon, 11 Mar 2019 14:35:59 -0400 Subject: [PATCH 297/445] [Keyboard] Update info.json to include macro layout (#5364) * Update info.json Adding layout for the macro version. * Update info.json Changed the macro layout to match exactly like the non-macro version (split backspace and bottow row match) --- keyboards/keebio/quefrency/info.json | 197 ++++++++++++++++++++++++++- 1 file changed, 196 insertions(+), 1 deletion(-) diff --git a/keyboards/keebio/quefrency/info.json b/keyboards/keebio/quefrency/info.json index 160e7896bbd0..1b50ccbe50e9 100644 --- a/keyboards/keebio/quefrency/info.json +++ b/keyboards/keebio/quefrency/info.json @@ -169,6 +169,201 @@ {"label":"Down", "x":15, "y":4}, {"label":"Right", "x":16, "y":4} ] + }, + "LAYOUT_60_with_macro": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F6", "x":1, "y":0}, + + {"label":"Esc", "x":2.25, "y":0}, + {"label":"1", "x":3.25, "y":0}, + {"label":"2", "x":4.25, "y":0}, + {"label":"3", "x":5.25, "y":0}, + {"label":"4", "x":6.25, "y":0}, + {"label":"5", "x":7.25, "y":0}, + {"label":"6", "x":8.25, "y":0}, + + {"label":"7", "x":10.25, "y":0}, + {"label":"8", "x":11.25, "y":0}, + {"label":"9", "x":12.25, "y":0}, + {"label":"0", "x":13.25, "y":0}, + {"label":"-", "x":14.25, "y":0}, + {"label":"=", "x":15.25, "y":0}, + {"label":"Del", "x":16.25, "y":0}, + {"label":"Bksp", "x":17.25, "y":0}, + + {"label":"F2", "x":0, "y":1}, + {"label":"F7", "x":1, "y":1}, + + {"label":"Tab", "x":2.25, "y":1, "w":1.5}, + {"label":"Q", "x":3.75, "y":1}, + {"label":"W", "x":4.75, "y":1}, + {"label":"E", "x":5.75, "y":1}, + {"label":"R", "x":6.75, "y":1}, + {"label":"T", "x":7.75, "y":1}, + + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"{", "x":14.75, "y":1}, + {"label":"}", "x":15.75, "y":1}, + {"label":"Backslash", "x":16.75, "y":1, "w":1.5}, + + {"label":"F3", "x":0, "y":2}, + {"label":"F8", "x":1, "y":2}, + + {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, + {"label":"A", "x":4, "y":2}, + {"label":"S", "x":5, "y":2}, + {"label":"D", "x":6, "y":2}, + {"label":"F", "x":7, "y":2}, + {"label":"G", "x":8, "y":2}, + + {"label":"H", "x":10, "y":2}, + {"label":"J", "x":11, "y":2}, + {"label":"K", "x":12, "y":2}, + {"label":"L", "x":13, "y":2}, + {"label":":", "x":14, "y":2}, + {"label":"\"", "x":15, "y":2}, + {"label":"Enter", "x":16, "y":2, "w":2.25}, + + {"label":"F4", "x":0, "y":3}, + {"label":"F9", "x":1, "y":3}, + + {"label":"Shift", "x":2.25, "y":3, "w":2.25}, + {"label":"Z", "x":4.5, "y":3}, + {"label":"X", "x":5.5, "y":3}, + {"label":"C", "x":6.5, "y":3}, + {"label":"V", "x":7.5, "y":3}, + {"label":"B", "x":8.5, "y":3}, + + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"/", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.75}, + {"label":"Fn", "x":17.25, "y":3}, + + {"label":"F5", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + + {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, + {"label":"Win", "x":3.5, "y":4, "w":1.25}, + {"label":"Alt", "x":4.75, "y":4, "w":1.25}, + {"label":"Fn", "x":6, "y":4, "w":1.25}, + {"label":"Space", "x":7.25, "y":4, "w":2.25}, + + {"label":"Fn", "x":10.5, "y":4, "w":1.25}, + {"label":"Space", "x":11.75, "y":4, "w":1.5}, + {"label":"Alt", "x":13.25, "y":4}, + {"label":"Ctrl", "x":14.25, "y":4}, + {"label":"Left", "x":15.25, "y":4}, + {"label":"Down", "x":16.25, "y":4}, + {"label":"Right", "x":17.25, "y":4} + ] + }, + "LAYOUT_65_with_macro": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F6", "x":1, "y":0}, + + {"label":"Esc", "x":2.25, "y":0}, + {"label":"1", "x":3.25, "y":0}, + {"label":"2", "x":4.25, "y":0}, + {"label":"3", "x":5.25, "y":0}, + {"label":"4", "x":6.25, "y":0}, + {"label":"5", "x":7.25, "y":0}, + {"label":"6", "x":8.25, "y":0}, + + {"label":"7", "x":10.25, "y":0}, + {"label":"8", "x":11.25, "y":0}, + {"label":"9", "x":12.25, "y":0}, + {"label":"0", "x":13.25, "y":0}, + {"label":"-", "x":14.25, "y":0}, + {"label":"=", "x":15.25, "y":0}, + {"label":"=", "x":16.25, "y":0}, + {"label":"Bksp", "x":17.25, "y":0}, + {"label":"Home", "x":18.25, "y":0}, + + {"label":"F2", "x":0, "y":1}, + {"label":"F7", "x":1, "y":1}, + + {"label":"Tab", "x":2.25, "y":1, "w":1.5}, + {"label":"Q", "x":3.75, "y":1}, + {"label":"W", "x":4.75, "y":1}, + {"label":"E", "x":5.75, "y":1}, + {"label":"R", "x":6.75, "y":1}, + {"label":"T", "x":7.75, "y":1}, + + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"{", "x":14.75, "y":1}, + {"label":"}", "x":15.75, "y":1}, + {"label":"|", "x":16.75, "y":1, "w":1.5}, + {"label":"PgUp", "x":18.25, "y":1}, + + {"label":"F3", "x":0, "y":2}, + {"label":"F8", "x":1, "y":2}, + + {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, + {"label":"A", "x":4, "y":2}, + {"label":"S", "x":5, "y":2}, + {"label":"D", "x":6, "y":2}, + {"label":"F", "x":7, "y":2}, + {"label":"G", "x":8, "y":2}, + + {"label":"H", "x":10, "y":2}, + {"label":"J", "x":11, "y":2}, + {"label":"K", "x":12, "y":2}, + {"label":"L", "x":13, "y":2}, + {"label":":", "x":14, "y":2}, + {"label":"\"", "x":15, "y":2}, + {"label":"Enter", "x":16, "y":2, "w":2.25}, + {"label":"PgDn", "x":18.25, "y":2}, + + {"label":"F4", "x":0, "y":3}, + {"label":"F9", "x":1, "y":3}, + + {"label":"Shift", "x":2.25, "y":3, "w":2.25}, + {"label":"Z", "x":4.5, "y":3}, + {"label":"X", "x":5.5, "y":3}, + {"label":"C", "x":6.5, "y":3}, + {"label":"V", "x":7.5, "y":3}, + {"label":"B", "x":8.5, "y":3}, + + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"/", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.75}, + {"label":"Up", "x":17.25, "y":3}, + {"label":"End", "x":18.25, "y":3}, + + {"label":"F5", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + + {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, + {"label":"Win", "x":3.5, "y":4, "w":1.25}, + {"label":"Alt", "x":4.75, "y":4, "w":1.25}, + {"label":"Fn", "x":6, "y":4, "w":1.25}, + {"label":"Space", "x":7.25, "y":4, "w":2.25}, + + {"label":"Fn", "x":10.5, "y":4, "w":1.25}, + {"label":"Space", "x":11.75, "y":4, "w":1.5}, + {"label":"Alt", "x":13.25, "y":4}, + {"label":"Ctrl", "x":14.25, "y":4}, + {"label":"Win", "x":15.25, "y":4}, + {"label":"Left", "x":16.25, "y":4}, + {"label":"Down", "x":17.25, "y":4}, + {"label":"Right", "x":18.25, "y":4} + ] + } } - } } From 2a2f41c6de868c06c06cf437cf7c2b875b8c53a4 Mon Sep 17 00:00:00 2001 From: layne001365 Date: Tue, 12 Mar 2019 03:41:16 +0800 Subject: [PATCH 298/445] [Keyboard] Add HotDox keyboard (#5365) * Add HotDox * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * * Update - keyboards/hotdox/config.h - keyboards/hotdox/hotdox.h - keyboards/hotdox/info.json - keyboards/hotdox/left.h - keyboards/hotdox/left.c - keyboards/hotdox/rules.mk * Replace EPRM with EPRM - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/keymaps/eozaki/keymap.c - keyboards/hotdox/keymaps/kloki/keymap.c * Remove keymaps readme.md * Remove twimaster.h/ twimaster.c * * Update - remove FORCE_NKRO from keyboards/hotdox/config.h - keyboards/hotdox/hotdox.c - keyboards/hotdox/hotdox.h - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/left.c - keyboards/hotdox/readme.md - keyboards/hotdox/rules.mk * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/hotdox.h Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 --- keyboards/hotdox/config.h | 78 ++++++ keyboards/hotdox/hotdox.c | 44 ++++ keyboards/hotdox/hotdox.h | 187 ++++++++++++++ keyboards/hotdox/info.json | 107 ++++++++ keyboards/hotdox/keymaps/default/keymap.c | 190 +++++++++++++++ keyboards/hotdox/keymaps/eozaki/keymap.c | 192 +++++++++++++++ keyboards/hotdox/keymaps/kloki/keymap.c | 210 ++++++++++++++++ keyboards/hotdox/left.c | 130 ++++++++++ keyboards/hotdox/left.h | 57 +++++ keyboards/hotdox/matrix.c | 283 ++++++++++++++++++++++ keyboards/hotdox/readme.md | 23 ++ keyboards/hotdox/rules.mk | 82 +++++++ 12 files changed, 1583 insertions(+) create mode 100644 keyboards/hotdox/config.h create mode 100644 keyboards/hotdox/hotdox.c create mode 100644 keyboards/hotdox/hotdox.h create mode 100644 keyboards/hotdox/info.json create mode 100644 keyboards/hotdox/keymaps/default/keymap.c create mode 100644 keyboards/hotdox/keymaps/eozaki/keymap.c create mode 100644 keyboards/hotdox/keymaps/kloki/keymap.c create mode 100644 keyboards/hotdox/left.c create mode 100644 keyboards/hotdox/left.h create mode 100644 keyboards/hotdox/matrix.c create mode 100644 keyboards/hotdox/readme.md create mode 100644 keyboards/hotdox/rules.mk diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h new file mode 100644 index 000000000000..ed15f4bb4a49 --- /dev/null +++ b/keyboards/hotdox/config.h @@ -0,0 +1,78 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xE11D + +#define DEVICE_VER 0x0001 +#define MANUFACTURER Z.P.Z.O. +#define PRODUCT HotDox +#define DESCRIPTION QMK keyboard firmware for HotDox + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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 */ +#ifndef IS_COMMAND +#define IS_COMMAND() ( \ + get_mods() == MOD_MASK_CTRL || \ + get_mods() == MOD_MASK_SHIFT \ +) +#endif + +#define BACKLIGHT_PIN B7 +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define USB_MAX_POWER_CONSUMPTION 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE + diff --git a/keyboards/hotdox/hotdox.c b/keyboards/hotdox/hotdox.c new file mode 100644 index 000000000000..00af9efb1e59 --- /dev/null +++ b/keyboards/hotdox/hotdox.c @@ -0,0 +1,44 @@ +#include "hotdox.h" +#include "backlight.h" +#include "quantum.h" + +extern inline void ergodox_board_led_on(void); +extern inline void ergodox_right_led_1_on(void); +extern inline void ergodox_right_led_2_on(void); +extern inline void ergodox_right_led_3_on(void); + +extern inline void ergodox_board_led_off(void); +extern inline void ergodox_right_led_1_off(void); +extern inline void ergodox_right_led_2_off(void); +extern inline void ergodox_right_led_3_off(void); + +extern inline void ergodox_led_all_on(void); +extern inline void ergodox_led_all_off(void); + +void ergodox_led_init(void); +void ergodox_blink_all_leds(void); + +void matrix_init_kb(void) { + ergodox_blink_all_leds(); + matrix_init_user(); +} + +void ergodox_blink_all_leds(void) +{ + ergodox_led_all_off(); + ergodox_led_all_set(LED_BRIGHTNESS_HI); + ergodox_right_led_1_on(); + _delay_ms(50); + ergodox_right_led_2_on(); + _delay_ms(50); + ergodox_right_led_3_on(); + _delay_ms(50); + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); + ergodox_led_all_on(); + _delay_ms(333); + ergodox_led_all_off(); +} diff --git a/keyboards/hotdox/hotdox.h b/keyboards/hotdox/hotdox.h new file mode 100644 index 000000000000..d79f335ad0f1 --- /dev/null +++ b/keyboards/hotdox/hotdox.h @@ -0,0 +1,187 @@ +#pragma once + +#include "quantum.h" +#include +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +void init_ergodox(void); + +inline void ergodox_board_led_on(void) { DDRB |= (1<event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/keyboards/hotdox/keymaps/eozaki/keymap.c b/keyboards/hotdox/keymaps/eozaki/keymap.c new file mode 100644 index 000000000000..dc80e7a34e0c --- /dev/null +++ b/keyboards/hotdox/keymaps/eozaki/keymap.c @@ -0,0 +1,192 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | ' | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | ~ | | " | Y | U | I | O | P | - | + * |--------+------+------+------+------+------| ` | | |------+------+------+------+------+--------| + * | Ctrl | A | S | D | F | G |------| |------| H | J | K | L | ; | \ | + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + * | LAlt | Z | X | C | V | B | [ | | ] | N | M | , | . | / | LShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LT-1 | F4 | F5 | F6 | F11 | | Left | Down | Up | Right| RAlt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L1 | Prev | | Vol+ | L2 | + * ,------|------|------| |------+--------+------. + * | | | Play | | Vol- | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | Next | | Mute | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV), + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, + LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11, + TG(SYMB), KC_MPRV, + KC_MPLY, + KC_SPC,KC_BSPC,KC_MNXT, + // right hand + KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + LSFT(KC_QUOT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS, + KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_LSFT, + KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_RALT, + KC_VOLU, TG(MDIA), + KC_VOLD, + KC_MUTE,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EEP_RST | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RGB_MOD,KC_TRNS, + KC_TRNS, + RGB_VAD,RGB_VAI,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_TOG, RGB_SLD, + KC_TRNS, + KC_TRNS, RGB_HUD, RGB_HUI +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + 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) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/hotdox/keymaps/kloki/keymap.c b/keyboards/hotdox/keymaps/kloki/keymap.c new file mode 100644 index 000000000000..f858effd540a --- /dev/null +++ b/keyboards/hotdox/keymaps/kloki/keymap.c @@ -0,0 +1,210 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define BASE 0 // default layer +#define QW 1 // qwerty +#define SYMB 2 // symbols +#define NUM 3 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | SHIFT| | SYM | 6 | 7 | 8 | 9 | 0 | Bck | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | `~ | | "' | J | F | U | P | : | \ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Ctr/Es | A | S | H | T | G |------| |------| Y | N | E | O | I | Enter | + * |--------+------+------+------+------+------| = + | | -_ |------+------+------+------+------+--------| + * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |MEH | Gui |AltShf| Left | Right| | DOWN | UP | [ | ] | ~SYM | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ESC |Home | | PgUp | QW | + * ,------|------|------| |------+--------+------. + * | | ENT | End | | PgDn | | | + * | Space| WIN |------| |------| Tab |Back | + * | SYM | | SCTR | | SALT | SYM | | + * `--------------------' `----------------------' + */ + +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSFT, + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_GRV, + CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_EQL, + KC_MEH, KC_LGUI, KC_LALT, KC_LEFT,KC_RGHT, + KC_ESC, KC_HOME, + KC_END, + LT(SYMB, KC_SPC), LGUI_T(KC_ENT), S(KC_LGUI), + // right hand + TG(NUM), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_QUOT, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS, + KC_Y, KC_N, KC_E, KC_O, KC_I , KC_ENT, + KC_MINS, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_DOWN,KC_UP, KC_LBRC,KC_RBRC, MO(SYMB), + KC_PGUP, TG(QW), + KC_PGDN, + S(KC_LALT),LT(SYMB, KC_TAB), KC_BSPC + ), + +[QW] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Y, KC_U, KC_I , KC_O, KC_P, _______, + KC_H, KC_J, KC_K , KC_L, KC_SCLN, _______, + _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | * | | | | < | H | U | PU | * | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| > | L | D | R | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | E | D | PD | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_ASTR,_______, + _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_LABK, KC_HOME, KC_UP, KC_PGUP, KC_ASTR, _______, + KC_RABK, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PLUS, _______, + _______, KC_AMPR, KC_END, KC_DOWN, KC_PGDN, KC_BSLS, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | L | MsUp | R | | | | | | 4 | 5 | 6 | | TAB | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | 1 | 2 | 3 | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | 0 | 0 | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUM] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_4, KC_5 , KC_6, _______, KC_TAB, + _______, KC_1, KC_2 , KC_3, _______, _______, + _______, _______, _______, KC_0, KC_0, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + 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) { + case 1: + ergodox_board_led_on(); + break; + case 3: + ergodox_board_led_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/hotdox/left.c b/keyboards/hotdox/left.c new file mode 100644 index 000000000000..ae56b1816011 --- /dev/null +++ b/keyboards/hotdox/left.c @@ -0,0 +1,130 @@ +#include "action.h" +#include "left.h" +#include "wait.h" + +bool i2c_initialized = false; + +void left_config(void); +uint8_t left_write(uint8_t reg, uint8_t data); +uint8_t left_read(uint8_t reg, uint8_t *data); + +uint8_t init_mcp23017(void) +{ + i2c_initialized = false; + + if (i2c_initialized == 0) + { + i2c_init(); // on pins D(1,0) + _delay_ms(1000); + } + + return 0; +} +void left_init(void) +{ + init_mcp23017(); + left_scan(); +#if 0 + while (1) + { + print("wait\n"); + wait_us(1000000); + } +#endif +} + +void left_scan(void) +{ + uint8_t ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); + + if (ret == 0) + { + i2c_stop(HOTDOX_I2C_TIMEOUT); + + if (!i2c_initialized) + { + i2c_initialized = true; + left_config(); + clear_keyboard(); + print("mcp23017 attached!!!\n"); + } + } + else + { + if (i2c_initialized) + { + i2c_initialized = false; + clear_keyboard(); + print("mcp23017 deattached!!!\n"); + } + } + + return; +} + +uint8_t left_read_cols(void) +{ + uint8_t data = 0; + + left_read(MCP23017_B0_GPIOA, &data); + + return data; +} + +void left_unselect_rows(void) +{ + left_write(MCP23017_B0_IODIRB, 0x3F); +} + +void left_select_row(uint8_t row) +{ + left_write(MCP23017_B0_IODIRB, ~(1 << row)); +} + +void left_config(void) +{ + left_write(MCP23017_B0_IODIRA, 0x7F); + left_write(MCP23017_B0_IPOLA, 0x7F); + left_write(MCP23017_B0_GPPUA, 0x7F); + + left_write(MCP23017_B0_IODIRB, 0xFF); + left_write(MCP23017_B0_GPIOB, 0xC0); +} + +uint8_t left_write(uint8_t reg, uint8_t data) +{ + if (!i2c_initialized) + { + return 0; + } + + uint8_t ret; + + ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_write(data, HOTDOX_I2C_TIMEOUT); + +out: + i2c_stop(HOTDOX_I2C_TIMEOUT); + return ret; +} + +uint8_t left_read(uint8_t reg, uint8_t *data) +{ + if (!i2c_initialized) + { + return 0; + } + + uint8_t ret = 0; + + ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_start(I2C_ADDR_READ, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + + *data = i2c_read_nack(HOTDOX_I2C_TIMEOUT); + +out: + i2c_stop(HOTDOX_I2C_TIMEOUT); + return ret; +} diff --git a/keyboards/hotdox/left.h b/keyboards/hotdox/left.h new file mode 100644 index 000000000000..3d8b5a6ead8c --- /dev/null +++ b/keyboards/hotdox/left.h @@ -0,0 +1,57 @@ +#pragma once + +#include "quantum.h" +#include +#include "i2c_master.h" +#include + +#define MCP23017 +#define MCP23017_A0 0 +#define MCP23017_A1 0 +#define MCP23017_A2 0 + +#define I2C_ADDR (0x20) +#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE) +#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ) + + +#define MCP23017_B0_IODIRA 0x00 +#define MCP23017_B0_IODIRB 0x01 +#define MCP23017_B0_IPOLA 0x02 +#define MCP23017_B0_IPOLB 0x03 +#define MCP23017_B0_GPINTENA 0x04 +#define MCP23017_B0_GPINTENB 0x05 +#define MCP23017_B0_DEFVALA 0x06 +#define MCP23017_B0_DEFVALB 0x07 +#define MCP23017_B0_INTCONA 0x08 +#define MCP23017_B0_INTCONB 0x09 +#define MCP23017_B0_IOCONA 0x0A +#define MCP23017_B0_IOCONB 0x0B +#define MCP23017_B0_GPPUA 0x0C +#define MCP23017_B0_GPPUB 0x0D +#define MCP23017_B0_INTFA 0x0E +#define MCP23017_B0_INTFB 0x0F +#define MCP23017_B0_INTCAPA 0x10 +#define MCP23017_B0_INTCAPB 0x11 +#define MCP23017_B0_GPIOA 0x12 +#define MCP23017_B0_GPIOB 0x13 +#define MCP23017_B0_OLATA 0x14 +#define MCP23017_B0_OLATB 0x15 + +#define HOTDOX_I2C_TIMEOUT 100 + +typedef int16_t i2c_status_t; + +void left_init(void); +void left_scan(void); + +uint8_t left_read_cols(void); +uint8_t left_get_col(uint8_t col); + +matrix_row_t left_read_row(void); + +void left_unselect_rows(void); +void left_select_row(uint8_t row); + +uint8_t init_mcp23017(void); + diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c new file mode 100644 index 000000000000..9d3a98db21af --- /dev/null +++ b/keyboards/hotdox/matrix.c @@ -0,0 +1,283 @@ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "hotdox.h" +#include "left.h" +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // disable JTAG + MCUCR = (1<1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + matrix_print(); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + wait_us(30); // without this wait read unstable value. + matrix_row_t mask = debounce_mask(i); + matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask); + debounce_report(cols ^ matrix[i], i); + matrix[i] = cols; + + unselect_rows(); + } + + matrix_scan_quantum(); + + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< Date: Mon, 11 Mar 2019 20:46:55 +0000 Subject: [PATCH 299/445] [Keyboard] Mechboards Micropad (#5368) --- .../handwired/mechboards_micropad/config.h | 245 ++++++++++++++++++ .../handwired/mechboards_micropad/info.json | 12 + .../keymaps/default/keymap.c | 84 ++++++ .../keymaps/default/readme.md | 4 + .../mechboards_micropad/mechboards_micropad.c | 43 +++ .../mechboards_micropad/mechboards_micropad.h | 33 +++ .../handwired/mechboards_micropad/readme.md | 14 + .../handwired/mechboards_micropad/rules.mk | 81 ++++++ 8 files changed, 516 insertions(+) create mode 100644 keyboards/handwired/mechboards_micropad/config.h create mode 100644 keyboards/handwired/mechboards_micropad/info.json create mode 100644 keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/mechboards_micropad/keymaps/default/readme.md create mode 100644 keyboards/handwired/mechboards_micropad/mechboards_micropad.c create mode 100644 keyboards/handwired/mechboards_micropad/mechboards_micropad.h create mode 100644 keyboards/handwired/mechboards_micropad/readme.md create mode 100644 keyboards/handwired/mechboards_micropad/rules.mk diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h new file mode 100644 index 000000000000..01a0bdd909a2 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar +#define PRODUCT Mechboards Micropad +#define DESCRIPTION Enjoy your freebie! + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * 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 { B6 } +#define MATRIX_COL_PINS { B2, B3, B1, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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/mechboards_micropad/info.json b/keyboards/handwired/mechboards_micropad/info.json new file mode 100644 index 000000000000..f8908d9fcf05 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Mechboards Micropad", + "url": "", + "maintainer": "yiancar", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c new file mode 100644 index 000000000000..41784c5204c4 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +uint8_t led_state = 1; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MECHBOARDURL = SAFE_RANGE, + QMKURL, + MKUK, + LEDCHANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + MECHBOARDURL, QMKURL, MKUK, LEDCHANGE \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MECHBOARDURL: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("https://mechboards.co.uk/" SS_TAP(X_ENTER)); + } 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; + case MKUK: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("MKUK4 was amazing!"); + } else { + // when keycode QMKURL is released + } + break; + case LEDCHANGE: + if (record->event.pressed) { + // when keycode QMKURL is pressed + led_state = !led_state; + writePin(F6, led_state); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + setPinOutput(F6); + writePinLow(F6); +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md b/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md new file mode 100644 index 000000000000..92d37ad8b921 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for mechboards_micropad + +This is a 4 key micropad freebie from Mechboards and Yiancar-Designs. +Press the keys to find out the secrets:) \ No newline at end of file diff --git a/keyboards/handwired/mechboards_micropad/mechboards_micropad.c b/keyboards/handwired/mechboards_micropad/mechboards_micropad.c new file mode 100644 index 000000000000..d4c8fa9b9286 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/mechboards_micropad.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mechboards_micropad.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/handwired/mechboards_micropad/mechboards_micropad.h b/keyboards/handwired/mechboards_micropad/mechboards_micropad.h new file mode 100644 index 000000000000..983908486230 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/mechboards_micropad.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#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( \ + k00, k01, k02, k03 \ +) \ +{ \ + { k00, k01, k02, k03 } \ +} diff --git a/keyboards/handwired/mechboards_micropad/readme.md b/keyboards/handwired/mechboards_micropad/readme.md new file mode 100644 index 000000000000..23af568a243b --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/readme.md @@ -0,0 +1,14 @@ +Mechboards Micropad +=================== + +This was a freebie, use me and find out more about me :) + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: ATMega32u4 +Hardware Availability: Random mechboards.co.uk order and UK meetups! + +Make example for this keyboard (after setting up your build environment): + + make handwired/mechboards_micropad: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/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk new file mode 100644 index 000000000000..8ac2297e466a --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/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 = 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 = 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 +# 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 e88a75904b0c345d75b02bbf333dd171d31399ae Mon Sep 17 00:00:00 2001 From: FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> Date: Mon, 11 Mar 2019 16:49:23 -0400 Subject: [PATCH 300/445] [Keyboard] Add Stand Aside keyboard (#5360) * 412_64 move to handwired 412_64 and its second printing, Mark Zero Stand Aside, are now obsolesced by new hardware. As only two units exist in the wild not owned by me, I'm moving the definition to handwired. * Mark 3 Stand Aside ready for production. Uploading firmware, compiled and tested, for Mark 3 Stand Aside. The hardware's ready, now the software is too. * Whoops. Should've branched before pushing Stand Aside. Sorry 'bout that. * Revert "Whoops." This reverts commit d222046cfe6183ed0c42286ec9ebb5034a5d1009. * Revert "Mark 3 Stand Aside ready for production." This reverts commit c790899af7a6d92855aebe6a96003f1fe9be66b3. * Mark 3 Stand Aside ready. Initial commit for Mark 3 Stand Aside, ready for production. * Update keyboards/standaside/rules.mk noroadsleft suggested removal of a line, 'LAYOUTS = ortho_4x16'. I agree. Co-Authored-By: FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> * Cleanup for pull request. Making changes requested by Drashna, as they're all good, and I know way less about the standards than they do. * Initial cleanup completion. Missed a few lines in standaside.c, they're cleaned up now. --- keyboards/standaside/config.h | 204 ++++++++++++++++++ keyboards/standaside/keymaps/default/config.h | 5 + keyboards/standaside/keymaps/default/keymap.c | 77 +++++++ keyboards/standaside/readme.md | 15 ++ keyboards/standaside/rules.mk | 73 +++++++ keyboards/standaside/standaside.c | 14 ++ keyboards/standaside/standaside.h | 29 +++ 7 files changed, 417 insertions(+) create mode 100644 keyboards/standaside/config.h create mode 100644 keyboards/standaside/keymaps/default/config.h create mode 100644 keyboards/standaside/keymaps/default/keymap.c create mode 100644 keyboards/standaside/readme.md create mode 100644 keyboards/standaside/rules.mk create mode 100644 keyboards/standaside/standaside.c create mode 100644 keyboards/standaside/standaside.h diff --git a/keyboards/standaside/config.h b/keyboards/standaside/config.h new file mode 100644 index 000000000000..fa3576ca5b6c --- /dev/null +++ b/keyboards/standaside/config.h @@ -0,0 +1,204 @@ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xF7E0 +#define PRODUCT_ID 0x0412 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Fate Everywhere +#define PRODUCT Stand Aside +#define DESCRIPTION A compact 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * 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 { D1, F4, F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { F5, D0, D4, C6, D7, E6, B4, B5 } +#define UNUSED_PINS {} + + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN C7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* 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 + +/* + * Enable RGB Underlighting + */ +#define RGB_DI_PIN C7 +#define RGBLED_NUM 12 +#define RGBLIGHT_ANIMATIONS + +/* 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. + * + */ + +/* 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 +*/ + diff --git a/keyboards/standaside/keymaps/default/config.h b/keyboards/standaside/keymaps/default/config.h new file mode 100644 index 000000000000..d533d806c90c --- /dev/null +++ b/keyboards/standaside/keymaps/default/config.h @@ -0,0 +1,5 @@ + + +#pragma once + +// place overrides here diff --git a/keyboards/standaside/keymaps/default/keymap.c b/keyboards/standaside/keymaps/default/keymap.c new file mode 100644 index 000000000000..0f13cb763296 --- /dev/null +++ b/keyboards/standaside/keymaps/default/keymap.c @@ -0,0 +1,77 @@ + +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _RAISE 1 +#define _LOWER 2 + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* MAIN + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | TAB | Q | W | E | R | T | Y | U | I | O | P | Backsp | Delete | 7 | 8 | 9 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | PgUp | 4 | 5 | 6 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / | ENTER | PgDn | 1 | 2 | 3 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | PAUS | GUI | ALT | Lower | Space | Space | Raise | Left | Down | Up | Right | Shift | 0 | . | ENTER | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_MAIN] = LAYOUT_ortho_4x16( + 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_DEL, KC_KP_7, KC_KP_8, KC_KP_9, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_PGUP, KC_KP_4, KC_KP_5, KC_KP_6, + 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_PGDN, KC_KP_1, KC_KP_2, KC_KP_3, + KC_LCTL, KC_PAUS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, KC_KP_0, KC_KP_DOT, KC_PENT + ), + +/* RAISE + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Insert | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | - | = | [ | ] | \ | Home | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | PScr | End | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | Next | Vol- | Vol+ | Play | NumLok | | | | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_ortho_4x16( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_INS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_END, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_NLCK, _______, _______, _______ + ), + +/* LOWER + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | RGBPWR | Mode | Reset | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | HUE+ | SAT+ | VAL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | | HUE- | SAT- | VAL- | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | Mute | | Plain | Rainbo | Larsen | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_ortho_4x16( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, RGB_TOG, RGB_MOD, RESET, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, RGB_M_P, RGB_M_R, RGB_M_K + ), + +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/standaside/readme.md b/keyboards/standaside/readme.md new file mode 100644 index 000000000000..ca1cfb2763de --- /dev/null +++ b/keyboards/standaside/readme.md @@ -0,0 +1,15 @@ +# Stand Aside + +![Stand Aside](https://i.imgur.com/X6Katar.png) + +A compact 60% keyboard designed by Fate Everywhere. Born out of the desire for a Planck with a numpad for technical work. Available for sale (kit and completed) once the store comes up. + +Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere) +Hardware Supported: Mark 3 Stand Aside. +Hardware Availability: Seven Store (https://store.7storm.org). + +Make example for this keyboard (after setting up your build environment): + + make standaside: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/standaside/rules.mk b/keyboards/standaside/rules.mk new file mode 100644 index 000000000000..a7ebc21fa484 --- /dev/null +++ b/keyboards/standaside/rules.mk @@ -0,0 +1,73 @@ +# 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 + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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 = atmel_dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +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 +# 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 +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) +RGBLIGHT_ENABLE = yes # Enable RGB underlighting support + diff --git a/keyboards/standaside/standaside.c b/keyboards/standaside/standaside.c new file mode 100644 index 000000000000..904e92d335cc --- /dev/null +++ b/keyboards/standaside/standaside.c @@ -0,0 +1,14 @@ + +#include "standaside.h" +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/standaside/standaside.h b/keyboards/standaside/standaside.h new file mode 100644 index 000000000000..b6616963979d --- /dev/null +++ b/keyboards/standaside/standaside.h @@ -0,0 +1,29 @@ + +#ifndef STANDASIDE_H +#define STANDASIDE_H + +#include "quantum.h" +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_ortho_4x16( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ + K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \ + K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \ + K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ +) \ +{ \ + { K00, K02, K04, K06, K08, K10, K12, K14 }, \ + { K01, K03, K05, K07, K09, K11, K13, K15 }, \ + { K16, K18, K20, K22, K24, K26, K28, K30 }, \ + { K17, K19, K21, K23, K25, K27, K29, K31 }, \ + { K32, K34, K36, K38, K40, K42, K44, K46 }, \ + { K33, K35, K37, K39, K41, K43, K45, K47 }, \ + { K48, K50, K52, K54, K56, K58, K60, K62 }, \ + { K49, K51, K53, K55, K57, K59, K61, K63 } \ +} + +#endif From fe89aef77476d76f3bfe4682b0e9c8a54c8b5329 Mon Sep 17 00:00:00 2001 From: DDRnJn Date: Mon, 11 Mar 2019 16:53:22 -0400 Subject: [PATCH 301/445] Add 3 new songs and add new note type (#5351) * Added 3 new songs and added new note type to musical_notes.h Added Megalovania from Undertale, Kataware Doki from Kimi no Na Wa and La Campanella by Lizst to song_list.h Added the breve (double whole note) and dotted breve note types to musical_notes.h. I included this because the default tempo is quite high, so I thought a note with higher duration was needed * Fixed indentation for new notes in musical_notes.h Changed tabs to spaces in indentation --- quantum/audio/musical_notes.h | 4 ++++ quantum/audio/song_list.h | 44 ++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index ce8d47d1c1ad..cd54af38d22f 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -26,12 +26,14 @@ // Note Types #define MUSICAL_NOTE(note, duration) {(NOTE##note), duration} +#define BREVE_NOTE(note) MUSICAL_NOTE(note, 128) #define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64) #define HALF_NOTE(note) MUSICAL_NOTE(note, 32) #define QUARTER_NOTE(note) MUSICAL_NOTE(note, 16) #define EIGHTH_NOTE(note) MUSICAL_NOTE(note, 8) #define SIXTEENTH_NOTE(note) MUSICAL_NOTE(note, 4) +#define BREVE_DOT_NOTE(note) MUSICAL_NOTE(note, 128+64) #define WHOLE_DOT_NOTE(note) MUSICAL_NOTE(note, 64+32) #define HALF_DOT_NOTE(note) MUSICAL_NOTE(note, 32+16) #define QUARTER_DOT_NOTE(note) MUSICAL_NOTE(note, 16+8) @@ -40,11 +42,13 @@ // Note Type Shortcuts #define M__NOTE(note, duration) MUSICAL_NOTE(note, duration) +#define B__NOTE(n) BREVE_NOTE(n) #define W__NOTE(n) WHOLE_NOTE(n) #define H__NOTE(n) HALF_NOTE(n) #define Q__NOTE(n) QUARTER_NOTE(n) #define E__NOTE(n) EIGHTH_NOTE(n) #define S__NOTE(n) SIXTEENTH_NOTE(n) +#define BD_NOTE(n) BREVE_DOT_NOTE(n) #define WD_NOTE(n) WHOLE_DOT_NOTE(n) #define HD_NOTE(n) HALF_DOT_NOTE(n) #define QD_NOTE(n) QUARTER_DOT_NOTE(n) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 126c0e59400d..35098304411b 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -533,5 +533,47 @@ H__NOTE(_C4 ), \ W__NOTE(_REST), \ QD_NOTE(_F4 ), \ - M__NOTE(_BF4, 128), + M__NOTE(_BF4, 128), + +#define KATAWARE_DOKI \ + W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), \ + B__NOTE(_E5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_C5), H__NOTE(_C6), Q__NOTE(_B5), \ + Q__NOTE(_A5), H__NOTE(_G5), Q__NOTE(_G5), Q__NOTE(_A5), W__NOTE(_G5), QD_NOTE(_E5), \ + QD_NOTE(_F5), Q__NOTE(_E5), WD_NOTE(_D5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), \ + H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), B__NOTE(_E5), H__NOTE(_G4), \ + Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), \ + Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), \ + Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), \ + Q__NOTE(_C5), HD_NOTE(_D5), H__NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), \ + H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), \ + W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), \ + H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), Q__NOTE(_C5), HD_NOTE(_D5), \ + HD_NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), BD_NOTE(_C5), + +#define CAMPANELLA \ + Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS5), E__NOTE(_DS5), \ + E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), \ + Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_GS4), \ + E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_G4), E__NOTE(_G4), E__NOTE(_DS6), Q__NOTE(_GS4), E__NOTE(_GS4), \ + E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS6), \ + Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_E5), E__NOTE(_E5), E__NOTE(_DS6), Q__NOTE(_DS5), \ + E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), \ + E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), \ + Q__NOTE(_GS4), E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_G4), E__NOTE(_G4), E__NOTE(_DS6), Q__NOTE(_GS4), \ + E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_DS4), E__NOTE(_DS4), \ + E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS6), E__NOTE(_DS6), E__NOTE(_DS7), \ + Q__NOTE(_DS6), E__NOTE(_DS6), E__NOTE(_DS7), Q__NOTE(_CS6), E__NOTE(_CS6), E__NOTE(_DS7), Q__NOTE(_B5), \ + E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_B5), E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), \ + E__NOTE(_DS7), Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_G5), E__NOTE(_G5), E__NOTE(_DS7), \ + Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), E__NOTE(_DS7), Q__NOTE(_DS5), \ + E__NOTE(_DS5), E__NOTE(_DS7), W__NOTE(_DS6), W__NOTE(_GS5), + +#define MEGALOVANIA \ + Q__NOTE(_D4), Q__NOTE(_D4), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ + Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_C4), Q__NOTE(_C4), H__NOTE(_D5), HD_NOTE(_A4), \ + H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), \ + Q__NOTE(_B3), Q__NOTE(_B3), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ + Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_BF3), Q__NOTE(_BF3), H__NOTE(_D5), \ + HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), \ + Q__NOTE(_G4), #endif From 8ff4b4dba4026daa15dda1e275c2edf65ba4a3ef Mon Sep 17 00:00:00 2001 From: Christian Westerlund Date: Mon, 11 Mar 2019 22:02:31 +0100 Subject: [PATCH 302/445] [Keymap] Small improvements to this keymap (#5343) * Small fixes, added tilde, print screen and switched alt keys * Comments * .. * Removed fn_actions block --- .../ergodox/dvorak_programmer_swe/keymap.c | 20 +++++++------- .../ergodox/dvorak_programmer_swe/readme.md | 27 ++++++++++++++++++- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c index 43efc763d163..2dd1dfd99d67 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c @@ -44,10 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| LT2 | | LT2 |------+------+------+------+------+--------| * | LShift | Ö | Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | CTRL | L1 |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * | CTRL | L1 |Alt | Left | Right| | Up | Down | [ | ] | ~L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| + * | App | LGui | | AltShf|Ctrl/Esc| * ,------|------|------| |------+--------+------. * | | | Home | | PgUp | | | * | Space|Backsp|------| |------| Tab |Enter | @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB), KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA), - CTL_T(KC_NO), MO(SYMB), LALT(KC_LSFT), KC_LEFT,KC_RGHT, + CTL_T(KC_NO), MO(SYMB), KC_LALT, KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC,KC_BSPC,KC_END, @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE, TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), - KC_LALT, CTL_T(KC_ESC), + LALT(KC_LSFT), CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT ), @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | # | ( | ) | \ | / |------| |------| > | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | | + * | | ~ | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | . | 0 | = | | | * `----------------------------------' `----------------------------------' @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS, KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH, - KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS, + KC_TRNS, NO_TILD, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, @@ -165,9 +165,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | | + * | | Save |Build |Debug |PrtScr| | | | | bool | int |string| dec | Todo | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| priv | publ |shared| prot | | | + * | | | ' | | | |------| |------| priv | publ |shared| prot | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | const| dim |return|nothin| | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -184,8 +184,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MEDIA AND MOUSE [DEVL] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, NO_APOS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/layouts/community/ergodox/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md index 552fa0e3ab79..1165632dd2bf 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/readme.md +++ b/layouts/community/ergodox/dvorak_programmer_swe/readme.md @@ -13,14 +13,39 @@ TODO: Known issues: * Keymap 2 modifier has not gotten its place yet.. -* Print screen, where? ## Changelog +* 2019-03-08 + * Switched position on Alt and Alt-shift + * Added tilde character to symbol layer + * Added Print Screen to keymap 3 + * Added ' (NO_APOS) to keymap 3 + * Added how to install help in this readme + * 2017-05-16 * Initial release + +# How to install - reminder +0. Docs: https://docs.qmk.fm/#/newbs +1. Download flashing tool - teensy (from ergodox-ez visual designer) +2. Setup build environment: https://docs.qmk.fm/#/newbs_getting_started + +QUICK HOWTO WSL: (this is not supported anymore it seems, why?) +The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. +Open "Bash On Ubuntu On Windows" from the start menu. +Go to the directory where you cloned qmk_firmware. Note that the paths start with /mnt/ in the WSL, so you have to write for example cd /mnt/c/path/to/qmk_firmware. +Run util/wsl_install.sh and follow the on-screen instructions. +Close the Bash command window, and re-open it. +You are ready to compile and flash the firmware! + +3. Build the firmware with: +Run the following in the root qmk folder: +make KEYBOARD=ergodox_ez KEYMAP=dvorak_programmer_swe + + # Author Christian Westerlund cwesterlund @ github From 99654c6e4f81d65a6ca3da592eb38ca710123b40 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 11 Mar 2019 23:52:04 +0000 Subject: [PATCH 303/445] [Keyboard] Fix diode and split keyboard configuration for 40percentclub/half_n_half (#5371) --- keyboards/40percentclub/half_n_half/config.h | 3 ++- keyboards/40percentclub/half_n_half/half_n_half.h | 4 ++++ keyboards/40percentclub/half_n_half/rules.mk | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index 9aa8e810dd96..c74fcacbb951 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -46,12 +46,13 @@ along with this program. If not, see . #define UNUSED_PINS /* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL +#define DIODE_DIRECTION COL2ROW /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define USE_SERIAL // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h index e20d42fde11f..bc330c9cb7b8 100644 --- a/keyboards/40percentclub/half_n_half/half_n_half.h +++ b/keyboards/40percentclub/half_n_half/half_n_half.h @@ -42,3 +42,7 @@ { R26, R25, R24, R23, R22, R21, R20 }, \ { ___, ___, ___, ___, R32, ___, ___ } \ } + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index bd0d8f808cd4..cc5fccee9844 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -79,3 +79,6 @@ 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) + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes From fd43259cbd09dda47087bb45aecf80a77cdc4c58 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Mon, 11 Mar 2019 20:53:25 -0300 Subject: [PATCH 304/445] [Keyboard] Update rules.mk (#5370) MOUSEKEY_ENABLED = yes by default --- keyboards/handwired/jotanck/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk index 6c3263446137..6b39b7cc1abe 100644 --- a/keyboards/handwired/jotanck/rules.mk +++ b/keyboards/handwired/jotanck/rules.mk @@ -48,7 +48,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration From e046872a80263df895a759a55e72ed51cfa70ae7 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 11 Mar 2019 23:47:50 -0400 Subject: [PATCH 305/445] [Keyboard] Satisfaction75 Protoype/Rev1 split, and new VIA features (#5303) * Add satisfaction75 revision 1 * Update manufacturer * Add tester layout and update rev1 comments * Add ifdef guards for OLED for tester * Add oled disabling rules * Update to save backlight settings and setup for VIA custom config * Add new VIA values to satisfaction75 * Safety guard in clock set mode * Fix mistaken doc edit * Address PR comments * bring the default back to pass travis CI * Address further PR comments --- keyboards/cannonkeys/satisfaction75/config.h | 23 ++- .../satisfaction75/keymaps/tester/keymap.c | 37 +++++ .../satisfaction75/keymaps/tester/rules.mk | 1 + .../satisfaction75/prototype/prototype.h | 19 +++ .../satisfaction75/prototype/rules.mk | 0 .../cannonkeys/satisfaction75/rev1/rev1.h | 108 ++++++++++++++ .../cannonkeys/satisfaction75/rev1/rules.mk | 0 keyboards/cannonkeys/satisfaction75/rules.mk | 2 +- .../satisfaction75/satisfaction75.c | 132 +++++++++++++++--- .../satisfaction75/satisfaction75.h | 33 ++--- .../satisfaction75/satisfaction_encoder.c | 12 +- .../satisfaction75/satisfaction_oled.c | 2 + keyboards/zeal60/zeal60_api.h | 3 +- 13 files changed, 326 insertions(+), 46 deletions(-) create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/prototype/prototype.h create mode 100644 keyboards/cannonkeys/satisfaction75/prototype/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/rev1/rev1.h create mode 100644 keyboards/cannonkeys/satisfaction75/rev1/rules.mk diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index dd2d9bc574f9..e3d44990efc3 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 /* in python2: list(u"whatever".encode('utf-16-le')) */ /* at most 32 characters or the ugly hack in usb_main.c borks */ -#define MANUFACTURER QMK +#define MANUFACTURER CannonKeys #define PRODUCT Satisfaction75 #define DESCRIPTION Satisfaction 75 Keyboard @@ -76,14 +76,27 @@ along with this program. If not, see . // 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 0x02 +#define EEPROM_VERSION 0x0F #define EEPROM_VERSION_ADDR 34 // Dynamic keymap starts after EEPROM version #define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 803 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 221 + +// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803 + +// I'm also putting my custom stuff after that +// 1 for enabled encoder modes +// 1 for custom backlighting controls +// 1 for OLED default mode +// 6 for 3x custom encoder settings, left, right, and press (18 total) + +#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 803 +#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 804 +#define DYNAMIC_KEYMAP_DEFAULT_OLED 805 +#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 806 + +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 824 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c new file mode 100644 index 000000000000..3595c107b98a --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2012,2013 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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_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_DEL, ENC_PRESS, + 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_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_ENTER, 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_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk new file mode 100644 index 000000000000..3357eb91c057 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk @@ -0,0 +1 @@ +QWIIC_ENABLE = no diff --git a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h new file mode 100644 index 000000000000..42e574f3ea83 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h @@ -0,0 +1,19 @@ +#pragma once + +#include "satisfaction75.h" + +#define LAYOUT_default( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, 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, K312, KC_NO, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} diff --git a/keyboards/cannonkeys/satisfaction75/prototype/rules.mk b/keyboards/cannonkeys/satisfaction75/prototype/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h new file mode 100644 index 000000000000..302b7e43def8 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h @@ -0,0 +1,108 @@ +#pragma once + +#include "satisfaction75.h" + +// This layout is the default - it's what's in VIA +// ANSI, bottom row 1.25/1.25/1.25/6.25/1/1/1 +#define LAYOUT_default( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, 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, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + +// ISO, bottom row 1.25/1.25/1.25/6.25/1/1/1 +#define LAYOUT_iso( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, 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, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + +// ANSI, bottom row 1.25/1.25/1.25/6.25/1.5/1.5 +#define LAYOUT_3x2( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K505, K509, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, 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, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, KC_NO, K511, K512, K513, KC_NO, K515 } \ +} + +// ANSI, WKL bottom row 1.5/1.5/7/1.5/1.5, Split Backspace +#define LAYOUT_2x2( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K505, K509, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, 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, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, KC_NO, K511, K512, K513, KC_NO, K515 } \ +} + +// ANSI, bottom row 1.25/1.25/1.25/2.25/1.25/2.75/1/1/1 +// ANSI, bottom row 1.25/1.25/1.25/2.75/1.25/2.25/1/1/1 +#define LAYOUT_split_space( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, 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, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + + +// Expose All Keys - Split backspace - ISO Extra keys - Split space bottom row +#define LAYOUT_all( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, 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, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rules.mk b/keyboards/cannonkeys/satisfaction75/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 88ab45920445..3e2877200ed2 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -54,4 +54,4 @@ QWIIC_ENABLE += MICRO_OLED # RAW_ENABLE = yes # DYNAMIC_KEYMAP_ENABLE = yes -DEFAULT_FOLDER = cannonkeys/satisfaction75 +DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 1423b11b0525..0e788b29b786 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -5,9 +5,10 @@ #include "ch.h" #include "hal.h" -// #ifdef QWIIC_MICRO_OLED_ENABLE +#ifdef QWIIC_MICRO_OLED_ENABLE #include "micro_oled.h" #include "qwiic.h" +#endif #include "timer.h" @@ -93,21 +94,87 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) } case id_get_keyboard_value: { - if ( command_data[0] == id_uptime ) - { - uint32_t value = timer_read32(); - command_data[1] = (value >> 24 ) & 0xFF; - command_data[2] = (value >> 16 ) & 0xFF; - command_data[3] = (value >> 8 ) & 0xFF; - command_data[4] = value & 0xFF; - } - else - { - *command_id = id_unhandled; - } + switch( command_data[0]) + { + case id_uptime: + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + break; + } + case id_oled_default_mode: + { + uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); + command_data[1] = default_oled; + break; + } + case id_oled_mode: + { + command_data[1] = oled_mode; + break; + + } + case id_encoder_modes: + { + command_data[1] = enabled_encoder_modes; + break; + } + case id_encoder_custom: + { + // uint8_t custom_encoder_idx = command_data[1]; + // command_data[2] = 0x00; + // command_data[3] = 0x00; + // command_data[4] = 0x00; + // command_data[5] = 0x00; + // command_data[6] = 0x00; + // command_data[7] = 0x00; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } break; - } + } #ifdef DYNAMIC_KEYMAP_ENABLE + case id_set_keyboard_value: + { + switch(command_data[0]){ + case id_oled_default_mode: + { + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED, command_data[1]); + break; + } + case id_oled_mode: + { + oled_mode = command_data[1]; + draw_ui(); + break; + } + case id_encoder_modes: + { + enabled_encoder_modes = command_data[1]; + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, enabled_encoder_modes); + break; + } + case id_encoder_custom: + { + // uint8_t custom_encoder_idx = command_data[1]; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } + break; + } case id_dynamic_keymap_get_keycode: { uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); @@ -243,9 +310,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { queue_for_send = true; switch (keycode) { case OLED_TOGG: - if (record->event.pressed) { - oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; - draw_ui(); + if(!clock_set_mode){ + if (record->event.pressed) { + oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; + draw_ui(); + } } return false; case CLOCK_SET: @@ -325,12 +394,34 @@ void encoder_update_kb(uint8_t index, bool clockwise) { } } +void dynamic_keymap_custom_reset(void){ + void *p = (void*)(DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); + void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); + while ( p != end ) { + eeprom_update_byte(p, 0); + ++p; + } + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, 0x1F); +} + +void save_backlight_config_to_eeprom(){ + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT, kb_backlight_config.raw); +} + +void load_custom_config(){ + kb_backlight_config.raw = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); +#ifdef DYNAMIC_KEYMAP_ENABLE + oled_mode = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); + enabled_encoder_modes = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES); +#endif +} + void eeprom_init_kb(void) { // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. if (eeprom_is_valid()) { - //backlight_config_load(); + load_custom_config(); } else { // If the EEPROM has not been saved before, or is out of date, // save the default values to the EEPROM. Default values @@ -341,6 +432,8 @@ void eeprom_init_kb(void) dynamic_keymap_reset(); // This resets the macros in EEPROM to nothing. dynamic_keymap_macro_reset(); + // Reset the custom stuff + dynamic_keymap_custom_reset(); #endif // Save the magic number last, in case saving was interrupted eeprom_set_valid(true); @@ -367,7 +460,7 @@ void matrix_scan_kb(void) { queue_for_send = true; } } - +#ifdef QWIIC_MICRO_OLED_ENABLE if (queue_for_send && oled_mode != OLED_OFF) { oled_sleeping = false; read_host_led_state(); @@ -378,5 +471,6 @@ void matrix_scan_kb(void) { send_command(DISPLAYOFF); /* 0xAE */ oled_sleeping = true; } +#endif } diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h index 5f9a1e48bad4..dfab68017f02 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -2,23 +2,11 @@ #include "quantum.h" -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array - #define LAYOUT_default( \ - K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \ - K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ -) { \ - { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ - { K200, K201, 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, K312, KC_NO, KC_NO, K315 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ - { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ -} +#ifdef KEYBOARD_cannonkeys_satisfaction75_prototype + #include "prototype.h" +#else + #include "rev1.h" +#endif /* screen off after this many milliseconds */ #define ScreenOffInterval 60000 /* milliseconds */ @@ -39,6 +27,13 @@ enum my_keycodes { OLED_TOGG }; +enum s75_keyboard_value_id { + id_encoder_modes = 0x80, + id_oled_default_mode, + id_encoder_custom, + id_oled_mode +}; + enum encoder_modes { ENC_MODE_VOLUME, ENC_MODE_MEDIA, @@ -114,5 +109,5 @@ void backlight_set(uint8_t level); bool is_breathing(void); void breathing_enable(void); void breathing_disable(void); -// void backlight_save_to_eeprom(uint8_t level); -// uint8_t backlight_config_load(); +void load_custom_config(void); +void save_backlight_config_to_eeprom(void); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index 88996f829d94..677681691867 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -10,6 +10,8 @@ void pre_encoder_mode_change(){ // timespec.dstflag = last_timespec.dstflag; timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; rtcSetTime(&RTCD1, ×pec); + } else if (encoder_mode == ENC_MODE_BACKLIGHT){ + save_backlight_config_to_eeprom(); } } @@ -26,6 +28,9 @@ void post_encoder_mode_change(){ void change_encoder_mode(bool negative){ pre_encoder_mode_change(); + if(enabled_encoder_modes == 0){ + enabled_encoder_modes = 0x1F; + } do { if(negative){ if (encoder_mode == 0){ @@ -94,12 +99,14 @@ uint16_t handle_encoder_clockwise(){ mapped_code = KC_WH_D; break; case ENC_MODE_BACKLIGHT: - // mapped_code = BL_INC; kb_backlight_config.level = kb_backlight_config.level + 1; if(kb_backlight_config.level > BACKLIGHT_LEVELS){ kb_backlight_config.level = BACKLIGHT_LEVELS; } backlight_set(kb_backlight_config.level); + if (kb_backlight_config.level != 0){ + kb_backlight_config.enable = true; + } break; case ENC_MODE_BRIGHTNESS: mapped_code = KC_BRIGHTNESS_UP; @@ -131,6 +138,9 @@ uint16_t handle_encoder_ccw(){ kb_backlight_config.level = kb_backlight_config.level - 1; } backlight_set(kb_backlight_config.level); + if (kb_backlight_config.level == 0){ + kb_backlight_config.enable = false; + } break; case ENC_MODE_BRIGHTNESS: mapped_code = KC_BRIGHTNESS_DOWN; diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index a92d61c568b8..4e22587db851 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -3,6 +3,7 @@ __attribute__ ((weak)) void draw_ui() { +#ifdef QWIIC_MICRO_OLED_ENABLE clear_buffer(); last_flush = timer_read(); send_command(DISPLAYON); @@ -22,6 +23,7 @@ void draw_ui() { send_command(DISPLAYOFF); break; } +#endif } void draw_encoder(int8_t startX, int8_t startY, bool show_legend){ diff --git a/keyboards/zeal60/zeal60_api.h b/keyboards/zeal60/zeal60_api.h index 8061146fdede..048344d712a0 100644 --- a/keyboards/zeal60/zeal60_api.h +++ b/keyboards/zeal60/zeal60_api.h @@ -43,6 +43,7 @@ enum zeal60_command_id enum zeal60_keyboard_value_id { - id_uptime = 0x01 + id_uptime = 0x01, + id_firmware_version }; From 395a7793d1c39053e95a699b4c5dc6ae9c304584 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 12 Mar 2019 14:21:51 +0000 Subject: [PATCH 306/445] Keymap update (#5382) * home and end on fn layer (for forward and back with left hand) * space movement shortcuts * mouse layer --- keyboards/planck/keymaps/callum/config.h | 7 +++ keyboards/planck/keymaps/callum/keymap.c | 73 ++++++++++++++++++----- keyboards/planck/keymaps/callum/readme.md | 67 +-------------------- keyboards/planck/keymaps/callum/rules.mk | 2 +- 4 files changed, 69 insertions(+), 80 deletions(-) create mode 100644 keyboards/planck/keymaps/callum/config.h diff --git a/keyboards/planck/keymaps/callum/config.h b/keyboards/planck/keymaps/callum/config.h new file mode 100644 index 000000000000..49f61dee5511 --- /dev/null +++ b/keyboards/planck/keymaps/callum/config.h @@ -0,0 +1,7 @@ +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index eca83d832025..02456aa7d8b6 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -13,6 +13,7 @@ enum planck_layers { _SYMB, _MOVE, _FUNC, + _MOUSE, }; enum planck_keycodes { @@ -21,6 +22,7 @@ enum planck_keycodes { SYMB, MOVE, FUNC, + MOUSE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -101,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | + * | | | | | | | |Mouse| | | | | * `-----------------------------------------------------------------------' */ [_SYMB] = { @@ -122,41 +124,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, { _______, _______, _______, _______, - _______, _______, _______, _______, + _______, _______, _______, MOUSE, _______, _______, _______, _______ } }, /* MOVE * ,-----------------------------------------------------------------------. - * | | | | | | | |Home | Up | End | | Esc | + * | | | | | | |CtrUp|Home | Up | End |Caps | Esc | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |Left |Down |Right|Caps | Del | + * | | | | | | |SpaL |Left |Down |Right|SpaR | Del | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |PgDn |PgUp |TabL |TabR | | + * | | | | | | |CtrDn|PgDn |PgUp |TabL |TabR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | + * | | | | |Mouse| | | | | | | | * `-----------------------------------------------------------------------' */ [_MOVE] = { { AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D), - AC(KC_E), AC(KC_F), XXXXXXX, KC_HOME, - KC_UP, KC_END, XXXXXXX, KC_ESC + AC(KC_E), AC(KC_F), C(KC_UP), KC_HOME, + KC_UP, KC_END, KC_CAPS, KC_ESC }, { AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J), - AC(KC_K), AC(KC_L), XXXXXXX, KC_LEFT, - KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL + AC(KC_K), AC(KC_L), C(KC_LEFT), KC_LEFT, + KC_DOWN, KC_RGHT, C(KC_RIGHT), KC_DEL }, { _______, AC(KC_M), AC(KC_N), AC(KC_O), - AC(KC_P), AC(KC_Q), XXXXXXX, KC_PGDN, + AC(KC_P), AC(KC_Q), C(KC_DOWN), KC_PGDN, KC_PGUP, SC(KC_TAB), C(KC_TAB), _______ }, { _______, _______, _______, _______, - _______, _______, _______, _______, + MOUSE, _______, _______, _______, _______, _______, _______, _______ } }, @@ -167,7 +169,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | |TabL |TabR | | | | |Clmak|Qwrty| | + * | | |Home |TabL |TabR |End | | | |Clmak|Qwrty| | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | | | |Prev |Mute |Play |Next | | | | | * `-----------------------------------------------------------------------' @@ -184,8 +186,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F18, KC_F19, KC_F20, KC_VOLD }, { - _______, XXXXXXX, XXXXXXX, SC(KC_TAB), - C(KC_TAB), XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, KC_HOME, SC(KC_TAB), + C(KC_TAB), KC_END, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, QWERTY, _______ }, { @@ -193,6 +195,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______ } + }, + + /* MOUSE + * ,-----------------------------------------------------------------------. + * | | | | | | | | ScL |Up | ScR | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | B4 | B3 | B2 | B1 | | |Left |Down |Right| | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | Ac0 | Ac1 | Ac2 | | | ScD | ScU | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------' + */ + [_MOUSE] = { + { + _______, _______, C(KC_LEFT), C(KC_UP), + C(KC_RIGHT), _______, _______, KC_WH_L, + KC_MS_U, KC_WH_R, _______, _______ + }, + { + _______, KC_BTN4, KC_BTN3, KC_BTN2, + KC_BTN1, _______, _______, KC_MS_L, + KC_MS_D, KC_MS_R, _______, _______ + }, + { + _______, _______, KC_ACL0, KC_ACL1, + KC_ACL2, _______, _______, KC_WH_D, + KC_WH_U, _______, _______, _______ + }, + { + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + } } }; @@ -250,6 +286,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_FUNC); } return false; + case MOUSE: + if (record->event.pressed) { + layer_on(_MOUSE); + } else { + layer_off(_MOUSE); + } + return false; // Override the defualt auto shifted symbols to use SEND_STRING // See https://github.com/qmk/qmk_firmware/issues/4072 diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 176211cd4bce..99b6dfbeff00 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -17,68 +17,7 @@ This is a layout for the grid planck, built with a few ideals in mind: - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -Keys are arranged as follows. Blank keys below may actually contain -undocumented shortcuts specific to my workflow. The base layer can be set to -colemak or qwerty (from the function layer). +A layout graphic can be found [here][keyboard-layout-editor] (excludes window +management keys). -``` -/* COLEMAK - * ,-----------------------------------------------------------------------. - * |Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Bksp | A | R | S | T | D | H | N | E | I | O | ' | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Shift| Z | X | C | V | B | K | M | , | . | / |Shift| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |FUNC |Super| Alt |Ctrl |SYMB |Enter|Space|MOVE |Ctrl | Alt |Super|FUNC | - * `-----------------------------------------------------------------------' - */ - -/* QWERTY - * ,-----------------------------------------------------------------------. - * |Tab | Q | W | E | R | T | Y | U | I | O | P | - | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Bksp | A | S | D | F | G | H | J | K | L | ; | ' | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Shift| Z | X | C | V | B | N | M | , | . | / |Shift| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |FUNC |Super| Alt |Ctrl |SYMB |Enter|Space|MOVE |Ctrl | Alt |Super|FUNC | - * `-----------------------------------------------------------------------' - */ - -/* SYMB - * ,-----------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ - -/* MOVE - * ,-----------------------------------------------------------------------. - * | | | | | | | |Home | Up | End | | Esc | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |Left |Down |Right|Caps | Del | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |PgDn |PgUp | | | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ - -/* FUNC - * ,-----------------------------------------------------------------------. - * |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | F21 | F22 | F23 | F24 | | | | |COLMK|QWRTY| | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | |Prev |Mute |Play |Next | | | | | - * `-----------------------------------------------------------------------' - */ - ``` +[keyboard-layout-editor]: http://www.keyboard-layout-editor.com/#/gists/ade5ec1f814bf83046489a4b632575ff diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index 25d398f0806d..4774c2c41781 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration From fe642a84fcf1a52cc761dca231244b7971742d00 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 12 Mar 2019 22:25:39 +0800 Subject: [PATCH 307/445] Fix speed issues with RGB Matrix in the DZ60RGB (#5380) * Fix speed issues with RGB Matrix in the DZ60RGB * keep boards in sync --- keyboards/dztech/dz40rgb/config.h | 3 +- keyboards/dztech/dz60rgb/config.h | 2 +- .../dztech/dz60rgb/keymaps/default/keymap.c | 166 +++++++++--------- 3 files changed, 84 insertions(+), 87 deletions(-) diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h index 2ac7fbdc87e5..5b9f6dc08992 100644 --- a/keyboards/dztech/dz40rgb/config.h +++ b/keyboards/dztech/dz40rgb/config.h @@ -22,7 +22,7 @@ #define DEBOUNCE 3 #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 0 +#define RGB_MATRIX_SKIP_FRAMES 10 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH @@ -31,4 +31,3 @@ #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 2 - diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index a1b3a19d9fc6..19f32440eaac 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -23,7 +23,7 @@ #define DEBOUNCE 3 #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 0 +#define RGB_MATRIX_SKIP_FRAMES 10 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c index 2c667ef42e40..0eff4ca8a379 100644 --- a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c @@ -10,7 +10,7 @@ extern bool g_suspend_state; #define _LAYER7 7 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT( /* Base */ - RESET, RGB_MOD, 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_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ @@ -60,92 +60,90 @@ void rgb_matrix_indicators_user(void) { if (!g_suspend_state) { switch (biton32(layer_state)) { case _LAYER1: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); + break; case _LAYER2: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); + break; + case _LAYER3: + if ( this_led & (1< Date: Tue, 12 Mar 2019 14:38:05 +0000 Subject: [PATCH 308/445] KPrepublic bm16a port (#5383) * Initial bm16a port * Initial bm16a port - fix readme formatting --- keyboards/bm16a/bm16a.c | 43 ++++ keyboards/bm16a/bm16a.h | 39 ++++ keyboards/bm16a/config.h | 246 ++++++++++++++++++++++ keyboards/bm16a/info.json | 30 +++ keyboards/bm16a/keymaps/default/config.h | 19 ++ keyboards/bm16a/keymaps/default/keymap.c | 73 +++++++ keyboards/bm16a/keymaps/default/readme.md | 1 + keyboards/bm16a/readme.md | 15 ++ keyboards/bm16a/rules.mk | 82 ++++++++ 9 files changed, 548 insertions(+) create mode 100644 keyboards/bm16a/bm16a.c create mode 100644 keyboards/bm16a/bm16a.h create mode 100644 keyboards/bm16a/config.h create mode 100644 keyboards/bm16a/info.json create mode 100644 keyboards/bm16a/keymaps/default/config.h create mode 100644 keyboards/bm16a/keymaps/default/keymap.c create mode 100644 keyboards/bm16a/keymaps/default/readme.md create mode 100644 keyboards/bm16a/readme.md create mode 100644 keyboards/bm16a/rules.mk diff --git a/keyboards/bm16a/bm16a.c b/keyboards/bm16a/bm16a.c new file mode 100644 index 000000000000..3d616f29e9dc --- /dev/null +++ b/keyboards/bm16a/bm16a.c @@ -0,0 +1,43 @@ +/* Copyright 2019 + * + * 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 "bm16a.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/bm16a/bm16a.h b/keyboards/bm16a/bm16a.h new file mode 100644 index 000000000000..cf8bab4730ad --- /dev/null +++ b/keyboards/bm16a/bm16a.h @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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_ortho_4x4( \ + K01, K02, K03, K04, \ + K11, K12, K13, K14, \ + K21, K22, K23, K24, \ + K31, K32, K33, K34 \ +) \ +{ \ + { K01, K02, K03, K04 }, \ + { K11, K12, K13, K14 }, \ + { K21, K22, K23, K24 }, \ + { K31, K32, K33, K34 } \ +} diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h new file mode 100644 index 000000000000..c6b460a1184d --- /dev/null +++ b/keyboards/bm16a/config.h @@ -0,0 +1,246 @@ +/* Copyright 2019 + * + * 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 0x424D +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT bm16a +#define DESCRIPTION KPrepublic bm16a + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * 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 { D3, D5, D1, D2} +#define MATRIX_COL_PINS { D6, D4, D7, B4} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 4 +#define RGBLIGHT_ANIMATIONS +// #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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/bm16a/info.json b/keyboards/bm16a/info.json new file mode 100644 index 000000000000..4f87c5ae1d27 --- /dev/null +++ b/keyboards/bm16a/info.json @@ -0,0 +1,30 @@ +{ + "keyboard_name": "bm16a", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "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} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/bm16a/keymaps/default/config.h b/keyboards/bm16a/keymaps/default/config.h new file mode 100644 index 000000000000..08c234aee2b2 --- /dev/null +++ b/keyboards/bm16a/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 + * + * 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/bm16a/keymaps/default/keymap.c b/keyboards/bm16a/keymaps/default/keymap.c new file mode 100644 index 000000000000..a0b06ee92a38 --- /dev/null +++ b/keyboards/bm16a/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + _BASE = 0, + _FN1, + _FN2, +}; + +// 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] = { + + [_BASE] = LAYOUT_ortho_4x4( + KC_PGUP, KC_HOME, KC_UP, KC_END , \ + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \ + MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \ + MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \ + ), + [_FN1] = LAYOUT_ortho_4x4( + KC_ESC, KC_P7, KC_P8, KC_P9, \ + KC_TAB, KC_P4, KC_P5, KC_P6, \ + KC_ENT, KC_P1, KC_P2, KC_P3, \ + _______, KC_P0, KC_P0, KC_DOT \ + ), + [_FN2] = LAYOUT_ortho_4x4( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, _______, _______, RESET, \ + BL_STEP, _______, QMKBEST, QMKURL \ + ) + +}; + +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; +} diff --git a/keyboards/bm16a/keymaps/default/readme.md b/keyboards/bm16a/keymaps/default/readme.md new file mode 100644 index 000000000000..f356f2cca051 --- /dev/null +++ b/keyboards/bm16a/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm16a \ No newline at end of file diff --git a/keyboards/bm16a/readme.md b/keyboards/bm16a/readme.md new file mode 100644 index 000000000000..8d43b7014d03 --- /dev/null +++ b/keyboards/bm16a/readme.md @@ -0,0 +1,15 @@ +# bm16a + +![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg) + +A 16 key macropad, with USB C, RGB underglow and backlight. + +Keyboard Maintainer: QMK Community +Hardware Supported: The PCBs, controllers supported +Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html) + +Make example for this keyboard (after setting up your build environment): + + make bm16a: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/bm16a/rules.mk b/keyboards/bm16a/rules.mk new file mode 100644 index 000000000000..013dac3c90a1 --- /dev/null +++ b/keyboards/bm16a/rules.mk @@ -0,0 +1,82 @@ +# 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 = 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 = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # 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) + +LAYOUTS = ortho_4x4 From 25bb059e4e42ed2637202230ff3d8b765e1295cd Mon Sep 17 00:00:00 2001 From: Naoki Katahira Date: Wed, 13 Mar 2019 02:20:07 +0900 Subject: [PATCH 309/445] [Keyboard] Lily58 Add info.json file (#5354) * Add info.json file * fix info.json * fix2 info.json * Update keyboards/lily58/rev1/info.json Co-Authored-By: kata0510 * Update2 keyboards/lily58/rev1/info.json Co-Authored-By: kata0510 --- keyboards/lily58/rev1/info.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 keyboards/lily58/rev1/info.json diff --git a/keyboards/lily58/rev1/info.json b/keyboards/lily58/rev1/info.json new file mode 100644 index 000000000000..4a3568c3e206 --- /dev/null +++ b/keyboards/lily58/rev1/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Lily58", + "url": "", + "maintainer": "F_YUUCHI", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5}, + {"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5}, + {"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5}, + {"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5}, + {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.15} + ] + } + } +} From 37932c293c15011f883a91e91ee02631ead44a2e Mon Sep 17 00:00:00 2001 From: James Churchill Date: Wed, 13 Mar 2019 03:23:28 +1000 Subject: [PATCH 310/445] Next set of split_common changes (#4974) * Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment --- common_features.mk | 10 +- docs/i2c_driver.md | 2 +- drivers/arm/i2c_master.c | 3 +- drivers/arm/i2c_master.h | 2 +- drivers/avr/i2c_master.c | 160 +++++------- drivers/avr/i2c_master.h | 2 +- drivers/avr/i2c_slave.c | 2 +- .../cannonkeys/satisfaction75/i2c_master.c | 2 +- keyboards/dc01/left/matrix.c | 4 +- keyboards/ergodox_ez/ergodox_ez.c | 6 +- keyboards/ergodox_ez/matrix.c | 4 +- keyboards/gergo/gergo.c | 4 +- keyboards/gergo/matrix.c | 36 +-- quantum/keymap_common.c | 22 -- quantum/quantum.c | 30 --- quantum/quantum.h | 4 - quantum/split_common/i2c.c | 184 -------------- quantum/split_common/i2c.h | 59 ----- quantum/split_common/matrix.c | 1 - quantum/split_common/split_flags.c | 5 - quantum/split_common/split_flags.h | 15 -- quantum/split_common/split_util.c | 5 - quantum/split_common/transport.c | 236 +++++++----------- tmk_core/common/avr/suspend.c | 9 - 24 files changed, 190 insertions(+), 617 deletions(-) delete mode 100644 quantum/split_common/i2c.c delete mode 100644 quantum/split_common/i2c.h delete mode 100644 quantum/split_common/split_flags.c delete mode 100644 quantum/split_common/split_flags.h diff --git a/common_features.mk b/common_features.mk index 20c38ae82e50..046f94d1dbe5 100644 --- a/common_features.mk +++ b/common_features.mk @@ -308,16 +308,16 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) OPT_DEFS += -DSPLIT_KEYBOARD # Include files used by all split keyboards - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ - $(QUANTUM_DIR)/split_common/split_util.c + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c # Determine which (if any) transport files are required ifneq ($(strip $(SPLIT_TRANSPORT)), custom) QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. - # Unused functions are pruned away, which is why we can add both drivers here without bloat. - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \ - $(QUANTUM_DIR)/split_common/serial.c + # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. + QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \ + i2c_master.c \ + i2c_slave.c endif COMMON_VPATH += $(QUANTUM_PATH)/split_common endif diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index 18546fc62be5..bb1a2d74ffd2 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -12,7 +12,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta |`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. | |`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. | |`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. | -|`uint8_t i2c_stop(uint16_t timeout);` |Stops the I2C driver. | +|`uint8_t i2c_stop(void);` |Ends an I2C transaction. | ### Function Return diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 50a30ebce77d..0e5edcc380a3 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -101,8 +101,7 @@ uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t l return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); } -// This is usually not needed. It releases the driver to allow pins to become GPIO again. -uint8_t i2c_stop(uint16_t timeout) +uint8_t i2c_stop(void) { i2cStop(&I2C_DRIVER); return 0; diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 7a9eb32eb9fb..4ab2301f8cfb 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -47,4 +47,4 @@ uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t ti uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length); uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -uint8_t i2c_stop(uint16_t timeout); +uint8_t i2c_stop(void); diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c index 19bae33e9f17..d97a35cd6b09 100755 --- a/drivers/avr/i2c_master.c +++ b/drivers/avr/i2c_master.c @@ -7,43 +7,44 @@ #include "i2c_master.h" #include "timer.h" +#include "wait.h" #ifndef F_SCL -#define F_SCL 400000UL // SCL frequency +# define F_SCL 400000UL // SCL frequency #endif #define Prescaler 1 -#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2) +#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16) / 2) -void i2c_init(void) -{ - TWSR = 0; /* no prescaler */ +void i2c_init(void) { + TWSR = 0; /* no prescaler */ TWBR = (uint8_t)TWBR_val; } -i2c_status_t i2c_start(uint8_t address, uint16_t timeout) -{ +i2c_status_t i2c_start(uint8_t address, uint16_t timeout) { // reset TWI control register TWCR = 0; // transmit START condition - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } } // check if the start condition was successfully transmitted - if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; } + if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) { + return I2C_STATUS_ERROR; + } // load slave address into data register TWDR = address; // start transmission of address - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } @@ -51,38 +52,39 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout) // check if the device has acknowledged the READ / WRITE mode uint8_t twst = TW_STATUS & 0xF8; - if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR; + if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { + return I2C_STATUS_ERROR; + } return I2C_STATUS_SUCCESS; } -i2c_status_t i2c_write(uint8_t data, uint16_t timeout) -{ +i2c_status_t i2c_write(uint8_t data, uint16_t timeout) { // load data into data register TWDR = data; // start transmission of data - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } } - if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; } + if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) { + return I2C_STATUS_ERROR; + } return I2C_STATUS_SUCCESS; } -int16_t i2c_read_ack(uint16_t timeout) -{ - +int16_t i2c_read_ack(uint16_t timeout) { // start TWI module and acknowledge data after reception - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } @@ -92,14 +94,12 @@ int16_t i2c_read_ack(uint16_t timeout) return TWDR; } -int16_t i2c_read_nack(uint16_t timeout) -{ - +int16_t i2c_read_nack(uint16_t timeout) { // start receiving without acknowledging reception - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } @@ -109,115 +109,89 @@ int16_t i2c_read_nack(uint16_t timeout) return TWDR; } -i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - if (status) return status; - for (uint16_t i = 0; i < length; i++) { + for (uint16_t i = 0; i < length && status >= 0; i++) { status = i2c_write(data[i], timeout); - if (status) return status; } - status = i2c_stop(timeout); - if (status) return status; + i2c_stop(); - return I2C_STATUS_SUCCESS; + return status; } -i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(address | I2C_READ, timeout); - if (status) return status; - for (uint16_t i = 0; i < (length-1); i++) { + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { status = i2c_read_ack(timeout); if (status >= 0) { data[i] = status; - } else { - return status; } } - status = i2c_read_nack(timeout); - if (status >= 0 ) { - data[(length-1)] = status; - } else { - return status; + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } } - status = i2c_stop(timeout); - if (status) return status; + i2c_stop(); - return I2C_STATUS_SUCCESS; + return status; } -i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(devaddr | 0x00, timeout); - if (status) return status; - - status = i2c_write(regaddr, timeout); - if (status) return status; + if (status >= 0) { + status = i2c_write(regaddr, timeout); - for (uint16_t i = 0; i < length; i++) { - status = i2c_write(data[i], timeout); - if (status) return status; + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } } - status = i2c_stop(timeout); - if (status) return status; + i2c_stop(); - return I2C_STATUS_SUCCESS; + return status; } -i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(devaddr, timeout); - if (status) return status; + if (status < 0) { + goto error; + } status = i2c_write(regaddr, timeout); - if (status) return status; - - status = i2c_stop(timeout); - if (status) return status; + if (status < 0) { + goto error; + } status = i2c_start(devaddr | 0x01, timeout); - if (status) return status; - for (uint16_t i = 0; i < (length-1); i++) { + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { status = i2c_read_ack(timeout); if (status >= 0) { data[i] = status; - } else { - return status; } } - status = i2c_read_nack(timeout); - if (status >= 0 ) { - data[(length-1)] = status; - } else { - return status; + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } } - status = i2c_stop(timeout); - if (status) return status; +error: + i2c_stop(); - return I2C_STATUS_SUCCESS; + return status; } -i2c_status_t i2c_stop(uint16_t timeout) -{ +void i2c_stop(void) { // transmit STOP condition - TWCR = (1<= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - return I2C_STATUS_SUCCESS; + TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); } diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h index 89c64599c51a..81a7fb5e322d 100755 --- a/drivers/avr/i2c_master.h +++ b/drivers/avr/i2c_master.h @@ -26,6 +26,6 @@ i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint1 i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_stop(uint16_t timeout); +void i2c_stop(void); #endif // I2C_MASTER_H \ No newline at end of file diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c index 18a29a45a5a4..dbb9fb0df349 100755 --- a/drivers/avr/i2c_slave.c +++ b/drivers/avr/i2c_slave.c @@ -16,7 +16,7 @@ static volatile bool slave_has_register_set = false; void i2c_slave_init(uint8_t address){ // load address into TWI address register - TWAR = (address << 1); + TWAR = address; // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); } diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c index a19dbcc9f5bf..d81eb92d4943 100644 --- a/keyboards/cannonkeys/satisfaction75/i2c_master.c +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c @@ -109,7 +109,7 @@ uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t l } // This is usually not needed. It releases the driver to allow pins to become GPIO again. -uint8_t i2c_stop(uint16_t timeout) +uint8_t i2c_stop(void) { i2cStop(&I2C_DRIVER); return 0; diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index cbe3b3f3d8fa..a3db220e4f6e 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -455,10 +455,10 @@ i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset) matrix[MATRIX_ROWS - 1] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end } else { - i2c_stop(10); + i2c_stop(); return 1; } - i2c_stop(10); + i2c_stop(); return 0; } \ No newline at end of file diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 3b2c943506f1..b27a6b89daee 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -128,7 +128,7 @@ uint8_t init_mcp23018(void) { mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); // set pull-up // - unused : on : 1 @@ -140,7 +140,7 @@ uint8_t init_mcp23018(void) { mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; out: - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); #ifdef LEFT_LEDS if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update(); @@ -179,7 +179,7 @@ uint8_t ergodox_left_leds_update(void) { if (mcp23018_status) goto out; out: - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); return mcp23018_status; } #endif diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 22837d312a2f..860cf7b229a4 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -309,7 +309,7 @@ static matrix_row_t read_cols(uint8_t row) data = ~((uint8_t)mcp23018_status); mcp23018_status = I2C_STATUS_SUCCESS; out: - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); return data; } } else { @@ -362,7 +362,7 @@ static void select_row(uint8_t row) mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0xFF & ~(1<. //Trackball pin defs #define TRKUP (1<<4) #define TRKDN (1<<5) -#define TRKLT (1<<6) +#define TRKLT (1<<6) #define TRKRT (1<<7) #define TRKBTN (1<<6) // Multiple for mouse moves #ifndef TRKSTEP -#define TRKSTEP 20 +#define TRKSTEP 20 #endif // multiple for mouse scroll @@ -98,13 +98,13 @@ along with this program. If not, see . // Trackball interrupts accumulate over here. Processed on scan // Stores prev state of mouse, high bits store direction -uint8_t trkState = 0; -uint8_t trkBtnState = 0; +uint8_t trkState = 0; +uint8_t trkBtnState = 0; -volatile uint8_t tbUpCnt = 0; -volatile uint8_t tbDnCnt = 0; -volatile uint8_t tbLtCnt = 0; -volatile uint8_t tbRtCnt = 0; +volatile uint8_t tbUpCnt = 0; +volatile uint8_t tbDnCnt = 0; +volatile uint8_t tbLtCnt = 0; +volatile uint8_t tbRtCnt = 0; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -240,14 +240,14 @@ uint8_t matrix_scan(void) // First we handle the mouse inputs #ifdef BALLER uint8_t pBtn = PINE & TRKBTN; - + #ifdef DEBUG_BALLER - // Compare to previous, mod report + // Compare to previous, mod report if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0) xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6)); #endif - // Modify the report + // Modify the report report_mouse_t pRprt = pointing_device_get_report(); // Scroll by default, move on layer @@ -264,7 +264,7 @@ uint8_t matrix_scan(void) } #ifdef DEBUG_BALLER - if (pRprt.x != 0 || pRprt.y != 0) + if (pRprt.x != 0 || pRprt.y != 0) xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); #endif @@ -272,7 +272,7 @@ uint8_t matrix_scan(void) if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1; // Save state, push update - if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) + if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) pointing_device_set_report(pRprt); trkBtnState = pBtn; @@ -325,8 +325,8 @@ uint8_t matrix_scan(void) enableInterrupts(); #ifdef DEBUG_MATRIX - for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); #endif @@ -394,7 +394,7 @@ static matrix_row_t read_cols(uint8_t row) data = ~((uint8_t)mcp23018_status); mcp23018_status = I2C_STATUS_SUCCESS; out: - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); #ifdef DEBUG_MATRIX if (data != 0x00) xprintf("I2C: %d\n", data); @@ -439,12 +439,12 @@ static void select_row(uint8_t row) if (row < 7) { // select on mcp23018 if (mcp23018_status) { // do nothing on error - } else { // set active row low : 0 // set other rows hi-Z : 1 + } else { // set active row low : 0 // set other rows hi-Z : 1 mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0xFF & ~(1<. #include "backlight.h" #include "quantum.h" -#ifdef SPLIT_KEYBOARD - #include "split_flags.h" -#endif - #ifdef MIDI_ENABLE #include "process_midi.h" #endif @@ -138,39 +134,21 @@ action_t action_for_key(uint8_t layer, keypos_t key) #ifdef BACKLIGHT_ENABLE case BL_ON: action.code = ACTION_BACKLIGHT_ON(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_OFF: action.code = ACTION_BACKLIGHT_OFF(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_DEC: action.code = ACTION_BACKLIGHT_DECREASE(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_INC: action.code = ACTION_BACKLIGHT_INCREASE(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_TOGG: action.code = ACTION_BACKLIGHT_TOGGLE(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_STEP: action.code = ACTION_BACKLIGHT_STEP(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; #endif #ifdef SWAP_HANDS_ENABLE diff --git a/quantum/quantum.c b/quantum/quantum.c index 46d404029f8b..8316d1f06a3a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -360,9 +360,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_toggle(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_MODE_FORWARD: @@ -374,9 +371,6 @@ bool process_record_quantum(keyrecord_t *record) { else { rgblight_step(); } - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_MODE_REVERSE: @@ -388,9 +382,6 @@ bool process_record_quantum(keyrecord_t *record) { else { rgblight_step_reverse(); } - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_HUI: @@ -401,9 +392,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_increase_hue(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_HUD: @@ -414,9 +402,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_decrease_hue(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_SAI: @@ -427,9 +412,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_increase_sat(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_SAD: @@ -440,9 +422,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_decrease_sat(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_VAI: @@ -453,9 +432,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_increase_val(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_VAD: @@ -466,9 +442,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_decrease_val(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_SPI: @@ -484,9 +457,6 @@ bool process_record_quantum(keyrecord_t *record) { case RGB_MODE_PLAIN: if (record->event.pressed) { rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_MODE_BREATHE: diff --git a/quantum/quantum.h b/quantum/quantum.h index d2c5862f881c..c12ac9ab8aff 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -44,10 +44,6 @@ #endif #endif -#ifdef SPLIT_KEYBOARD - #include "split_flags.h" -#endif - #ifdef RGB_MATRIX_ENABLE #include "rgb_matrix.h" #endif diff --git a/quantum/split_common/i2c.c b/quantum/split_common/i2c.c deleted file mode 100644 index 45e958b39560..000000000000 --- a/quantum/split_common/i2c.c +++ /dev/null @@ -1,184 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" -#include "split_flags.h" - -// 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; - - if ( slave_buffer_pos == I2C_BACKLIT_START) { - BACKLIT_DIRTY = true; - } else if ( slave_buffer_pos == (I2C_RGB_START+3)) { - RGB_DIRTY = true; - } - - 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 - -// Address location defines (Keymap should be last, as it's size is dynamic) -#define I2C_BACKLIT_START 0x00 -// Need 4 bytes for RGB (32 bit) -#define I2C_RGB_START 0x01 -#define I2C_KEYMAP_START 0x06 - -// Slave buffer (8bit per) -// Rows per hand + backlit space + rgb space -// TODO : Make this dynamically sized -#define SLAVE_BUFFER_SIZE 0x20 - -// i2c SCL clock frequency -#ifndef SCL_CLOCK -#define SCL_CLOCK 100000L -#endif - -// Support 8bits right now (8 cols) will need to edit to take higher (code exists in delta split?) -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_write_data(void *const TXdata, uint8_t dataLen); -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(); diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index f2a277c69f3a..dcb96254f583 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -25,7 +25,6 @@ along with this program. If not, see . #include "matrix.h" #include "split_util.h" #include "config.h" -#include "split_flags.h" #include "quantum.h" #include "debounce.h" #include "transport.h" diff --git a/quantum/split_common/split_flags.c b/quantum/split_common/split_flags.c deleted file mode 100644 index 1f5825d65020..000000000000 --- a/quantum/split_common/split_flags.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "split_flags.h" - -volatile bool RGB_DIRTY = false; - -volatile bool BACKLIT_DIRTY = false; \ No newline at end of file diff --git a/quantum/split_common/split_flags.h b/quantum/split_common/split_flags.h deleted file mode 100644 index aaac474a7dbf..000000000000 --- a/quantum/split_common/split_flags.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include -#include - -/** -* Global Flags -**/ - -//RGB Stuff -extern volatile bool RGB_DIRTY; - - -//Backlight Stuff -extern volatile bool BACKLIT_DIRTY; diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 5095cb8fdce1..da870f877535 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -3,7 +3,6 @@ #include "keyboard.h" #include "config.h" #include "timer.h" -#include "split_flags.h" #include "transport.h" #include "quantum.h" @@ -60,10 +59,6 @@ static void keyboard_master_setup(void) { #endif #endif transport_master_init(); - - // For master the Backlight info needs to be sent on startup - // Otherwise the salve won't start with the proper info until an update - BACKLIT_DIRTY = true; } static void keyboard_slave_setup(void) diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 95738530ecf4..b16852bc161e 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -3,146 +3,83 @@ #include "matrix.h" #include "quantum.h" -#define ROWS_PER_HAND (MATRIX_ROWS/2) +#define ROWS_PER_HAND (MATRIX_ROWS / 2) #ifdef RGBLIGHT_ENABLE -# include "rgblight.h" +# include "rgblight.h" #endif #ifdef BACKLIGHT_ENABLE -# include "backlight.h" - extern backlight_config_t backlight_config; +# include "backlight.h" +extern backlight_config_t backlight_config; #endif #if defined(USE_I2C) || defined(EH) -#include "i2c.h" +# include "i2c_master.h" +# include "i2c_slave.h" -#ifndef SLAVE_I2C_ADDRESS -# define SLAVE_I2C_ADDRESS 0x32 -#endif +# define I2C_BACKLIT_START 0x00 +// Need 4 bytes for RGB (32 bit) +# define I2C_RGB_START 0x01 +# define I2C_KEYMAP_START 0x05 -#if (MATRIX_COLS > 8) -# error "Currently only supports 8 COLS" -#endif +# define TIMEOUT 100 + +# ifndef SLAVE_I2C_ADDRESS +# define SLAVE_I2C_ADDRESS 0x32 +# endif // Get rows from other half over i2c bool transport_master(matrix_row_t matrix[]) { - int err = 0; + i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_START, (void *)matrix, ROWS_PER_HAND * sizeof(matrix_row_t), TIMEOUT); // write backlight info -#ifdef BACKLIGHT_ENABLE - if (BACKLIT_DIRTY) { - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) { goto i2c_error; } - - // Backlight location - err = i2c_master_write(I2C_BACKLIT_START); - if (err) { goto i2c_error; } - - // Write backlight - i2c_master_write(get_backlight_level()); - - BACKLIT_DIRTY = false; - } -#endif - - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) { goto i2c_error; } - - // start of matrix stored at I2C_KEYMAP_START - err = i2c_master_write(I2C_KEYMAP_START); - 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[i] = i2c_master_read(I2C_ACK); - } - matrix[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 false; +# ifdef BACKLIGHT_ENABLE + static uint8_t prev_level = ~0; + uint8_t level = get_backlight_level(); + if (level != prev_level) { + i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIT_START, (void *)&level, sizeof(level), TIMEOUT); + prev_level = level; } - -#ifdef RGBLIGHT_ENABLE - if (RGB_DIRTY) { - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) { goto i2c_error; } - - // RGB Location - err = i2c_master_write(I2C_RGB_START); - if (err) { goto i2c_error; } - - uint32_t dword = eeconfig_read_rgblight(); - - // Write RGB - err = i2c_master_write_data(&dword, 4); - if (err) { goto i2c_error; } - - RGB_DIRTY = false; - i2c_master_stop(); +# endif + +# ifdef RGBLIGHT_ENABLE + static uint32_t prev_rgb = ~0; + uint32_t rgb = eeconfig_read_rgblight(); + if (rgb != prev_rgb) { + i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgb, sizeof(rgb), TIMEOUT); + prev_rgb = rgb; } -#endif +# endif return true; } void transport_slave(matrix_row_t matrix[]) { - - for (int i = 0; i < ROWS_PER_HAND; ++i) - { - i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i]; - } - // Read Backlight Info - #ifdef BACKLIGHT_ENABLE - if (BACKLIT_DIRTY) - { - backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]); - BACKLIT_DIRTY = false; + for (int i = 0; i < ROWS_PER_HAND * sizeof(matrix_row_t); ++i) { + i2c_slave_reg[I2C_KEYMAP_START + i] = matrix[i]; } - #endif - #ifdef RGBLIGHT_ENABLE - if (RGB_DIRTY) - { - // Disable interupts (RGB data is big) - cli(); - // Create new DWORD for RGB data - uint32_t dword; - - // Fill the new DWORD with the data that was sent over - uint8_t * dword_dat = (uint8_t *)(&dword); - for (int i = 0; i < 4; i++) - { - dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i]; - } - - // Update the RGB now with the new data and set RGB_DIRTY to false - rgblight_update_dword(dword); - RGB_DIRTY = false; - // Re-enable interupts now that RGB is set - sei(); - } - #endif -} -void transport_master_init(void) { - i2c_master_init(); -} +// Read Backlight Info +# ifdef BACKLIGHT_ENABLE + backlight_set(i2c_slave_reg[I2C_BACKLIT_START]); +# endif -void transport_slave_init(void) { - i2c_slave_init(SLAVE_I2C_ADDRESS); +# ifdef RGBLIGHT_ENABLE + uint32_t rgb = *(uint32_t *)(i2c_slave_reg + I2C_RGB_START); + // Update the RGB with the new data + rgblight_update_dword(rgb); +# endif } -#else // USE_SERIAL +void transport_master_init(void) { i2c_init(); } + +void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } -#include "serial.h" +#else // USE_SERIAL + +# include "serial.h" typedef struct _Serial_s2m_buffer_t { // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack @@ -150,40 +87,40 @@ typedef struct _Serial_s2m_buffer_t { } Serial_s2m_buffer_t; typedef struct _Serial_m2s_buffer_t { -#ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -#endif -#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - rgblight_config_t rgblight_config; //not yet use - // - // When MCUs on both sides drive their respective RGB LED chains, - // it is necessary to synchronize, so it is necessary to communicate RGB information. - // In that case, define the RGBLIGHT_SPLIT macro. - // - // Otherwise, if the master side MCU drives both sides RGB LED chains, - // there is no need to communicate. -#endif +# ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +# endif +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + rgblight_config_t rgblight_config; // not yet use + // + // When MCUs on both sides drive their respective RGB LED chains, + // it is necessary to synchronize, so it is necessary to communicate RGB + // information. In that case, define the RGBLIGHT_SPLIT macro. + // + // Otherwise, if the master side MCU drives both sides RGB LED chains, + // there is no need to communicate. +# endif } Serial_m2s_buffer_t; volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; +uint8_t volatile status0 = 0; SSTD_t transactions[] = { - { (uint8_t *)&status0, - sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer - } + { + (uint8_t *)&status0, + sizeof(serial_m2s_buffer), + (uint8_t *)&serial_m2s_buffer, + sizeof(serial_s2m_buffer), + (uint8_t *)&serial_s2m_buffer, + }, }; -void transport_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } +void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } -void transport_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } +void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } bool transport_master(matrix_row_t matrix[]) { - if (soft_serial_transaction()) { return false; } @@ -193,32 +130,29 @@ bool transport_master(matrix_row_t matrix[]) { matrix[i] = serial_s2m_buffer.smatrix[i]; } - #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Code to send RGB over serial goes here (not implemented yet) - #endif +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // Code to send RGB over serial goes here (not implemented yet) +# endif - #ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; - #endif +# ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; +# endif return true; } void transport_slave(matrix_row_t matrix[]) { - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) - { + for (int i = 0; i < ROWS_PER_HAND; ++i) { serial_s2m_buffer.smatrix[i] = matrix[i]; } - #ifdef BACKLIGHT_ENABLE - backlight_set(serial_m2s_buffer.backlight_level); - #endif - #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Add serial implementation for RGB here - #endif - +# ifdef BACKLIGHT_ENABLE + backlight_set(serial_m2s_buffer.backlight_level); +# endif +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) +// Add serial implementation for RGB here +# endif } #endif diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index b29447ac4e20..2259201b5d99 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -11,9 +11,6 @@ #include "led.h" #include "host.h" #include "rgblight_reconfig.h" -#ifdef SPLIT_KEYBOARD - #include "split_flags.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" @@ -135,9 +132,6 @@ static void power_down(uint8_t wdto) { is_suspended = true; rgblight_enabled = rgblight_config.enable; rgblight_disable_noeeprom(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } #endif suspend_power_down_kb(); @@ -216,9 +210,6 @@ void suspend_wakeup_init(void) { wait_ms(10); #endif rgblight_enable_noeeprom(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); From 2f3dbb1253839fad1bb2e20db8ef7b88c5fd331a Mon Sep 17 00:00:00 2001 From: Takuya Urakawa Date: Wed, 13 Mar 2019 03:48:17 +0900 Subject: [PATCH 311/445] Add new keyboard Plaid and ATMEGA328p support (#5379) * add plaid * Change usb vid/pid to free id from vusb Trivial fix for vusb core * update readme * update info.json default keymap * fix typo * Replace copyright --- keyboards/plaid/config.h | 248 ++++++++++++++ keyboards/plaid/info.json | 113 ++++++ keyboards/plaid/keymaps/default/config.h | 19 ++ keyboards/plaid/keymaps/default/keymap.c | 222 ++++++++++++ keyboards/plaid/keymaps/default/readme.md | 2 + keyboards/plaid/plaid.c | 43 +++ keyboards/plaid/plaid.h | 63 ++++ keyboards/plaid/readme.md | 23 ++ keyboards/plaid/rules.mk | 101 ++++++ keyboards/plaid/usbconfig.h | 397 ++++++++++++++++++++++ quantum/config_common.h | 5 + tmk_core/protocol/vusb/usbdrv/usbdrv.c | 2 +- 12 files changed, 1237 insertions(+), 1 deletion(-) create mode 100644 keyboards/plaid/config.h create mode 100644 keyboards/plaid/info.json create mode 100644 keyboards/plaid/keymaps/default/config.h create mode 100644 keyboards/plaid/keymaps/default/keymap.c create mode 100644 keyboards/plaid/keymaps/default/readme.md create mode 100644 keyboards/plaid/plaid.c create mode 100644 keyboards/plaid/plaid.h create mode 100644 keyboards/plaid/readme.md create mode 100644 keyboards/plaid/rules.mk create mode 100644 keyboards/plaid/usbconfig.h diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h new file mode 100644 index 000000000000..efef3ca18b74 --- /dev/null +++ b/keyboards/plaid/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 Takuya Urakawa (dm9records.com) + +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 */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x16c0 +#define PRODUCT_ID 0x27db +#define DEVICE_VER 0x0002 +#define MANUFACTURER dm9records +#define PRODUCT plaid +#define DESCRIPTION 12x4 ortholinear keyboard with through hole components + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 { B4, B5, B3, D4 } +#define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 + +/* + * 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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/plaid/info.json b/keyboards/plaid/info.json new file mode 100644 index 000000000000..13bd05c149e4 --- /dev/null +++ b/keyboards/plaid/info.json @@ -0,0 +1,113 @@ +{ + "keyboard_name": "Plaid // Through Hole", + "keyboard_folder": "planid", + "url": "https://github.com/hsgw/plaid", + "maintainer": "hsgw", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_plaid_mit": { + "key_count": 47, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 2, "x": 5, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + }, + "LAYOUT_plaid_grid": { + "key_count": 48, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + } + } +} diff --git a/keyboards/plaid/keymaps/default/config.h b/keyboards/plaid/keymaps/default/config.h new file mode 100644 index 000000000000..5733b9e4b046 --- /dev/null +++ b/keyboards/plaid/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c new file mode 100644 index 000000000000..f27abb0aa564 --- /dev/null +++ b/keyboards/plaid/keymaps/default/keymap.c @@ -0,0 +1,222 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 + +extern keymap_config_t keymap_config; + +enum plaid_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + EXT_PLV +}; + +#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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( + 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_ESC, 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_LCTL, KC_RALT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_plaid_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 , + KC_LCTL, KC_RALT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_plaid_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 , + KC_LCTL, KC_RALT, 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_plaid_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_plaid_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_plaid_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_plaid_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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +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 PLOVER: + if (record->event.pressed) { + 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) { + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/plaid/keymaps/default/readme.md new file mode 100644 index 000000000000..6f68e46af4ef --- /dev/null +++ b/keyboards/plaid/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for plaid +folk from planck diff --git a/keyboards/plaid/plaid.c b/keyboards/plaid/plaid.c new file mode 100644 index 000000000000..28f56d7f93c8 --- /dev/null +++ b/keyboards/plaid/plaid.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 "plaid.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/plaid/plaid.h b/keyboards/plaid/plaid.h new file mode 100644 index 000000000000..4ebdcea11f26 --- /dev/null +++ b/keyboards/plaid/plaid.h @@ -0,0 +1,63 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_plaid_mit( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_plaid_grid( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + LAYOUT_plaid_grid( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + ) + +#define KEYMAP LAYOUT_plaid_grid +#define LAYOUT_ortho_4x12 LAYOUT_plaid_grid +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP diff --git a/keyboards/plaid/readme.md b/keyboards/plaid/readme.md new file mode 100644 index 000000000000..dd49ecbdf53c --- /dev/null +++ b/keyboards/plaid/readme.md @@ -0,0 +1,23 @@ +# plaid // Through Hole + +![plaid](https://i.imgur.com/tTi9yR9h.jpg) + +12x4 ortholinear keyboard with only through hole components. + +Keyboard Maintainer: [hsgw](https://github.com/hsgw) +Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid) +Hardware Availability: Group buy in r/mk + +Make example for this keyboard (after setting up your build environment): + make plaid:default + +Flash firmware: + // In bootloader mode + make plaid:default:program + +## Bootloader +use usbasploader in my repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + + +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/plaid/rules.mk b/keyboards/plaid/rules.mk new file mode 100644 index 000000000000..3d66334b3015 --- /dev/null +++ b/keyboards/plaid/rules.mk @@ -0,0 +1,101 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega328p +PROTOCOL = VUSB + +# 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 +# +# This uses usbaspbootloader +# 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 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + +# Flash program via avrdude, but default command is not suitable. +# You can use plaid:default:program +PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex + + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# 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 = 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) + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + + +LAYOUTS = ortho_4x12 planck_mit planck_grid +LAYOUTS_HAS_RGB = no diff --git a/keyboards/plaid/usbconfig.h b/keyboards/plaid/usbconfig.h new file mode 100644 index 000000000000..ea9fdd8ea6f1 --- /dev/null +++ b/keyboards/plaid/usbconfig.h @@ -0,0 +1,397 @@ +/* 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. + */ +// max power draw with maxed white underglow measured at 120 mA (peaks) +#define USB_CFG_MAX_BUS_POWER 100 +/* 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 0 +/* 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, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'd','m','9','r','e','c','o','r','d','s' +#define USB_CFG_VENDOR_NAME_LEN 10 +/* 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 'P', 'l', 'a', 'i', 'd' +#define USB_CFG_DEVICE_NAME_LEN 5 +/* 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 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','p','1' +#define USB_CFG_SERIAL_NUMBER_LEN 17 +/* 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__ */ diff --git a/quantum/config_common.h b/quantum/config_common.h index 0b2e408a43f2..c489e1407303 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -59,6 +59,11 @@ #define PINC_ADDRESS 0x3 #define PINB_ADDRESS 0x6 #define PINA_ADDRESS 0x9 + #elif defined(__AVR_ATmega328P__) + #define ADDRESS_BASE 0x00 + #define PINB_ADDRESS 0x3 + #define PINC_ADDRESS 0x6 + #define PIND_ADDRESS 0x9 #else #error "Pins are not defined" #endif diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrv.c b/tmk_core/protocol/vusb/usbdrv/usbdrv.c index 2e8dd8756b3f..30cdc9dcfc9d 100644 --- a/tmk_core/protocol/vusb/usbdrv/usbdrv.c +++ b/tmk_core/protocol/vusb/usbdrv/usbdrv.c @@ -95,7 +95,7 @@ const PROGMEM int usbDescriptorStringDevice[] = { #if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN #undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER #define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber) -PROGMEM int usbDescriptorStringSerialNumber[] = { +const PROGMEM int usbDescriptorStringSerialNumber[] = { USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN), USB_CFG_SERIAL_NUMBER }; From 131b647a962ba676af8a9ea650cbad0d6b046a55 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 12 Mar 2019 22:15:32 +0000 Subject: [PATCH 312/445] Minor readme fix (#5389) --- keyboards/handwired/mechboards_micropad/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/mechboards_micropad/readme.md b/keyboards/handwired/mechboards_micropad/readme.md index 23af568a243b..36230b1281b2 100644 --- a/keyboards/handwired/mechboards_micropad/readme.md +++ b/keyboards/handwired/mechboards_micropad/readme.md @@ -4,7 +4,7 @@ Mechboards Micropad This was a freebie, use me and find out more about me :) Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) -Hardware Supported: ATMega32u4 +Hardware Supported: ATMega32u4 Hardware Availability: Random mechboards.co.uk order and UK meetups! Make example for this keyboard (after setting up your build environment): From 73c4c9f9e8d2299d0b3a66b2ea8fa3450b9bad31 Mon Sep 17 00:00:00 2001 From: walkerstop Date: Tue, 12 Mar 2019 15:23:09 -0700 Subject: [PATCH 313/445] Wheat Field Peripherals mt980 (FC980M Layout) PCB Support (#5374) * mt980 keyboard support * Update manufacturer name * Correct indicator LEDs, add walker keymap * Added readme.md * Update keyboards/mt980/mt980.c Co-Authored-By: walkerstop * Treat number pad + and enter as pgup and pgdn when number lock is off * Update keyboards/mt980/mt980.c Co-Authored-By: walkerstop * Update keyboards/mt980/mt980.c Co-Authored-By: walkerstop * Update keyboards/mt980/readme.md Co-Authored-By: walkerstop * Update keyboards/mt980/readme.md Co-Authored-By: walkerstop * Update keyboards/mt980/readme.md Co-Authored-By: walkerstop * Update keyboards/mt980/rules.mk Co-Authored-By: walkerstop --- keyboards/mt980/config.h | 48 ++++++++ keyboards/mt980/keymaps/default/keymap.c | 21 ++++ keyboards/mt980/keymaps/walker/config.h | 5 + keyboards/mt980/keymaps/walker/keymap.c | 135 +++++++++++++++++++++++ keyboards/mt980/keymaps/walker/rules.mk | 1 + keyboards/mt980/mt980.c | 60 ++++++++++ keyboards/mt980/mt980.h | 25 +++++ keyboards/mt980/readme.md | 14 +++ keyboards/mt980/rules.mk | 55 +++++++++ 9 files changed, 364 insertions(+) create mode 100644 keyboards/mt980/config.h create mode 100644 keyboards/mt980/keymaps/default/keymap.c create mode 100644 keyboards/mt980/keymaps/walker/config.h create mode 100644 keyboards/mt980/keymaps/walker/keymap.c create mode 100644 keyboards/mt980/keymaps/walker/rules.mk create mode 100644 keyboards/mt980/mt980.c create mode 100644 keyboards/mt980/mt980.h create mode 100644 keyboards/mt980/readme.md create mode 100644 keyboards/mt980/rules.mk diff --git a/keyboards/mt980/config.h b/keyboards/mt980/config.h new file mode 100644 index 000000000000..9b5abf919f9e --- /dev/null +++ b/keyboards/mt980/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wheat Field Peripherals +#define PRODUCT MT980 +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#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 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 185 +#endif diff --git a/keyboards/mt980/keymaps/default/keymap.c b/keyboards/mt980/keymaps/default/keymap.c new file mode 100644 index 000000000000..bdd5a93f233a --- /dev/null +++ b/keyboards/mt980/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#include "mt980.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_NO, KC_INS, KC_PSCR, 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_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_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + [1] = 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_TRNS, KC_PAUSE, KC_SLCK, KC_HOME, KC_END, + KC_TRNS, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS) + +}; diff --git a/keyboards/mt980/keymaps/walker/config.h b/keyboards/mt980/keymaps/walker/config.h new file mode 100644 index 000000000000..0bd39599381b --- /dev/null +++ b/keyboards/mt980/keymaps/walker/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 200 +#define ONESHOT_TAP_TOGGLE 5 +#define ONESHOT_TIMEOUT 5000 diff --git a/keyboards/mt980/keymaps/walker/keymap.c b/keyboards/mt980/keymaps/walker/keymap.c new file mode 100644 index 000000000000..c1db4f3d3d8e --- /dev/null +++ b/keyboards/mt980/keymaps/walker/keymap.c @@ -0,0 +1,135 @@ +#include "mt980.h" + +bool numlock_on = true; + +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + TRIPLE_TAP = 5, + TRIPLE_HOLD = 6 +}; + +enum { + ALT_L1 = 0 +}; + +int cur_dance (qk_tap_dance_state_t *state); +void alt_finished (qk_tap_dance_state_t *state, void *user_data); +void alt_reset (qk_tap_dance_state_t *state, void *user_data); + +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_NO, KC_INS, KC_PSCR, 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_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_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, TD(ALT_L1), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + [1] = 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_TRNS, KC_PAUSE, KC_SLCK, KC_HOME, KC_END, + 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, RGB_TOG, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->pressed) return SINGLE_HOLD; + else return SINGLE_TAP; + } + else if (state->count == 2) { + if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; +} + +static tap alttap_state = { + .is_press_action = true, + .state = 0 +}; + +void alt_finished (qk_tap_dance_state_t *state, void *user_data) { + alttap_state.state = cur_dance(state); + switch (alttap_state.state) { + case SINGLE_TAP: set_oneshot_layer(1, ONESHOT_START); clear_oneshot_layer_state(ONESHOT_PRESSED); break; + case SINGLE_HOLD: register_code(KC_LALT); break; + case DOUBLE_TAP: set_oneshot_layer(1, ONESHOT_START); set_oneshot_layer(1, ONESHOT_PRESSED); break; + case DOUBLE_HOLD: register_code(KC_LALT); layer_on(1); break; + } +} + +void alt_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (alttap_state.state) { + case SINGLE_TAP: break; + case SINGLE_HOLD: unregister_code(KC_LALT); break; + case DOUBLE_TAP: break; + case DOUBLE_HOLD: layer_off(1); unregister_code(KC_LALT); break; + } + alttap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_L1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,alt_finished, alt_reset) +}; + +void led_set_keymap(uint8_t usb_led) { + if (usb_led & (1< Date: Wed, 13 Mar 2019 17:06:09 +0200 Subject: [PATCH 314/445] archetype keymap for jj50 (#5397) * archetype keymap for jj50 keyboard * archetype keymap for jj50 keyboard * PR fixes proposed by mechmerlin --- keyboards/jj50/keymaps/archetype/README.md | 22 +++ keyboards/jj50/keymaps/archetype/config.h | 8 + keyboards/jj50/keymaps/archetype/keymap.c | 215 +++++++++++++++++++++ keyboards/jj50/keymaps/archetype/rules.mk | 65 +++++++ 4 files changed, 310 insertions(+) create mode 100644 keyboards/jj50/keymaps/archetype/README.md create mode 100644 keyboards/jj50/keymaps/archetype/config.h create mode 100644 keyboards/jj50/keymaps/archetype/keymap.c create mode 100644 keyboards/jj50/keymaps/archetype/rules.mk diff --git a/keyboards/jj50/keymaps/archetype/README.md b/keyboards/jj50/keymaps/archetype/README.md new file mode 100644 index 000000000000..a2ae4e9123fe --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/README.md @@ -0,0 +1,22 @@ +# archetype keymap for jj50 keyboards +A keymap that can be used with the jj50 ortholinear keyboard. + +## Features + +- `QWERTY` layout (Default) +- `COLEMAK` layout +- `FN` layout (various keys that are rarely needed) +- `FX` layout (Control lighting and audio) +- Use `Left Ctrl` and `Left Alt` to output `()`, `[]` and `{}` by tapping once, twice or thrice respectively. Hold them down for the regular keycode (LCtrl or LAlt) +- `Right Shift` when held or Enter when tapped +- Auto-Shift enabled (long press on alphas and numeric keys outputs shifted character) +- Full arrow keys available + + +## Feedback + +I made this keymap based on the existing default one. If you happen to use this keymap [drop me a line](mailto://idimitrakopoulos@gmail.com) about what could be improved etc + +Enjoy! + +Iason Dimitrakopoulos diff --git a/keyboards/jj50/keymaps/archetype/config.h b/keyboards/jj50/keymaps/archetype/config.h new file mode 100644 index 000000000000..7955796eaf6a --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/config.h @@ -0,0 +1,8 @@ +#pragma once + +#undef AUTO_SHIFT_TIMEOUT +#undef TAPPING_TERM + +#define AUTO_SHIFT_TIMEOUT 150 +#define TAPPING_TERM 150 +//#define BOOTMAGIC_KEY_SALT KC_LCTL diff --git a/keyboards/jj50/keymaps/archetype/keymap.c b/keyboards/jj50/keymaps/archetype/keymap.c new file mode 100644 index 000000000000..0704943e0822 --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/keymap.c @@ -0,0 +1,215 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 Iason Dimitrakopoulos (idimitrakopoulos) + +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 +#include "action_layer.h" +#include "rgblight.h" +#include "quantum.h" + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _FN 2 +#define _FX 3 + +enum { + TD_BSPC_DEL = 0, + TD_LCTL_LBRC = 1, + TD_LALT_RBRC = 2, +}; + + +void left_brackets(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + register_mods(MOD_LSFT); + register_code(KC_9); + } else { + register_mods(MOD_LCTL); + } + } else if (state->count == 2) { + register_code(KC_LBRC); + } else if (state->count == 3) { + register_mods(MOD_LSFT); + register_code(KC_LBRC); + } +} + +void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + unregister_mods(MOD_LSFT); + unregister_code(KC_9); + } else { + unregister_mods(MOD_LCTL); + } + } else if (state->count == 2) { + unregister_code(KC_LBRC); + } else if (state->count == 3) { + unregister_mods(MOD_LSFT); + unregister_code(KC_LBRC); + } +} + +void right_brackets(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + register_mods(MOD_LSFT); + register_code(KC_0); + } else { + register_mods(MOD_LALT); + } + } else if (state->count == 2) { + register_code(KC_RBRC); + } else if (state->count == 3) { + register_mods(MOD_LSFT); + register_code(KC_RBRC); + } +} + +void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + unregister_mods(MOD_LSFT); + unregister_code(KC_0); + } else { + unregister_mods(MOD_LALT); + } + } else if (state->count == 2) { + unregister_code(KC_RBRC); + } else if (state->count == 3) { + unregister_mods(MOD_LSFT); + unregister_code(KC_RBRC); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + // Single tap = Backspace | Double tap = Delete + [TD_BSPC_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, KC_DEL), + // Single tap = ( | Double tap = [ | Triple tap = { | Single hold = KC_LCTL + [TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset), + // Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT + [TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset), +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_SLSH, KC_UP, SFT_T(KC_ENT), \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), LT(_FN, KC_SPC), _______, KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + [_COLEMAK] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, KC_R, KC_S, KC_T, KC_D, _______, KC_N, KC_E, KC_I, KC_O, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, KC_K, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + [_FN] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINUS, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + [_FX] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, BL_ON, BL_INC, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, BL_OFF, BL_DEC, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, RGB_TOG, BL_STEP, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + +}; diff --git a/keyboards/jj50/keymaps/archetype/rules.mk b/keyboards/jj50/keymaps/archetype/rules.mk new file mode 100644 index 000000000000..e32e8ce741ec --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/rules.mk @@ -0,0 +1,65 @@ +# Copyright 2017 Luiz Ribeiro +# Modified 2018 Wayne Jones (WarmCatUK) + +# 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 = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes +NKRO_ENABLE = no +# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes + + +DISABLE_WS2812 = no + +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 + + +#OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c backlight.c + +# programming options +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex + +LAYOUTS = ortho_5x12 From 7e306f9c9867ff8160c710caa7a7b8e7820cef9e Mon Sep 17 00:00:00 2001 From: Jarred Steenvoorden Date: Thu, 14 Mar 2019 05:22:06 +1100 Subject: [PATCH 315/445] [Keymap] Add atreus, ergotravel and org60 keymaps (#5381) * Add atreus, ergotravel and org60 keymaps * Cleanup my keymap config files --- keyboards/atreus62/keymaps/jarred/config.h | 21 ++++++++ keyboards/atreus62/keymaps/jarred/keymap.c | 26 ++++++++++ keyboards/ergotravel/keymaps/jarred/config.h | 29 ++++++++++++ keyboards/ergotravel/keymaps/jarred/keymap.c | 50 ++++++++++++++++++++ keyboards/org60/keymaps/jarred/keymap.c | 25 ++++++++++ users/jarred/jarred.h | 4 ++ 6 files changed, 155 insertions(+) create mode 100644 keyboards/atreus62/keymaps/jarred/config.h create mode 100644 keyboards/atreus62/keymaps/jarred/keymap.c create mode 100644 keyboards/ergotravel/keymaps/jarred/config.h create mode 100644 keyboards/ergotravel/keymaps/jarred/keymap.c create mode 100644 keyboards/org60/keymaps/jarred/keymap.c diff --git a/keyboards/atreus62/keymaps/jarred/config.h b/keyboards/atreus62/keymaps/jarred/config.h new file mode 100644 index 000000000000..34ab0baaf0b9 --- /dev/null +++ b/keyboards/atreus62/keymaps/jarred/config.h @@ -0,0 +1,21 @@ +/* Copyright 2018 Jarred Steenvoorden + * + * 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 + +// My hand wire diodes are in the opposite direction to the Atreus62 PCB +#undef DIODE_DIRECTION +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus62/keymaps/jarred/keymap.c b/keyboards/atreus62/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..7a49b2890c4a --- /dev/null +++ b/keyboards/atreus62/keymaps/jarred/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2018 Jarred Steenvoorden + * + * 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 "jarred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_L4, KC_NO, KC_NO, QWERTY_R4), + [_LW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, LOWER_1_12 , LOWER_2_12 , LOWER_3_12 , LOWER_L4 , KC_NO, KC_NO, LOWER_R4 ), + [_NV] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NAV_1_12 , NAV_2_12 , NAV_3_12 , NAV_L4 , KC_NO, KC_NO, NAV_R4 ), + [_NP] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_L4, KC_NO, KC_NO, NUMPAD_R4), + [_MS] = LAYOUT_atreus62_grid_wrapper(BLANK_12, MOUSE_1_12 , MOUSE_2_12 , MOUSE_3_12 , MOUSE_L4 , KC_NO, KC_NO, MOUSE_R4 ) +}; diff --git a/keyboards/ergotravel/keymaps/jarred/config.h b/keyboards/ergotravel/keymaps/jarred/config.h new file mode 100644 index 000000000000..d64187b5982f --- /dev/null +++ b/keyboards/ergotravel/keymaps/jarred/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2017 Pierre Constantineau + +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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/ergotravel/keymaps/jarred/keymap.c b/keyboards/ergotravel/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..33031f931b39 --- /dev/null +++ b/keyboards/ergotravel/keymaps/jarred/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2018 Jarred Steenvoorden + * + * 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 "jarred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_ergotravel_grid_wrapper( + QWERTY_L1, KC_NO, KC_NO, QWERTY_R1, + QWERTY_L2, KC_NO, KC_NO, QWERTY_R2, + QWERTY_L3, KC_NO, KC_NO, QWERTY_R3, + QWERTY_4_12), + + [_LW] = LAYOUT_ergotravel_grid_wrapper( + LOWER_L1, KC_NO, KC_NO, LOWER_R1, + LOWER_L2, KC_NO, KC_NO, LOWER_R2, + LOWER_L3, KC_NO, KC_NO, LOWER_R3, + LOWER_4_12), + + [_NV] = LAYOUT_ergotravel_grid_wrapper( + NAV_L1, KC_NO, KC_NO, NAV_R1, + NAV_L2, KC_NO, KC_NO, NAV_R2, + NAV_L3, KC_NO, KC_NO, NAV_R3, + NAV_4_12), + + [_NP] = LAYOUT_ergotravel_grid_wrapper( + NUMPAD_L1, KC_NO, KC_NO, NUMPAD_R1, + NUMPAD_L2, KC_NO, KC_NO, NUMPAD_R2, + NUMPAD_L3, KC_NO, KC_NO, NUMPAD_R3, + NUMPAD_4_12), + + [_MS] = LAYOUT_ergotravel_grid_wrapper( + MOUSE_L1, KC_NO, KC_NO, MOUSE_R1, + MOUSE_L2, KC_NO, KC_NO, MOUSE_R2, + MOUSE_L3, KC_NO, KC_NO, MOUSE_R3, + MOUSE_4_12) +}; diff --git a/keyboards/org60/keymaps/jarred/keymap.c b/keyboards/org60/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..3397a1909cd9 --- /dev/null +++ b/keyboards/org60/keymaps/jarred/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 + +// HHKB Layout +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = 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_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + MO(_NV), 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, XXXXXXX, KC_RSFT, KC_ENT, \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_SPC, XXXXXXX, KC_RALT, XXXXXXX, KC_RCTL, XXXXXXX), + + [_NV] = 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_F12, _______, _______, \ + _______, _______, _______, _______, KC_DEL ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END , KC_INS , _______, _______, _______, \ + _______, _______, _______, KC_LSFT,KC_LCTL, KC_ENT, _______,KC_LEFT,KC_DOWN,KC_RGHT, KC_DEL , KC_DEL , _______, _______, \ + _______, _______, _______, _______, _______,_______,_______,_______,KC_PGUP,KC_PGDN, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, RESET, _______), + +}; + + diff --git a/users/jarred/jarred.h b/users/jarred/jarred.h index 3f27163ab1e4..ae48adb70c15 100644 --- a/users/jarred/jarred.h +++ b/users/jarred/jarred.h @@ -50,6 +50,8 @@ enum { // Wrappers #define LAYOUT_planck_grid_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__) +#define LAYOUT_atreus62_grid_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ergotravel_grid_wrapper(...) LAYOUT(__VA_ARGS__) /* Qwerty Layer */ #define QWERTY_L1 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T @@ -127,6 +129,8 @@ enum { #define MOUSE_4_DOX _______, _______, _______, _______, _______, _______ +#define BLANK_12 KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO + #define QWERTY_1_12 QWERTY_L1, QWERTY_R1 #define QWERTY_2_12 QWERTY_L2, QWERTY_R2 #define QWERTY_3_12 QWERTY_L3, QWERTY_R3 From 5a12b054aeff59ce47d0bd233206249d56352b64 Mon Sep 17 00:00:00 2001 From: Christian Westerlund Date: Wed, 13 Mar 2019 19:54:34 +0100 Subject: [PATCH 316/445] [Keymap] Some more improvements to keymap, currency symbols.. (#5395) acute accent and pipe character also --- .../ergodox/dvorak_programmer_swe/keymap.c | 17 +++++++++-------- .../ergodox/dvorak_programmer_swe/readme.md | 4 ++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c index 2dd1dfd99d67..41beeb7e5fee 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c @@ -2,8 +2,9 @@ #include "debug.h" #include "action_layer.h" #include "version.h" -#include "keymap_nordic.h" -#include "keymap_norwegian.h" +#include "keymap_swedish.h" +//#include "keymap_nordic.h" +//#include "keymap_norwegian.h" #define BASE 0 // default layer #define SYMB 1 // symbols @@ -165,11 +166,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Save |Build |Debug |PrtScr| | | | | bool | int |string| dec | Todo | | + * | | Save |Build |Debug |PrtScr| $ | | | | bool | int |string| dec | Todo | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | ' | | | |------| |------| priv | publ |shared| prot | | | + * | | ´ | ' | | | | £ |------| |------| priv | publ |shared| prot | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | const| dim |return|nothin| | | + * | | | | | | £ | | | | const| dim |return|nothin| | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -184,9 +185,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MEDIA AND MOUSE [DEVL] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, NO_APOS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, ALGR(KC_4), KC_TRNS, + KC_TRNS, NO_ACUT, NO_APOS, NO_PIPE, KC_TRNS, ALGR(KC_3), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md index 1165632dd2bf..3bedf50d74b8 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/readme.md +++ b/layouts/community/ergodox/dvorak_programmer_swe/readme.md @@ -16,6 +16,10 @@ Known issues: ## Changelog +* 2019-03-11 + * Added currency $, £, € to keymap 3 + * Added pipe character to keymap 3 + * Added the acute accent character to keymap 3 * 2019-03-08 * Switched position on Alt and Alt-shift From f34244a871310fac4ab27f3fd75dc44626ed4eb9 Mon Sep 17 00:00:00 2001 From: "Michael F. Lamb" Date: Wed, 13 Mar 2019 14:00:09 -0700 Subject: [PATCH 317/445] Sleep until USB port becomes writable before running avrdude (#5393) * sleep until usb port becomes writable before running avrdude * only wait for a writable USB port when not on MSYS using MINGW or MSYS: sleep for one second, as before. otherwise: wait for the port to become writable. * typo * typo --- tmk_core/avr.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index d22c3bbcadef..79fdf4de5371 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -214,12 +214,15 @@ define EXEC_AVRDUDE mv /tmp/2 /tmp/1; \ done; \ echo ""; \ - echo "Detected controller on USB port at $$USB"; \ + echo "Device $$USB has appeared; assuming it is the controller."; \ if $(GREP) -q -s 'MINGW\|MSYS' /proc/version; then \ USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ echo "Remapped MSYS2 USB port to $$USB"; \ + sleep 1; \ + else \ + printf "Waiting for $$USB to become writable."; \ + while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \ fi; \ - sleep 1; \ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ fi endef From 4a908288f13e53258a3ab91574bfd1e9164c126e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 13 Mar 2019 14:08:21 -0700 Subject: [PATCH 318/445] Fix i2c calls for HotDox keyboard (#5387) --- keyboards/hotdox/left.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/hotdox/left.c b/keyboards/hotdox/left.c index ae56b1816011..970d36f1b561 100644 --- a/keyboards/hotdox/left.c +++ b/keyboards/hotdox/left.c @@ -39,7 +39,7 @@ void left_scan(void) if (ret == 0) { - i2c_stop(HOTDOX_I2C_TIMEOUT); + i2c_stop(); if (!i2c_initialized) { @@ -102,10 +102,10 @@ uint8_t left_write(uint8_t reg, uint8_t data) ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out; ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out; - ret = i2c_write(data, HOTDOX_I2C_TIMEOUT); + ret = i2c_write(data, HOTDOX_I2C_TIMEOUT); out: - i2c_stop(HOTDOX_I2C_TIMEOUT); + i2c_stop(); return ret; } @@ -125,6 +125,6 @@ uint8_t left_read(uint8_t reg, uint8_t *data) *data = i2c_read_nack(HOTDOX_I2C_TIMEOUT); out: - i2c_stop(HOTDOX_I2C_TIMEOUT); + i2c_stop(); return ret; } From 30db1b18e56e0d85bf3d5f7df5e050591f1c6d96 Mon Sep 17 00:00:00 2001 From: Michael Dye Date: Wed, 13 Mar 2019 17:23:49 -0600 Subject: [PATCH 319/445] Added 1up60rgb keymap: mdyevimnav (#5386) Added keymap for 60% board 1up60rgb. The map provides VIM-style navigation on a second layer (L1) with HOME, PGDN, PGUP, and END keys on that same layer one row below the home row. The layout is used by https://github.com/michaeldye. --- .../1up60rgb/keymaps/mdyevimnav/keymap.c | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c new file mode 100644 index 000000000000..bb0d10405cd2 --- /dev/null +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Layer 0 + * ,-----------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Esc | a | s | d | f | g | h | j | k | l | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | z | x | c | v | b | n | m | , | . | / | Shift | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | L1 | Alt | space | Alt | Sup | L1 | Ctrl | + * \-----------------------------------------------------------------------------------------/ + * + */ + LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_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_ENT, + KC_LSHIFT, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_RSHIFT, + KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +/* + * Layer 1 + * ,-----------------------------------------------------------------------------------------. + * | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10 | f11 | f12 | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | Ins | | Paus| | | Prnt | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | L | D | U | R | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | Hom | PDn | PUp | End | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | + * \-----------------------------------------------------------------------------------------/ + * + */ + LAYOUT_all( + 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_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, 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_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; From f9c5b80aedc1ef43baeff6a197dc1c3772e69618 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 14 Mar 2019 00:26:25 +0100 Subject: [PATCH 320/445] Add support for THE60 (#5385) --- keyboards/lazydesigners/the60/config.h | 38 +++++++++ keyboards/lazydesigners/the60/info.json | 79 +++++++++++++++++++ .../the60/keymaps/default/keymap.c | 54 +++++++++++++ .../the60/keymaps/default/readme.md | 32 ++++++++ keyboards/lazydesigners/the60/readme.md | 18 +++++ keyboards/lazydesigners/the60/rules.mk | 51 ++++++++++++ keyboards/lazydesigners/the60/the60.c | 2 + keyboards/lazydesigners/the60/the60.h | 32 ++++++++ 8 files changed, 306 insertions(+) create mode 100644 keyboards/lazydesigners/the60/config.h create mode 100644 keyboards/lazydesigners/the60/info.json create mode 100644 keyboards/lazydesigners/the60/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/the60/keymaps/default/readme.md create mode 100644 keyboards/lazydesigners/the60/readme.md create mode 100644 keyboards/lazydesigners/the60/rules.mk create mode 100644 keyboards/lazydesigners/the60/the60.c create mode 100644 keyboards/lazydesigners/the60/the60.h diff --git a/keyboards/lazydesigners/the60/config.h b/keyboards/lazydesigners/the60/config.h new file mode 100644 index 000000000000..a767d1dc8a14 --- /dev/null +++ b/keyboards/lazydesigners/the60/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT THE60 +#define DESCRIPTION A 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 6 +#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 diff --git a/keyboards/lazydesigners/the60/info.json b/keyboards/lazydesigners/the60/info.json new file mode 100644 index 000000000000..4fef5a098c4d --- /dev/null +++ b/keyboards/lazydesigners/the60/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "THE60", + "url": "http://lazydesigners.cn", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_split_spc_split_bspc": { + "key_count": 66, + "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":"Home", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"|", "x":11.5, "y":1, "w":1.5}, + {"label":"}", "x":13, "y":1}, + {"label":"{", "x":14, "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":"Enter", "x":10.75, "y":2, "w":2.25}, + {"label":":", "x":13, "y":2}, + {"label":"\"", "x":14, "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":"Shift", "x":11.25, "y":3, "w":1.75}, + {"label":"Up", "x":13, "y":3}, + {"label":"/", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":2.75}, + {"label":"Alt", "x":8.75, "y":4, "w":1.25}, + {"label":"Menu", "x":10, "y":4}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Left", "x":12, "y":4}, + {"label":"Down", "x":13, "y":4}, + {"label":"Right", "x":14, "y":4}] + } + } +} diff --git a/keyboards/lazydesigners/the60/keymaps/default/keymap.c b/keyboards/lazydesigners/the60/keymaps/default/keymap.c new file mode 100644 index 000000000000..8a95b447489f --- /dev/null +++ b/keyboards/lazydesigners/the60/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,--------------------------------------------------------------------------. + * |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del | + * |--------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] | + * |--------------------------------------------------------------------------| + * |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' | + * |--------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / | + * |--------------------------------------------------------------------------| + * | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght| + * `--------------------------------------------------------------------------' + */ + +[_QWERTY] = LAYOUT_split_spc_split_bspc( +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_HOME, 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_LBRC, KC_RBRC, +KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, 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_RSFT, KC_UP, KC_SLSH, +KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT +), + +/* FN + * ,--------------------------------------------------------------------------. + * |RST | | | | | | | | | | | | |End |Ins | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | |PgUp|PgDn| + * |--------------------------------------------------------------------------| + * | | |Prev|Play|Next| |VolD|Mute|VolU| | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * |EEPRST| | | | | | | | | | | + * `--------------------------------------------------------------------------' + */ + +[_FN] = LAYOUT_split_spc_split_bspc( +RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_INS, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, +XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) +}; + diff --git a/keyboards/lazydesigners/the60/keymaps/default/readme.md b/keyboards/lazydesigners/the60/keymaps/default/readme.md new file mode 100644 index 000000000000..7a5a10a34ac9 --- /dev/null +++ b/keyboards/lazydesigners/the60/keymaps/default/readme.md @@ -0,0 +1,32 @@ +# Default keymap for THE60 + + +## QWERTY (Normal) Layer +``` + ,--------------------------------------------------------------------------. + |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del | + |--------------------------------------------------------------------------| + | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] | + |--------------------------------------------------------------------------| + |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' | + |--------------------------------------------------------------------------| + | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / | + |--------------------------------------------------------------------------| + | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght| + `--------------------------------------------------------------------------' +``` + +## FN layer +``` + ,--------------------------------------------------------------------------. + |RST | | | | | | | | | | | | |End |Ins | + |--------------------------------------------------------------------------| + | | | | | | | | | | | | |PgUp|PgDn| + |--------------------------------------------------------------------------| + | | |Prev|Play|Next| |VolD|Mute|VolU| | | | | + |--------------------------------------------------------------------------| + | | | | | | | | | | | | | | + |--------------------------------------------------------------------------| + |EEPRST| | | | | | | | | | | + `--------------------------------------------------------------------------' +``` diff --git a/keyboards/lazydesigners/the60/readme.md b/keyboards/lazydesigners/the60/readme.md new file mode 100644 index 000000000000..bf7cc771af35 --- /dev/null +++ b/keyboards/lazydesigners/the60/readme.md @@ -0,0 +1,18 @@ +# THE60 + +![THE60](https://cdn.discordapp.com/attachments/536190211240099840/549506683064287243/image0.jpg) + +A 60% custom PCB and case designed and produced by [LazyDesigners](http://lazydesigners.cn). +The PCB allows one to test a 40% layout in a 60% case. + +Keyboard Maintainer: QMK Community +Hardware Supported: THE60 PCB +Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/the60:default:dfu + +To enter the bootloader, either short the pins on the PCB, use the RESET button on the FN layer or hold the Esc key while plugging in your keyboard. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/lazydesigners/the60/rules.mk b/keyboards/lazydesigners/the60/rules.mk new file mode 100644 index 000000000000..76fb44b2c884 --- /dev/null +++ b/keyboards/lazydesigners/the60/rules.mk @@ -0,0 +1,51 @@ +# 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 = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # 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 = yes # Enable keyboard backlight functionality diff --git a/keyboards/lazydesigners/the60/the60.c b/keyboards/lazydesigners/the60/the60.c new file mode 100644 index 000000000000..09eeb63cf00b --- /dev/null +++ b/keyboards/lazydesigners/the60/the60.c @@ -0,0 +1,2 @@ +#include "the60.h" + diff --git a/keyboards/lazydesigners/the60/the60.h b/keyboards/lazydesigners/the60/the60.h new file mode 100644 index 000000000000..e3708461c4ef --- /dev/null +++ b/keyboards/lazydesigners/the60/the60.h @@ -0,0 +1,32 @@ +#pragma once + +#include "quantum.h" + +/* + * ,--------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | + * `--------------------------------------------------------------------------' + */ + +#define LAYOUT_split_spc_split_bspc( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K402, K403, K404, K407, K409, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, KC_NO, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414 } \ +} + From c3b4f65c640c217a0c9bf99d6b30982f966e585c Mon Sep 17 00:00:00 2001 From: walkerstop Date: Thu, 14 Mar 2019 08:21:41 -0700 Subject: [PATCH 321/445] Added info.json for mt980 keyboard and fixes to walker keymap (#5391) * Added info.json and minor fixes to walker keymap * Fix url * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Fix user calling keymap functions * cancel oneshot layer on KC_TRNS * Fix to oneshot layer handling * Fix oneshot handling of reset * Move bootmagic key to Esc where it normally resides * Remove deprecated function * Treat shift-numlock as shift-insert in Walker layer --- keyboards/mt980/config.h | 4 + keyboards/mt980/info.json | 117 ++++++++++++++++++++++++ keyboards/mt980/keymaps/walker/keymap.c | 53 +++++++++-- keyboards/mt980/mt980.c | 9 +- 4 files changed, 171 insertions(+), 12 deletions(-) create mode 100644 keyboards/mt980/info.json diff --git a/keyboards/mt980/config.h b/keyboards/mt980/config.h index 9b5abf919f9e..88c25a587032 100644 --- a/keyboards/mt980/config.h +++ b/keyboards/mt980/config.h @@ -46,3 +46,7 @@ #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_LIMIT_VAL 185 #endif + +/* Place bootmagic key on Esc */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mt980/info.json b/keyboards/mt980/info.json new file mode 100644 index 000000000000..f71d0228564c --- /dev/null +++ b/keyboards/mt980/info.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "mt980", + "url": "https://shop110310565.taobao.com", + "maintainer": "walkerstop", + "width": 19.5, + "height": 6.75, + "layouts": { + "LAYOUT": { + "key_count": 103, + "layout": [ + {"label":"K50", "x":0, "y":0}, + {"label":"K52", "x":1.25, "y":0}, + {"label":"K53", "x":2.25, "y":0}, + {"label":"K54", "x":3.25, "y":0}, + {"label":"K55", "x":4.25, "y":0}, + {"label":"K57", "x":5.5, "y":0}, + {"label":"K58", "x":6.5, "y":0}, + {"label":"KB8", "x":7.5, "y":0}, + {"label":"KB7", "x":8.5, "y":0}, + {"label":"KB5", "x":9.75, "y":0}, + {"label":"KB4", "x":10.75, "y":0}, + {"label":"KB3", "x":11.75, "y":0}, + {"label":"KB6", "x":12.75, "y":0}, + {"label":"K51", "x":14, "y":0}, + {"label":"KB2", "x":15.5, "y":0}, + {"label":"KB1", "x":16.5, "y":0}, + {"label":"KB0", "x":17.5, "y":0}, + {"label":"K63", "x":18.5, "y":0}, + {"label":"K40", "x":0, "y":1.5}, + {"label":"K41", "x":1, "y":1.5}, + {"label":"K42", "x":2, "y":1.5}, + {"label":"K43", "x":3, "y":1.5}, + {"label":"K44", "x":4, "y":1.5}, + {"label":"K45", "x":5, "y":1.5}, + {"label":"K46", "x":6, "y":1.5}, + {"label":"K47", "x":7, "y":1.5}, + {"label":"K48", "x":8, "y":1.5}, + {"label":"KA8", "x":9, "y":1.5}, + {"label":"KA7", "x":10, "y":1.5}, + {"label":"KA5", "x":11, "y":1.5}, + {"label":"KA4", "x":12, "y":1.5}, + {"label":"KA3", "x":13, "y":1.5}, + {"label":"KA6", "x":14, "y":1.5}, + {"label":"KA2", "x":15.5, "y":1.5}, + {"label":"KA1", "x":16.5, "y":1.5}, + {"label":"KA0", "x":17.5, "y":1.5}, + {"label":"K64", "x":18.5, "y":1.5}, + {"label":"K30", "x":0, "y":2.5, "w":1.5}, + {"label":"K31", "x":1.5, "y":2.5}, + {"label":"K32", "x":2.5, "y":2.5}, + {"label":"K33", "x":3.5, "y":2.5}, + {"label":"K34", "x":4.5, "y":2.5}, + {"label":"K35", "x":5.5, "y":2.5}, + {"label":"K36", "x":6.5, "y":2.5}, + {"label":"K37", "x":7.5, "y":2.5}, + {"label":"K38", "x":8.5, "y":2.5}, + {"label":"K98", "x":9.5, "y":2.5}, + {"label":"K97", "x":10.5, "y":2.5}, + {"label":"K95", "x":11.5, "y":2.5}, + {"label":"K94", "x":12.5, "y":2.5}, + {"label":"K84", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K96", "x":15.5, "y":2.5}, + {"label":"K92", "x":16.5, "y":2.5}, + {"label":"K91", "x":17.5, "y":2.5}, + {"label":"K90", "x":18.5, "y":2.5}, + {"label":"K20", "x":0, "y":3.5, "w":1.75}, + {"label":"K21", "x":1.75, "y":3.5}, + {"label":"K22", "x":2.75, "y":3.5}, + {"label":"K23", "x":3.75, "y":3.5}, + {"label":"K24", "x":4.75, "y":3.5}, + {"label":"K25", "x":5.75, "y":3.5}, + {"label":"K26", "x":6.75, "y":3.5}, + {"label":"K27", "x":7.75, "y":3.5}, + {"label":"K28", "x":8.75, "y":3.5}, + {"label":"K88", "x":9.75, "y":3.5}, + {"label":"K87", "x":10.75, "y":3.5}, + {"label":"K85", "x":11.75, "y":3.5}, + {"label":"K93", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K86", "x":15.5, "y":3.5}, + {"label":"K82", "x":16.5, "y":3.5}, + {"label":"K81", "x":17.5, "y":3.5}, + {"label":"K80", "x":18.5, "y":3.5}, + {"label":"K10", "x":0, "y":4.5, "w":1.25}, + {"label":"K11", "x":1.25, "y":4.5}, + {"label":"K12", "x":2.25, "y":4.5}, + {"label":"K13", "x":3.25, "y":4.5}, + {"label":"K14", "x":4.25, "y":4.5}, + {"label":"K15", "x":5.25, "y":4.5}, + {"label":"K16", "x":6.25, "y":4.5}, + {"label":"K17", "x":7.25, "y":4.5}, + {"label":"K18", "x":8.25, "y":4.5}, + {"label":"K78", "x":9.25, "y":4.5}, + {"label":"K77", "x":10.25, "y":4.5}, + {"label":"K75", "x":11.25, "y":4.5}, + {"label":"K74", "x":12.25, "y":4.5, "w":1.75}, + {"label":"K73", "x":14.25, "y":4.75}, + {"label":"K76", "x":15.5, "y":4.5}, + {"label":"K72", "x":16.5, "y":4.5}, + {"label":"K71", "x":17.5, "y":4.5}, + {"label":"K70", "x":18.5, "y":4.5}, + {"label":"K00", "x":0, "y":5.5, "w":1.25}, + {"label":"K01", "x":1.25, "y":5.5}, + {"label":"K02", "x":2.25, "y":5.5, "w":1.25}, + {"label":"K06", "x":3.5, "y":5.5, "w":6.25}, + {"label":"K08", "x":9.75, "y":5.5}, + {"label":"K07", "x":10.75, "y":5.5}, + {"label":"K05", "x":11.75, "y":5.5, "w":1.25}, + {"label":"K04", "x":13.25, "y":5.75}, + {"label":"K03", "x":14.25, "y":5.75}, + {"label":"K66", "x":15.25, "y":5.75}, + {"label":"K62", "x":16.5, "y":5.5}, + {"label":"K61", "x":17.5, "y":5.5}, + {"label":"K60", "x":18.5, "y":5.5} + ] + } + } +} diff --git a/keyboards/mt980/keymaps/walker/keymap.c b/keyboards/mt980/keymaps/walker/keymap.c index c1db4f3d3d8e..83a3fb8167da 100644 --- a/keyboards/mt980/keymaps/walker/keymap.c +++ b/keyboards/mt980/keymaps/walker/keymap.c @@ -99,35 +99,68 @@ void led_set_keymap(uint8_t usb_led) { } bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_TRNS: + case KC_NO: + /* Always cancel one-shot layer when another key gets pressed */ + if (record->event.pressed && is_oneshot_layer_active()) + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return true; + case RESET: + /* Don't allow reset from oneshot layer state */ + if (record->event.pressed && is_oneshot_layer_active()) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + } + return true; case KC_PPLS: if (!numlock_on) { - if (get_oneshot_layer() == 1 || layer_state & 0x2) { - register_code(KC_HOME); - unregister_code(KC_HOME); + if (is_oneshot_layer_active() || layer_state & 0x2) { + if (record->event.pressed) + register_code(KC_HOME); + else + unregister_code(KC_HOME); clear_oneshot_layer_state(ONESHOT_START); } else { - register_code(KC_PGUP); - unregister_code(KC_PGUP); + if (record->event.pressed) + register_code(KC_PGUP); + else + unregister_code(KC_PGUP); } return false; } return true; case KC_PENT: if (!numlock_on) { - if (get_oneshot_layer() == 1 || layer_state & 0x2) { - register_code(KC_END); - unregister_code(KC_END); + if (is_oneshot_layer_active() || layer_state & 0x2) { + if (record->event.pressed) + register_code(KC_END); + else + unregister_code(KC_END); clear_oneshot_layer_state(ONESHOT_START); } else { - register_code(KC_PGDN); - unregister_code(KC_PGDN); + if (record->event.pressed) + register_code(KC_PGDN); + else + unregister_code(KC_PGDN); } return false; } return true; + case KC_NLCK: + /* Shift + NumLock will be treated as shift-Insert */ + if ((keyboard_report->mods & MOD_BIT (KC_LSFT)) || (keyboard_report->mods & MOD_BIT (KC_RSFT))) { + if (record->event.pressed) { + register_code(KC_INS); + unregister_code(KC_INS); + } + return false; + } + else + return true; default: return true; } diff --git a/keyboards/mt980/mt980.c b/keyboards/mt980/mt980.c index 1b03d1aedfeb..5461a3b21ff0 100644 --- a/keyboards/mt980/mt980.c +++ b/keyboards/mt980/mt980.c @@ -17,8 +17,13 @@ uint32_t layer_state_set_keymap (uint32_t state) { __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) {} -__attribute__ ((weak)) -void action_function_keymap(keyrecord_t *record, uint8_t id, uint8_t opt) {} +void matrix_init_user(void) { + matrix_init_keymap(); +} + +void matrix_scan_user(void) { + matrix_scan_keymap(); +} void keyboard_pre_init_user(void) { /* Set NUMLOCK indicator pin as output */ From 2558372b3f5b383582ee35f318d75a2dc7a28c6e Mon Sep 17 00:00:00 2001 From: Alexander Kagno Date: Thu, 14 Mar 2019 19:04:59 +0000 Subject: [PATCH 322/445] fresh commit for a new fork for PR to upstream/master (#5406) --- keyboards/mechmini/v2/keymaps/arkag/keymap.c | 37 +-- keyboards/mechmini/v2/keymaps/arkag/rules.mk | 2 +- users/arkag/arkag.c | 262 ++++++++++++------- users/arkag/arkag.h | 31 +-- users/arkag/config.h | 2 +- 5 files changed, 202 insertions(+), 132 deletions(-) diff --git a/keyboards/mechmini/v2/keymaps/arkag/keymap.c b/keyboards/mechmini/v2/keymaps/arkag/keymap.c index 29e125394bcd..0b1cc4dacb61 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/keymap.c +++ b/keyboards/mechmini/v2/keymaps/arkag/keymap.c @@ -8,32 +8,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_2u_space_ortho( - KC_LEAD, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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, QUOTE, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, - M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, KC_SLSH, KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, XXXXXXX, KC_LEAD), [_RAISE] = LAYOUT_2u_space_ortho( - GRAVE, KC_1, KC_2, THREE, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + GRAVE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, _______, KC_7, KC_8, KC_9, _______, _______, _______, OBRACK, CBRACK, KC_EQL, HYPHEN, _______, _______, KC_4, KC_5, KC_6, _______, KC_NLCK, - _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_PPLS, KC_PENT, - _______, _______, _______, KEEB, _______, _______, _______, M_OS, KC_PSLS, KC_PMNS, KC_PAST), + _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT, + _______, _______, _______, KEEB, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST), [_LOWER] = LAYOUT_2u_space_ortho( - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, M_P_B, M_C_A_D, + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + _______, LRALT, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_KEEB] = LAYOUT_2u_space_ortho( + [_MEDIA] = LAYOUT_2u_space_ortho( + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______), + + [_FUNCT] = LAYOUT_2u_space_ortho( 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_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, M_SFT, M_SPC, M_OS), + + [_KEEB] = LAYOUT_2u_space_ortho( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_LAZY] = LAYOUT_2u_space_ortho( - _______, _______, _______, _______, _______, M_TM, _______, M_SNIPT, M_SHRUG, _______, _______, KC_MUTE, - _______, _______, _______, _______, _______, M_GGT, _______, M_UF, M_LOD, M_REPO, _______, _______, - _______, _______, _______, _______, _______, _______, _______, M_TF, M_LENNY, _______, KC_VOLU, KC_MPLY, - _______, _______, _______, _______, _______, _______, M_CALC, _______, KC_MPRV, KC_VOLD, KC_MNXT), }; diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk index c1d5afa1ebae..1330a2738aa9 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk +++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = full MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c index 212d06de67cf..80f7b1bbc14e 100644 --- a/users/arkag/arkag.c +++ b/users/arkag/arkag.c @@ -5,34 +5,7 @@ https://github.com/arkag/qmk_firmware/blob/master/keyboards/mechmini/v2/keymaps/arkag/keymap.c */ -// Start: Written by konstantin: vomindoraan -#include -#include -#include - -void send_unicode_hex_string(const char *str) { - if (!str) { return; } // Saftey 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(*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 - } -} -// End: Written by konstantin: vomindoraan +#include // Start: Written by Chris Lewis #ifndef MIN @@ -78,6 +51,8 @@ Color underglow, flashState flash_state = no_flash; fadeState fade_state = add_fade; activityState state = boot; +bool aesthetic = false, + shifty = false; void set_color (Color new, bool update) { rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update); @@ -146,7 +121,7 @@ void check_state (void) { case sleeping: if (!slept) { - rgblight_mode_noeeprom(4); + rgblight_mode_noeeprom(2); slept = true; activated = false; deactivated = false; @@ -249,11 +224,6 @@ void set_os (uint8_t os, bool update) { num_extra_flashes_off = 1; } -void tap_key(uint8_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - // register GUI if Mac or Ctrl if other void pri_mod(bool press) { if (press) { @@ -293,13 +263,13 @@ void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) { register_code(KC_LSFT); } for (int i = 0; i < num_of_chars; i++) { - tap_key(keycode); + tap_code(keycode); } if (use_shift) { unregister_code(KC_LSFT); } for (int i = 0; i < (num_of_chars/2); i++) { - tap_key(KC_LEFT); + tap_code(KC_LEFT); } } @@ -307,7 +277,7 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) { for (int i = 0; i < num_of_keys-1; i++) { register_code(keys[i]); } - tap_key(keys[num_of_keys-1]); + tap_code(keys[num_of_keys-1]); for (int i = 0; i < num_of_keys-1; i++) { unregister_code(keys[i]); } @@ -315,7 +285,10 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) { void dance_grv (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_GRV); + tap_code(KC_GRV); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { surround_type(2, KC_GRAVE, false); } else { @@ -325,7 +298,10 @@ void dance_grv (qk_tap_dance_state_t *state, void *user_data) { void dance_quot (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_QUOT); + tap_code(KC_QUOT); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { surround_type(2, KC_QUOTE, false); } else if (state->count == 3) { @@ -333,35 +309,53 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data) { } } -void dance_strk (qk_tap_dance_state_t *state, void *user_data) { +void dance_hyph (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - surround_type(4, KC_TILDE, true); + tap_code(KC_MINS); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { - if (current_os == OS_MAC) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); - } else if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); - } else { - return; + register_code(KC_LSFT); + tap_code(KC_MINS); + if (aesthetic) { + tap_code(KC_SPACE); } + unregister_code(KC_LSFT); + } else if (state->count == 3) { + send_unicode_hex_string("2014"); } } -void dance_3 (qk_tap_dance_state_t *state, void *user_data) { +void dance_obrck (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_3); + tap_code(KC_LBRC); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { - send_unicode_hex_string("00E8"); - } else if (state->count == 3) { - send_unicode_hex_string("00E9"); + register_code(KC_LSFT); + tap_code(KC_9); + if (aesthetic) { + tap_code(KC_SPACE); + } + unregister_code(KC_LSFT); } } -void dance_c (qk_tap_dance_state_t *state, void *user_data) { +void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_C); + tap_code(KC_RBRC); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { - send_unicode_hex_string("00E7"); + register_code(KC_LSFT); + tap_code(KC_0); + if (aesthetic) { + tap_code(KC_SPACE); + } + unregister_code(KC_LSFT); } } @@ -383,13 +377,28 @@ void matrix_scan_user(void) { // begin OS functions SEQ_TWO_KEYS(KC_P, KC_B) { if (current_os == OS_WIN) { - SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_PAUSE) SS_UP(X_LGUI)); + long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE}); + } else { + } + } + SEQ_TWO_KEYS(KC_LSFT, M_PMOD) { + if (current_os == OS_WIN) { + long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LSFT, KC_ESC}); + } else { + } + } + SEQ_TWO_KEYS(KC_S, KC_S) { + if (current_os == OS_MAC) { + long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); + } else if (current_os == OS_WIN) { + long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); } else { + return; } } SEQ_THREE_KEYS(KC_C, KC_A, KC_D) { if (current_os == OS_WIN) { - SEND_STRING(SS_DOWN(X_LCTRL) SS_DOWN(X_LALT) SS_TAP(X_DELETE) SS_UP(X_LALT) SS_UP(X_LCTRL)); + long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LALT, KC_DEL}); } else { } } @@ -415,33 +424,33 @@ void matrix_scan_user(void) { SEQ_ONE_KEY(KC_S) { surround_type(4, KC_GRAVE, true); } - SEQ_TWO_KEYS(KC_S, KC_S) { - if (current_os == OS_MAC) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); - } else if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); - } else { - return; - } - } SEQ_ONE_KEY(KC_C) { - surround_type(2, KC_GRAVE, false); + send_unicode_hex_string("00E7"); } SEQ_TWO_KEYS(KC_C, KC_C) { + surround_type(2, KC_GRAVE, false); + } + SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { surround_type(6, KC_GRAVE, false); } + SEQ_ONE_KEY(KC_E) { + send_unicode_hex_string("00E8"); + } + SEQ_TWO_KEYS(KC_E, KC_E) { + send_unicode_hex_string("00E9"); + } // end format functions // start fancy functions SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { surround_type(6, KC_GRAVE, false); pri_mod(true); - tap_key(KC_V); + tap_code(KC_V); pri_mod(false); - tap_key(KC_RGHT); - tap_key(KC_RGHT); - tap_key(KC_RGHT); - tap_key(KC_ENTER); + tap_code(KC_RGHT); + tap_code(KC_RGHT); + tap_code(KC_RGHT); + tap_code(KC_ENTER); } // end fancy functions @@ -450,8 +459,8 @@ void matrix_scan_user(void) { // ™ send_unicode_hex_string("2122"); } - SEQ_THREE_KEYS(KC_G, KC_G, KC_T) { - SEND_STRING("@GrahamGoldenTech.com"); + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(".\\Administrator"); } SEQ_THREE_KEYS(KC_L, KC_O, KC_D) { // ಠ__ಠ @@ -482,29 +491,103 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (aesthetic) { + switch (keycode) { + case KC_A ... KC_0: + case KC_SPACE ... KC_SLASH: + if (record->event.pressed) { + state = active; + velocikey_accelerate(); + tap_code(keycode); + tap_code(KC_SPACE); + } + return false; + + case KC_BSPACE: + if (record->event.pressed) { + state = active; + velocikey_accelerate(); + tap_code(keycode); + tap_code(keycode); + } + return false; + default: // Do nothing + break; + } + } + + if (shifty) { + switch (keycode) { + case KC_A ... KC_Z: + if (record->event.pressed) { + int shift = rand() % 2; + state = active; + velocikey_accelerate(); + if (shift == 1){ + register_code(KC_LSFT); + } + tap_code(keycode); + if (shift == 1){ + unregister_code(KC_LSFT); + } + } + return false; + case KC_SPC: + if (record->event.pressed) { + state = active; + velocikey_accelerate(); + tap_code(keycode); + } + return false; + default: // Do nothing + break; + } + } + switch (keycode) { case M_PMOD: - if (record->event.pressed) { - pri_mod(true); - } else { - pri_mod(false); - } + pri_mod(record->event.pressed); return false; case M_SMOD: - if (record->event.pressed) { - sec_mod(true); - } else { - sec_mod(false); - } + sec_mod(record->event.pressed); return false; case M_OS: - if (record->event.pressed) { + if (record->event.pressed){ set_os((current_os+1) % _OS_COUNT, true); } + return false; + case M_SPC: + if(record->event.pressed){ + if (aesthetic) { + aesthetic = false; + num_extra_flashes_off = 1; + } else { + aesthetic = true; + } + flash_color = underglow; + flash_state = flash_off; + return false; + } + + + case M_SFT: + if(record->event.pressed){ + if (shifty) { + shifty = false; + num_extra_flashes_off = 1; + } else { + shifty = true; + } + flash_color = underglow; + flash_state = flash_off; + return false; + } + + default: if (record->event.pressed) { state = active; @@ -516,13 +599,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - [TD_3_GRV_ACT] = ACTION_TAP_DANCE_FN (dance_3), - [TD_C_CED] = ACTION_TAP_DANCE_FN (dance_c), [TD_GRV_3GRV] = ACTION_TAP_DANCE_FN (dance_grv), [TD_SING_DOUB] = ACTION_TAP_DANCE_FN (dance_quot), - [TD_STRK_SHOT] = ACTION_TAP_DANCE_FN (dance_strk), - [TD_HYPH_UNDR] = ACTION_TAP_DANCE_DOUBLE (KC_MINS, LSFT(KC_MINS)), - [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, LSFT(KC_9)), - [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, LSFT(KC_0)), + [TD_HYPH_UNDR] = ACTION_TAP_DANCE_FN (dance_hyph), + [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck), + [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck), [TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT), }; diff --git a/users/arkag/arkag.h b/users/arkag/arkag.h index a4672a8e82ef..a5f2a6a352a0 100644 --- a/users/arkag/arkag.h +++ b/users/arkag/arkag.h @@ -17,9 +17,9 @@ #define RAISE MO(1) #define LOWER MO(2) -#define KEEB MO(3) -#define MEDIA MO(4) -#define LAZY MO(5) +#define MEDIA MO(3) +#define FUNCT MO(4) +#define KEEB MO(5) #define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) #define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) @@ -37,9 +37,9 @@ enum { _QWERTY = 0, _RAISE, _LOWER, - _KEEB, _MEDIA, - _LAZY, + _FUNCT, + _KEEB, }; typedef enum { @@ -76,22 +76,9 @@ typedef enum { enum custom_keycodes { M_PMOD = SAFE_RANGE, M_SMOD, - M_P_B, - M_C_A_D, - M_CALC, M_OS, - M_TF, - M_TM, - M_GGT, - M_LOD, - M_LENNY, - M_BOLD, - M_ITAL, - M_ULIN, - M_SNIPT, - M_REPO, - M_SHRUG, - M_UF, + M_SFT, + M_SPC, }; enum tapdances { @@ -101,16 +88,12 @@ enum tapdances { TD_SLSH_HTTP, TD_SING_DOUB, TD_HYPH_UNDR, - TD_STRK_SHOT, TD_SPECIAL, TD_BRCK_PARN_O, TD_BRCK_PARN_C, TD_LALT_RALT, - SPC_SFT_NSFT, }; -void send_unicode_hex_string(const char *str); - void velocikey_accelerate(void); void velocikey_decelerate(void); uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue); diff --git a/users/arkag/config.h b/users/arkag/config.h index 2e0a9ad01998..5a89a18f60f2 100644 --- a/users/arkag/config.h +++ b/users/arkag/config.h @@ -1,6 +1,6 @@ #pragma once #define TAPPING_TERM 200 -#define LEADER_TIMEOUT 250 +#define LEADER_TIMEOUT 300 #define LEADER_PER_KEY_TIMING From 980a41e9049aad53c49b667066a3c5e5cabda113 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Thu, 14 Mar 2019 14:59:34 -0600 Subject: [PATCH 323/445] [Keyboard] Georgi Support (#5384) * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json --- keyboards/georgi/config.h | 74 ++++ keyboards/georgi/georgi.c | 68 ++++ keyboards/georgi/georgi.h | 82 ++++ keyboards/georgi/info.json | 133 +++++++ keyboards/georgi/keymaps/default/keymap.c | 229 +++++++++++ keyboards/georgi/keymaps/default/readme.md | 11 + keyboards/georgi/keymaps/default/rules.mk | 27 ++ keyboards/georgi/keymaps/template/keymap.c | 216 +++++++++++ keyboards/georgi/keymaps/template/readme.md | 6 + keyboards/georgi/keymaps/template/rules.mk | 27 ++ keyboards/georgi/matrix.c | 402 ++++++++++++++++++++ keyboards/georgi/readme.md | 29 ++ keyboards/georgi/rules.mk | 22 ++ keyboards/georgi/sten.c | 2 + keyboards/georgi/sten.h | 290 ++++++++++++++ 15 files changed, 1618 insertions(+) create mode 100644 keyboards/georgi/config.h create mode 100644 keyboards/georgi/georgi.c create mode 100644 keyboards/georgi/georgi.h create mode 100644 keyboards/georgi/info.json create mode 100644 keyboards/georgi/keymaps/default/keymap.c create mode 100644 keyboards/georgi/keymaps/default/readme.md create mode 100644 keyboards/georgi/keymaps/default/rules.mk create mode 100644 keyboards/georgi/keymaps/template/keymap.c create mode 100644 keyboards/georgi/keymaps/template/readme.md create mode 100644 keyboards/georgi/keymaps/template/rules.mk create mode 100644 keyboards/georgi/matrix.c create mode 100644 keyboards/georgi/readme.md create mode 100644 keyboards/georgi/rules.mk create mode 100644 keyboards/georgi/sten.c create mode 100644 keyboards/georgi/sten.h diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h new file mode 100644 index 000000000000..041567719bbf --- /dev/null +++ b/keyboards/georgi/config.h @@ -0,0 +1,74 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +// Copy and worked on with love from the EZ team + +#pragma once +#include "config_common.h" + +/* Defaults */ + +#define VERSION "Alpha 01: Ted " +#define VERBOSE + +#define FORCE_NKRO +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_DEBUG +#define NO_ACTION_ONESHOT +#define NO_ACTION_FUNCTION + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER g Heavy Industries +#define PRODUCT Georgi +#define DESCRIPTION QMK keyboard firmware for Georgi + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 4 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 +#define TAPPING_TOGGLE 2 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +#define DEBOUNCE 5 +#define USB_MAX_POWER_CONSUMPTION 500 diff --git a/keyboards/georgi/georgi.c b/keyboards/georgi/georgi.c new file mode 100644 index 000000000000..8866886ce7c7 --- /dev/null +++ b/keyboards/georgi/georgi.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +bool i2c_initialized = 0; +i2c_status_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT + + // (tied to Vcc for hardware convenience) + //DDRB &= ~(1<<4); // set B(4) as input + //PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins - C7, D4, D5, D7, E6 + // set as input with internal pull-up enabled + DDRC &= ~(1<<7); + DDRD &= ~(1<<5 | 1<<4 | 1<<6 | 1<<7); + DDRE &= ~(1<<6); + PORTC |= (1<<7); + PORTD |= (1<<5 | 1<<4 | 1<<6 | 1<<7); + PORTE |= (1<<6); + + matrix_init_user(); +} + + +uint8_t init_mcp23018(void) { + print("starting init"); + mcp23018_status = 0x20; + + // I2C subsystem + + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); + + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + // i2c_init(); // on pins D(1,0) + // _delay_ms(1000); + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + +out: + i2c_stop(); + // SREG=sreg_prev; + //uprintf("Init %x\n", mcp23018_status); + return mcp23018_status; +} diff --git a/keyboards/georgi/georgi.h b/keyboards/georgi/georgi.h new file mode 100644 index 000000000000..df6bb6ea9a40 --- /dev/null +++ b/keyboards/georgi/georgi.h @@ -0,0 +1,82 @@ +#pragma once +#include +#include +#include +#include "quantum.h" +#include "i2c_master.h" +#include "matrix.h" + + +extern i2c_status_t mcp23018_status; +#define ERGODOX_EZ_I2C_TIMEOUT 1000 +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +//#define I2C_ADDR 0b0100000 +#define I2C_ADDR 0x20 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +void init_ergodox(void); +uint8_t init_mcp23018(void); + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_georgi( \ + 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, R20,R21,R22) \ + \ + { \ + { KC_NO, R00, R10, R21}, \ + { KC_NO, R01, R11, R20}, \ + { KC_NO, R02, R12, R22}, \ + { KC_NO, R03, R13, KC_NO}, \ + { KC_NO, R04, R14, KC_NO}, \ + { KC_NO, R05, R15, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO}, \ + \ + { KC_NO, L05, L15, L22}, \ + { KC_NO, L04, L14, L21}, \ + { KC_NO, L03, L13, L20}, \ + { KC_NO, L02, L12, KC_NO}, \ + { KC_NO, L01, L11, KC_NO}, \ + { KC_NO, L00, L10, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO}, \ + \ +} + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- +#define LAYOUT_GERGO( \ + L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \ + 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, \ + L31,L32, R33,R34, \ + L30, R30, \ + L33,L34, R31,R32) \ + \ + { \ + { KC_NO, L16, L26, L30}, \ + { L05, L15, L25, L34}, \ + { L04, L14, L24, L33}, \ + { L03, L13, L23, L32}, \ + { L02, L12, L22, L31}, \ + { L01, L11, L21, KC_NO}, \ + { L00, L10, L20, KC_NO}, \ + \ + { KC_NO, R10, R20, R30}, \ + { R00, R11, R21, R31}, \ + { R01, R12, R22, R32}, \ + { R02, R13, R23, R33}, \ + { R03, R14, R24, R34}, \ + { R04, R15, R25, KC_NO}, \ + { R05, R16, R26, KC_NO}, \ +} */ diff --git a/keyboards/georgi/info.json b/keyboards/georgi/info.json new file mode 100644 index 000000000000..d0752e2cd3eb --- /dev/null +++ b/keyboards/georgi/info.json @@ -0,0 +1,133 @@ +{ + "keyboard_name": "Georgi", + "url": "http://gboards.ca", + "maintainer": "germ", + "width": 13.2, + "height": 3.68, + "layouts": { + "LAYOUT_georgi": { + "layout": [ + { + "x": 0.05, + "y": 0.54 + }, + { + "x": 1.06, + "y": 0.55 + }, + { + "x": 2.06, + "y": 0.29 + }, + { + "x": 3.05, + "y": 0.16 + }, + { + "x": 4.06, + "y": 0.41 + }, + { + "x": 5.06, + "y": 0.54 + }, + { + "x": 7.1899999999999995, + "y": 0.41 + }, + { + "x": 8.2, + "y": 0.3 + }, + { + "x": 9.2, + "y": 0.05 + }, + { + "x": 10.2, + "y": 0.29 + }, + { + "x": 11.2, + "y": 0.43 + }, + { + "x": 12.2, + "y": 0.42 + }, + { + "x": 0.05, + "y": 1.54 + }, + { + "x": 1.06, + "y": 1.54 + }, + { + "x": 2.06, + "y": 1.28 + }, + { + "x": 3.05, + "y": 1.16 + }, + { + "x": 4.06, + "y": 1.4 + }, + { + "x": 5.06, + "y": 1.54 + }, + { + "x": 7.1899999999999995, + "y": 1.4 + }, + { + "x": 8.2, + "y": 1.28 + }, + { + "x": 9.2, + "y": 1.04 + }, + { + "x": 10.2, + "y": 1.28 + }, + { + "x": 11.2, + "y": 1.42 + }, + { + "x": 12.2, + "y": 1.42 + }, + { + "x": 3.05, + "y": 2.67 + }, + { + "x": 4.06, + "y": 2.68 + }, + { + "x": 5.06, + "y": 2.68 + }, + { + "x": 7.19, + "y": 2.67 + }, + { + "x": 8.2, + "y": 2.67 + }, + { + "x": 9.2, + "y": 2.66 + } + ] + } + } +} diff --git a/keyboards/georgi/keymaps/default/keymap.c b/keyboards/georgi/keymaps/default/keymap.c new file mode 100644 index 000000000000..c3d69eb8aa02 --- /dev/null +++ b/keyboards/georgi/keymaps/default/keymap.c @@ -0,0 +1,229 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +int getKeymapCount(void); + +// Proper Layers +#define FUNCT (LSD | LK | LP | LH) +#define MEDIA (LSD | LK | LW | LR) +#define MOVE (ST1 | ST2) + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RG | RB | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | NUM | LA | LO | | RE | RU | NUM | + * `---------------' `---------------' + */ + +// YOU MUST ORDER THIS! +// P Will return from processing on the first match it finds. Therefore +// PJ Will run the requested action, remove the matched chord and continue +// +// First any chords that would conflict with PJs need to be checked, then PJs, lastly Ps. +// For all chords should be ordered by length in their section! +// +// http://docs.gboards.ca +bool processQwerty(void) { + // Place P's that would be trashed by PJ's here + P( RT | RS | RD | RZ | NUM, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( NUM | LA | LO | RE | RU, SEND(KC_MPLY)); + P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC)); + + // Thumb Chords + P( LA | LO | RE | RU, SEND(KC_CAPS)); + P( LA | RU, SEND(KC_ESC)); + PJ( LO | RE, SEND(KC_LCTL)); + PJ( NUM | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + PJ( NUM | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // Mods + PJ( RT | RD | RS | RZ, SEND(KC_LGUI)); + PJ( RT | RD, SEND(KC_LCTL)); + PJ( RS | RZ, SEND(KC_LALT)); + PJ( LA | NUM, SEND(KC_LCTL)); + PJ( LA | LO, SEND(KC_LALT)); + PJ( LO, SEND(KC_LSFT)); + + // Function Layer + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + P( MOVE | ST3, SEND(KC_PGUP)); + P( MOVE | ST4, SEND(KC_PGDN)); + + // Media Layer + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + P( MEDIA | RZ, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + + // Mouse Keys + P( LP | LH, clickMouse(KC_MS_BTN1)); + P( LW | LR, clickMouse(KC_MS_BTN2)); + + // Number Row + P( NUM | LSU, SEND(KC_1)); + P( NUM | LFT, SEND(KC_2)); + P( NUM | LP, SEND(KC_3)); + P( NUM | LH, SEND(KC_4)); + P( NUM | ST1, SEND(KC_5)); + P( NUM | ST3, SEND(KC_6)); + P( NUM | RF, SEND(KC_7)); + P( NUM | RP, SEND(KC_8)); + P( NUM | RL, SEND(KC_9)); + P( NUM | RT, SEND(KC_0)); + P( NUM | LA, SEND(KC_5)); + P( NUM | RT, SEND(KC_0)); + + // Specials + P( LA | NUM, SEND(KC_ESC)); + P( RU | NUM, SEND(KC_TAB)); + P( RE | RU, SEND(KC_BSPC)); + P( RD | RZ, SEND(KC_ENT)); + P( RE, SEND(KC_ENT)); + P( RD, SEND(KC_BSPC)); + P( NUM, SEND(KC_BSPC)); + P( LA, SEND(KC_SPC)); + P( RU, SEND(KC_SPC)); + P( RZ, SEND(KC_ESC)); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_D)); + P( LH | LR, SEND(KC_F)); + P( ST1 | ST2, SEND(KC_G)); + P( ST3 | ST4, SEND(KC_H)); + P( RF | RR, SEND(KC_J)); + P( RT | RS, SEND(KC_SCLN)) + P( RG | RL, SEND(KC_L)); + P( RP | RB, SEND(KC_K)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_E)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_R)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_T)); + P( ST2, SEND(KC_B)); + P( ST3, SEND(KC_Y)); + P( ST4, SEND(KC_N)); + P( RF, SEND(KC_U)); + P( RR, SEND(KC_M)); + P( RP, SEND(KC_I)); + P( RB, SEND(KC_COMM)); + P( RL, SEND(KC_O)); + P( RG, SEND(KC_DOT)); + P( RT, SEND(KC_P)); + P( RS, SEND(KC_SLSH)); + + // Symbols and Numbers + P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | LA | LO, SEND(KC_SPC)); + P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( PWR | ST1 | ST2, SEND(KC_GRV)); // ` + P( PWR | RD | RZ, SEND(KC_ESC)); + P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // # + P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( PWR | LW, SEND(KC_LBRC)); + P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( PWR | LR, SEND(KC_RBRC)); + P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( PWR | ST3, SEND(KC_QUOT)); + P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( PWR | RF, SEND(KC_KP_PLUS)); + P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( PWR | RP, SEND(KC_MINS)); + P( PWR | RB, SEND(KC_EQL)); + P( PWR | RL, SEND(KC_SLSH)); + P( PWR | RG, SEND(KC_COMM)); + P( PWR | RT, SEND(KC_PAST)); + P( PWR | RS, SEND(KC_DOT)); + P( PWR | RD, SEND(KC_TAB)); + P( PWR | LA, SEND(KC_SCLN)); + P( PWR | LO, SEND(KC_SLSH)); + P( PWR | RE, SEND(KC_SCLN)); + P( PWR | RU, SEND(KC_SLSH)); + + + // If we make here, send as a steno chord + // If plover is running we can hook that host side + return false; +} + +#define STENO_LAYER 0 +#define GAMING 1 +#define GAMING_2 2 + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | RR | RG | RB | RS is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you have only a single layer, you must set SINGLELAYER = yes in your rules.mk, otherwise you may experince undefined behaviour + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Main layer, everything goes through here +[STENO_LAYER] = LAYOUT_georgi( +STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, +STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N1) +, +// Gaming layer with Numpad, Very limited +[GAMING] = LAYOUT_georgi( +KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, +KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, +KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER)), + +[GAMING_2] = LAYOUT_georgi( +KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, +KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER)) +}; + +int getKeymapCount(void) { + return sizeof(keymaps)/sizeof(keymaps[0]); +} diff --git a/keyboards/georgi/keymaps/default/readme.md b/keyboards/georgi/keymaps/default/readme.md new file mode 100644 index 000000000000..f9da34b02454 --- /dev/null +++ b/keyboards/georgi/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/default/rules.mk b/keyboards/georgi/keymaps/default/rules.mk new file mode 100644 index 000000000000..2973c45918dc --- /dev/null +++ b/keyboards/georgi/keymaps/default/rules.mk @@ -0,0 +1,27 @@ +#---------------------------------------------------------------------------- +# make georgi:extrakey:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +#Debug options +VERBOSE = yes +CONSOLE_ENABLE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes +MOUSEKEY_ENABLE = yes +SINGLE_LAYER = no + + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(SINGLE_LAYER)), yes) + OPT_DEFS += -DSINGLE_LAYER +endif diff --git a/keyboards/georgi/keymaps/template/keymap.c b/keyboards/georgi/keymaps/template/keymap.c new file mode 100644 index 000000000000..b17d7ed9f7e4 --- /dev/null +++ b/keyboards/georgi/keymaps/template/keymap.c @@ -0,0 +1,216 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +int getKeymapCount(void); + +// Proper Layers +#define FUNCT (LSD | LK | LP | LH) +#define MEDIA (LSD | LK | LW | LR) +#define MOVE (ST1 | ST2) + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RG | RB | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | NUM | LA | LO | | RE | RU | NUM | + * `---------------' `---------------' + */ + +// YOU MUST ORDER THIS! +// P Will return from processing on the first match it finds. Therefore +// PJ Will run the requested action, remove the matched chord and continue +// +// First any chords that would conflict with PJs need to be checked, then PJs, lastly Ps. +// For all chords should be ordered by length in their section! +// +// http://docs.gboards.ca +bool processQwerty(void) { + // Place P's that would be trashed by PJ's here + P( RT | RS | RD | RZ | NUM, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( NUM | LA | LO | RE | RU, SEND(KC_MPLY)); + P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC)); + + // Thumb Chords + P( LA | LO | RE | RU, SEND(KC_CAPS)); + P( LA | RU, SEND(KC_ESC)); + PJ( LO | RE, SEND(KC_LCTL)); + PJ( NUM | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + PJ( NUM | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // Mods + PJ( RT | RD | RS | RZ, SEND(KC_LGUI)); + PJ( RT | RD, SEND(KC_LCTL)); + PJ( RS | RZ, SEND(KC_LALT)); + PJ( LA | NUM, SEND(KC_LCTL)); + PJ( LA | LO, SEND(KC_LALT)); + PJ( LO, SEND(KC_LSFT)); + + // Function Layer + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + P( MOVE | ST3, SEND(KC_PGUP)); + P( MOVE | ST4, SEND(KC_PGDN)); + + // Media Layer + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + P( MEDIA | RZ, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + + // Mouse Keys + P( LP | LH, clickMouse(KC_MS_BTN1)); + P( LW | LR, clickMouse(KC_MS_BTN2)); + + // Number Row + P( NUM | LSU, SEND(KC_1)); + P( NUM | LFT, SEND(KC_2)); + P( NUM | LP, SEND(KC_3)); + P( NUM | LH, SEND(KC_4)); + P( NUM | ST1, SEND(KC_5)); + P( NUM | ST3, SEND(KC_6)); + P( NUM | RF, SEND(KC_7)); + P( NUM | RP, SEND(KC_8)); + P( NUM | RL, SEND(KC_9)); + P( NUM | RT, SEND(KC_0)); + P( NUM | LA, SEND(KC_5)); + P( NUM | RT, SEND(KC_0)); + + // Specials + P( LA | NUM, SEND(KC_ESC)); + P( RU | NUM, SEND(KC_TAB)); + P( RE | RU, SEND(KC_BSPC)); + P( RD | RZ, SEND(KC_ENT)); + P( RE, SEND(KC_ENT)); + P( RD, SEND(KC_BSPC)); + P( NUM, SEND(KC_BSPC)); + P( LA, SEND(KC_SPC)); + P( RU, SEND(KC_SPC)); + P( RZ, SEND(KC_ESC)); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_D)); + P( LH | LR, SEND(KC_F)); + P( ST1 | ST2, SEND(KC_G)); + P( ST3 | ST4, SEND(KC_H)); + P( RF | RR, SEND(KC_J)); + P( RT | RS, SEND(KC_SCLN)) + P( RG | RL, SEND(KC_L)); + P( RP | RB, SEND(KC_K)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_E)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_R)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_T)); + P( ST2, SEND(KC_B)); + P( ST3, SEND(KC_Y)); + P( ST4, SEND(KC_N)); + P( RF, SEND(KC_U)); + P( RR, SEND(KC_M)); + P( RP, SEND(KC_I)); + P( RB, SEND(KC_COMM)); + P( RL, SEND(KC_O)); + P( RG, SEND(KC_DOT)); + P( RT, SEND(KC_P)); + P( RS, SEND(KC_SLSH)); + + // Symbols and Numbers + P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | LA | LO, SEND(KC_SPC)); + P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( PWR | ST1 | ST2, SEND(KC_GRV)); // ` + P( PWR | RD | RZ, SEND(KC_ESC)); + P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // # + P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( PWR | LW, SEND(KC_LBRC)); + P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( PWR | LR, SEND(KC_RBRC)); + P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( PWR | ST3, SEND(KC_QUOT)); + P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( PWR | RF, SEND(KC_KP_PLUS)); + P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( PWR | RP, SEND(KC_MINS)); + P( PWR | RB, SEND(KC_EQL)); + P( PWR | RL, SEND(KC_SLSH)); + P( PWR | RG, SEND(KC_COMM)); + P( PWR | RT, SEND(KC_PAST)); + P( PWR | RS, SEND(KC_DOT)); + P( PWR | RD, SEND(KC_TAB)); + P( PWR | LA, SEND(KC_SCLN)); + P( PWR | LO, SEND(KC_SLSH)); + P( PWR | RE, SEND(KC_SCLN)); + P( PWR | RU, SEND(KC_SLSH)); + + + // If we make here, send as a steno chord + // If plover is running we can hook that host side + return false; +} + +#define STENO_LAYER 0 + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | RR | RG | RB | RS is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you have only a single layer, you must set SINGLELAYER = yes in your rules.mk, otherwise you may experince undefined behaviour + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Main layer, everything goes through here +[STENO_LAYER] = LAYOUT_georgi( +STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, +STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N1) +}; + +int getKeymapCount(void) { + return sizeof(keymaps)/sizeof(keymaps[0]); +} diff --git a/keyboards/georgi/keymaps/template/readme.md b/keyboards/georgi/keymaps/template/readme.md new file mode 100644 index 000000000000..7c6fc3512322 --- /dev/null +++ b/keyboards/georgi/keymaps/template/readme.md @@ -0,0 +1,6 @@ +# Georgi QWERTY/Steno firmware + +This is a blank template configured with 5K of free space for your onboard dictionary! +Read the docs over at [gBoards](http://docs.gboards.ca) + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! diff --git a/keyboards/georgi/keymaps/template/rules.mk b/keyboards/georgi/keymaps/template/rules.mk new file mode 100644 index 000000000000..1178fd80db12 --- /dev/null +++ b/keyboards/georgi/keymaps/template/rules.mk @@ -0,0 +1,27 @@ +#---------------------------------------------------------------------------- +# make georgi:extrakey:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +#Debug options +VERBOSE = yes +CONSOLE_ENABLE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes +MOUSEKEY_ENABLE = no +SINGLE_LAYER = no + + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(SINGLE_LAYER)), yes) + OPT_DEFS += -DSINGLE_LAYER +endif diff --git a/keyboards/georgi/matrix.c b/keyboards/georgi/matrix.c new file mode 100644 index 000000000000..22079ac61a1c --- /dev/null +++ b/keyboards/georgi/matrix.c @@ -0,0 +1,402 @@ +/* +Note for ErgoDox EZ customizers: Here be dragons! +This is not a file you want to be messing with. +All of the interesting stuff for you is under keymaps/ :) +Love, Erez + +Copyright 2013 Oleg Kostyuk + +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 "matrix.h" +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "keymap_steno.h" +#include QMK_KEYBOARD_H +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +// MCP Pin Defs +#define RROW1 (1<<3) +#define RROW2 (1<<2) +#define RROW3 (1<<1) +#define RROW4 (1<<0) +#define COL0 (1<<0) +#define COL1 (1<<1) +#define COL2 (1<<2) +#define COL3 (1<<3) +#define COL4 (1<<4) +#define COL5 (1<<5) +#define COL6 (1<<6) + +// ATmega pin defs +#define ROW1 (1<<6) +#define ROW2 (1<<5) +#define ROW3 (1<<4) +#define ROW4 (1<<1) +#define COL7 (1<<0) +#define COL8 (1<<1) +#define COL9 (1<<2) +#define COL10 (1<<3) +#define COL11 (1<<2) +#define COL12 (1<<3) +#define COL13 (1<<6) + + +// bit masks +#define BMASK (COL7 | COL8 | COL9 | COL10) +#define CMASK (COL13) +#define DMASK (COL11 | COL12) +#define FMASK (ROW1 | ROW2 | ROW3 | ROW4) +#define RROWMASK (RROW1 | RROW2 | RROW3 | RROW4) +#define MCPMASK (COL0 | COL1 | COL2 | COL3 | COL4 | COL5 | COL6) + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +/* + * matrix state(1:on, 0:off) + * contains the raw values without debounce filtering of the last read cycle. + */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; +// static uint16_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + + +void matrix_init(void) +{ + // initialize row and col + mcp23018_status = init_mcp23018(); + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + for (uint8_t j=0; j < MATRIX_COLS; ++j) { + debounce_matrix[i * MATRIX_COLS + j] = 0; + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + matrix_init_quantum(); +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + +} + +// Returns a matrix_row_t whose bits are set if the corresponding key should be +// eligible to change in this scan. +matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { + matrix_row_t result = 0; + matrix_row_t change = rawcols ^ raw_matrix[row]; + raw_matrix[row] = rawcols; + for (uint8_t i = 0; i < MATRIX_COLS; ++i) { + if (debounce_matrix[row * MATRIX_COLS + i]) { + --debounce_matrix[row * MATRIX_COLS + i]; + } else { + result |= (1 << i); + } + if (change & (1 << i)) { + debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; + } + } + return result; +} + +matrix_row_t debounce_read_cols(uint8_t row) { + // Read the row without debouncing filtering and store it for later usage. + matrix_row_t cols = read_cols(row); + // Get the Debounce mask. + matrix_row_t mask = debounce_mask(cols, row); + // debounce the row and return the result. + return (cols & mask) | (matrix[row] & ~mask);; +} + +uint8_t matrix_scan(void) +{ + // Then the keyboard + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + select_row(i); + // and select on left hand + select_row(i + MATRIX_ROWS_PER_SIDE); + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + // grab cols from left hand + matrix[i] = debounce_read_cols(i); + // grab cols from right hand + matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); + + unselect_rows(); + } + + matrix_scan_quantum(); + +#ifdef DEBUG_MATRIX + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); +#endif + + return 1; +} + +bool matrix_is_modified(void) // deprecated and evidently not called. +{ + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 1 | ((PINC & CMASK) >> 6) | (PIN))); + //return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + return ~( + (((PINF & ROW4) >> 1) + | ((PINF & (ROW1 | ROW2 | ROW3)) >> 3)) + & 0xF); + } +} + +// Row pin configuration +static void unselect_rows(void) +{ + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~(BMASK); + PORTB &= ~(BMASK); + DDRC &= ~CMASK; + PORTC &= ~CMASK; + DDRD &= ~DMASK; + PORTD &= ~DMASK; +} + +static void select_row(uint8_t row) +{ + if (row < 7) { + // select on mcp23018 + if (mcp23018_status) { // do nothing on error + } else { // set active row low : 0 // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1< 1) { + uprintf("Switching to QMK\n"); + layer_on(1); + goto out; + } + + // Lone FN press, toggle QWERTY + if (cChord == FN) { + (cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO); + goto out; + } + + // Check for Plover momentary + if (cMode == QWERTY && (cChord & FN)) { + cChord ^= FN; + goto steno; + } + + // Do QWERTY and Momentary QWERTY + if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) { + if (cChord & FN) cChord ^= FN; + processQwerty(); + goto out; + } + + // Fallback NKRO Steno + if (cMode == STENO && QWERSTENO) { + processFakeSteno(); + goto out; + } + +steno: + // Hey that's a steno chord! + inChord = false; + cChord = 0; + return true; + +out: + inChord = false; + clear_keyboard(); + cChord = 0; + return false; +} + +// Update Chord State +bool process_steno_user(uint16_t keycode, keyrecord_t *record) { + // Everything happens in here when steno keys come in. + // Bail on keyup + if (!record->event.pressed) return true; + + // Update key repeat timers + repTimer = timer_read(); + inChord = true; + + // Switch on the press adding to chord + bool pr = record->event.pressed; + switch (keycode) { + // Mods and stuff + case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break; + case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break; + case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break; + case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break; + case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break; + case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break; + case STN_N1...STN_N6: + case STN_N7...STN_NC: pr ? (cChord |= (NUM)): (cChord &= ~(NUM)); break; + + // All the letter keys + case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break; + case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break; + case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break; + case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break; + case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break; + case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break; + case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break; + case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break; + case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break; + case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break; + case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break; + case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break; + case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break; + case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break; + case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break; + case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break; + case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break; + case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break; + case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break; + case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break; + case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break; + case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break; + } + + // Check for key repeat in QWERTY mode + return true; +} +void matrix_scan_user(void) { + // We abuse this for early sending of key + // Key repeat only on QWER/SYMB layers + if (cMode != QWERTY) return; + + // Check timers + if (timer_elapsed(repTimer) > REP_DELAY) { + // Process Key for report + processQwerty(); + + // Send report to host + send_keyboard_report(); + repTimer = timer_read(); + } +}; + +// Helpers +bool processFakeSteno(void) { + PJ( LSU, SEND(KC_Q);); + PJ( LSD, SEND(KC_A);); + PJ( LFT, SEND(KC_W);); + PJ( LP, SEND(KC_E);); + PJ( LH, SEND(KC_R);); + PJ( LK, SEND(KC_S);); + PJ( LW, SEND(KC_D);); + PJ( LR, SEND(KC_F);); + PJ( ST1, SEND(KC_T);); + PJ( ST2, SEND(KC_G);); + PJ( LA, SEND(KC_C);); + PJ( LO, SEND(KC_V);); + PJ( RE, SEND(KC_N);); + PJ( RU, SEND(KC_M);); + PJ( ST3, SEND(KC_Y);); + PJ( ST4, SEND(KC_H);); + PJ( RF, SEND(KC_U);); + PJ( RP, SEND(KC_I);); + PJ( RL, SEND(KC_O);); + PJ( RT, SEND(KC_P);); + PJ( RD, SEND(KC_LBRC);); + PJ( RR, SEND(KC_J);); + PJ( RB, SEND(KC_K);); + PJ( RG, SEND(KC_L);); + PJ( RS, SEND(KC_SCLN);); + PJ( RZ, SEND(KC_COMM);); + PJ( NUM, SEND(KC_1);); + + return false; +} +void clickMouse(uint8_t kc) { +#ifdef MOUSEKEY_ENABLE + mousekey_on(kc); + mousekey_send(); + + // Store state for later use + inMouse = true; + mousePress = kc; +#endif +} +void SEND(uint8_t kc) { + // Send Keycode, Does not work for Quantum Codes + if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) { + uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF); + CMDBUF[CMDLEN] = kc; + CMDLEN++; + } + + if (cMode != COMMAND) register_code(kc); + return; +} From c02c7b75171cf1038a249872806fc6ee926d79b8 Mon Sep 17 00:00:00 2001 From: Brendan Wrafter Date: Thu, 14 Mar 2019 17:18:11 -0400 Subject: [PATCH 324/445] Fix ascii art (#5407) --- docs/how_keyboards_work.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index cc54e566a1f1..0772f055d685 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -12,7 +12,7 @@ place: ``` text +------+ +-----+ +----------+ +----------+ +----+ | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | -+------+ +-----+ +----------+ +----------+ |----+ ++------+ +-----+ +----------+ +----------+ +----+ ``` This scheme is a very simple view of what's going on, and more details follow From 577e99f1954347380dcde6f7160d95c6a38677d5 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 14 Mar 2019 21:22:50 +0000 Subject: [PATCH 325/445] [Keyboard] Inital port of xd96 (#5401) * Initial import of xd96 based on xd84 code * Configure xd96 port expander mapping * Fix xd96 led count * Fix xd96 port expander reading * Fix xd96 port expander reading * Fix xd96 LAYOUT matrix mapping * Add additional links for xd96 Hardware Availability * Correct Configurator config Co-Authored-By: zvecr * Readme review comments Co-Authored-By: zvecr --- keyboards/xd96/config.h | 244 ++++++++++++++++++++ keyboards/xd96/custom_matrix_helper.c | 127 ++++++++++ keyboards/xd96/info.json | 17 ++ keyboards/xd96/keymaps/default/keymap.c | 38 +++ keyboards/xd96/keymaps/default_iso/keymap.c | 38 +++ keyboards/xd96/matrix.c | 96 ++++++++ keyboards/xd96/pca9555.c | 78 +++++++ keyboards/xd96/pca9555.h | 55 +++++ keyboards/xd96/readme.md | 22 ++ keyboards/xd96/rules.mk | 86 +++++++ keyboards/xd96/xd96.c | 34 +++ keyboards/xd96/xd96.h | 59 +++++ 12 files changed, 894 insertions(+) create mode 100644 keyboards/xd96/config.h create mode 100644 keyboards/xd96/custom_matrix_helper.c create mode 100644 keyboards/xd96/info.json create mode 100644 keyboards/xd96/keymaps/default/keymap.c create mode 100644 keyboards/xd96/keymaps/default_iso/keymap.c create mode 100644 keyboards/xd96/matrix.c create mode 100644 keyboards/xd96/pca9555.c create mode 100644 keyboards/xd96/pca9555.h create mode 100644 keyboards/xd96/readme.md create mode 100644 keyboards/xd96/rules.mk create mode 100644 keyboards/xd96/xd96.c create mode 100644 keyboards/xd96/xd96.h diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h new file mode 100644 index 000000000000..df21205f8d2a --- /dev/null +++ b/keyboards/xd96/config.h @@ -0,0 +1,244 @@ +/* Copyright 2019 + * + * 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 0x4096 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD96 +#define DESCRIPTION KPrepublic XD96 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * 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 { D0, D5 } +//#define MATRIX_COL_PINS { F1, F0, B0 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 10 +// #define BACKLIGHT_BREATHING + +#define RGB_DI_PIN C7 +#define RGBLED_NUM 16 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 50 +// #ifdef RGB_DI_PIN +// #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +// LTO options +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/xd96/custom_matrix_helper.c b/keyboards/xd96/custom_matrix_helper.c new file mode 100644 index 000000000000..a4c5b6afa547 --- /dev/null +++ b/keyboards/xd96/custom_matrix_helper.c @@ -0,0 +1,127 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +//_____COMMON__________________________________________________________________ +// user-defined overridable functions +__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) {} + + +//_____COULD BE COMMON_________________________________________________________ +/* matrix state(1:on, 0:off) */ +/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; +/*static*/ matrix_row_t matrix[MATRIX_ROWS]; + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +__attribute__ ((weak)) +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +__attribute__ ((weak)) +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +__attribute__ ((weak)) +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +__attribute__ ((weak)) +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +__attribute__ ((weak)) +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + + +//_____CUSTOM MATRIX 'LITE'____________________________________________________ +__attribute__ ((weak)) +void custom_matrix_init(void) { +} + +__attribute__ ((weak)) +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = true; + return changed; +} + +__attribute__ ((weak)) +void matrix_init(void) { + + custom_matrix_init(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +__attribute__ ((weak)) +uint8_t matrix_scan(void) { + bool changed = custom_matrix_scan(raw_matrix); + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/keyboards/xd96/info.json b/keyboards/xd96/info.json new file mode 100644 index 000000000000..f180682735f7 --- /dev/null +++ b/keyboards/xd96/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "xd96", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 6, + "layouts": { + "LAYOUT_96_ansi": { + "key_count": 99, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + }, + "LAYOUT_96_iso": { + "key_count": 100, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + } + } +} diff --git a/keyboards/xd96/keymaps/default/keymap.c b/keyboards/xd96/keymaps/default/keymap.c new file mode 100644 index 000000000000..45588f18c4b3 --- /dev/null +++ b/keyboards/xd96/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RALT LM(1, MOD_RALT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_HOME, KC_END, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, L1_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd96/keymaps/default_iso/keymap.c b/keyboards/xd96/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..cdd1f496798b --- /dev/null +++ b/keyboards/xd96/keymaps/default_iso/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RALT LM(1, MOD_RALT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_96_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_HOME, KC_END, 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_P7, KC_P8, KC_P9, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────├─────────├─────────├ ┤ */ + 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_P4, KC_P5, KC_P6, KC_PPLS, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_P1, KC_P2, KC_P3, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, L1_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_96_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd96/matrix.c b/keyboards/xd96/matrix.c new file mode 100644 index 000000000000..550dae4d02e8 --- /dev/null +++ b/keyboards/xd96/matrix.c @@ -0,0 +1,96 @@ +/* Copyright 2019 + * + * 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 +#include +#include "matrix.h" +#include "pca9555.h" +#include "quantum.h" + +#include "debug.h" + +// PCA9555 slave addresses +#define IC1 0x20 +#define IC2 0x21 + +//_____Utility funcs___________________________________________________________ + +static void init_pins(void) { + // init all cols high - IC2 all input + pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT);//same as initial state + pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT);//same as initial state + pca9555_set_config(IC1, PCA9555_PORT1, ALL_INPUT);//same as initial state + + // init all rows - IC1 port0 input + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT);//same as initial state +} + +static void select_row(uint8_t row) { + // For the XD96 all rows are on the same IC and port + // so its safe enough to assume here row == pin + uint8_t pin = row; + uint8_t mask = 1 << pin; + + pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH & (~mask)); + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT & (~mask)); +} + +static uint32_t read_cols(void) { + uint32_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0); + uint32_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1); + uint32_t state_3 = pca9555_readPins(IC1, PCA9555_PORT1); + + // For the XD96 the pins are mapped to port expanders as follows: + // all 8 pins port 0 IC2, first 6 pins port 1 IC2, first 4 pins port 1 IC1 + uint32_t state = (((state_3 & 0b00001111) << 14) | ((state_2 & 0b00111111) << 8) | state_1); + return (~state) & 0b111111111111111111; +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + current_matrix[current_row] = read_cols(); + + // No need to Unselect row as the next `select_row` will blank everything + + return (last_row_value != current_matrix[current_row]); +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void custom_matrix_init(void) { + pca9555_init(IC1); + pca9555_init(IC2); + + init_pins(); +} + +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + return changed; +} \ No newline at end of file diff --git a/keyboards/xd96/pca9555.c b/keyboards/xd96/pca9555.c new file mode 100644 index 000000000000..960df4f4e523 --- /dev/null +++ b/keyboards/xd96/pca9555.c @@ -0,0 +1,78 @@ +/* Copyright 2019 + * + * 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 "i2c_master.h" +#include "pca9555.h" + +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n<<1) +#define TIMEOUT 100 + +enum { + CMD_INPUT_0 = 0, + CMD_INPUT_1, + CMD_OUTPUT_0, + CMD_OUTPUT_1, + CMD_INVERSION_0, + CMD_INVERSION_1, + CMD_CONFIG_0, + CMD_CONFIG_1 +}; + +void pca9555_init(uint8_t slave_addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + + s_init=1; + } + + // TODO: could check device connected + //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); + //i2c_stop(); +} + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_config::FAILED\n"); + } +} + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_output::FAILED\n"); + } +} + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; + + uint8_t data = 0; + i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_readPins::FAILED\n"); + } + return data; +} diff --git a/keyboards/xd96/pca9555.h b/keyboards/xd96/pca9555.h new file mode 100644 index 000000000000..6aaee8a6f88a --- /dev/null +++ b/keyboards/xd96/pca9555.h @@ -0,0 +1,55 @@ +/* Copyright 2019 + * + * 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 + +/* + PCA9555 + ,----------. + SDA --| SDA P00 |-- P1 + SCL --| SCL P01 |-- P2 + INT --| INT P02 |-- P3 + | P03 |-- P4 + A0 --| A0 P04 |-- P5 + A1 --| A1 P05 |-- P6 + A2 --| A2 P06 |-- P7 + | P07 |-- P8 + | | + | P10 |-- P10 + | P11 |-- P11 + | P12 |-- P12 + | P13 |-- P13 + | P14 |-- P14 + | P15 |-- P15 + | P16 |-- P16 + | P17 |-- P17 + `----------' +*/ + +#define PCA9555_PORT0 0 +#define PCA9555_PORT1 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void pca9555_init(uint8_t slave_addr); + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file diff --git a/keyboards/xd96/readme.md b/keyboards/xd96/readme.md new file mode 100644 index 000000000000..237d7a05165f --- /dev/null +++ b/keyboards/xd96/readme.md @@ -0,0 +1,22 @@ +# XD96 + +![XD96](https://cdn.shopify.com/s/files/1/2711/4238/products/xd96_pcb_1024x1024.jpg?v=1515425370) + +Compact With 96 Keys & RGB LED Underglow +- Designed by Xiudi +- ISO and ANSI support +- Uses Kimera core + +Keyboard Maintainer: QMK Community +Hardware Supported: XD96 +Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd96-pcb-90-custom-mechanical-keyboard-supports-tkg-tools-underglow-rgb-programmed); [AliExpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) + +Make example for this keyboard (after setting up your build environment): + + make xd96:default + +Install examples: + + make xd96:default:dfu + +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/xd96/rules.mk b/keyboards/xd96/rules.mk new file mode 100644 index 000000000000..c9f804471291 --- /dev/null +++ b/keyboards/xd96/rules.mk @@ -0,0 +1,86 @@ +# 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 = 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 = lite # 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 +# 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # 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) + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c + +EXTRAFLAGS += -flto diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c new file mode 100644 index 000000000000..45cfb3b1f179 --- /dev/null +++ b/keyboards/xd96/xd96.c @@ -0,0 +1,34 @@ +/* Copyright 2019 + * + * 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 "xd96.h" + +#define CAPS_PIN B6 + +void keyboard_pre_init_kb(void) { + setPinOutput(CAPS_PIN); + + keyboard_pre_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(CAPS_PIN); + } else { + writePinHigh(CAPS_PIN); + } + + led_set_user(usb_led); +} diff --git a/keyboards/xd96/xd96.h b/keyboards/xd96/xd96.h new file mode 100644 index 000000000000..04c2cc46e2ea --- /dev/null +++ b/keyboards/xd96/xd96.h @@ -0,0 +1,59 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define ____ KC_NO + +/* 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_96_ansi( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K416, K417, K418, K419, \ + K501, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, \ + K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K419 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, K414, K416, K417, K418, ____ }, \ + { K501, ____, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ +} + +#define LAYOUT_96_iso( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K316, K317, K318, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, \ + K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, K316, K317, K318, K419 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, ____ }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ +} From c025d813baf7ca1dcd427b293b36603339ac31f7 Mon Sep 17 00:00:00 2001 From: ginjake Date: Fri, 15 Mar 2019 07:54:16 +0900 Subject: [PATCH 326/445] [Keyboard] new keyboard lovelive9 (#5266) * new keyboard lovelive9 * Update keyboards/lovelive9/config.h thank you Co-Authored-By: ginjake * Apply suggestions from code review Co-Authored-By: ginjake * fix review * fix readme * move handwired * Update keyboards/handwired/lovelive9/keymaps/default/keymap.c thanks Co-Authored-By: ginjake * Apply suggestions from code review commit suggestion Co-Authored-By: ginjake * fix spell miss * fix review * fix col and row * fix layout define --- keyboards/handwired/lovelive9/config.h | 39 ++ keyboards/handwired/lovelive9/info.json | 12 + .../lovelive9/keymaps/default/keymap.c | 338 ++++++++++++++++++ keyboards/handwired/lovelive9/lovelive9.c | 7 + keyboards/handwired/lovelive9/lovelive9.h | 9 + keyboards/handwired/lovelive9/readme.md | 14 + keyboards/handwired/lovelive9/rules.mk | 67 ++++ 7 files changed, 486 insertions(+) create mode 100644 keyboards/handwired/lovelive9/config.h create mode 100644 keyboards/handwired/lovelive9/info.json create mode 100644 keyboards/handwired/lovelive9/keymaps/default/keymap.c create mode 100644 keyboards/handwired/lovelive9/lovelive9.c create mode 100644 keyboards/handwired/lovelive9/lovelive9.h create mode 100644 keyboards/handwired/lovelive9/readme.md create mode 100644 keyboards/handwired/lovelive9/rules.mk diff --git a/keyboards/handwired/lovelive9/config.h b/keyboards/handwired/lovelive9/config.h new file mode 100644 index 000000000000..c11a25df6006 --- /dev/null +++ b/keyboards/handwired/lovelive9/config.h @@ -0,0 +1,39 @@ + + +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER numazu Keyboards +#define PRODUCT lovelive9 +#define DESCRIPTION lovelive sunshine Keyboards 9Key + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 9 + +/* default pin-out */ +#define MATRIX_ROW_PINS { NO_PIN } +#define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 } + +#define UNUSED_PINS + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 9 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define BACKLIGHT_LEVELS 5 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +#define BREATHING_PERIOD 2 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define USB_MAX_POWER_CONSUMPTION 400 + +#define TAPPING_TERM 200 diff --git a/keyboards/handwired/lovelive9/info.json b/keyboards/handwired/lovelive9/info.json new file mode 100644 index 000000000000..4f81d321d9e9 --- /dev/null +++ b/keyboards/handwired/lovelive9/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "lovelive9", + "url": "https://github.com/ginjake", + "maintainer": "ginjake", + "width": 9, + "height": 1, + "layouts": { + "LAYOUT": { + "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":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}] + } + } +} diff --git a/keyboards/handwired/lovelive9/keymaps/default/keymap.c b/keyboards/handwired/lovelive9/keymaps/default/keymap.c new file mode 100644 index 000000000000..605f722f444e --- /dev/null +++ b/keyboards/handwired/lovelive9/keymaps/default/keymap.c @@ -0,0 +1,338 @@ +#include QMK_KEYBOARD_H + +//#include "v1.h" + +//Following line allows macro to read current RGB settings + +rgblight_config_t RGB_current_config; + +#define KC_KANJI KC_GRV + + +enum Layer +{ + _QWERTY, + _DIA, + _YOU, + _CHIKA, + _ZURA, + _RUBY, + _YOHANE, + _RIKO, + _MARI, + _KANAN, + _RUBY_SUB1, + _RUBY_SUB2, + _RUBY_SUB3, + _SCHOOL_IDOL_FESTIVAL +}; + +#define SEND_DIA 100 +#define SEND_YOU 101 +#define SEND_CHIKA 102 +#define SEND_ZURA 103 +#define SEND_RUBY 104 +#define SEND_YOHANE 105 +#define SEND_RIKO 106 +#define SEND_MARI 107 +#define SEND_KANAN 108 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DIA, + YOU, + CHIKA, + ZURA, + RUBY, + RUBY_SUB1, + RUBY_SUB2, + RUBY_SUB3, + YOHANE, + RIKO, + MARI, + KANAN, + TO_SCHOOL_IDOL_FESTIVAL, + RETURN_SCHOOL_IDOL_FESTIVAL +}; + + +int long_tap_timer; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + DIA, YOU, CHIKA, ZURA, RUBY, YOHANE, RIKO, MARI, KANAN + ), + [_DIA] = LAYOUT( + DIA, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_LSFT + ), + + [_YOU] = LAYOUT( + KC_H, YOU, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_LSFT + ), + + [_CHIKA] = LAYOUT( + KC_O, KC_P, CHIKA, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_LSFT + ), + + [_ZURA] = LAYOUT( + KC_V, KC_W, KC_X, ZURA, KC_Y, KC_Z, KC_M, KC_N, KC_LSFT + ), + + //推しをたくさん押せるようにルビーちゃんには複数のレイヤー設定 + [_RUBY] = LAYOUT( + KC_CIRC, KC_LPRN, KC_QUOT, RUBY_SUB1, RUBY, RUBY_SUB2, KC_LCBR, KC_EXLM, KC_LSFT + ), + [_RUBY_SUB1] = LAYOUT( + KC_RCBR, KC_AT, KC_PIPE, RUBY_SUB1, RUBY, RUBY_SUB2, KC_HASH, KC_EQL, KC_LSFT + ), + [_RUBY_SUB2] = LAYOUT( + KC_TILD, KC_DLR, KC_LBRC, RUBY_SUB1, RUBY, RUBY_SUB2, KC_PERC, KC_RBRC, KC_LSFT + ), + [_RUBY_SUB3] = LAYOUT( + TO_SCHOOL_IDOL_FESTIVAL, KC_DLR, KC_LBRC, RUBY_SUB1, RUBY, RUBY_SUB2, KC_PERC, KC_RBRC, RETURN_SCHOOL_IDOL_FESTIVAL + ), + + [_YOHANE] = LAYOUT( + KC_0, KC_1, KC_2, KC_3, KC_4, YOHANE, KC_5, KC_6, KC_LSFT + ), + + [_RIKO] = LAYOUT( + KC_7, KC_8, KC_9, KC_PLUS, KC_MINS, KC_ASTR, RIKO, KC_SLSH, KC_LSFT + ), + + [_MARI] = LAYOUT( + KC_TAB, KC_DEL, KC_COMM, KC_SPC, KC_ENT, KC_BSPC, KC_DOT, MARI, KC_LSFT + ), + + [_KANAN] = LAYOUT( + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, KC_BSPC, KC_AMPR, KC_KANJI, KANAN + ), + [_SCHOOL_IDOL_FESTIVAL] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9 + ), +}; + +void check_tap_and_send_key(int MEMBER) { + if (long_tap_timer < 500) { + switch (MEMBER) { + case SEND_DIA: + SEND_STRING("KUROSAWA DIA"); + break; + case SEND_YOU: + SEND_STRING("WATANABE YOU"); + break; + case SEND_CHIKA: + SEND_STRING("TAKAMI CHIKA"); + break; + case SEND_ZURA: + SEND_STRING("KUNIKIDA HANAMARU"); + break; + case SEND_RUBY: + SEND_STRING("KUROSAWA RUBY"); + break; + case SEND_YOHANE: + SEND_STRING("TSUSHIMA YOSHIKO"); + break; + case SEND_RIKO: + SEND_STRING("SAKURAUCHI RIKO"); + break; + case SEND_MARI: + SEND_STRING("OHARA MARI"); + break; + case SEND_KANAN: + SEND_STRING("MATSUURA KANAN"); + break; + } + } + long_tap_timer = 0; +} + +int aqours_color_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322}; +int aqours_color_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255}; +int aqours_color_v[] = {255, 255, 255, 255, 255, 255, 200, 255, 255}; + +void LED_default_set(void) { + + sethsv(aqours_color_h[2], aqours_color_s[2], aqours_color_v[2], (LED_TYPE *)&led[0]); + sethsv(aqours_color_h[7], aqours_color_s[7], aqours_color_v[7], (LED_TYPE *)&led[1]); + sethsv(aqours_color_h[1], aqours_color_s[1], aqours_color_v[1], (LED_TYPE *)&led[2]); + sethsv(aqours_color_h[5], aqours_color_s[5], aqours_color_v[5], (LED_TYPE *)&led[3]); + sethsv(aqours_color_h[8], aqours_color_s[8], aqours_color_v[8], (LED_TYPE *)&led[4]); + sethsv(aqours_color_h[6], aqours_color_s[6], aqours_color_v[6], (LED_TYPE *)&led[5]); + sethsv(aqours_color_h[0], aqours_color_s[0], aqours_color_v[0], (LED_TYPE *)&led[6]); + sethsv(aqours_color_h[4], aqours_color_s[4], aqours_color_v[4], (LED_TYPE *)&led[7]); + sethsv(aqours_color_h[3], aqours_color_s[3], aqours_color_v[3], (LED_TYPE *)&led[8]); + + rgblight_set(); + +} + + +void LED_layer_set(int aqours_index) { + for (int c = 0; c < 9; c++) { + sethsv(aqours_color_h[aqours_index], aqours_color_s[aqours_index], aqours_color_v[aqours_index], (LED_TYPE *)&led[c]); + } + rgblight_set(); +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + case DIA: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_DIA); + LED_layer_set(3); + } else { + check_tap_and_send_key(SEND_DIA); + layer_off(_DIA); + LED_default_set(); + } + break; + + case YOU: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_YOU); + LED_layer_set(4); + } else { + check_tap_and_send_key(SEND_YOU); + layer_off(_YOU); + LED_default_set(); + } + break; + + case CHIKA: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_CHIKA); + LED_layer_set(0); + } else { + check_tap_and_send_key(SEND_CHIKA); + layer_off(_CHIKA); + LED_default_set(); + } + break; + + case ZURA: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_ZURA); + LED_layer_set(6); + } else { + check_tap_and_send_key(SEND_ZURA); + layer_off(_ZURA); + LED_default_set(); + } + break; + + case RUBY: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_RUBY); + LED_layer_set(8); + } else { + check_tap_and_send_key(SEND_RUBY); + layer_off(_RUBY); + LED_default_set(); + } + break; + case RUBY_SUB1: + if (record->event.pressed) { + layer_on(_RUBY_SUB1); + if (IS_LAYER_ON(_RUBY_SUB1) && IS_LAYER_ON(_RUBY_SUB2)) { + layer_on(_RUBY_SUB3); + } else { + layer_off(_RUBY_SUB3); + } + } else { + layer_off(_RUBY_SUB1); + } + break; + case RUBY_SUB2: + if (record->event.pressed) { + layer_on(_RUBY_SUB2); + if (IS_LAYER_ON(_RUBY_SUB1) && IS_LAYER_ON(_RUBY_SUB2)) { + layer_on(_RUBY_SUB3); + } else { + layer_off(_RUBY_SUB3); + } + } else { + layer_off(_RUBY_SUB2); + } + break; + + case YOHANE: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_YOHANE); + LED_layer_set(5); + } else { + check_tap_and_send_key(SEND_YOHANE); + layer_off(_YOHANE); + LED_default_set(); + } + break; + + case RIKO: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_RIKO); + LED_layer_set(1); + } else { + check_tap_and_send_key(SEND_RIKO); + layer_off(_RIKO); + LED_default_set(); + } + break; + + case MARI: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_MARI); + LED_layer_set(7); + } else { + check_tap_and_send_key(SEND_MARI); + layer_off(_MARI); + LED_default_set(); + } + break; + + case KANAN: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_KANAN); + LED_layer_set(2); + } else { + check_tap_and_send_key(SEND_KANAN); + layer_off(_KANAN); + LED_default_set(); + } + break; + + case TO_SCHOOL_IDOL_FESTIVAL: + if (record->event.pressed) { + LED_default_set(); + layer_on(_SCHOOL_IDOL_FESTIVAL); + } + break; + case RETURN_SCHOOL_IDOL_FESTIVAL: + if (record->event.pressed) { + layer_off(_SCHOOL_IDOL_FESTIVAL); + } + break; + } + + return true; +} + + +void matrix_scan_user(void) { + + if (long_tap_timer > 0) { + long_tap_timer++; + } +} diff --git a/keyboards/handwired/lovelive9/lovelive9.c b/keyboards/handwired/lovelive9/lovelive9.c new file mode 100644 index 000000000000..1ec8ae0527ca --- /dev/null +++ b/keyboards/handwired/lovelive9/lovelive9.c @@ -0,0 +1,7 @@ +#include "lovelive9.h" + + + +void matrix_init_kb(void) { + matrix_init_user(); +} diff --git a/keyboards/handwired/lovelive9/lovelive9.h b/keyboards/handwired/lovelive9/lovelive9.h new file mode 100644 index 000000000000..f6fb1f94cc09 --- /dev/null +++ b/keyboards/handwired/lovelive9/lovelive9.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 } \ +} diff --git a/keyboards/handwired/lovelive9/readme.md b/keyboards/handwired/lovelive9/readme.md new file mode 100644 index 000000000000..2046472773c3 --- /dev/null +++ b/keyboards/handwired/lovelive9/readme.md @@ -0,0 +1,14 @@ +# lovelive9 + +lovelive9 is 9keys keyboard. + +![lovelive9](https://user-images.githubusercontent.com/16838187/53496102-a6fc0700-3ae4-11e9-85e4-1e6cd981b410.jpg) + +Keyboard Maintainer: [ginjake](https://github.com/ginjake) [Twitter:@sirojake](https://twitter.com/sirojake) +Hardware Supported: Pro Micro, handwired (LED used [CherryMXLEDBitBoard](https://github.com/swanmatch/MxLEDBitPCB) with handwired) + +Make example for this keyboard (after setting up your build environment): + + make handwired/lovelive9: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/#/n diff --git a/keyboards/handwired/lovelive9/rules.mk b/keyboards/handwired/lovelive9/rules.mk new file mode 100644 index 000000000000..99a531a63843 --- /dev/null +++ b/keyboards/handwired/lovelive9/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +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 + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = caterina + +# 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 = 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 +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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From 205ffc277c1b6cb25d11f0938d4df02048870fa5 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 14 Mar 2019 22:55:08 +0000 Subject: [PATCH 327/445] Align use of atmega32a program script (#5259) * Remove duplicate 'program' files and refactor to use atmega32a_program.py * Update readme references from 'program' to 'atmega32a_program.py' --- keyboards/alice/program | 106 ---------------------------- keyboards/alice/rules.mk | 2 +- keyboards/jj40/README.md | 2 +- keyboards/jj4x4/README.md | 2 +- keyboards/jj50/README.md | 2 +- keyboards/jj50/program | 74 ------------------- keyboards/jj50/rules.mk | 2 +- keyboards/mechmini/v1/README.md | 2 +- keyboards/mehkee96/program | 105 --------------------------- keyboards/mehkee96/rules.mk | 2 +- keyboards/ps2avrGB/README.md | 2 +- keyboards/ps2avrGB/program | 105 --------------------------- keyboards/ps2avrGB/rules.mk | 2 +- keyboards/winkeyless/bface/program | 105 --------------------------- keyboards/winkeyless/bface/rules.mk | 2 +- keyboards/ymd75/README.md | 2 +- keyboards/ymd75/program | 74 ------------------- keyboards/ymd75/rules.mk | 2 +- keyboards/ymd96/program | 74 ------------------- 19 files changed, 12 insertions(+), 655 deletions(-) delete mode 100755 keyboards/alice/program delete mode 100644 keyboards/jj50/program delete mode 100644 keyboards/mehkee96/program delete mode 100755 keyboards/ps2avrGB/program delete mode 100755 keyboards/winkeyless/bface/program delete mode 100644 keyboards/ymd75/program delete mode 100644 keyboards/ymd96/program diff --git a/keyboards/alice/program b/keyboards/alice/program deleted file mode 100755 index 3779bad040aa..000000000000 --- a/keyboards/alice/program +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - printDeviceInfo(kb) - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/alice/rules.mk b/keyboards/alice/rules.mk index bb57cbeae304..eecd38d7e760 100644 --- a/keyboards/alice/rules.mk +++ b/keyboards/alice/rules.mk @@ -45,4 +45,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 SRC += i2c_master.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md index ed1ea90fe7c4..7d3612554bc7 100644 --- a/keyboards/jj40/README.md +++ b/keyboards/jj40/README.md @@ -36,7 +36,7 @@ $ make $ sudo cp bootloadHID /usr/bin ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `././util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/README.md index 09684bd82563..29dc2605de05 100644 --- a/keyboards/jj4x4/README.md +++ b/keyboards/jj4x4/README.md @@ -36,7 +36,7 @@ $ make $ sudo cp bootloadHID /usr/bin ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md index 397889535e52..f7b8acc641b2 100644 --- a/keyboards/jj50/README.md +++ b/keyboards/jj50/README.md @@ -37,7 +37,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `././util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/jj50/program b/keyboards/jj50/program deleted file mode 100644 index a88d9cd9b042..000000000000 --- a/keyboards/jj50/program +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -print('Searching for ps2avrGB... ', end='') - -dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) -if dev is None: - raise ValueError('Device not found') - -print('Found', end='\n\n') - -print('Device Information:') -print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) -print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) -print('Manufacturer: %s' % (dev.iManufacturer)) -print('Serial: %s' % (dev.iSerialNumber)) -print('Product: %s' % (dev.iProduct), end='\n\n') - -print('Transferring control to bootloader... ', end='') - -dev.set_configuration() - -request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - -USBRQ_HID_SET_REPORT = 0x09 -HID_REPORT_OPTION = 0x0301 - - -try: - dev.ctrl_transfer( - request_type, - USBRQ_HID_SET_REPORT, - HID_REPORT_OPTION, - 0, - [0, 0, 0xFF] + [0] * 5 - ) -except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - -# wait a bit until bootloader starts up -time.sleep(2) - -print('OK') -print('Programming...') -if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: - print('\nDone!') diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 1a18ec4fe4fa..4ee5719185ea 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -58,6 +58,6 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex LAYOUTS = ortho_5x12 diff --git a/keyboards/mechmini/v1/README.md b/keyboards/mechmini/v1/README.md index b4a1924c4f72..315349803a09 100644 --- a/keyboards/mechmini/v1/README.md +++ b/keyboards/mechmini/v1/README.md @@ -29,7 +29,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/mehkee96/program b/keyboards/mehkee96/program deleted file mode 100644 index b777b911066b..000000000000 --- a/keyboards/mehkee96/program +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index e6e7d4a58833..f7fb397e2594 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -32,4 +32,4 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c # programming options -PROGRAM_CMD = ./keyboards/mehkee96/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md index 8399dff029ee..8a558b158676 100644 --- a/keyboards/ps2avrGB/README.md +++ b/keyboards/ps2avrGB/README.md @@ -30,7 +30,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program deleted file mode 100755 index b777b911066b..000000000000 --- a/keyboards/ps2avrGB/program +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk index 1be9edc24f88..95d287f7f419 100644 --- a/keyboards/ps2avrGB/rules.mk +++ b/keyboards/ps2avrGB/rules.mk @@ -47,4 +47,4 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/winkeyless/bface/program b/keyboards/winkeyless/bface/program deleted file mode 100755 index 298e645477de..000000000000 --- a/keyboards/winkeyless/bface/program +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk index 10331ef70022..369ccf2edac8 100644 --- a/keyboards/winkeyless/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -44,5 +44,5 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight_ps2avrGB.c # programming options -PROGRAM_CMD = ./keyboards/winkeyless/bface/program .build/$(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md index eed6ce13eed7..d1c4e95ae7b7 100644 --- a/keyboards/ymd75/README.md +++ b/keyboards/ymd75/README.md @@ -37,7 +37,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/ymd75/program b/keyboards/ymd75/program deleted file mode 100644 index a88d9cd9b042..000000000000 --- a/keyboards/ymd75/program +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -print('Searching for ps2avrGB... ', end='') - -dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) -if dev is None: - raise ValueError('Device not found') - -print('Found', end='\n\n') - -print('Device Information:') -print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) -print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) -print('Manufacturer: %s' % (dev.iManufacturer)) -print('Serial: %s' % (dev.iSerialNumber)) -print('Product: %s' % (dev.iProduct), end='\n\n') - -print('Transferring control to bootloader... ', end='') - -dev.set_configuration() - -request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - -USBRQ_HID_SET_REPORT = 0x09 -HID_REPORT_OPTION = 0x0301 - - -try: - dev.ctrl_transfer( - request_type, - USBRQ_HID_SET_REPORT, - HID_REPORT_OPTION, - 0, - [0, 0, 0xFF] + [0] * 5 - ) -except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - -# wait a bit until bootloader starts up -time.sleep(2) - -print('OK') -print('Programming...') -if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: - print('\nDone!') diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 9697a76f1e86..9d09d3da94b8 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -59,4 +59,4 @@ SRC = matrix.c i2c.c backlight.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ymd96/program b/keyboards/ymd96/program deleted file mode 100644 index a88d9cd9b042..000000000000 --- a/keyboards/ymd96/program +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -print('Searching for ps2avrGB... ', end='') - -dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) -if dev is None: - raise ValueError('Device not found') - -print('Found', end='\n\n') - -print('Device Information:') -print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) -print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) -print('Manufacturer: %s' % (dev.iManufacturer)) -print('Serial: %s' % (dev.iSerialNumber)) -print('Product: %s' % (dev.iProduct), end='\n\n') - -print('Transferring control to bootloader... ', end='') - -dev.set_configuration() - -request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - -USBRQ_HID_SET_REPORT = 0x09 -HID_REPORT_OPTION = 0x0301 - - -try: - dev.ctrl_transfer( - request_type, - USBRQ_HID_SET_REPORT, - HID_REPORT_OPTION, - 0, - [0, 0, 0xFF] + [0] * 5 - ) -except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - -# wait a bit until bootloader starts up -time.sleep(2) - -print('OK') -print('Programming...') -if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: - print('\nDone!') From 41584c3384c92ffe37270b11fe352f9159283ec1 Mon Sep 17 00:00:00 2001 From: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Fri, 15 Mar 2019 00:09:35 -0400 Subject: [PATCH 328/445] [Keymap] Added Boy_314's layout for half n half keyboard (#5373) * added Boy_.314's layout for halfnhalf keyboard * reset rules.mk to default * update keymap with qwerty layout, and enable tap dancing * fixed formatting in layout visualization * added rules.mk to custom layout * added mod tap for ctrl/capslock * fixed typo in config.h, remove excess in rules.mk, revert half_n_half rules.mk --- .../half_n_half/keymaps/Boy_314/config.h | 22 +++ .../half_n_half/keymaps/Boy_314/keymap.c | 141 ++++++++++++++++++ .../half_n_half/keymaps/Boy_314/readme.md | 2 + .../half_n_half/keymaps/Boy_314/rules.mk | 5 + 4 files changed, 170 insertions(+) create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h new file mode 100644 index 000000000000..ae39290bcf20 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Boy_314 + * + * 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 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c new file mode 100644 index 000000000000..fa12e7ee0cd4 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c @@ -0,0 +1,141 @@ +/* Copyright 2019 Boy_314 + * + * 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 + +// Tap Dance Declarations +enum { + TD_SWAP_LAYERS = 0 +}; + +enum layers { + DVORAK, + QWERTY, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* DVORAK + * ,-------------------------------------------------------------------------------------------------. + * |Tab |' |, |. |P |Y |Brght+|= |F |G |C |R |L |Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |CtlCps|A |O |E |U |I |Brght-|Ctrl+F|D |H |T |N |S |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LShift|; |Q |J |K |X |LAlt |- |B |M |W |V |Z |RShift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |TD Swap Layer| |Space | + * `-------------' `-------------' + */ + [DVORAK] = LAYOUT(/* Base Dvorak */ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC + ), + + /* QWERTY + * ,-------------------------------------------------------------------------------------------------. + * |Tab |Q |W |E |R |T |Brght+|' |Y |U |I |O |P |Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LCtrl |A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LShift|Z |X |C |V |B |LAlt |- |N |M |, |. |/ |RShift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |TD Swap Layer| |Space | + * `-------------' `-------------' + */ + [QWERTY] = LAYOUT(/* Base Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, 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_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC + ), + + /* LOWER + * ,-------------------------------------------------------------------------------------------------. + * |Esc |1 |2 |3 |4 |5 | |= |6 |7 |8 |9 |0 |/ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Caps |F1 |F2 |F3 |F4 |F5 |F6 |Vol Up|Play |_ |+ |{ |} || | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |F7 |F8 |F9 |F10 |F11 |F12 |Vol Dn|Next |Home |PgDn |PgUp |End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + * `-------------' `-------------' + */ + [LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MNXT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS + ), + + /* RAISE + * ,-------------------------------------------------------------------------------------------------. + * |Reset | | |Up | | | | | | | | | |Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |` | |Left |Down |Right | | | | |- |= |[ |] |\ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |! |@ |# |$ |% | | |^ |& |* |( |) | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + * `-------------' `-------------' + */ + [RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Reset Key */ + RESET, 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_DEL, + KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_TRNS + ) +}; + +void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + layer_on(LOWER); + break; + case 2: + layer_on(RAISE); + break; + } +} + +void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + layer_off(LOWER); + break; + case 2: + layer_off(RAISE); + break; + case 3: + if (default_layer_state == DVORAK) { + default_layer_set(QWERTY); + layer_on(QWERTY); + layer_off(DVORAK); + } + else if (default_layer_state == QWERTY) { + default_layer_set(DVORAK); + layer_on(DVORAK); + layer_off(QWERTY); + } + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + // ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn) + [TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset) +}; \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md new file mode 100644 index 000000000000..9eff08b5ea43 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md @@ -0,0 +1,2 @@ +# Boy_314's keymap for half_n_half +# Currently only supports DVORAK. QWERTY Support is on the TODO list. \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk new file mode 100644 index 000000000000..59c7ccf82752 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk @@ -0,0 +1,5 @@ +TAP_DANCE_ENABLE = yes # Enable Tap Dance +NKRO_ENABLE = yes # USB Nkey Rollover + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes \ No newline at end of file From b85e2eef9a44dac2e8d1119199238fd6c225586a Mon Sep 17 00:00:00 2001 From: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Thu, 14 Mar 2019 23:13:24 -0700 Subject: [PATCH 329/445] [Keymap] Greenshadowmaker keymap for ergodash (#5403) * My Inital Keymap, adjusted for not removing outer keys, and using large inner key * First working version of keymap * RGB investigate * Updated Keymap, added keyboard-layout-editor.com json file * minor fix * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Ah! Thanks fort the clarification, it was a blind copy/paste Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * removed persistent_default_layer_set and the QWERTY section as suggested --- .../rev2/keymaps/greenshadowmaker/config.h | 41 ++ .../keyboard-layout-editor.json | 460 ++++++++++++++++++ .../rev2/keymaps/greenshadowmaker/keymap.c | 136 ++++++ .../rev2/keymaps/greenshadowmaker/rules.mk | 3 + 4 files changed, 640 insertions(+) create mode 100644 keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h create mode 100644 keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json create mode 100644 keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c create mode 100644 keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h new file mode 100644 index 000000000000..8ace28f240a6 --- /dev/null +++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h @@ -0,0 +1,41 @@ +/* +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 . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json new file mode 100644 index 000000000000..8f8d30855384 --- /dev/null +++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json @@ -0,0 +1,460 @@ +[ + { + "name": "gsm-ErgoDash", + "notes": "Front Legend = \"Adust\" layer (both lower and Raise)\n\n\nLayout Positions are an aproximation and not exact" + }, + [ + { + "x": 3, + "t": "#0000ff\n#ff0000" + }, + "\nF3\n\n\n\n\n\n\n\n3 #", + { + "x": 11 + }, + "\nF8\n\n\n\n\n\n\n\n8 *" + ], + [ + { + "y": -0.875, + "x": 2 + }, + "\nF2\n\n\n\n\n\n\n\n2 @", + { + "x": 1 + }, + "\nF4\n\n\n\n\n\n\n\n4 $", + { + "x": 9 + }, + "\nF7\n\n\n\n\n\n\n\n7 &", + { + "x": 1 + }, + "\nF9\n\n\n\n\n\n\n\n9 (" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "\nF5\n\n\n\n\n\n\n\n5 %", + { + "x": 7 + }, + "\nF6\n\n\n\n\n\n\n\n6 &" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 3 + }, + "Esc\n\n\n\nreset", + { + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nF1\n\n\n\n\n\n\n\n1 !", + { + "x": 15 + }, + "\nF10\n\n\n\n\n\n\n\n0 )", + { + "t": "#000000", + "a": 7, + "fa": [ + 2 + ] + }, + "Bksp" + ], + [ + { + "y": -0.625, + "x": 6, + "f": 3 + }, + "= +", + { + "x": 5, + "f": 3 + }, + "- _" + ], + [ + { + "y": -0.75, + "x": 3, + "f": 3 + }, + "E", + { + "x": 11, + "f": 3 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2, + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 4, + "f": 3 + }, + "PgUP\nUP\n\n\n\n\n\n\n\nW", + { + "x": 1, + "t": "#000000", + "a": 3, + "f": 3 + }, + "R\n\n\n\nrgb_tog", + { + "x": 9, + "a": 7, + "f": 3 + }, + "U", + { + "x": 1, + "f": 3 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5, + "a": 3, + "f": 3 + }, + "T\n\n\n\nbl_tog", + { + "x": 7, + "a": 7, + "f": 3 + }, + "Y" + ], + [ + { + "y": -0.875, + "f": 3 + }, + "Tab", + { + "f": 3 + }, + "Q", + { + "x": 15, + "f": 3 + }, + "P", + { + "f": 3 + }, + "] }" + ], + [ + { + "y": -0.625, + "x": 6 + }, + "", + { + "x": 5, + "f": 3 + }, + "[ {" + ], + [ + { + "y": -0.75, + "x": 3, + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 0, + "f": 3 + }, + "End\nRIGHT\n\n\nrgb_sai\n\n\n\n\nD", + { + "x": 11, + "t": "#000000", + "a": 7, + "f": 3 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2, + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 0, + "f": 3 + }, + "PgDwn\nDOWN\n\n\nrgb_hai\n\n\n\n\nS", + { + "x": 1, + "t": "#000000", + "a": 3, + "f": 3 + }, + "F\n\n\n\nrgb_val", + { + "x": 9, + "a": 7, + "f": 3 + }, + "J", + { + "x": 1, + "f": 3 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5, + "a": 3, + "f": 3 + }, + "G\n\n\n\nbl_inc", + { + "x": 7, + "a": 7, + "f": 3 + }, + "H" + ], + [ + { + "y": -0.875, + "c": "#0000ff", + "t": "#ffffffff", + "f": 3 + }, + "Raise", + { + "c": "#cccccc", + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 4, + "f": 3 + }, + "Home\nLEFT\n\n\n\n\n\n\n\nA", + { + "x": 15, + "t": "#000000", + "a": 7, + "f": 3 + }, + ": ;", + { + "f": 3 + }, + "' \"" + ], + [ + { + "y": -0.625, + "x": 6 + }, + "", + { + "x": 5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3, + "a": 3, + "f": 3 + }, + "C\n\n\n\nrgb_sad", + { + "x": 11, + "a": 7, + "f": 3 + }, + ", <" + ], + [ + { + "y": -0.875, + "x": 2, + "a": 3, + "f": 3 + }, + "X\n\n\n\nrgb_sad", + { + "x": 1, + "f": 3 + }, + "V\n\n\n\nrgb_vad", + { + "x": 9, + "a": 7, + "f": 3 + }, + "M", + { + "x": 1, + "f": 3 + }, + ". >" + ], + [ + { + "y": -0.875, + "x": 5, + "a": 3, + "f": 3 + }, + "B\n\n\n\nbl_dec", + { + "x": 7, + "a": 7, + "f": 3 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 3, + "f": 3 + }, + "Shift\n\n\n\neep_rst", + { + "a": 7, + "f": 3 + }, + "Z", + { + "x": 15, + "f": 3 + }, + "/ ?", + { + "f": 3 + }, + "Shift" + ], + [ + { + "y": -0.25, + "x": 2, + "f": 3 + }, + "Alt", + { + "x": 13, + "f": 3 + }, + "DOWN" + ], + [ + { + "y": -0.9749999999999996, + "x": 3.5, + "f": 3 + }, + "Ctrl", + { + "x": 10.15, + "f": 3 + }, + "LEFT" + ], + [ + { + "y": -0.7750000000000004, + "f": 3 + }, + "`~", + { + "f": 3 + }, + "\\|", + { + "x": 15, + "f": 3 + }, + "UP", + { + "f": 3 + }, + "RIGHT" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -0.25, + "x": -0.2999999999999998, + "c": "#eb7c15", + "f": 3, + "h": 2 + }, + "Space", + { + "c": "#cccccc", + "f": 3 + }, + "Del" + ], + [ + { + "x": -1.2999999999999998, + "c": "#ff0000", + "f": 3 + }, + "Lower", + { + "x": 1, + "c": "#cccccc", + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nApp\n\n\n\n\n\n\n\nOS" + ], + [ + { + "r": -30, + "rx": 13, + "y": -0.5, + "x": -2, + "t": "#000000", + "a": 7, + "f": 3 + }, + "PrtScr", + { + "c": "#eb7c15", + "f": 3, + "h": 2 + }, + "Space" + ], + [ + { + "x": -2, + "c": "#cccccc", + "f": 3 + }, + "Enter", + { + "x": 1, + "c": "#0000ff", + "t": "#ffffff", + "f": 3 + }, + "Raise" + ] +] \ No newline at end of file diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c new file mode 100644 index 000000000000..7a7985f75fc8 --- /dev/null +++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c @@ -0,0 +1,136 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,----------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | = | | - | 6 | 7 | 8 | 9 | 0 |Backsp| + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| A | S | D | F | G | | | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B |||||||| Del | | |||||||| N | M | , | . | / | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | ` | \ | ALt | Ctrl |||||||| Lower| Space| LGui|||||||| Enter| Space| Raise|||||||| Left | Down | Up | Right| + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \ + RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, 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_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,----------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| Left | Down | Rght | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| | | | | |||||||| | | |||||||| | | | | | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| Lower| Space| |||||||| | Space| Raise|||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_LOWER] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + /* Raise + * ,----------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | PgUp | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| Home | PgDwn| End | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| | | | | |||||||| | | |||||||| | | | | | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| Lower| Space| |||||||| |Space | Raise|||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_RAISE] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + /* Adjust (Both Raise and Lower Together) + * ,----------------------------------------------------------------------------------------------------------------------. + * | Reset| | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | | |rgbtog|bl_tog| | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| |rgbhui|rgbsai|rgbvai|bl_inc| | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + *|EEP_RST| |rgbhud|rgbdec|rgbvad|bl_dec|||||||| | | |||||||| | | | | | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| Lower| Space| |||||||| | Space| Raise|||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_ADJUST] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + 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/ergodash/rev2/keymaps/greenshadowmaker/rules.mk b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk new file mode 100644 index 000000000000..11b62b9bffeb --- /dev/null +++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no From e0a03bfa6c148da2936b27a2285f1928c5574ac0 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 15 Mar 2019 15:55:07 +0000 Subject: [PATCH 330/445] Fix return value of i2c_readReg and i2c_receive (#5410) --- drivers/avr/i2c_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c index d97a35cd6b09..0db949db4aba 100755 --- a/drivers/avr/i2c_master.c +++ b/drivers/avr/i2c_master.c @@ -140,7 +140,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 i2c_stop(); - return status; + return (status < 0) ? status : I2C_STATUS_SUCCESS; } i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { @@ -188,7 +188,7 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 error: i2c_stop(); - return status; + return (status < 0) ? status : I2C_STATUS_SUCCESS; } void i2c_stop(void) { From 493fbb3dc1423e0d42e57a6dc7ba38b880b37eb5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 15 Mar 2019 08:57:44 -0700 Subject: [PATCH 331/445] [Keymap] Update to drashna keymaps: Conform to QMK Standards Edition (#5377) * Use correct functions for dip switch code * Some planck cleanup * Hopefully fix RGB Sleeping with RGB Matrix * Add rgbmatrix extern * Add numpad 5x6 layout * RGB Tweaks * Add RGB startup animation * Minor RGB Fixes * Turn off RBG on planck * Enable separate storage of EEPROM * Update Macro pad * Add BJohnson Keymap and minor darshna tweaks * Clean up rgb and other code for new numpad * Remove clicky hachy thing * Update my code to use built in MOD_MASK defines * Fix up modifier calls * Tweak to KC_MAKE * Tweak to KC_MAKE * Add Semi-colon to numpad * Preprocess out rgb matrix stuff if not enabled * Formatting of KC_MAKE * Add stuff for matrix and light rgb coexistance * Fix bad spelling * Change where layer indication shows based on rgblight status * Force set mods in KC_MAKE * Optimize CRKBD --- keyboards/crkbd/keymaps/drashna/keymap.c | 10 ++-- keyboards/crkbd/keymaps/drashna/rules.mk | 2 +- layouts/community/ergodox/drashna/keymap.c | 16 +++--- .../community/ergodox/drashna_glow/config.h | 11 ++++ .../community/ergodox/drashna_glow/keymap.c | 3 ++ .../community/numpad_5x6/bjohnson/config.h | 25 +++++++++ .../community/numpad_5x6/bjohnson/keymap.c | 51 +++++++++++++++++++ .../community/numpad_5x6/bjohnson/rules.mk | 5 ++ layouts/community/numpad_5x6/drashna/config.h | 18 +++++++ layouts/community/numpad_5x6/drashna/keymap.c | 22 ++++++++ layouts/community/numpad_5x6/drashna/rules.mk | 9 ++++ layouts/community/numpad_5x6/layout.json | 6 +++ layouts/community/numpad_5x6/readme.md | 3 ++ layouts/community/ortho_4x12/drashna/config.h | 10 ++-- layouts/community/ortho_4x12/drashna/keymap.c | 39 ++++++++------ layouts/community/ortho_4x12/drashna/rules.mk | 2 +- users/drashna/config.h | 8 +-- users/drashna/drashna.c | 6 +-- users/drashna/drashna.h | 5 -- users/drashna/process_records.c | 45 ++++++++-------- users/drashna/rgb_stuff.c | 37 +++++++------- users/drashna/rules.mk | 4 ++ 22 files changed, 246 insertions(+), 91 deletions(-) create mode 100644 layouts/community/numpad_5x6/bjohnson/config.h create mode 100644 layouts/community/numpad_5x6/bjohnson/keymap.c create mode 100644 layouts/community/numpad_5x6/bjohnson/rules.mk create mode 100644 layouts/community/numpad_5x6/drashna/config.h create mode 100644 layouts/community/numpad_5x6/drashna/keymap.c create mode 100644 layouts/community/numpad_5x6/drashna/rules.mk create mode 100644 layouts/community/numpad_5x6/layout.json create mode 100644 layouts/community/numpad_5x6/readme.md diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 0a9ff24ff8be..91f0ebfa2700 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -187,10 +187,10 @@ const char* read_modifier_state(void) { uint8_t one_shot = get_oneshot_mods(); snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%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" : " " + (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) ? "CTL" : " ", + (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI) ? "GUI" : " ", + (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) ? "ALT" : " ", + (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? "SFT" : " " ); return modifier_state_str; @@ -252,7 +252,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) { // 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(matrix, read_host_led_state()); + // matrix_write(matrix, read_host_led_state()); //matrix_write_ln(matrix, read_timelog()); } else { matrix_write(matrix, read_logo()); diff --git a/keyboards/crkbd/keymaps/drashna/rules.mk b/keyboards/crkbd/keymaps/drashna/rules.mk index 4b70f66f7bb2..540534978c91 100644 --- a/keyboards/crkbd/keymaps/drashna/rules.mk +++ b/keyboards/crkbd/keymaps/drashna/rules.mk @@ -24,8 +24,8 @@ BOOTLOADER = qmk-dfu # If you want to change the display of OLED, you need to change here SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ ./lib/logo_reader.c \ + # ./lib/rgb_state_reader.c \ # ./lib/keylogger.c \ # ./lib/host_led_state_reader.c \ # ./lib/mode_icon_reader.c \ diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index e0100de8f126..428706e2d58c 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -360,15 +360,15 @@ void matrix_scan_keymap(void) { // runs frequently to update info // Since we're not using the LEDs here for layer indication anymore, // then lets use them for modifier indicators. Shame we don't have 4... // Also, no "else", since we want to know each, independently. - if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1< 0; i--) { + rgblight_sethsv_noeeprom( ( i + 180) % 360, 255, 255); + wait_ms(8); + } + led_set_user(host_keyboard_leds()); + rgblight_mode_noeeprom(temp_mode); +#endif +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + rgblight_sethsv_noeeprom_cyan(); + } else { + rgblight_sethsv_noeeprom_magenta(); + } +} + +void shutdown_user (void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb_red(); + #endif // RGBLIGHT_ENABLE +} diff --git a/layouts/community/numpad_5x6/bjohnson/rules.mk b/layouts/community/numpad_5x6/bjohnson/rules.mk new file mode 100644 index 000000000000..d370da7f1b30 --- /dev/null +++ b/layouts/community/numpad_5x6/bjohnson/rules.mk @@ -0,0 +1,5 @@ +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +NO_SECRETS = yes +BOOTMAGIC_ENABLE = lite diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h new file mode 100644 index 000000000000..ec66940e0227 --- /dev/null +++ b/layouts/community/numpad_5x6/drashna/config.h @@ -0,0 +1,18 @@ +#pragma once + +// #define B6_AUDIO + +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) +#define RGB_DI_PIN B1 +#define RGBLED_NUM 16 // Number of LEDs + +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#endif // RGBLIGHT_ENABLE + + +#define TAP_CODE_DELAY 10 diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c new file mode 100644 index 000000000000..646f4db3379d --- /dev/null +++ b/layouts/community/numpad_5x6/drashna/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H +#include "drashna.h" + +#define F2_MCRO LT(_GAMEPAD, KC_F2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMLOCK] = LAYOUT_numpad_5x6( + KC_F1, F2_MCRO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_F3, KC_F4, KC_P7, KC_P8, KC_P9, + KC_F5, KC_F6, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_F7, KC_F8, KC_P1, KC_P2, KC_P3, + KC_F9, KC_COLN, KC_P0, KC_PDOT, KC_PENT + ), + + [_GAMEPAD] = LAYOUT_numpad_5x6( + RGB_TOG, _______, _______, EEP_RST, KC_MAKE, RESET, + RGB_MOD, RGB_RMOD, _______, _______, _______, + RGB_HUI, RGB_HUD, _______, _______, _______, _______, + RGB_SAI, RGB_SAD, _______, _______, _______, + RGB_VAI, RGB_VAD, _______, _______, _______ + ), +}; diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk new file mode 100644 index 000000000000..ed6fa8c79193 --- /dev/null +++ b/layouts/community/numpad_5x6/drashna/rules.mk @@ -0,0 +1,9 @@ +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +NO_SECRETS = yes +BOOTMAGIC_ENABLE = lite +INDICATOR_LIGHTS = no +RGBLIGHT_TWINKLE = yes +MACROS_ENABLED = no +MAKE_BOOTLOADER = yes diff --git a/layouts/community/numpad_5x6/layout.json b/layouts/community/numpad_5x6/layout.json new file mode 100644 index 000000000000..7264cd5a6dc6 --- /dev/null +++ b/layouts/community/numpad_5x6/layout.json @@ -0,0 +1,6 @@ +["","","",""], +[{y:0.5},"","","",""], +["","","",{h:2},""], +["","",""], +["","","",{h:2},""], +[{w:2},"",""] diff --git a/layouts/community/numpad_5x6/readme.md b/layouts/community/numpad_5x6/readme.md new file mode 100644 index 000000000000..147097c8371c --- /dev/null +++ b/layouts/community/numpad_5x6/readme.md @@ -0,0 +1,3 @@ +# numpad_5x6 + + LAYOUT_numpad_5x6 diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 55862aec36e1..f648d1127906 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -2,9 +2,9 @@ #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -#define RGB_DI_PIN D3 -#define RGBLED_NUM 16 // Number of LEDs - +#define RGB_DI_PIN B3 +#define RGBLED_NUM 13 // Number of LEDs +#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 12 #define RGBLIGHT_VAL_STEP 12 @@ -17,10 +17,10 @@ #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) // #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_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended // #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -// #define EECONFIG_RGB_MATRIX (uint32_t *)16 +#define EECONFIG_RGB_MATRIX (uint32_t *)15 #endif #if defined(KEYBOARD_lets_split_rev2) diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index f5ead81da2ad..28da1b204279 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -19,7 +19,12 @@ #ifdef RGB_MATRIX_ENABLE extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; #endif +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; +#endif + #ifdef BACKLIGHT_ENABLE enum planck_keycodes { @@ -162,13 +167,13 @@ bool music_mask_user(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE -void suspend_power_down_keymap(void) -{ +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); + rgb_matrix_config.enable = false; } -void suspend_wakeup_init_keymap(void) -{ +void suspend_wakeup_init_keymap(void) { + rgb_matrix_config.enable = true; rgb_matrix_set_suspend_state(false); } @@ -188,7 +193,14 @@ void rgb_matrix_indicators_user(void) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); uint8_t this_osm = get_oneshot_mods(); - if (!g_suspend_state) { + + if (!g_suspend_state && userspace_config.rgb_layer_change && +#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +#else + rgb_matrix_config.enable +#endif + ) { switch (biton32(layer_state)) { case _RAISE: rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; @@ -228,27 +240,26 @@ void rgb_matrix_indicators_user(void) { case _WORKMAN: rgb_matrix_set_color(42, 0xD9, 0xA5, 0x21); break; } - - if (this_mod & MODS_SHIFT_MASK || this_led & (1<event.pressed) { - #if !defined(KEYBOARD_viterbi) - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - #endif + 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), MACRO_TIMER); - #if defined(KEYBOARD_viterbi) - 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 +#ifndef MAKE_BOOTLOADER + if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) +#endif + { + #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 | temp_osm ) & MOD_MASK_CTRL) { 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); + set_oneshot_mods(temp_osm); } break; diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 7eaa7e94918b..a98ad590cc73 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -4,6 +4,7 @@ #if defined(RGBLIGHT_ENABLE) extern rgblight_config_t rgblight_config; +bool has_initialized; #elif defined(RGB_MATRIX_ENABLE) extern rgb_config_t rgb_matrix_config; #endif @@ -17,7 +18,7 @@ void rgblight_sethsv_default_helper(uint8_t index) { #ifdef INDICATOR_LIGHTS void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { - if (this_mod & MODS_SHIFT_MASK || this_led & (1< 0; i--) { + rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255); + wait_ms(10); + } + layer_state_set_user(layer_state); #endif } diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 6d8612e71ae8..5050704a53b3 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -42,3 +42,7 @@ ifdef CONSOLE_ENABLE OPT_DEFS += -DKEYLOGGER_ENABLE endif endif + +ifeq ($(strip $(MAKE_BOOTLOADER)), yes) + OPT_DEFS += -DMAKE_BOOTLOADER +endif From fabdb3c4e8ce4659539a2b0fa4cafc56a07d6c2d Mon Sep 17 00:00:00 2001 From: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Fri, 15 Mar 2019 11:01:50 -0700 Subject: [PATCH 332/445] [Keymap] Keymap for Idobo (#5402) * greenshadowmaker keymap for idobo xd75 massdrop * remove uneeded config.h * corrected format to match convention instead of xd75 where I accidentally started from --- .../keyboard-layout-editor-gsm-idobo.json | 190 ++++++++++++++++++ .../idobo/keymaps/greenshadowmaker/keymap.c | 152 ++++++++++++++ .../idobo/keymaps/greenshadowmaker/readme.md | 3 + .../idobo/keymaps/greenshadowmaker/rules.mk | 3 + 4 files changed, 348 insertions(+) create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/keymap.c create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/readme.md create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/rules.mk diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json new file mode 100644 index 000000000000..95122075bdc3 --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json @@ -0,0 +1,190 @@ +[ + { + "name": "gsm-idobo", + "notes": "Massdrop xd75\n\nFront Legend = \"Adust\" layer (both lower and Raise)" + }, + [ + { + "a": 3 + }, + "Esc\n\n\n\nreset", + { + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nF1\n\n\n\n\n\n\n\n1 !", + "\nF2\n\n\n\n\n\n\n\n2 @", + "\nF3\n\n\n\n\n\n\n\n3 #", + "\nF4\n\n\n\n\n\n\n\n4 $", + "\nF5\n\n\n\n\n\n\n\n5 %", + { + "t": "#000000", + "a": 7 + }, + "= +", + "", + "- _", + { + "t": "#0000ff\n#ff0000", + "a": 0 + }, + "\nF6\n\n\nrgbplain\n\n\n\n\n6 ^", + "\nF7\n\n\nrgbtest\n\n\n\n\n7 &", + "\nF8\n\n\nrgbmode\n\n\n\n\n8 *", + { + "a": 4 + }, + "\nF9\n\n\n\n\n\n\n\n9 (", + "\nF10\n\n\n\n\n\n\n\n0 )", + { + "t": "#000000", + "a": 7 + }, + "Bksp" + ], + [ + "Tab", + "Q", + { + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "PgUp\nUP\n\n\n\n\n\n\n\nW", + { + "t": "#000000", + "a": 7 + }, + "E", + { + "a": 3 + }, + "R\n\n\n\nrgb_tog", + "T\n\n\n\nbl_tog", + { + "a": 7 + }, + "", + "", + "[ {", + "T", + "Y", + "I", + "O", + "P", + "]" + ], + [ + { + "c": "#0000ff", + "t": "#ffffff" + }, + "Raise", + { + "c": "#cccccc", + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "Home\nLEFT\n\n\n\n\n\n\n\nA", + { + "a": 0 + }, + "PgDwn\nDOWN\n\n\nrgb_hai\n\n\n\n\nS", + "End\nRIGHT\n\n\nrgb_sai\n\n\n\n\nD", + { + "t": "#000000", + "a": 3 + }, + "F\n\n\n\nrgb_vai", + "G\n\n\n\nbl_inc", + { + "a": 7 + }, + "", + "UP", + "", + "H", + "J", + "K", + "L", + "; :", + "' \"" + ], + [ + { + "a": 3 + }, + "Shift\n\n\n\neep_rst", + { + "a": 7 + }, + "Z", + { + "a": 3 + }, + "X\n\n\n\nrgb_hud", + "C\n\n\n\nrgb_sad", + "V\n\n\n\nrgb_vad", + "B\n\n\n\nbl_dec", + { + "a": 7 + }, + "LEFT", + "DOWN", + "RIGHT", + "N", + "M", + ", <", + ". >", + "/ ?", + { + "a": 6 + }, + "Shift" + ], + [ + { + "a": 7 + }, + "` ~", + "\\ |", + "Alt", + "Ctrl", + { + "c": "#ff0000" + }, + "Lower", + { + "c": "#eb7c15" + }, + "Space", + { + "c": "#cccccc", + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nApp\n\n\n\n\n\n\n\nOS", + { + "t": "#000000", + "a": 7 + }, + "Del", + "Enter", + { + "c": "#eb7c15" + }, + "Space", + { + "c": "#0000ff", + "t": "#ffffff" + }, + "Raise", + { + "c": "#cccccc", + "t": "#000000" + }, + "", + "", + "", + "PrtScr" + ] +] \ No newline at end of file diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keymap.c b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c new file mode 100644 index 000000000000..e96459da54fd --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c @@ -0,0 +1,152 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | RAISE | A | S | D | F | G | | UP | | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | LEFT | DOWN | RIGHT | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | ` | \ | LALT | LCTRL | LOWER | SPACE | LGUI | DEL | ENTER | SPACE | RAISE | | | | PrtScr | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x15( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, XXXXXXX, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \ + RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_UP, XXXXXXX, 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_LEFT, KC_DOWN, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRAVE, KC_GRAVE, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_LGUI, KC_DEL, KC_ENT, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR \ +), + + +/* LOWER + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | UP | | | | | | | | | | PR SCR | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RAISE | LEFT | DOWN | RIGHT | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | LOWER | | APP | | | | RAISE | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x15( \ + XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_LEFT, KC_DOWN, KC_RGHT, 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, LOWER, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + /* RAISE + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | pgup | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RAISE | home | pgdn | end | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | LOWER | | | | | | RAISE | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x15( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_HOME, KC_PGDN, KC_END, 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, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + + /* ADJUST + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | RESET | | | | | | | | |rgbplain|rgbtest | rgbmode| | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | |rgb tog | bl_tog | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RAISE | | rgb hi | rgb sai|rgb vai | bl inc | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | EEP Rst| | rgb hd | rgb sad|rgb vad | bl dec | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | LOWER | | | | | | RAISE | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x15( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, RGB_M_T, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + 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/idobo/keymaps/greenshadowmaker/readme.md b/keyboards/idobo/keymaps/greenshadowmaker/readme.md new file mode 100644 index 000000000000..bdd28d4ffe35 --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/readme.md @@ -0,0 +1,3 @@ +# GreenShadowMaker keymap for idobo + +Note: keyboard-layout-editor-gsm-idobo.json shoudl be the matching layout for http://www.keyboard-layout-editor.com diff --git a/keyboards/idobo/keymaps/greenshadowmaker/rules.mk b/keyboards/idobo/keymaps/greenshadowmaker/rules.mk new file mode 100644 index 000000000000..f6587a835e35 --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +COMMAND_ENABLE = no # Commands for debug and configuration +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow From 9c4424ae2cd86002cd2f4140eff7108212ef884e Mon Sep 17 00:00:00 2001 From: Len Trigg Date: Sat, 16 Mar 2019 09:46:49 +1300 Subject: [PATCH 333/445] rgblight split transfer non-eeprom config (#5396) * Make rgblight_update_dword not update eeprom (we already have eeconfig_update_rgblight for that). Make split i2c keyboards transfer active rgblight config rather than eeprom saved version of rgblight config, enabling runtime changes that aren't persisted to eeprom. * prev_level and prev_rgb only store successfully transmitted values --- quantum/api.c | 2 +- quantum/rgblight.c | 7 +++++-- quantum/rgblight.h | 1 + quantum/split_common/transport.c | 12 +++++++----- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/quantum/api.c b/quantum/api.c index 52dfe23e1764..233f99636de4 100644 --- a/quantum/api.c +++ b/quantum/api.c @@ -67,7 +67,7 @@ void process_api(uint16_t length, uint8_t * data) { case DT_RGBLIGHT: { #ifdef RGBLIGHT_ENABLE uint32_t rgblight = bytes_to_dword(data, 2); - rgblight_update_dword(rgblight); + eeconfig_update_rgblight(rgblight); #endif break; } diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 52e0be8ba016..119ca1b9eeeb 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -225,11 +225,14 @@ void rgblight_init(void) { } +uint32_t rgblight_read_dword(void) { + return rgblight_config.raw; +} + void rgblight_update_dword(uint32_t dword) { rgblight_config.raw = dword; - eeconfig_update_rgblight(rgblight_config.raw); if (rgblight_config.enable) - rgblight_mode(rgblight_config.mode); + rgblight_mode_noeeprom(rgblight_config.mode); else { #ifdef RGBLIGHT_USE_TIMER rgblight_timer_disable(); diff --git a/quantum/rgblight.h b/quantum/rgblight.h index f92388c96104..36e436b899b4 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -174,6 +174,7 @@ void rgblight_step_reverse(void); uint8_t rgblight_get_mode(void); void rgblight_mode(uint8_t mode); void rgblight_set(void); +uint32_t rgblight_read_dword(void); void rgblight_update_dword(uint32_t dword); void rgblight_increase_hue(void); void rgblight_decrease_hue(void); diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index b16852bc161e..3696a2abaa74 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -39,17 +39,19 @@ bool transport_master(matrix_row_t matrix[]) { static uint8_t prev_level = ~0; uint8_t level = get_backlight_level(); if (level != prev_level) { - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIT_START, (void *)&level, sizeof(level), TIMEOUT); - prev_level = level; + if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { + prev_level = level; + } } # endif # ifdef RGBLIGHT_ENABLE static uint32_t prev_rgb = ~0; - uint32_t rgb = eeconfig_read_rgblight(); + uint32_t rgb = rgblight_read_dword(); if (rgb != prev_rgb) { - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgb, sizeof(rgb), TIMEOUT); - prev_rgb = rgb; + if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgb, sizeof(rgb), TIMEOUT) >= 0) { + prev_rgb = rgb; + } } # endif From 3c257c1c6e1685a2ce37951c26d13bcb8fad749d Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 15 Mar 2019 17:05:50 -0400 Subject: [PATCH 334/445] Add avrdude split EE_HANDS flash commands (#5414) * Add EEPROM avrdude flashing commands for setting handedness * Update docs with info on flashing EEPROM handedness files with commands --- docs/config_options.md | 4 ++++ tmk_core/avr.mk | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 336feee8fd80..a8a106459134 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -208,9 +208,13 @@ There are a few different ways to set handedness for split keyboards (listed in 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 + * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files + * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right` 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 +#### Defines for handedness + * `#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. diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 79fdf4de5371..bf3e269fdf3c 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -223,7 +223,11 @@ define EXEC_AVRDUDE printf "Waiting for $$USB to become writable."; \ while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \ fi; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ + if [ -z "$(1)" ]; then \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ + else \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \ + fi \ fi endef @@ -232,9 +236,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware while true; do \ - $(call EXEC_AVRDUDE) ; \ + $(call EXEC_AVRDUDE) ; \ done +avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE,eeprom-lefthand.eep) + +avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE,eeprom-righthand.eep) + # Convert hex to bin. bin: $(BUILD_DIR)/$(TARGET).hex $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin From 22e499efdb12d277b9847dea8809ba1b717e071f Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 15 Mar 2019 17:28:38 -0400 Subject: [PATCH 335/445] [Keyboard] Add handwired split tester (#5413) * Add handwired split tester * Update keyboards/handwired/splittest/readme.md Co-Authored-By: nooges * Update keyboards/handwired/splittest/readme.md Co-Authored-By: nooges --- keyboards/handwired/splittest/config.h | 75 +++++++++++++++++++ .../splittest/keymaps/default/config.h | 23 ++++++ .../splittest/keymaps/default/keymap.c | 5 ++ keyboards/handwired/splittest/readme.md | 26 +++++++ keyboards/handwired/splittest/rules.mk | 65 ++++++++++++++++ keyboards/handwired/splittest/splittest.c | 1 + keyboards/handwired/splittest/splittest.h | 5 ++ 7 files changed, 200 insertions(+) create mode 100644 keyboards/handwired/splittest/config.h create mode 100644 keyboards/handwired/splittest/keymaps/default/config.h create mode 100644 keyboards/handwired/splittest/keymaps/default/keymap.c create mode 100644 keyboards/handwired/splittest/readme.md create mode 100644 keyboards/handwired/splittest/rules.mk create mode 100644 keyboards/handwired/splittest/splittest.c create mode 100644 keyboards/handwired/splittest/splittest.h diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h new file mode 100644 index 000000000000..9e4fb38ca0af --- /dev/null +++ b/keyboards/handwired/splittest/config.h @@ -0,0 +1,75 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1111 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Split Tester +#define DESCRIPTION Split keyboard testing unit + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 2 +#define MATRIX_COLS 1 + +// wiring of each half +#define MATRIX_ROW_PINS { B3 } +#define MATRIX_COL_PINS { B6 } +#define SPLIT_HAND_PIN F6 +#define SOFT_SERIAL_PIN D1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } + +/* + * 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 diff --git a/keyboards/handwired/splittest/keymaps/default/config.h b/keyboards/handwired/splittest/keymaps/default/config.h new file mode 100644 index 000000000000..ecebd3658916 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* +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 . +*/ + +#pragma once + +#define USE_I2C diff --git a/keyboards/handwired/splittest/keymaps/default/keymap.c b/keyboards/handwired/splittest/keymaps/default/keymap.c new file mode 100644 index 000000000000..1c15f6f1dfa0 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/default/keymap.c @@ -0,0 +1,5 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(RGB_MOD, RESET) +}; diff --git a/keyboards/handwired/splittest/readme.md b/keyboards/handwired/splittest/readme.md new file mode 100644 index 000000000000..3dbff32ed405 --- /dev/null +++ b/keyboards/handwired/splittest/readme.md @@ -0,0 +1,26 @@ +Split Tester +============ + +A two-switch tester built using two Pro Micros, mainly intended to test RGB on split keyboards. Seen here: https://www.instagram.com/p/BvCPNzynwrV/ + +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make handwired/splittest:default + +Example of flashing this keyboard: + + make handwired/splittest: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). + +Wiring +------ +- Add switches to both Pro Micros across B3 and B6 pins +- Add pull-up resistor to left side between VCC and F6 +- Add pull-down resistors to right side between GND and F6 +- Connect the following pins on both sides together: D0, D1, GND, VCC +- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC +- Wire Di of RGB strip for each half to D2 diff --git a/keyboards/handwired/splittest/rules.mk b/keyboards/handwired/splittest/rules.mk new file mode 100644 index 000000000000..9512c0f64827 --- /dev/null +++ b/keyboards/handwired/splittest/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) + +# 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 +# +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 = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/splittest/splittest.c b/keyboards/handwired/splittest/splittest.c new file mode 100644 index 000000000000..3c919a565dbf --- /dev/null +++ b/keyboards/handwired/splittest/splittest.c @@ -0,0 +1 @@ +#include "splittest.h" diff --git a/keyboards/handwired/splittest/splittest.h b/keyboards/handwired/splittest/splittest.h new file mode 100644 index 000000000000..17b7081a0275 --- /dev/null +++ b/keyboards/handwired/splittest/splittest.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT(L1, R1) {{L1}, {R1}} From e9ace1487887c1f8b4a7e8e6d87c322988bec9ce Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 15 Mar 2019 14:34:58 -0700 Subject: [PATCH 336/445] [Docs] Add VSCode guide to docs (#5124) * Add VSCode guide to docs * Fix settings menu enumeration * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna --- docs/_summary.md | 3 +- docs/{eclipse.md => other_eclipse.md} | 0 docs/other_vscode.md | 117 ++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 1 deletion(-) rename docs/{eclipse.md => other_eclipse.md} (100%) create mode 100644 docs/other_vscode.md diff --git a/docs/_summary.md b/docs/_summary.md index 35936df00d13..df876b794f06 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -92,7 +92,8 @@ * [Understanding QMK](understanding_qmk.md) * Other Topics - * [Using Eclipse with QMK](eclipse.md) + * [Using Eclipse with QMK](other_eclipse.md) + * [Using VSCode with QMK](other_vscode.md) * [Support](support.md) * QMK Internals (In Progress) diff --git a/docs/eclipse.md b/docs/other_eclipse.md similarity index 100% rename from docs/eclipse.md rename to docs/other_eclipse.md diff --git a/docs/other_vscode.md b/docs/other_vscode.md new file mode 100644 index 000000000000..7427f758e5be --- /dev/null +++ b/docs/other_vscode.md @@ -0,0 +1,117 @@ +# Setting up Visual Studio Code for QMK Development + +[Visual Studio Code](https://code.visualstudio.com/) (VS Code) is an open-source code editor that supports many different programming languages. + +Using a full-featured editor such as VS Code provides many advantages over a plain text editor, such as: +* intelligent code completion +* convenient navigation in the code +* refactoring tools +* build automation (no need for the command-line) +* a graphical front end for GIT +* many other tools such as debugging, code formatting, showing call hierarchies etc. + +The purpose of this page is to document how to set up VS Code for developing QMK Firmware. + +This guide covers how to configure everything needed on Windows and Ubuntu 18.04 + +# Set up VS Code +Before starting, you will want to make sure that you have all of the build tools set up, and QMK Firmware cloned. Head to the the [Newbs Getting Started Guide](newbs_getting_started.md) to get things set up, if you haven't already. + +## Windows + +### Prerequisites + +* [Git for Windows](https://git-scm.com/download/win) (This link will prompt to save/run the installer) + + 1. Disable all of the options but `Git LFS (Large File Support)` and `Check daily for Git for Windows updates`. + 2. Set the default editor to `Use Visual Studio Code as Git's default editor` + 3. Select the `Use Git from Git Bash only` option, since that's the option that you should use here. + 4. For the `Choosing HTTPS transport backend`, either option should be fine. + 5. Select the `Checkout as-is, commit Unix-style line endings` option. QMK Firmware uses Unix style commits. + 6. For the extra options, leave the default options as is. + + This software is needed for Git support in VS Code. It may be possible to not include this, but it is much simpler to just use this. + +* [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (Optional) + + This software provides better support for Git by providing secure storage for git credentials, MFA and personal access token generation. + + This isn't strictly needed, but we would recommend it. + + +### Installing VS Code + +1. Head to [VS Code](https://code.visualstudio.com/) and download the installer +2. Run the installer + +This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly. + +### Configuring VS Code + +First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already. + +Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS. + +Once you have saved this file, you will need to reload VS Code, if it was already running. + +?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well. + + +Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window. + +1. Click File > Preferences > > Settings +2. Click on the {} button, in the top right to open the `settings.json` file. +3. Set the file's content to: + + ```json + { + "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe", + "terminal.integrated.env.windows": { + "MSYSTEM": "MINGW64", + "CHERE_INVOKING": "1" + }, + "terminal.integrated.shellArgs.windows": [ + "--login" + ], + "terminal.integrated.cursorStyle": "line" + } + ``` + + If there are settings here already, then just add everything between the first and last curly brackets. + +?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system. + +4. Hit Ctrl-` (grave) to bring up the terminal. + + This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard. + + +## Every other Operating System + +1. Head to [VS Code](https://code.visualstudio.com/) and download the installer +2. Run the installer +3. That's it + +No, really, that's it. The paths needed are already included when installing the packages, and it is much better about detecting the current workspace files and parsing them for IntelliSense. + +## Plugins + +There are a number of extensions that you may want to install: + +* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) - +This installs a bunch of Git related tools that may make using Git with QMK Firmware easier. +* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions. +* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code. +* [Github Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's. +* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody. +* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too. +* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up. + +Restart once you've installed any extensions + +# Configure VS Code for QMK +1. Click File > Open Folder +2. Open the QMK Firmware folder that you cloned from GitHub. +3. Click File > Save Workspace As... + +And now you're ready to code QMK Firmware in VS Code From e30c993d75b2edd78c185a5d5f33f2fe10635eb5 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 17 Mar 2019 10:04:50 -0700 Subject: [PATCH 337/445] [Keyboard] XD75 refactor (#5420) * Refactor layout macro names Update the names of the layout macros to reflect QMK's desired usage. - KEYMAP renamed to LAYOUT - colinta keymap updated accordingly - KC_KEYMAP renamed to LAYOUT_kc - mtdjr keymap updated accordingly * Update xd75.h to use #pragma once include guard * Update keymaps to use QMK_KEYBOARD_H * Refactor default keymap - updated to use layout macro - remove deprecated action_get_macro function - add functions from QMK keymap.c template - process_record_user - matrix_init_user - matrix_scan_user - led_set_user * Update supporting files - updated config.h files to use #pragma once include guard - remove errant QUANTUM_DIR code block * Rename readme files to fully lowercase filenames * Restructure keyboard readme Updated the readme to better align with the current QMK template. * Bugfixes to supporting files --- keyboards/xd75/keymaps/adi/config.h | 7 +- keyboards/xd75/keymaps/adi/keymap.c | 2 +- keyboards/xd75/keymaps/adi/rules.mk | 1 + keyboards/xd75/keymaps/atomic_style/config.h | 7 +- keyboards/xd75/keymaps/atomic_style/keymap.c | 2 +- keyboards/xd75/keymaps/bbaserdem/config.h | 7 +- keyboards/xd75/keymaps/bbaserdem/keymap.c | 2 +- .../keymaps/bramver/{README.md => readme.md} | 0 .../xd75/keymaps/c4software_bepo/config.h | 2 +- .../c4software_bepo/{README.md => readme.md} | 0 keyboards/xd75/keymaps/cbbrowne/config.h | 13 +-- keyboards/xd75/keymaps/cbbrowne/keymap.c | 2 +- keyboards/xd75/keymaps/cbbrowne/rules.mk | 6 +- keyboards/xd75/keymaps/colinta/config.h | 7 +- keyboards/xd75/keymaps/colinta/keymap.c | 10 +-- keyboards/xd75/keymaps/davidrambo/config.h | 7 +- keyboards/xd75/keymaps/davidrambo/keymap.c | 2 +- keyboards/xd75/keymaps/default/config.h | 7 +- keyboards/xd75/keymaps/default/keymap.c | 86 ++++++++++++------- .../xd75/keymaps/developper_bepo/config.h | 2 +- .../developper_bepo/{README.md => readme.md} | 0 .../xd75/keymaps/dyn_macro_tap_dance/config.h | 7 +- .../xd75/keymaps/dyn_macro_tap_dance/keymap.c | 2 +- keyboards/xd75/keymaps/emilyh/config.h | 7 +- keyboards/xd75/keymaps/emilyh/keymap.c | 2 +- keyboards/xd75/keymaps/fabian/config.h | 7 +- keyboards/xd75/keymaps/french/config.h | 7 +- keyboards/xd75/keymaps/french/keymap.c | 2 +- .../keymaps/french/{README.md => readme.md} | 0 keyboards/xd75/keymaps/germanized/config.h | 6 +- keyboards/xd75/keymaps/germanized/keymap.c | 2 +- keyboards/xd75/keymaps/kim-kim-xd73/config.h | 7 +- keyboards/xd75/keymaps/kim-kim/config.h | 7 +- keyboards/xd75/keymaps/kloki/config.h | 7 +- keyboards/xd75/keymaps/kloki/keymap.c | 2 +- keyboards/xd75/keymaps/markus/config.h | 7 +- keyboards/xd75/keymaps/markus/keymap.c | 2 +- keyboards/xd75/keymaps/mtdjr/config.h | 7 +- keyboards/xd75/keymaps/mtdjr/keymap.c | 6 +- keyboards/xd75/keymaps/tdl-jturner/config.h | 7 +- keyboards/xd75/keymaps/tdl-jturner/keymap.c | 2 +- keyboards/xd75/readme.md | 51 +++-------- keyboards/xd75/xd75.h | 11 +-- 43 files changed, 117 insertions(+), 213 deletions(-) rename keyboards/xd75/keymaps/bramver/{README.md => readme.md} (100%) rename keyboards/xd75/keymaps/c4software_bepo/{README.md => readme.md} (100%) rename keyboards/xd75/keymaps/developper_bepo/{README.md => readme.md} (100%) rename keyboards/xd75/keymaps/french/{README.md => readme.md} (100%) diff --git a/keyboards/xd75/keymaps/adi/config.h b/keyboards/xd75/keymaps/adi/config.h index 244c75c77c45..08bed9ccb9a1 100644 --- a/keyboards/xd75/keymaps/adi/config.h +++ b/keyboards/xd75/keymaps/adi/config.h @@ -14,12 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // Disable backlight #undef BACKLIGHT_ENABLE - -#endif diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xd75/keymaps/adi/keymap.c index a91b7d35dbef..4f9e414c1c05 100644 --- a/keyboards/xd75/keymaps/adi/keymap.c +++ b/keyboards/xd75/keymaps/adi/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Fillers to make layering more clear #define ___T___ KC_TRNS diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xd75/keymaps/adi/rules.mk index 52a8f38d45ff..a0c4fc967849 100644 --- a/keyboards/xd75/keymaps/adi/rules.mk +++ b/keyboards/xd75/keymaps/adi/rules.mk @@ -13,3 +13,4 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +BACKLIGHT_ENABLE = no diff --git a/keyboards/xd75/keymaps/atomic_style/config.h b/keyboards/xd75/keymaps/atomic_style/config.h index f52a97bbc865..a72596783dd1 100644 --- a/keyboards/xd75/keymaps/atomic_style/config.h +++ b/keyboards/xd75/keymaps/atomic_style/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/atomic_style/keymap.c b/keyboards/xd75/keymaps/atomic_style/keymap.c index d3e86b050993..bdbbc4af3360 100644 --- a/keyboards/xd75/keymaps/atomic_style/keymap.c +++ b/keyboards/xd75/keymaps/atomic_style/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Fillers to make layering more clear #define ___T___ KC_TRNS diff --git a/keyboards/xd75/keymaps/bbaserdem/config.h b/keyboards/xd75/keymaps/bbaserdem/config.h index 28d32e562828..271f48d0011b 100644 --- a/keyboards/xd75/keymaps/bbaserdem/config.h +++ b/keyboards/xd75/keymaps/bbaserdem/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_KEYMAP_H -#define CONFIG_KEYMAP_H +#pragma once -#include "../../config.h" - -#endif +// place overrides here diff --git a/keyboards/xd75/keymaps/bbaserdem/keymap.c b/keyboards/xd75/keymaps/bbaserdem/keymap.c index 68071d018e2a..6f8576b09b41 100644 --- a/keyboards/xd75/keymaps/bbaserdem/keymap.c +++ b/keyboards/xd75/keymaps/bbaserdem/keymap.c @@ -1,4 +1,4 @@ -#include "xd75.h" +#include QMK_KEYBOARD_H #include "bbaserdem.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/xd75/keymaps/bramver/README.md b/keyboards/xd75/keymaps/bramver/readme.md similarity index 100% rename from keyboards/xd75/keymaps/bramver/README.md rename to keyboards/xd75/keymaps/bramver/readme.md diff --git a/keyboards/xd75/keymaps/c4software_bepo/config.h b/keyboards/xd75/keymaps/c4software_bepo/config.h index 39845f15b7a7..6605bbf93f72 100644 --- a/keyboards/xd75/keymaps/c4software_bepo/config.h +++ b/keyboards/xd75/keymaps/c4software_bepo/config.h @@ -16,4 +16,4 @@ # pragma once -#include "../../config.h" +// place overrides here diff --git a/keyboards/xd75/keymaps/c4software_bepo/README.md b/keyboards/xd75/keymaps/c4software_bepo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/c4software_bepo/README.md rename to keyboards/xd75/keymaps/c4software_bepo/readme.md diff --git a/keyboards/xd75/keymaps/cbbrowne/config.h b/keyboards/xd75/keymaps/cbbrowne/config.h index f6bb06f399b6..0ff61e1f4272 100644 --- a/keyboards/xd75/keymaps/cbbrowne/config.h +++ b/keyboards/xd75/keymaps/cbbrowne/config.h @@ -14,9 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once +// place overrides here #ifndef NO_DEBUG #define NO_DEBUG #endif @@ -24,8 +24,6 @@ #define NO_PRINT #endif -#include "../../config.h" - #define LEADER_TIMEOUT 300 #define BACKLIGHT_BREATHING @@ -34,10 +32,3 @@ #define randadd 53 #define randmul 181 #define randmod 167 - -/* Filler to make layering a bit clearer * - * borrowed from basic keymap */ - -#define _____ KC_NO - -#endif diff --git a/keyboards/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c index b20cafabc99c..6c356ac80340 100644 --- a/keyboards/xd75/keymaps/cbbrowne/keymap.c +++ b/keyboards/xd75/keymaps/cbbrowne/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H /* Fillers to make layering more clear */ #define ___T___ KC_TRNS diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk index 0968298a0a7f..eb2f87063486 100644 --- a/keyboards/xd75/keymaps/cbbrowne/rules.mk +++ b/keyboards/xd75/keymaps/cbbrowne/rules.mk @@ -1,5 +1,5 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# 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) @@ -18,7 +18,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/xd75/keymaps/colinta/config.h b/keyboards/xd75/keymaps/colinta/config.h index 3b39bee81c90..354c9c918607 100644 --- a/keyboards/xd75/keymaps/colinta/config.h +++ b/keyboards/xd75/keymaps/colinta/config.h @@ -14,15 +14,12 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here // QMK customization: // - after 1.5s, turn off one-shot keys #define ONESHOT_TIMEOUT 1500 // - TT(layer) only needs one press #define TAPPING_TOGGLE 1 - -#endif diff --git a/keyboards/xd75/keymaps/colinta/keymap.c b/keyboards/xd75/keymaps/colinta/keymap.c index a50a02c36043..257caad339f6 100644 --- a/keyboards/xd75/keymaps/colinta/keymap.c +++ b/keyboards/xd75/keymaps/colinta/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H #ifdef IS_COLINTA #include "secrets.h" @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--/RRND----/MUTE----/FFWD-------------------------------------------------------------------------------------------------------------' */ - [LAYER_COLEMAK] = KEYMAP( + [LAYER_COLEMAK] = LAYOUT( KC_GRV, TH_F1, TH_F2, TH_F3, TH_F4, TH_F5, MM_0, MM_1, KC_DEL, TH_F6, TH_F7, TH_F8, TH_F9, TH_F10, KC_MINS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, MM_2, GOTO_FN, KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL, OSCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LBRC, KC_RBRC, KC_ENT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_RECORD] = KEYMAP( + [LAYER_RECORD] = LAYOUT( _____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, @@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_QWERTY] = KEYMAP( + [LAYER_QWERTY] = LAYOUT( _____, _____, _____, _____, _____, _____, MM_0, MM_1, _____, _____, _____, _____, _____, _____, _____, _____, KC_Q, KC_W, KC_E, KC_R, KC_T, MM_2, GOTO_FN, _____, KC_Y, KC_U, KC_I, KC_O, KC_P, _____, MOD_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, _____, _____, _____, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _____, @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_FN] = KEYMAP( + [LAYER_FN] = LAYOUT( GOTO_CM, GOTO_QW, KC_NO, KC_NO, KC_NO, KC_NO, DYN_REC_START1, DYN_REC_START2, 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, diff --git a/keyboards/xd75/keymaps/davidrambo/config.h b/keyboards/xd75/keymaps/davidrambo/config.h index f219147034d4..6e6349c7cf67 100644 --- a/keyboards/xd75/keymaps/davidrambo/config.h +++ b/keyboards/xd75/keymaps/davidrambo/config.h @@ -14,12 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here #define TAPPING_TERM 200 #define PERMISSIVE_HOLD - -#endif diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c index b37cad054888..442a00afda9c 100644 --- a/keyboards/xd75/keymaps/davidrambo/keymap.c +++ b/keyboards/xd75/keymaps/davidrambo/keymap.c @@ -1,4 +1,4 @@ -#include "xd75.h" +#include QMK_KEYBOARD_H #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac // #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use diff --git a/keyboards/xd75/keymaps/default/config.h b/keyboards/xd75/keymaps/default/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/default/config.h +++ b/keyboards/xd75/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c index 03f605385320..0e5c7dbaaaff 100644 --- a/keyboards/xd75/keymaps/default/keymap.c +++ b/keyboards/xd75/keymaps/default/keymap.c @@ -13,12 +13,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Layer shorthand #define _QW 0 #define _FN 1 +// 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] = { /* QWERTY @@ -35,13 +41,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_QW] = { /* QWERTY */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, 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_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT }, - { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL }, - }, + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, 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_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL + ), /* FUNCTION * .--------------------------------------------------------------------------------------------------------------------------------------. @@ -56,30 +62,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ - - [_FN] = { /* FUNCTION */ - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, - { KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS }, - { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______ }, - { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______ }, - { _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ }, - } + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ + ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; +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 } - return MACRO_NONE; -}; + 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/xd75/keymaps/developper_bepo/config.h b/keyboards/xd75/keymaps/developper_bepo/config.h index 78357b5bc4fc..0183e024271b 100644 --- a/keyboards/xd75/keymaps/developper_bepo/config.h +++ b/keyboards/xd75/keymaps/developper_bepo/config.h @@ -16,4 +16,4 @@ #pragma once -#include "../../config.h" +// place overrides here diff --git a/keyboards/xd75/keymaps/developper_bepo/README.md b/keyboards/xd75/keymaps/developper_bepo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/developper_bepo/README.md rename to keyboards/xd75/keymaps/developper_bepo/readme.md diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h b/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c index 594e5c41cfa1..cf4bfb4dc5a1 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H enum planck_keycodes { DUMMY = SAFE_RANGE, diff --git a/keyboards/xd75/keymaps/emilyh/config.h b/keyboards/xd75/keymaps/emilyh/config.h index f52a97bbc865..a72596783dd1 100644 --- a/keyboards/xd75/keymaps/emilyh/config.h +++ b/keyboards/xd75/keymaps/emilyh/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/emilyh/keymap.c b/keyboards/xd75/keymaps/emilyh/keymap.c index f597dc2b99e5..bea9863d5bc7 100644 --- a/keyboards/xd75/keymaps/emilyh/keymap.c +++ b/keyboards/xd75/keymaps/emilyh/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H #include "backlight.h" // Fillers to make layering more clear diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xd75/keymaps/fabian/config.h index 59de3fa55f65..a72596783dd1 100644 --- a/keyboards/xd75/keymaps/fabian/config.h +++ b/keyboards/xd75/keymaps/fabian/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/french/config.h b/keyboards/xd75/keymaps/french/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/french/config.h +++ b/keyboards/xd75/keymaps/french/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/french/keymap.c b/keyboards/xd75/keymaps/french/keymap.c index 1ffec2202ef7..547a67b6efd3 100644 --- a/keyboards/xd75/keymaps/french/keymap.c +++ b/keyboards/xd75/keymaps/french/keymap.c @@ -1,5 +1,5 @@ #include "keymap_french.c" -#include "xd75.h" +#include QMK_KEYBOARD_H // Layer shorthand diff --git a/keyboards/xd75/keymaps/french/README.md b/keyboards/xd75/keymaps/french/readme.md similarity index 100% rename from keyboards/xd75/keymaps/french/README.md rename to keyboards/xd75/keymaps/french/readme.md diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h index dd3f32275be7..65ab6a0dcba4 100644 --- a/keyboards/xd75/keymaps/germanized/config.h +++ b/keyboards/xd75/keymaps/germanized/config.h @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here @@ -118,4 +115,3 @@ // Launchy #define ALT_SPC LALT(KC_SPC) -#endif diff --git a/keyboards/xd75/keymaps/germanized/keymap.c b/keyboards/xd75/keymaps/germanized/keymap.c index b7c9620c13d2..bba1172eca65 100644 --- a/keyboards/xd75/keymaps/germanized/keymap.c +++ b/keyboards/xd75/keymaps/germanized/keymap.c @@ -1,6 +1,6 @@ /* Copyright 2017 Kolja Brauns */ -#include "xd75.h" +#include QMK_KEYBOARD_H #ifndef KEYMAP_GERMAN #define KEYMAP_GERMAN diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/config.h b/keyboards/xd75/keymaps/kim-kim-xd73/config.h index e2390f770cbe..0c8015e22714 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/config.h +++ b/keyboards/xd75/keymaps/kim-kim-xd73/config.h @@ -14,12 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here #undef BACKLIGHT_BREATHING - -#endif diff --git a/keyboards/xd75/keymaps/kim-kim/config.h b/keyboards/xd75/keymaps/kim-kim/config.h index e2390f770cbe..0c8015e22714 100644 --- a/keyboards/xd75/keymaps/kim-kim/config.h +++ b/keyboards/xd75/keymaps/kim-kim/config.h @@ -14,12 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here #undef BACKLIGHT_BREATHING - -#endif diff --git a/keyboards/xd75/keymaps/kloki/config.h b/keyboards/xd75/keymaps/kloki/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/kloki/config.h +++ b/keyboards/xd75/keymaps/kloki/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/kloki/keymap.c b/keyboards/xd75/keymaps/kloki/keymap.c index 340d9a8dc63a..b9bb2c66d416 100644 --- a/keyboards/xd75/keymaps/kloki/keymap.c +++ b/keyboards/xd75/keymaps/kloki/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Layer shorthand #define _WO 0 diff --git a/keyboards/xd75/keymaps/markus/config.h b/keyboards/xd75/keymaps/markus/config.h index bde866636f64..4e4e6f0d7392 100644 --- a/keyboards/xd75/keymaps/markus/config.h +++ b/keyboards/xd75/keymaps/markus/config.h @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here @@ -30,5 +27,3 @@ #define MOUSEKEY_TIME_TO_MAX 0 #define MOUSEKEY_WHEEL_MAX_SPEED 1 #define MOUSEKEY_WHEEL_TIME_TO_MAX 0 - -#endif diff --git a/keyboards/xd75/keymaps/markus/keymap.c b/keyboards/xd75/keymaps/markus/keymap.c index e61fb09b1b96..eaf620151546 100644 --- a/keyboards/xd75/keymaps/markus/keymap.c +++ b/keyboards/xd75/keymaps/markus/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H #include "keymap_german.h" #define ________ KC_TRNS diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h index 7e2227c874d8..0ceba236fed4 100644 --- a/keyboards/xd75/keymaps/mtdjr/config.h +++ b/keyboards/xd75/keymaps/mtdjr/config.h @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here #undef MANUFACTURER @@ -25,5 +22,3 @@ #define MANUFACTURER mtdjr #define PRODUCT XD75 #define DESCRIPTION XD75Re - -#endif diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c index 074cf7335a3a..e56d918fd5f4 100644 --- a/keyboards/xd75/keymaps/mtdjr/keymap.c +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c @@ -3,7 +3,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KC_KEYMAP( + [_QWERTY] = LAYOUT_kc( // .--------------------------------------------------------------------------. EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,MPNT,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), - [_LOWER] = KC_KEYMAP( + [_LOWER] = LAYOUT_kc( // .--------------------------------------------------------------------------. xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,xxxx, F7 , F8 , F9 , F10, F11, F12, DEL, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), -[_RAISE] = KC_KEYMAP( +[_RAISE] = LAYOUT_kc( // .--------------------------------------------------------------------------. xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| diff --git a/keyboards/xd75/keymaps/tdl-jturner/config.h b/keyboards/xd75/keymaps/tdl-jturner/config.h index 985247bb2e3f..596aaff66597 100644 --- a/keyboards/xd75/keymaps/tdl-jturner/config.h +++ b/keyboards/xd75/keymaps/tdl-jturner/config.h @@ -16,10 +16,9 @@ // additional config optoinsa vailable at https://docs.qmk.fm/reference/config-options#the-config.h-file -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here // place overrides here //#define TAPPING_TERM 200 @@ -33,5 +32,3 @@ #define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 - -#endif diff --git a/keyboards/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xd75/keymaps/tdl-jturner/keymap.c index 9789d9a8678b..593e54f14d7d 100644 --- a/keyboards/xd75/keymaps/tdl-jturner/keymap.c +++ b/keyboards/xd75/keymaps/tdl-jturner/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H enum xd75_layers { _QWERTY, diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md index e11ce7dca9a4..fc5b8972c85a 100644 --- a/keyboards/xd75/readme.md +++ b/keyboards/xd75/readme.md @@ -1,32 +1,25 @@ -xd75 keyboard firmware -====================== +# XD75 -The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! +![XD75](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1MzOISXXXXXXgXpXXq6xXFXXXO_1024x1024.jpg) -## Quantum MK Firmware +The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! -For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm). +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: XD75Re +Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd75re-xd75am-xd75-xiudi-60-custom-keyboard-pcb), [AliExpress](https://www.aliexpress.com/item/xd75re-Custom-Mechanical-Keyboard-75-keys-TKG-TOOLS-Underglow-RGB-PCB-GH60-60-programmed-gh60-kle/32818745981.html) -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the -keyboards/xd75 folder. Once your dev env is setup, you'll be able to -type `make` to generate your .hex - you can then use the Teensy Loader -to install the resulting .hex file, or have the `make` process install -it using DFU. + make xd75:default -### Default +Flashing example: -To build with the default keymap, simply run `make xd75:default` from the root directory (i.e. two levels above this file), and to install via DFU, `make xd75:default:dfu`, also from the root directory. + make xd75:default:dfu -Note that DFU is likely to require root permissions, so installing the -firmware likely requires a command line like: +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). -``` -$ sudo make xd75:default:dfu -``` -### LED control +## LED control There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB. @@ -65,23 +58,3 @@ GP103_LED F4 KEYCAPS_LED F5 GP100_LED F7 ``` - -### Other Keymaps - -The "default" keymap included is basically the OLKB Atomic keymap with -a few buttons added for RGB underglow control. This should be usable -as a starting point, but most people will be best served creating -their own keymap and flashing it - more info on creating your own -keymap is available in [the official QMK -documentation](https://docs.qmk.fm). - -Keymaps follow the format **__\.c__** and are stored in -subdirectories under `keyboards/xd75/keymaps` - -To build the firmware binary hex file for a specific keymap, and -install it, using DFU, just do `make` with a keymap like this: - -``` -$ make xd75:[default|] -``` - diff --git a/keyboards/xd75/xd75.h b/keyboards/xd75/xd75.h index e278066900c9..c27930a8453f 100644 --- a/keyboards/xd75/xd75.h +++ b/keyboards/xd75/xd75.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef XD75_H -#define XD75_H +#pragma once #include "quantum.h" @@ -22,7 +21,7 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ 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,\ @@ -36,7 +35,7 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ } -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ 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,\ @@ -50,7 +49,7 @@ { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ } -#define LAYOUT_ortho_5x15 KEYMAP +#define LAYOUT_ortho_5x15 LAYOUT void capslock_led_init(void); void capslock_led_off(void); @@ -67,5 +66,3 @@ void gp103_led_on(void); void keycaps_led_init(void); void keycaps_led_off(void); void keycaps_led_on(void); - -#endif From c62f6b0825b13d2791838154867c543f1f433030 Mon Sep 17 00:00:00 2001 From: Nik Richers Date: Sun, 17 Mar 2019 10:13:45 -0700 Subject: [PATCH 338/445] [Keymap] Add a tweaked Redox keymap (#5422) * Add nrichers keymap * Additional keymap tweaks, add readme info * Improve descriptions for changes from default keymap * Add image of keymap, update .gitignore to * Add image link Adds an image of the modified keymap. * Improve legibility of keymap changes with colour coding * Tinker with color codes in Markdown * Experiment with colour codes * Tinker more with colour codes * Figured out the easiest way to include colour coding * Undo earlier .gitignore change --- keyboards/redox/keymaps/nrichers/config.h | 34 ++++++++ keyboards/redox/keymaps/nrichers/keymap.c | 92 ++++++++++++++++++++ keyboards/redox/keymaps/nrichers/keymap.png | Bin 0 -> 146904 bytes keyboards/redox/keymaps/nrichers/readme.md | 28 ++++++ keyboards/redox/keymaps/nrichers/rules.mk | 2 + 5 files changed, 156 insertions(+) create mode 100755 keyboards/redox/keymaps/nrichers/config.h create mode 100755 keyboards/redox/keymaps/nrichers/keymap.c create mode 100644 keyboards/redox/keymaps/nrichers/keymap.png create mode 100755 keyboards/redox/keymaps/nrichers/readme.md create mode 100755 keyboards/redox/keymaps/nrichers/rules.mk diff --git a/keyboards/redox/keymaps/nrichers/config.h b/keyboards/redox/keymaps/nrichers/config.h new file mode 100755 index 000000000000..a3ef209a05d9 --- /dev/null +++ b/keyboards/redox/keymaps/nrichers/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/nrichers/keymap.c b/keyboards/redox/keymaps/nrichers/keymap.c new file mode 100755 index 000000000000..7434b4368295 --- /dev/null +++ b/keyboards/redox/keymaps/nrichers/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) +#define KC_CTQU RCTL_T(KC_QUOT) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,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_CTQU , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_SPC ,KC_BSPC , KC_DEL ,KC_ENT , KC_RGUI , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + 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 + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/nrichers/keymap.png b/keyboards/redox/keymaps/nrichers/keymap.png new file mode 100644 index 0000000000000000000000000000000000000000..8ef3fe4eaa51e027167d34c360a87b23788bd40c GIT binary patch literal 146904 zcmafbby(F~w>4}*0i{dn?ogy#rID5{De0DOl}>3SC8edMk?!tpL^?Okx3(u<&wKAZ z-(T|h>{!3G)|_+9F~;11^0MNnCN`cftR#Vjj+bf8gyE z#h=3!^%HHv!3o1jiadMe48NU>T&Jvb*^#>Lf`^hNpMFfkE+3Hj0jv0Pxji(ljT=J8{}Ac__>eze zlPTacJXHSrXuYq}s0VMR#v$KrXR?Iy(@5u?e_H~0w?2)0-Ya@W)uJS~7*^eRhF4!O zN+p-);_P2b2B#B815j5DeW*JT4tCj|PMaUna0s_OR4` zgUU}l$lZ@n?g$sUF&R#h2!8i}@5!&n@mVG#Lw|KBQZZvy>sx+`M9}hr0GpnVL8Ty| zG=tkU%>4QPxu>xAN4yaBdo-*r;Y3a>_88f0sl@ffj8P#Sp*!q#EBD=h-45XrjEF3M z{JfT*qq$0p7l=&!tKCvh_-qW6y>ajT`)SgNL58&@{K>V&Jn7T+&vvR7w7d_m9-X88 z>leZy1SJZC{gtT+xl$Bf`kY3ZB^}qF8ou}c+3B=N*l#YIF6|Ge4%$6X;CLr&Y5I3Y>*{P&#_p_1p-M`MG1ii9o1pd+jT8JlJ@ ziN}6BPS;cNU>Z;R#BB779SRxS!UD|JGI;vY!boIIa&uft&?0s%xQQzs#&Z)EN2ZxXjJ7rgu)eqnylA207NX$D(z3P(fy6Ne4 zMn-ez8H?-mm9k%!n2uy;$!2{){%0=pVW(_zXFo+V5G3Gx+7C8@0vjoNpUh9(&}tR7 zEg|0SnNm236pigjEC5R!^ zN;wRp2;fkJ-y*E{CK&W3a-k=x#}ZeVjg`JfRjwj}s#LP{ zm-+;vd@2VCCGZXZ2;9%ek4aJc{BU6Z-9-aVed+@}>3`q5-4tvdOr9{`x2@h?3Ksd8tr;EEJVKlsdt?ZAia0q zK`D>C7qucCqHP~0F@cxihdn350?Yr1^byU63NxO|It7)8dr&Hl#ZtTGZHedgh5Gxu zs0E;cNY?0I;M7{qaB5asBrxmLO}2+TGRP1Quf(JjQ!9JZhczC+wctMD3W6YtMy6Dy zP-9BRZO151+c9D8?T8F=tr#y(EBAvrY0)QWFLaZCJ^Ei6gDM>E$a~NtiU(b-+~i}0 z#niA$u}-oBOZFDp=A%*#oPtXkV;j77i%i!|P;NbKP;saco z`jhzz4Z9*`zkkk0f5g^m`E#bu#oi*OD{VHUWs>(P=E~zr#z;cQrZm{3i&J6_IVH%U z484LykVL8J2n`I3Xl{o`b7_y941!qX$p`mzk|tmxnqH}Q1E14Ap!H;HVrF})OuHc3 zy777(jc@yLj_}83gS~oaC3N0x;OAKW29xx2oR3fZJ;Fj-8f)28Y$wZ%2SOg9v%@0v z&)Y`Ehx8b|b7tV6_s(G~##~iTQ70`ZTuC+V$pbu?M&f z1wX}+FOXrt3Jw{n;EOaQq?hrJzh4}0u8`O?Yg@JWp=QG=%Y0(D-E$@DW*=g~M>Nx| zw##xW2G^{UChvNg#`7RZ%K(*xfAUJ3{o^lH);d5?LY2?i zsJK=hS5dAI`-9Z<=nxrljvU?VuX-3Tu9d?U4X4`2JO zLS0+Vm`g~@>@LGk+juu4!QX3snh7%4+BNObBX6*k{qvremNOv6EI=^E7IveZz^!~e zYuDS2IY;p6r3QJ${xUW;iw<6$UBqsIic1BYuiOwGRgQ*P@ieh)tIQP&We_68gfgg7 z<&0wJNvH(uHpR`+iB=nIXz!tF3ZX5FsvC6w*(*4NNNErkHVvX2=wEc|Yx2EsN$NNg zyg)js3lBCUy4%Pr4hsPr(-hEgA`X*5 zvf8V|9__2JP(rTha?_FR-P%1^5}X96BgshI7X?@GbDpWvJ@r15f>y+L8b zeB(IoayKUTw_KSMPMCg{n*Rsv5c-@1eG;5_|HpC+IpI?p-$7XibiY^Iu$LkArU=Y{ z!1Isu>;0*samVKa20(8ZAvh49blR_aEq4jo3S+r}^8a=O*mP`JnHaJR& zT`&Bn43p_V_`Q5-;!$p!s+~$ymPX49H?H?_c?o zdVUKf;9%e*M>IVF-?9qHV0>MzrQY|6qlez_o#C215=7`~|9yqk+;k|TZgr*mxn1pE z!(~$NWBTP%N%pDTp$z}TZGo%(mhlR6Rd7llKX0G8;RL*Q4hTMzAg9t<_WQe*`#2-* zU*V=`u%$MZyR7Bq7qJN(k$PPnSP8mLo90Zd_a(Nd2E9U}ituhvZC}dGNin-e;`|yS zolOT2hZ0iSerI$_Cb9YpVV_F3lb=S(d`_GRHm92-9eJw7yG#P*X{?Ol0;iKL%);m( zvlTU5m{nm5nZx;-{N!IrMXkKRmw@N(z6(U#}@`VxO4g$v7H;ms=6Ly+E*X| zDri%joBKG{EEfx_=7S0qSN(*^k?2TrINi+Z?*Pn8h7khCQut0`=^=t*bQ37TJ6A^o zPPGrk!iY?>q+&{KSK6njsJq7zp>~i5W{;C z31VaY+pW~lu56c?$MwlXk`cBz^;LTEqSKNR}puUm_mO9SnEws4t zCMcT2a^&PvsYt6j;NX3$w2H~H_{;F}9V>=E`#d^4aM{+{NCu8n=dtuJRq|Dso!)89 zbiY&G`xM1C5fVySy+WJD9chEe!yLL$Lb&7CQXxC1qMN`+amSL?R`;{Do}DR zbjy~t;kz%L@l-B^?$feWt1NcX$b9++l{jySiODnNbJ~6DGyMw_x3t+QT(-$v0XS+F zuE_ewu?U-CEuJ%0=`MTRbTgBm%55asht;1g2Rm+N#eG^&g@G(=S?=$SGnQ48_g5Yu zwLTNpxm#&5rSDJTYC>dej{+Ws8J3Be1!VZ1zH0&pyH>!B#gN(B@odly4}rU@A&1gvMT0kE>dpD+j)c;ip(7*D9Flq1{M{e;uFpU8Z^ z&PA<2QShhNVcL7NQjkZ)UWI*NX7a^8naMcKP5!I4{C2(WgX?8yiraA%w;ms~0R^{< z$9xVHS)K`%>WXD-P*oO_o#t)vO$O7R*|Cajf~u+kYf{JO#MjC~y=Re4{XIZp)f#C$ zTfU#KQIU5auka4r-sqFItO)Z*JMQwcK>%bJ6EaLEQb82$+^-HgScGQ*hIuos?$}MA zqXrPfPCwt?%VA}uvPoUfbL#XfW2`yupmf-3KVdZW&G@S0PIZccWX1+2edIPFuqtjaaKi*X!B=K)AAGhjH};#CPL3 zj6QeJxSLX3f6_+Xj3gfcDB3UhcZizuZp5Yi~mBy zy9d2Co$8Gg`;N@FFaA+#eR|2s zdP3=yvg4U}aavv+4TBV+etx*N<40)q^&_QtjmwWEf6^45&}?dYNnt`>>QDX@Fi`m% zQzAcYZCc-MHUbnFGX!0N0Ds1e<(r&8ZD8m|teYgZ$sXYZI;^_?O3 zoFR95#6Yagxm0h??xU!DNxl}kIWxGzUwrv@wuB)^vNfc$qP$h!YEb@)JcAhNx6t|| zK`@(I&Qv<=#wryZzM{)OGAR^Ie^L#Q+M8E1C^HYoH{M}~7f4*k%dWZ?WL6NAkT0)C4rglL^bz3K&9ZKT z%;*$L3d&ZRR{-=eLZ$VBm9EE0OmG?HoA0wan_imFnj98>KV}rU*Ed(^<9W)A(3h7( z;-t6@O-%I92vev=a^#!_ia{0XjA~-3-PX5zTJE@`u^~GZ&b7(5e-DC8ljaa3CwSgk zXfM&_7hfWX?}{T*E7(zEZ{imydvGbjg3(gQhksf_U%Wraaxx;z*T=jsb@ZMp&O2HH z9H$-Y&Sb1;=vj|UDBe8P#gm<(jC&qf>5Py^jyuz1PjFbPuO&YWzrdq(O^e3uSnZ11 z$xgJgTN}?+>Y(R|W!1F;jf~@NAs&m?4~S&OKGKjnQCLC~=<|%9zUh5jtrV3yFLZk~ zg2VV`@~d8d$n|=nby#(;1>ZBNHIUEd@R-yVKj{=|a70PhV9W78xz`4|0?V`gB~GW^ z*(3w^znUY!1JDuq+}=PNi{O~8Oov`|qf@cLTMiCsshGnDEzru{4Pwr9fYeXqs}3*= z>%JWlwQA8_#p;6hIYT0{ZN;P+z-tXYPbA&4U+Pd`-?A^@^EZzFG1?@ET(O%JV4hvq z{6YmG=!JJFCFUHl+oNR`Y50?t8SBO!ltJT!!eQE>0~}h!erzs87sdjUxa+kzT`O@C zmrO>b`#HlA7e4Q}ET;`otULky_Zg!=p;k{vNz3t;#U_bF^ogTuJEZ=W%*ixyQB&D~m$=(vv{7+jP z_pT0+?Sb2KoWP*6LlAT|#HZ79X>nJJrqIwv69UmEhCaf*2v&{Pj`)OPQu1x*3X9KW zY#!@|hbVRr$O&DKxuVkJu|oIaAqfBhSu6dVJ$%H{E$+BVF66-;bkT1pUtq}72o`ZJ9W;n9t+cNA{}m~?TzXv0q* zvsAHv7TLk)O4a+~en7;kSy`ZDhrvfq;+llb>Jx;^STkqq${nH3heZs3z1t0uX2DrS zdwJXViCb!wP`$(N!K38@K|_xBe_4(aq$pil6LSXf%*-Sa?~&S5#t zE@8G#G#sAki2WmLv4y~YiAezR=nWd8Mr0oXz~EL3?ng45lmYoWc9J>CzIO0rzF&Jw za0x|GmI27>1T5JOiPj23Qq*r{4h6&c_8Pha!oZP5jUzm2hPrPc#r;sy*fL*+A1F}~ zBnUXVDpv0Ri}XxsHr{6I@#awanc1VhPxM>%->2>t4V1J$N>b1Z$Af+{?P}&EOV}`< zaL*)VxlL6Sa@KIhlLzU-YcVh}8hiPn>?r!raFYv>KUmA6Zz0l3FeJ15^g*0IJ5na0 zj|C@rSXJ?{O%d6e-F-5y*Q#2!zNY@4qqCjnU2+lwq&LY`;ioH}dR!a_G_oFy`yT!M zB*L5+&HzRw8x_t5U8FxWD;-becPaG>a00bY2C0+bX3`+MqS}5VTQU?|R|ZtJr=dn3 zXnx-x(Oj4?c|?9O&ncJAHz7y}4c;2E38W6cJ71t)M!^u5&a5Q(6IYlou@(Jcii~A; zA;5Z92soD_#li~vhcNhao=MDM7X5T!zS1(WCw-;3{`8Z*Kdv)c>Tj%AGj@d29n0bB z^Yz4|R$l(=;}PwByEb@X0A`LU(onNX2cI`%zxH6^Pc>02`>4mRrQfAQWS(tWy#IQ! zjji?F26LDXejUv(f;1u-0q5!f(Czl$p@viBy5%qpg3!8d2&DAa6WUJ6Ze4QBzmdQg z0`M+e&Wk?xP?FLRM_>(SlP%g`H#=e;L2)`unKwguaSF(6lgzKO?D@X%{laNfsZD@( zOg0jSHL;*(aHu=NinHVKkoZg+zV7xrb5HPRS22?6Z^h!*pFSZ}UttybJtrlhcm^4U zFd)j{LPR{7l(IvPhUObQ+&26LJ{skitAh|O19^GI13DL1B$GA|!%tYUuTQt9I8BGC zqK026f)WL7c)O_xW#M{Ida)l~`~C{n&HY7({qbk3u&{kEr{(k{C}IZO!37u+LIBi8 zjvBKi#<*c2BE~UdwZ05?#JVM>`9=G^-X$3V+=3E6br+^MksjcYzWUs`H_fw=WB>qB z1+{eSLv-ftN$h?M&8!qyc+yM-0^8|uMly4G=6z2c@nmUBL=p+`w z_^g!x(Fn~`aHB)$<;Zs4$L8=Z0d@t(!Yb8&8b$w=lY@MOlX)F1mRkd}-9*#aEhYzv z(fQkr|L3RbApvfr`xB?78M?r6gtp_9kqT%?n{hg-F(f1*YR;L4Rfcb}a3(~S8;##E zn&N_O_W6NaZZg!2^M&Yt?m7;l58w;{PrJ1Z_!yR;9$Qo-93Ggu5XSGu`VFSxwoia; z??ygo_dgc%$HC!X`+%Z7pzQ+4)3#T4Snm6*Vl`zc+np=A!olk9{0CqLBzj@;gFL1&!~vf=pe&+laT#hZiz1llG~r(IJ{Y|{ikUaTtw zK2bx(Hm#&hx=GcUNxd}FnX!3nh32c-7z2!D?>`5PWtl>T*qZymDLNg0sRsg%-ld1= zJvzDwpR4(NTCbIq46{ULD z1Y*xb!1dV1eh}7oR9enhZ1g9eF1|;f2C8u(_|Cv@4~&G#D8Pf401z19(iQOu0SN1_ z0n^f-n-rZR!2;-|wbDhUNaQm-k{h>3R`CN2I^jidR~@?11PslLLv_G?;}ozEJnW>b zG#N^VY}oum$@z8r<<%hgy6z=Pjth8H`GF}@3V%Q}BFqWXB^<_>uBFEr>XO5N5 zw0SWc<;@utPQ=5uG1lmHdu$;QX%^Z{DfybdlFVni!dw&Fyxyu~y7>2$7!oW#=z?cW z+KT{dRx&8(spTqW6#x|EI4nt9y%KLv6DO4QPe~D@Qw(y*v=2mYjj=rCUyRKB-Eu)T zn?+%N0}xSD0lu90*zjI;CFIrdyxu)D$spJ=Dc2!_J_HWBE|Xvreh0{-~et6eLKsVx9W0g5956?)~@Wl%RrFw@-50tsbv;b26VQ%>u;h zyt+pxVY|yla$Kjh0vr3vtBG#+ElK{BA^3Hx#pc)tiCPXRr;Ef zU)(SaSo|m{nJ;A3mVyJAPaA=XXK=~=6M|TaXA9KJQK^T z$(EMIPCkZQpi@6xtvoVG*>05w#XAX(11Id68QMG%ZudF`*K^e}kU%D@kVOp&r zMiyZK0hR9CQC)fk1_C4jwy)WzOgr!35Dqa0S^R)_w!rJS9l!Cdfyia`<8J)R;Qu8* zQy?>GeH+A`$d*auZ&Udq|6QZPY%T2iu!q%U_zdDBf(@Fk_X3~`_|;ETE_hy2*En~- z7w*OY3U~KgL|h*r4`<6Jn>{t|XBT+fb-U4cbHd7Zxm{NH*7PR11+zf2sz^Cku?>$^ zXB*N2qZN6kIzkCI1R2BbVe$C@`e7Q7s;|-c_q}%j7AV1Qdi0ND5bnkTs8TlN%>O&X zbd7^~Ph&hOlWrx+$U0w_d2#(47@&$_I)~mEAhLJ?!Awg7Fm$tgUd`BNARKl;EK~y8 za{6@IoVChF;d@n23?u%Hh@$20Y_%i6S$uN%i{8RC*sp!rquk;ujc|NGj;cu+n{+V2NmAABL#Iq zj}%yEr~+uxY4+NKc0%nYrvwwqe?HP1%rlVg=bn0fQvnql$yfZLFbdk-SG^aSHE(lG zGv-WllGizz&6Yetb%YTu`G7Br$CAMExxL==a-4VBm;%Q|)VMQK1;ZQ0V8xZ7oXjIG z`@J%O99k{8eM3qP#zD#y0wrv7!M~hL8mTw_NlWIo$?Uh1nLdyj?<4}nS=+9Q`V^$x zYTv6Ft6FAhlh%n|AhZs{Oi!14Ubp5zE3%g**QaMh^qP>7g^)I5ogH+L{>pCMVP79f z0>i{_#bG$M>5*}g9>5*U@?MtCieD|Ojd-^T%1|=x$>O{@nHr9VrLC}2Ah8Qz(L8~3 zwN6gshdlSrFru5l3H{`xx0RW(4;|xg1mOlnRp8^%+8x&{`hyro%0cdf=1mvXl zwT$^lyf+R>But7c7iLvRD+49E7xaC}26wlx&ak7s3%JEX9_mf#xD^6W*@+lB!a`VG z)l97>Z%B^LfK=x=4l{S{tPa26gZMOKML?Xoqv>fzJk=}6y|5#EHGpc7>@fWvT@VTH zSIXt!%t9dD?#>IU;1j$fd;Jy zK+GlVh??C8Xc1$_&zEU!KrqxSq#LKWv;+DZ$Lm=VGJH5p=}E58sLmVP={#boXx|C1 zaFx+i%Vj%Tnk%u)_kfNOX&&FOyBYMZ^vjh*li0a=|3cWpu2_o=_%#dP_I%$&nbEU0 zoTUeg+wN9xEK|_7_nQK>X4AJ->@|Q8yC1Gt5;EDR!H!shZOrB`_}JDSGuuU*7GEk( z>=1o^U=Zcic2<;@c6t~~DbM0Zo=0GDu=7R)f-w!%r`2O;#(Q|ju@zuJnHE!aY8&x}tVaM~>XLosga(oN( z?f@>hrYdTIyKQI)t#F0)p$Y9mg!y#p6=O~ZZsxJ+V0wicvDXyp>CeLVM63edpjYhL z96~Zf{^dI1LHM?}mWFiUbEzZGMDHY@cz{!up_nD**n-NHsdfED{tcGAw_R6Gs^_O1 zAA<1GtB6it4wP_y=d(x%!mwVS`nW3$AU&}H9O=eQ9B^cCR1GPY*bmD{Wo!DDRW#TU z+JhEn>a#zI8R$yNU@5B2V(=Z;E_12lxD_VHP!}nk0k=o*%3tl9_|44FP+GpiX}?7J@Sqsk~&i42UuKxcmsyR;h^=C z7a^BA7Ii@kP|(yb;kDpUV)mRbj=~IGit!o1$>Atf3Bx=j9>)qBS!+G4jlH%N1*J-J z=F)o80{~Xj_yD{xL(c~|1^xSYOg2SOAb&l~+27aRraig{WFhnwj~0RT?ORi2IWSDw zue*q=s-*{lJ(;i8dZB@Z`70f2G#WAQBupMelV)@T>=Uod5y&Xk146g%vX0g76?D`s z-fmAm`GFP)Yc;_2o`v`?WBgd30!_odA4+q5OlU>?9$fyqYdAXwOlu|RI(L~L-wY9>1TuG_&0F0}sa8}(KJjCmw+{Xq^BZ|{>O7i?v^RriWxFT7VQ zqMxjtb=7qkQ|=!#2gWvSEgW^iE(n3DUf_moAh_-ibL|K{XKg#GZ9PEws6ovp*y@R6 zbuw?aWu8qm-mJNoOY+!G>iJib8twGPU82RMjli$e48UjEMTf9FRFYkIS8^N?>Afe1(%1Q+*HTp$2^STB4$X^vXUcVFR;w@zaf5 z7eCrb@Ch1*%4dk7Lg8KoP$(U~N)Y>5Ww_QIvs(`kg=GE);LDR!=V6ppVu=^I?q(iw za81M2InB&)Ya{30rpzKtU5+Xu!5h0>FBZCf?PYP+c5}!?@>E&M6+Ip|f9&he+Huqw z5t((_8vTHJ&w+@q=MujPkk2SZlLxD{m(4;?52bbkhzR>i;CLNrm+PyJSVV}2UGd2b zn2ZN%@~DpIxzWhgtKIw>r@h_f2PPgNPt?_#lXQs?R`YbMwktlLZb0s?235^Wxad=^(H~%n`Fv0R14ipylwt4BQzKqcm0_QfKOw!tsM}&YDp`5P4$*F)7zY?U54M)v9BjE)R=B& zN53@kpWK83;KqxV;k7b?k60Ng!BgNWf&5;Wi~zDVQCzi7`!+oOBxg<90;;jLLk+PUMdE4z7u(7xXJ+hmMR}*DFyBznb3yf#j<`|ghUm; zqT+>2FMVeT|Dh(@t=#D8p$R;oJ{AN~Fkf!2QcevqJR+M-8XP=*8*VUtd=db+R}POJdp5&4wJA2dIRqVLuykHV_XOLrm^OYdOA5;hz#1F%vAD``Vk6 zk(1Zwq+z47Z{qS*m;z?DOi(E2DJPi#5Hu>$xv=s45XAh<>CTLT^O>--93KP*uxhzB zwTrr8vY2L-RiCLplaN*YiAvRw4oY~Oj%!z;q;%Ithr@XGXp@7n?+c{2=72XZi|7tZ zy6-~zHuY7=;(*{~FTHH}_eS8&^HCpOehMO_#uUh@{TeUOMPQgA8PsMgT8A|Br>0}< zU)h_ETk?Is17e~2S)Q~>8e$Mh-Z6^1NmNg=4TY0fO&Gh^@V4p4CxfGOv(=edLhwQ) zA?@+y_2)*Z9;ddkV&~yUVB$bR08+X?A{+8L-QPK(hyuVq!u*R7M<$ck}L-|;spzihRhkVPOt zf(|%bk4?D3(1A-JO0=!X=Z<~QxNG@%e8qf$Gtsm~9*3UG(!PMzsxE14q{!BX1`!Q= z6~VT|SSWd0^Uz(lM{t?>Y5M``8|9C)?olwy(whXY0{2L_eYO@VOnfwC$@Iw~K07Sg zK`(+CTM{7Ww5AyJ?fwuCQA)cW%2W%2v^;+%*@$g&vbOm0d@TBgcY*q@WEga4kc+~o zv%NM2|F^Z-`j0n1Yej8efh_~-pS~lVvj%72?5L4lL8Qe`>1p7}6(&=GTwD)Ss+rUb z&|WrhS#{#fYFyePYl)DM_2WsxO?6rr0SBSffJ< z_Sa2tRq&nwM~&yJvc?r)AYsu<;t*<3w3WY$zhvo}`;O$5xhP*3A?R`O?Y3|@Yeds1 zV!k4LP`!kP5$@#;+St43cVvB_L!zg1T<~z(s9A%#BD&GfQKD-Z=${*^aG8zLRsG2E zq5GIF(lEkqV|aHIn3V8;XnoIqzcY-kY`n8OQNixLmd`BD?(JYnWsht^uKs-o6DgAd z{@U@UuZXyC(F5Ec3h3;1fdPL})_`aLyNKsmu9j!4(l!-sBFHj94iHqRj_PV`XI0aRwcEyhC1l9>xslqI7vI+plIMIkP^q@->y?zX=ti?SmxXKcWYMh^5~#d`(q>^c@4254i)b=xB{i_9;9Y~N$qP>TYIOjZs7)u392?# zNQai(KL^BOGa~zhpX*%5+wCO#{w{hk!hMGV09MyK{KlUY@?4s?4b5(p z59vzbwe5AXQi_Fu{*zRS*Zp?D>&C#<7rPq!0zB@le)OKKlnN0W_MvDj3049eVi4X} z9hWuSDmM{6iSka|FBl3pR~rZ^#RERwkyobf{;9B*1#&(#^BMKRQ`&@q^dg(pG59}ULiOG|dUr_#N>+G>POX}WD|0r&q>pUy zo#a*zO6X#3(P2+CqF=xEH=ECrUB%8^iu;#`?S$56q%Rt_u3lm>@$3JPL5&waz$Iey z8biZOaFj|QZ%q3x;?sNboD3t-o1`7LihBPZ!!XZgO3|rbnVl5$G|S-nk$=}FN3~2u z=jbb+PMpL|zz@DH`MesXB*<;F)it_wbd?Q3}KMc=iJ1E^P^&XxF0P}PmRP` zq(mPTwvct8U@ zkzxHMsRQe?-xwII7ij>{6_HgVBfF!GucrWqUrjkM>rk)jKT>u< z@(Fl`?-NBQMyjV8X6N0KS8!=;&ezw%w29T6$DbCZhhh^q&yUGYMwR5MU#pa|1c*KK zACeDZ9sqQjAxb%bGaG9>LrxCLz>3e`asIowC*)IqI^B~@^w4XB)e@xgT?5W)tkW5i z&14s0ljptSFUpYPn!zYgvh%p;^Eff7Y|MzrJEGzi^+C;)V2no=!v|)31PrYOXk%Z$ zlj`l&FE69f$oKE1!l+Xga65gA5)RW{=yQ^=__4+BV_>ibp1~L}#NijjU>bn}d*OgK z)qS`;c>ik)8ZeQ6TEj`_Ccz>W|K|n+b%Um78gyN?#HBZH+CbY?J68&PmuxPU!YEj; zN#r8}!vLJ^ryf>V&-jRht6k%HJMRJ2h7tlET)isc7+_m_!lR%fJTPR{MG3s(E*A7W z2tL3Z*Jf3-NfX7Yj6*_BX3I_C1I*3wT5zVcBEUULu|9D60A={>Y$bdK7`@7fMN6t0 zfn^s)NK6LOru@K>`{dmS6o71QlEZsM!EAYxgf9^PUb=7)b_7SYewH?9eXVY6Kxd!{ zlY0OwSP5jH4YScIh~z=Gd_4{Ym}RQ$2hfkO*l=BiC{X+=%NzAq{qwT(*184n4UJl_hw z5G$I7xpGODf145|gGabH-7(i#9Vv^8CT*Z|J_i=+C9gGNhyo0?lHeWJeM;wh3_3178I7*&&uLs6C!lY^ddnH}<6?_ol?-y5YQdOIWPT-9P7AG2*B>B#=l03oJC-oiC7`qoN7%mb`aTo^qLMMDrk zw|BAk9$^Q4%!sFPbpVbr94gs594JDTIL2#9-dCVMx&%r_p;QcmWX+j`yO=Av* ziozd7z%r|sfy&pzKZb>{3_zF>vD!vGM$16Jr_x;Heh`_o5#gTtMsu5@0zb9b#SdQh zuYjU^4!+pezmJ~`mQH<+;MOyiBye9E2x>$~)`>$p^a_kR`TStU9z@x>Qlnr#6)-mU z=N^FJi8BF)FEl*RG_f*Hvl)~3?NLC( zY!&Se9?wOk53Jc}5X`;q$N+w{o%V@dTxRh7oex97b zN%YCi%mmHL_}74&4D6Jv#VdcGD;Y(@#O_9%aX@3W+`%1Uoq0E`#f0>6#ThG?oc%_B zA4(fxci34wp7CD;Hxb;h1-|LxCu2{vq5rkH)tUNJXRYq+ahi3hV0X)phMLSdfIqlR?Bw1f@E&J<-VZ%V-wP1&W-{+UX$Jk;8W3acl0AoHUF zI0({h_E(1pBY#I4cA(Z+G`y7?ePIBg^xPIu1?{qPfh`G)7wt~ggTa%K7H(c48zLQ0 zF%;s`1d%6L74SvG{v(L`e1Xj*5Mjfn6Df#MlkPnx?aOKdD;8C7MwTH_ts7lFuyg|AgcpEByGN0NqTCs6H+EKhEj7@U12C56_L*BsrAYDM2F) zG@*0>78vcbk^^IlUWkf+XEcDB<&P2K?|m>%32*`FWlx#0Ab)Hhkkl zpL-;ab-#a}BvEwjB<6I?>xup$9xhP?84p9jpU?OooB@OR z_<%>fgbPQ$7}V4LP-Q=M#DgBll-D@x{8HJPI#Bv1I)MbW3)ZxY2 z!_^V;Xyu)G&p?5r7mk?cRV&$2Gfy_(6T$|LUn3I1ERlF&&3ib2yFg9Dev9vi8c+? zx4*i%+*8LDdbSfvO%rJK6M)>W@OSQFl=F9XDidM1u@AwfOtTlYmT}FA!mmUx511L8 zv5P3fxGB8s`kl172tU|9Y>12EKx@&B8GT8${}D=fIv>nBoul)T;?HI>ViO^yVUy-^ zdCtjlC@1xetI|lN2RK(JZLm_Sj4&rtFCBsgyo6M6zzZFL5B&=Ue2s}@%sAOX{G^#& z^tGRcW^K#6jOZ+VZ@NELF+?hN+ytBBE>tUN29_iO59(q5oauZ=amLc^9}A5_-C=Y- zK>OzptNp{N}Ei?wkV-sHbe4IoASRYq(Hhln0n{%al zPOp2NeI7f!fufs?w7WVtQrC{>8#|@ihgn`8$<^LeZ`cu##gPxp+XW}P%~+0)DuooO zH_WDdJJry1b@)x`g zcF?DDP+n)go?0E7XZ;T13pVeWQ#g98j-n5}b|&=vp4HYw!2vq$YVt<$ z*^`R_T?QW)VGE+8fjjzqiL;-P9;3bZi0sLqV%vG4WfNOM)FCjX=tKlacq_SDF%?$u;s&}^t9o~SC8PJL{b>9NE7U~Yw;yV81Q z-LaVE0EalH4v~zR0WoTRUjL&`5C2xf?fufnINL;Fe-==EYMU)!P4TNR-*INuiH=5% zy1mpT{HZP(et<(>>jte`0QCN?z=cUzvq2B3*W@jUTQAxP4h6MzjNJie=9#rqH+`jb zPb{ayu}ST6C#7ZUJ<`b(AUp+~AMG$&-+6|-cdjiJ{j+wLpggEWU<#RfE zWzrWRey=vUVXqr~l887x{v+=?>V0MsNJvZFXe0-kdTLJ(Pm1+a^J5aurT##tK6b5y zlFY37=J!7M(oP%eGN(-=%Z*Ip>;1`zxWOkw41A+^N|}BDsMDGzPgs}SGW~rtQxZE` zjD(B6uNAc?WcGHY*dx`q+j@N}YXL6Uk(SIlwqwkt0RL7j{3^LAt$!w z)VHCqow1&E7b(6q+bE(nL?ZAKT3MH6Pr8+RdTfG`70NZOL;=LRTy@#x+@*C$tb!y`;U&P>U9h9p& zfBF8PPObKO@2ZQ$Sy61$ca{2ahrN?sRMiMqQfFyKY!!Fhrq%ay39Yg>GSG|eL}$q^ zY^z>&sH3U4K7Lq!>M3XoCmZXLwH|*=ed$#t`StiEPdj(-PM34XQqMd^H4cfZno!#e zav&f+>!<|kMdPGds;O$CmV2p<#0zU2b~voLw#=+c#ES$ox4!_LrATB)#d5oPYaf>+ z)m4RbdM6K&JTRKTh<^($d9SA!sFQ--95KcF+}$$@jEunU^vh5quZ18L$865Ue_PiV z&)#*jGNB&>shUIgrlcEd6rwY;M(Koe4Xx0e9L=b!Z%yiox8o`cs*Vwc)a$|S~VZ&j!hX& z%eAhJqJ7gS9RN~2cA`4o~ta?|vf+EdA+5V7mimBUnZL#hL zWl0}5k^x>)mR~{MS*s?kJ0SaKU|FVYN`z`*F$z?{^Sfo`SX45rsPwq z-#4nYIMUZ*(yZ)-xyhnKX6oUxm#M8p$ye%~32_-zEAI*3Ow#kd?Hj1~M2V&pFfYDE zBQUgf-sO#UoK{v{`$m_)#k_xYd<}J+->Is#dz-TC)>+|iO^v07_m|7PO>~jcTFIw? z_pXaiYdHT7yDIA3%wcfBL-FIiJtl!l%PIYi)7_oY(UX*L>OwFG8g{y@D~Z#3Wja8R z_9mHk*DddA>73DBj%xWl82pq)dnO(#e7oL|%{l`{rw9PdY$d9u;AappV!grr7AW&V zfCQ4INkZ9Kn{u>1cWF0)ZZ{P}I#Xnn8Mj-Wi30KA&JOdJPE=7g!(qyBHF|3&vos>- zv!#9%g9d!f7Y*I!&Lv#)o~P=GTZmF|F&)-hG~4~O_fT`K-csE=3dI_Pp_L5CgH1x%9gUcU1Dwrd?}4b zvWz>H)AIZgk~%3+paEKWuEp?ANc*zF`cB_;=NlB=JAdK&HgVuvJSf@d{>vhV^UmA) zBZt}kA|&g$dJS)D{rs`+V*@|bQ}-xooY%_FR4X(czH9_poPp7x6_jz_mYGL0v-WNk zm-BA51{WjanpX-u2K-(dq&H=gWr=Z~^&1ybv6M6X(D$-+h?yp>#l^QIeLSmwlIYx! z+gbDZQ%QV0vIF}UQOh`eCE5UFk z3>mD*?u=T+@x#%Ua`E(Nq~f+C7q#QS9nUbgagf$pZY}oyd`22r z47}76j;1zN({%%(hR1RX-RUber|=73S4vMWRZ>1aS3wg!NV9hwp}<~b$d!W>iV9g? z*F?Xh*T!5j)(cVH9aWA{$Woy89Qc9F9Nd=lu(d+;oo-gt?Qg0ErJEt~c!uwsEyB1A zEQ1c{NVO6xMfF9!s&1`MVP5(1xF~98o?qLvs>;RwNL|uX%X>h3!;j=ylZTbHOXw z1s!ZReUK({(6vPteru1`g6onrA&O{mw?|e>6A#Di#mHHT9`t_%PSXh2=G`AK*TsJl z0TNZ|q0-s|RvDp1P1!XDI2Cfw9l3Uhc6eBeulZmH&nE4kV-+HKzE8kyL%YF`%KGw} z!y*Y$<75(h0__-{4Z~$r&edcfnz``aa{^-rd&@LZ{z+K9#Rw(UJ3dvI*`$V4>EpRV zcc3bvbK-X=zc7CF8|1pIUh#rA$nRY*jbR%BD;tB?!BP3)w?pNsiPE*3H2r-Blu!H} zORjEtlKv&<2KTU=fp2RB)YC=ya~&>TebgJ3l~n`~9%(S8hytFD+f20DSmo`OLyhxE z)wSEo`AO9W&H;A8=M@j8kKEo1Q#=vBgLRL>0Fee#cg`kdcPI;gzYd!6(qZ?jWxfdmJ61PWQ zq0DHx2ocUsP1AAzlxI~5_4}*U#2Z=j6ocx$KfdTarHWD?jtf1vAS=q5S6kU-|2Sl> zX*JH7AjaLE-FHsu0SUiqOOSr$fOMzGb^-u$Y@NP&B~#c!(}8@;0JjxmRF0QF$Sq}3 zab@zj(|-AA>_`8+2HJy!@Air_u|6JQ&+XJ*&GKk6H|qQQ_;RFQM0@W^9MYz$OfBIg zr;aGs)7ud<`1(1rB^(D2pF5=aR=$@}R(xs~5m*3bdt0efQGbeE_z~CL4#t5Sox;>| zR6hC@-m!MoC(bP3ipB?8LBEG`PMwC13|+^In%rYgs`k$=p_2(@-Uu|}) zYV*CU?myTPjI6n6en3I&VrG=g@M=)Bdy`%gMeC;n#UQ`VWD(V?Rc?c6b|1R~OB3Pae7NhoknlupM9J`t zegKxBr?bO(;c3Jr=GpkcfIx~>gyHCtj_bWioha%m2W8>@Sqe;a`V^z*c5*Y-2%{c^ z8OaX75`<#t0b&wiOa3@9p0$xA@A}c*I)4tK89F8W!TgGr>!yA~d5&*A?jxXsAF(a5 z*gswK&ywErd3w6w$N^#-M}m-isr)?i^z+S}0|5TaZ?NTBWW1=Zn#togy)Q&O%9R{l z-OyZS{|c+oz+j@xe%TyDj6R)HSYsAiQ6-~`WwF!rBF@ZAn{UpH8iPXxclCi?hv`>l z>}y%%xE^6o7-ujpAs!I=A!8x2uM`DZHm``8wOufurJePQAP1j2Tc4J5*UO+8WQD3b zq^k4yoBnqaIuYFKE-v{JG=4SU;X=4^Y{*on0-;HHO!1IL;hF4Qmz{C?sPrJi{WTyC z)#eixJ5Q0B63d*>O-`h25=axk@ zpFxDml^|5k7HVwZ=_-AaBg8y)5z)0(; z|FLjRA&LX?Ea$pX1)^hdV)5PU6rhp8xt66r3hf44q0)u$YKcAEbJa$F85=e#j9{}@ z)k@h4A=V!Vu|M%qw;YqH-}NXewdZZ|{M?OOw}9%2?WWV=Cyt5+Y=&a+k>KmJ)uFOz z;|5U%LNF&)XHt2_0lTlEn!H)~FJHU(y|9meSp;^6qI4QUKi=z5I)3r7zt>17DF=Qd z&CLsFpvlP;8r5=t%C3;>$f%pyVsgiW%YE%e0V3>o24Vl!KEnv8v~y!Ou<@^`<#HpI zR&JmMNOa2rVq8AoWx`78SAhWF3XsYo$Q@)I?Dx11-^in;r`YmhlmppuAsj_bv~H}@ zZN3B*M>c5xH3=1P+DY)m=@|XE;nt(5J+twTDa7#C2xQSwPiL<7=NbCEN=t~^FB&W` zj~{v0+)nsUy9{Yhr17I3ml_0Ue7gRfh#?LKlvrm_+xZy5ucHVtN796jVM_EagzAUj zb-zcu+9)he}!VL==t&TW)=VAV^@7=a6e{R_O6l<3))pMytJ zJF%6ywr?Q{*UjKON`eh*fAN$zm@L{3pnppgDuT|~xn9#!yg#vXnvm;gpqKY!KMYq9 z#d3`V3VbbP^pYt$S~E?`)>&4b!Vk(xoRa=%F0GNhzyw=BOYm!Hv;{_#Jyx2pub)-I z(3Nb;dOM4B{rVCW`HmFa%bXYatr8Y)q>6vuJ+;|l+6}a?M0Uo~!dEJG`*r3l(VAsg z0jch2OttBexpe8zNT@(#^C@7)MPoPDC@;_uQSm3Opyot}h^5 zo8}b8GSaFh5k35&K3}F8&|HPEX34lNBP45@&EP z04u`k4y}zR7wYb?B?t=K5+Npc_{Qw8-z%kVloHFp)>TfPvBNnaX?hPBa8Rl<>#7_b zNEB4JfR$LTa7Nc@$06i4I|-HO*|C5p-qZzC(0wcb3duQ{b80{1zz@mR)(MTBC4ggB zSoHg6;+*ULM1pcYEo});{#2Sh_pbqo>xjE1jxKO?-yo(3E*|?*Pen(dp+0ux=Y!Pg-xVw zKAk2_S(d$S-Kcs48kHlG340Q@8Vq|Qz>MExkWae%rp9F|qlDQv5{Qw4trt&A;RlXS zMrRp&@>sCS5MVMq5ud1aKiVjI!yW1nLy`d+N9e?q>Eo8lwB7H|T~W+Uc9|pVX{Y{^ zfJEVg4Q&X7yrHXIIvaIcF(3_)YzI=raTihDT2(nh?l%mWeR2toxsjY2m4(%Q6MgUi zv?8N>Y7v{o@hT6c@0xY(#CFOPr_iSuXzHI$?YGb=V3#0#*JwjMXfY@Hy|nyr`L0LD z+U~cpCpn$|v`Zab-xY4;8X@^mEULCu(KXSoKoN8cunQ0o`vrC%J;9jtR!JE0)gryn8!VnpA$gG zmKMj^2yKYgJM+!=57Lr2%{k0M>+vzf0&(Q5!iUMuho;|C^(QeXY`pb>>;Lv1rb7=}^CC zBbm^DLLQ@2J006N#|gxSIgC$}VNQNp@zs?b7ca)8CC=JXDC4OofQG z*b1igP~qExoiC3A_0AYukdr&r-|EHj5w|7$Ql@b=SSpA6gXs45H}3pKiHhowf`rBuG9!usq~a2K;4;IcV~_L~Aeg4>_)M zXR^7d8s`7J6c%hW2&xXbR*!Pnb4zNuN@s}7OS5CBK(;EYs^RnCgaCK}wQt@|wV_-T zqfYOc{}G9GGQ&G6cs3!YB^jI)?2H+yJ!B8iKdVsG`9t06f>SraXhZS~4TSyU zuaOLsOMwW17*GlD3)l^3k50nQZOqFpH;5$2VUpfkr4!o5I>}G&*gW$Wy{M4Pus8(Y z^E@LIJ0?Bm%&#vYW*i(~_BV@pQ%M;4A2(vxEEh{r_JQgJV3h;tx1$)Rcq9HHzWv8%p%YvXc7AWa#N6-c zlLy&=HsYZGnNY#j4JfDQgkz2S(A48xp;ac0U?@ zLIdxz`^wjT(Ph|tKy^n{XBDNT&HSQKi%|;=Dn!A6hH0|2=A~LZ z?6tZvPW;7z1bIF*Iha3y-2kB>JhKB|^$?YiY0c0M?KOZrr?37jYHUhh+ z2F<4sF&}+c&Q-~F1RF~!_V(KNxO^0@=yGAX8K4kcd-pmw|Q++%*v}zK}+=4U$32;zLi{ikFPbeMq5g!ud4KUM4P(Oxe zXgHZznSzJY>cxK82;aX%tl#vmeQK?{d!htE+SLC!Ns)jv42k?mDX=!)BLWsgkwe-k zHKs$CGhXkYs{B}-5O_kW*Ha1(dF=-220=+!_X_9%FBHbXc6Y%2KmD=)nLZzgFNnIA zEJPY2E!KH6(FmuggWX*`9}Nb0D(Bo7Pc5ZUE5k1YvIoryi7h3Ryr^Y7%Dn za~FW;{m-X428W*Qfa(c58uGMxf&+!zE9#S$VZm-jAE{t(;YK4>eRIQn+I zl15YnS%9wI_?Ud-|BBl%rBehjM;!X~Gk~72i1>(yyYc%DBemv(-gl91r!@=UiT(tI z5MsKFhQCSn=Y0BOYMs0#Kr9(*r)WP2V5Tgy;4SL?;(`44(t*I_inue59m=fy$%^@} zHAb)w9;ZeZ{$nQm`}xp>{6x519;DqU|6`cpe{MSSocX`5<)6hZ>jrb-?zdWyOSQ9U z3I0uX2>VgM0iI6;Oi*m!_HpXg-ZV~4CuAy`b7@RU8Tj{WbOc>Y*?fn_6PmKqIl z!bF&>g2LdrZVEWU2dMBx=Cu)}|2#sRWl~967Oh^d#c`Z|$&Wm9yN#8R(w>$m&IgDd zObAwx=I!@JK44|tjL=XKoodp7AoB+5{~8z+A2fvBDo(T~-WWuw#BGRB`Vp4h3P>Hc z@n06JI(TiO{#!I9gGi9xplwr_FlcM49 z0f&)6WV!C?u!MJK!jTs6)0_rGzzlf=c06+rv8ppesvjwr-aT;i`zZ0`%%B7Y zr3p9$^6ESRa;u2Td3qrFTEX7$a3w?`3z0mpR&E<0wjqe8joceDX-OJ4OpSLM&A$m7 z1)tvm-}*+Gf4G})>6hETt;c^p;^l0|Mw?~7RW$B-I9R1$)^~qRt+`<6UC4*y*6QP` z!M>x4=BrkN7Lo7P!pi9^U!wbS zZJZinrFdGsj1ka5RzLG~3inh3dil0vr8ge9Pt1vr)Ra@z><~Xd!SO?Uu!On7DkUF% zgL;;4k`nDZ!I!D(5n;IxJN<@U_3GDk6X@+NR%j##L(h*&GfvZ_)E~FUdlp!0S-!7! z%npA2^oM}7m11E*vD((V1=Tx$NzdhILCwml%}RnMtqfNgNI05_ zx%xtuu2&iIUnNZ#j6oe{Z*Vxdc6k(Pe3PI5Y#WpRc)%Pf9s8mWXLTS2v33SnR=lPw(mGXhV zI%fs1{K=j9PHSz68;Mv>a|yBb@2AgEpCO__MSj3@(tT}Lio4+Dk+}Dgs@FHukD=&x z!QxQH+2!$2bNOTAhYMK)4HNCOOmi3`_@l5cluDuIL;bT048(NVP`X7=adGbmF8ymF zN^o{eI^aP0Ce1|YJ1MpFlxMkRz0v=lKQ-1^xRlp4@Ti2}3?G4ykv3w%FnU=tIIXsB zhU%GM*2IL-E>ocvSL;1YfVT)p44>04k2L%D)QLaVz2 zdXNZv`u0Mus0OFS@b`!e$n+G1UiCUU`0)driqE-U_N$c+ej<{blH|wJ#I}E9CDVZxJ*-jDgp+Zly}z za3p|#fiTf~JXAK}?4D>#e_za}PoK)VyI1(?&Q!48;~sj*P;+owO)V@mO)=aTrNk#W zw8r+{Q=*=kr{a$u6*3%q@G|S{tQ1U~@x=Z0gsY^y*F?7WU%<;?=_W%z>fYB9s^0n6 zq^(PKh_4+ubfc5m*vlh@anE*-B?&q?OoRZR3ciddI z?mf~WKgU;<_liSN4Eb$sZEu9}DxF7zFS~)(m`W(G7*31^;X3-M(vn@6@3<(A)kNd3 zk)9Aj-x;&7&V!faL?IPB$`qBCOR65Ct{?P*%`&HR^%&fgE2PjEQV3J<@n51>%hj}E zUcY{wr9cz1=@4>$D`%aRwk*7$w|6m44L!IFssPOlm1Hgm!eQRtD6fNeJ+3LHnYG2x z0e+%&hnz>o}!?icKv#Zyz)Y>3}uh44A+zZe*+BL&B;%f#L)~CQG^}@ zCb_OpnZ+0s!9g1AzKyS>1JWS9%9ywA#r=eXdH{`S^O9H!zh|nKQUlOIq3|ZcW;i1- z@=Ryd;#AL3JVgce3=YY<@n7MC62eDmzt+dKO2qW0QgJ8ZHhKx(`(Sub`+5nZv#wvs zXdA*&uwtZPpbBJpsflQO^cZ56aK6*?k zhn&-enukewGj z5|>ox17jc<)Ci-&I&TaUgo!&t=K~ortIxPM>M0Wd&%43L32ek(eE$4d*2cz$tM9W= zfV{GD6unGP6Ik|{fJskFKXc0w!?(ZqbRpWtDmb){n9Q- zAW`dNK{a~RZzmaF4g4;OrWd@p?SIv8)>R{!*cc{M8#7$Qu3{|x?=|ink3P{xK>aKp z{W6tFE#b+B^wEEj!Y?y7Ia;6`rvD6?iKg<{9rGxroC>p@e7dXXAeDG~ z6t#JdgW>G(qlk>%F@ovZ>O6%r{$tH_cPcXQ?XJOE3tLlW})p7 zi(Z-@i>evAJo}AsqV2K_dI^<7VDOS^qvZuy)e|l-f1HypDImKf3aTR4WMKvD+K-6L z{kRWeYBI4zp~_M-dt8H~-1_#%`%`UF#S@=-E?rWst*sT-c)V>I@blH^4Jkdngh$`L zNKjGpTwi>&X8q$*wH$^RQ~Ld}T+t$-?a&f3;xx!yc)gC?0fG%0w=t4JZm5P0-Rkq9 z%3~o>MvT2mj^VQHkMaeI4=^G`%^&pLO4d(Ij@sj6l8a<6m){uCA=1u#mTD((%=^^e z-%b{`aSv}8;LST6@c7NKE=0>Zf23+lL_c_jvaHR-$hfQI)^5pC;zNx_L9xBq8_w4j$wmAQbJv^R=y`;+&#lh^VkQunL22Sq)Q$5zggzN#FeLAN8|r1 zjTom7vHoJSyW%UM;do*B8jEiY&Pd>yj_MzBwv;KIGTeQRlrZV3-Y(lht;P&!ZBB^^T)lB`_+w5Fn=!A=*5a*F z+v#ULg;jAVZSqH`WLWUH>-V9iFqJ=9#x}y4m zNnpBA*W1e`aV^^A-m?Id>j>iB+BWFgDzXTL1;1eshgr)SHmJA z##u)>Q8_HYV&yES+Sf@M>HSX+zt1PDO-_ao(IXi{%|0f&dx0LF@HQHgX<6j78#hkU zWrGRL2OU2+2!p)rj%H)d_M-+3eybnIJyk;0PBYumz?>_?S5oR`DunkkS7wwmpfl8) zn>eMmF4`^FVOtIjT+uYK@fE|sN^Cy-VN-zo6H>IDmlrNc!a*5tZ=X$AejXGQ1&1gs zW^8WBDqej3>eW|s;D4hr29L?%4;)~WpT;?FLs8bX`*Hd`C@7xUizk2E3YZM!h_Zq6 zS%~(#4$E?C@%q=l(D<`br^k2n(|<3fpfZs42>P6?#OL8Gv7IIpdtbLHl z2^cBKr}WFsma%_r#qk8a!XL%M*;(ECJ(s7H5uCHd>#|`|R6b~ZG4aW>yQBihdQzMh zAf~DdyahXo{mpl4A}?SaxuTBL;QLJ94A%Hrl0D7ihCOB*iPCWQrgPz{F^}=B{HIm^ z%%iyOJVYzfOkJF;#Za?>NMrwjTQ9v$M(r{_%8m#>N zgA%Hu&id?foyJt1UD$5l)1fA8Yuyk#O7aU7RSO=iq3&XQz-R<);7rR;}%u@fEW`sY9X*51yj9JCblr z81|ei>~E=(5Bwq2bF$-A6HT~v8oG%(4YxaZi(2#bp+Z37yTQ?zDoW4Skm`vQ$cVZ` zw9bw7*kM1Eb5jD%xin9w;D%sG!w0aGVYVyIRT8^#;|3eXEaWD)%(5+CIa|=721$9u zQ26b+L*n-c?)(xmMdZDq+(%lktt^Y6wx|3hk~x+y1pf{EuAN z{TYgi^Nym{hgX{P(9YyC?Pgl||3J-Y{-p=KcVnKXsa@`4@G zA+|0<)b!12`t}Qc5uFQsSBaK_abMclGQP~>RoB{ZjOd#`M@36ZOGHi04aM@KuQ$e= zBvB4(y0RyNJ*L>|KxZTiy%E@H1iqz^)TR-POl&h`rh>U6FWjBt;Dp!&QVT*>rZJuk z2TZ9~ob!SJ(U+yuNW1(N+2nftY5JcFDxbBQfYM74q(iW$|E}P4Fl~+^Pd~>IE7~Qc zn!HwX+QvezAorA>o37ZE1DBuQx}}sG?%e|7ehicYeYa}7!RU&V)7h9ViGI2I=6m!U>$4D|N}D33FqK1JW6BqW@q zNna{HOjj8(6@U!ybP@Dzlqc`1!T8@|Ty}~ZkRcYo9Yl)R@X`P!FOpr0jd{&=VdNza z4o*0fx~)*bLWhX+9mfjE^Kuv0O?wKzShvPRTWBJQ_y+`p!{5z20;>~jNw$a`;czfQ}~?3pvv!!R+M?zl!{kGFaZg32UeU<|N5fd;1>6i%a^ZH-AY0&OFA zV9G^wn$9hEaC_bPhDTm$J`x$bIJ+R9022^=c$Pj0xd9Frbso38`@@ay`^TwqZBAGQmC8+*E6{;BG*XGy*kO#zhhUJx5cD7=BrMA`u=;|7$&e$JF4|kBSZTfkLn%7 z&A4vxKaQ)UO1$zQssa#4v;yfEaxpMSB|EqIggvM(P}$K*Brf#H(YaasJ@>%RdpJ_` z9C~uoL2X|n54O5>B`1B(NKVgL`jt>&HpHrUd)!T40Hoh^rYZC%{c&kPIAvE?R}_Em zGdW`ojflNv;B=}HUV}GM zEbj+giEYl}5jv;`3OF0Mb4#h(znMApza|qDsD9<%AxLk|+Vq8tcI^d!r+Sf7Q9uzb zY96CEC4;M^hX#dN_JnzDGTKmpj)!a#lJk^+bIOYHn2Wl~cSV`oJ zn?qa|eqvOc#|r{Bf0cD7#T~?|quGl^*_+(CrJ87 zou$0?b>PW)`Fh)X)qM8$6hnEaYhm73Ftz8N`duk|l0)MIbwmoeDB}TZO65H#14JmD z#r8GlHh*4L*!-+L#kIA^kk%lWPULhWSn4T2=OYdDT1N}50? zRxMlmLq#rCD>H(*B{PeMYl@EhT6&8SdFKVdWj2An-xNF;?7mM)dwn)?jXws5VjTcj zTZ$pbWz2Wt{`VGk5RY=;cn|eR1k7rfU{KWL@mECu!i`3lYlx{<3#P*vLYC0MQ;os8 zYB$3j3>O~1ZqfBV>;$xkecry~;K{wtbs;{Vk`jRhFw&dQzU0^s_=Smbjp2(LUmVg1 zV-a%!JZjNw%kFCm=Ds_y6|;tGN=Qhwq}_s}i7mPplY@$`yyXESmRS=L$6|}_7Hs1$?Y)@V-OB zoH-)|B0KOTxMo5~L^Q?IAy24n+1St^zcyBx4k}R1`*ExfvGDLTMU^J{(_j}x%Z#1y zJ#KvSgXi=mKH3xflm@jLxlPaL`Mv|3B^LCD9w~B=(*#`f%| zmQ#E}c-YwF0ceh2Si1{m!S~J29;hsjR~u6LJ7f_Ah>;Kwr071c@_u5$Ny4gjUGRBb zZX8(6$XB`V7P5E>(cFY{VP^AcB?`w!sCbOLfBdTVMDWrH&euBQaXZPR*pT2# z->@6~ph7rS_jd5maLV&5B5mw-!Hs~v(*vUQ!{k;>@oCJPW{aN8_csJ*#K|)EDcaq; zKdQ7f^=F-T8R491pg7u^k`qy*`@yW z0;t*5I>Xsf&8xls0{tKq#Uvx5vvh3p*t1UWKVhMeN=Zaeo(BB6e99U35EOJB(x%tdyTHkpZmsYp(w7*w+QG@=vYE zlp9&$uUvQQvZ_Q8s{f6do{UK@!NdXklk@Y2WE{@YXh*W*;oKG*OkO4v%JEkW;sV3% z%$-=`_5*W92D1|?_nu;06a+lbV!W!7DB}xlw$7-PFg0!&oF1eBjxHfb1bgVp=CMHp|uxuyma@A0XB5Vq-p$DVfVN8T99@KEnz z^j!V&48=Etttj#WUYG)16K(FqZQ7CChGWz=X~l#qh#v?Sxs82)vZ|{@#b2Qd03RVV zr~udOI;xlLC-sTmUqgk&Z|RQPhG0vgzVSWB`)+pTd@bv)z8H=HkmML5y#tB_pD2eBlIQ zUyluZnwOJ+Jw}KNFfvMiM=MS^!xCGlztu!Km-7V!;h8KJ1ILkN@;>;G+v}1fGo$LG zG0I1T03Wy4DsFwBitYJ?EJvy(oum0)?+5H>a!=0zD&P^V?fu;iN zRHWtp>&c5ytVi_dP+-Ih*wXEPeiqSy@IV*LYAj!kmgyDUj|AEP_2Q$mijC-}Ps_pa z*0??4clRbpcq3Khv!w`2KGhF- zboA}wAy>WM^4vYh&fMdfS>t_=SIkZw7O@5^b@Z7pr#Bgl7|~)(rZn1tMzwr33rsv0 zMVVe9pI#+}B1GZ1HkPB@Ti@8YuUxOAj%@zFf2wJCz!|aVJlIlMy1HFSemD^LR|7yC zZR~mtv$AuICBCBWEPI6EMMw9WaX||V_4gwqQw}a$nEo`9FOA~Jbfk<_zwH^VV?W;n zDeUQR@_RxLPaWJ4-w7I}0ksr zGaL@ARm_h&y9fKB##y5cB*UrM$I`2E*MW?J3CPA8bEk?fMsw(>#a*_bgS(4_jP8E% zuF^kM4Z{QzswEz{nEK~m=mJ)cWoZrBwK+rRHxND4kK_!c9!HKW;WgifZZS*1DRERY z%#U+#j) z1l~k%HJ-d!R4?DIX0WPdtEbKgEA+=b;`8m<01kSOMJZ*{I_IfmrX4sNMqcUNrw5a@ zzJhA5kCytBKu+;40kzIna05A%9NC;(f*Zj@AN{c!%PXX1RS{nUrPK`MPb4fi;D~_C zqr4K}yP80~u>qL`+xRV;gO|kmM{_?$%H4vB=zkC8x-=S8x9^66+ITFsiyl=C+)(M; zg~L14GQu(NsW?I~pe@w|oH)Z<3=!9H8A6894O|x({hvQ?(&V@rR|SrUgR8f<&OoUk z^5D9tOlg6rRDto!ro?uZo~3hC1Y?dDz^IojaYdQxChr}q=bqlw=g{^30#L;f0ChS3 zG5JAK2|3SOf53F7;arD7B*VW6iXZvV1x%l_suDtIsfT-19gduchcI z6sx^ll%91N^N^==uC(EX3$xH!`bPfr_U;FAaU@EQK}DCFfIRLd|4mB-AwkZVXEmrO z0TO{6!v45Soxrgj%N6nddJK3$G5J0IMaEz z`gp(ka=QJyd&F)Ve-ARUYJEnSP}KXVJ${733F#6>Iw?k<9;<dS`gF>@leYgmU~NQgH9 z>qUbb*ypev;>JkqM3b=4??rPlHjhVlVDI?e@Ds8mM1T0rPdb@X&Ef=@{SNsiBQLKS zI5K5a<*;O*s{0Kxe{@Pvd-CGv6Y_>avQ!B0C%FMMg5ZGcf_Ik0C(roCv5or^Du5zQ73zbnUhIreiSznDYWlfdrJBJUFr*I z3RKKO*k{g#si~$r^jzZQL&cnslETUA{9e$APO+uz8sU;srno4iYx>wY%N3Pbh$g!( z2%jB;C-B7!HEN2?r(rT{X&4mMLdNE%2A1SlAvH>9Jf^-kKisX4=Rexr26j2xIF-&R z_pNV-<6&1sy#Bn_0p@ielgPo^E|4~;au*yH89Rxp)=Vg|Z~4fGXYGHwebGdglE)3f z%6Q^Zd*#-KP5zf3;zPqRHfmOPQ{Fr-69jnFWRhj{a^P2H6wiq_q+cKlc2B?>GiqoV zPgq7ew+4V{Af@TLHJVH?)h!hH2$oQ+&yd2TAwGkm$nm8aj}A_nRDWSS6I4D(8$W_v zN35gIZZ)zY69M9C>>&?=mp85<@FFhi{SchF&o|6Co7XFcmRL*=uX zsiLqbcAV!&!p3lVW%*2d<(x;0^fTzmwOb zrUc(ZQuo65P&BQCjk}1aJcw)lu+-fAZe~tJjFUSdIBPsm>7RB#|bE|ei zO_^@=3AZPZ6l_}{eKX*)xvhT@XfQ};b%@SF{tz7m9vzGe{ zX>$K6*@b0L;^)UL#}sZ@@9DAi<;|5ocIPl>6ApCLUTl9_JZ7MNcX2doth>Uy^o3lN=SOg4KU*5gdD9@}?bX`5`BRR8xm6tw$Co%w} zjcSm`GhMoL3F%Mlf=}O@_4o4g`IK-I&oDJ|bZ>!Pij)lMTfl-1@F+@L=m;`LK}kgi zF2Nyil$<scB1uPTy4AMvYy9Jw`75@dZ)MR0j;IgMJzV>jt zHM{Yi7kC7?$IBnWk8umXC<;dB>FZFrq#Ez}zdTzI-4q!RJ+turNlzr@&?zOM;;`d~ z19ZDMPwy3TY#|vXV-0e;4??+XDeNt=old)%8t;`Bb)SR$1dql;D0XsiCN&-CI#ihj zQ!uN*`iqgSJ?-gvqp=r%r0}vd=I9ebO59(wv{VGvy6Ha)z42J2_-JQ3>OT9gTe^XHT}FmInd(M2@7aIW^56Sgi2@BY$sym% zxH_adImsox=E8NEPVxSjmmdjBo6^k3N=aWo&ar*JO( zli{(}9Bw=dyI34EyJ$idh28YiMh}&uP_xd$$dr%+yS-qsbn&>vqW5nC6DxE!3#Zng zl7DLkY703JCuqZ`tb6OQ15IgQ+LHMHxHjY>z4-|+@$sYKl!s7F&5Be$#Wzw%lBZ2} zHsqLQOmaBhtlNALi{EyUG_qrRz(S>d?eP5N2gaTUdL5aG>jTG|%7c}wq`NMY7h^Ad z)8F-&_goOMczQjOi?%=4Dx93PpOJ^faIauUdhsQBSlk>7Wu{0rkx}j}cpQcS2-^BO zSoB>S0Ossl$sCpgb#m4~y36U-`}jN3{HvV=I~rum&&0L0V~|6!A1v0r2=Qjdyg4~Z z*L!zXzB%XYJ0bT)ztYy(9qaEKJI_UlRE2ec;a^45%e*W!rnlSN2(aXpJ^ zVJEg&$gj*5!9VKdI0Cf691KQ-;Lk?eSwzT|aAwlpqswtF`q-{rgR;K#eK zM@Cai)gFERn!}WX;TT?ToY^{@vnOAWw8Hr6df~xO`-C>HCG}Yx21o5Y%h{d9vn+zZ zC4Q}_c?eqv(S?}Q2MS6BqYhwe&;&rMDbQ5Zpx!rp$h7olt@a0ag+yZb36Vj6v(AGp zI$>6uqi_{dROi%z4M;C?H5th+J7p`9uTzt4&#*5vzi5n*v)3L|F010>IW+L=cT=$O zA=sU(T*!AjjQX+f(4*}5V{gZSmBND3Z%&}n_HfSu!B%)JBF6^2xWI0a9;n)3ut%#+ zhMvRwS3dXmm?3Y(@vv$(6oJM!^c>32U5dGeM!6axppxBrZz!L}$}y*Z)O&N$HF$)c zIBt~Di}D&<=JAd~i$*}`xBS6G+j$(kuz}Rhci~iCRL`TcqPa5Db69-ou*umPqlql$ zvXS$E%X@=>1%{0;aD^Jq1e$4$9t|xY#c&D#r%&>q^Sy=@RolqNH1hd#OhItZ?fC&H zV3jPO!}wblBgoRT8r}pK&>@j+qljHdVXojiSSm(7!N7;9dn*m}GLFNxKtg{TPQ4RM z%9MwI&*clw|Lgl4(Bk}EV&=>t))E1q;ho5m^hz0o=viohlwGOyDg>YBc&m#y09ZMB zXjVi6RgO8IZ^*Ph87-4rvz@jpxECe;SCL*SIkA0N?8TGSN-gMW*ryAhm;5#K#prN> zvl=&|i?5h0Fof6x^=Kx6*8cBZ_x%N*fuqA&SNRwBdmo-9*UfgY#QQ6LjW7@x6uv2R zUoCw^aqdCCa`oKleFz6uzStG}H~0ON?2vo_BW9?KmZnO05QqdumV{`kj%(HjlxA@RB3I0nc| zqNvQ*UTvolsuk~!b_->=e7uJ{Wp{;LAzsT>HV5P4yPakandUvR@umcvYFVS3RhFIW zXa4sESrf@t*(qgI2-PRID_Y-=L7VMX>#|3d76Jt0Ku zcVqfmNl80#*GU4@oDL;c6@6v;LX9@vns;<~&A(k|HApRdMA554r*J;JeLOeZ@O)0B zlktA*K#rk&V0F27h$g!_gq^X1S?j&*hl#LT2<_n=aK76#c#sejycCVtirs~ z8yK*$-$qC4Y3pEQVv>gq^LFR{loW82+y9<$f4>QF0w!R)&`*w7ba$Vcj66*?(?*X` zs_=PH7kxA|G>xLv_ZKz?aEOZcm>c8ud{{0XpHCTShvh*H#@~>A@*bNk*Qx4iEc4dqOR-_8tqUHg-3K%&STf3wd#%; z7HUyN*b5|R7#OZkO;7V#?R+{1U0lBZp5Zf;sJSwmK_UuFV1@mDF+49#{GPn*KJQLZGRywR2}r-gTy7I&*v653TotA6mPI17Bsd0OdrOR@62QhqvS8!1bt z3T5Obs=%KvGi*S0RG@2v8JbN}0;KwGQ3#UWFj);sbc7^e-vYbmiP7qC! zkdrbH*}pnL-*8OxdHSE=0CL6N$;1<`Upp~S;#JU;F&UPH66SuUWIQE(*%n2#if5qD zBRcHiWK}cu1>asv*5~pz&bj+qw#+!m?$5CCF-9FBor}!i{GoGe=inC+hxd!wdq zJrYulM|msAB5vDLZ*f>PSKtkmHGJ^}8k9+~HsO_l4^mcXhm|^4CQ2?l5~vQ|>7_C& z|Brpd{Uu8O>#9EEY;LR>JfE~`?xx7k46{U^mWdjjC^&X;&fOfWwd-0C3(9J*uG3Ns zbN_Vo`pkNARGGlzSMt#z544J#UtY%G_L11l7ddNs`XFSw(2qU!bB<|GLKMG7Fb)2I z%D(N<{oU_bx4MtE#_oQ6Tpw9>i4#jZ6veS`qVDgh_Q#u2Iq#*ek+k-F*&2RKk{6ij z@yn?pHY7B`c$m1d`z1_HxwhjgYH22yA|Gx4IMr{gCJ*sdH6INUU-+{CijTl1_o6`t6WEFcVnEo`JkAIwcO(4 z6YJY?a__{pkGX<{kJFxH>X&?h=xO z8Lql7d+J=f^HHzNrYpCTz-eRar#YndU!-6K%PskgntUHv*l^6M>drQI^JgLCtUd$< z5BjbKQiTlMsiY8I8G0xXBvIo0(>()2%afP8-9&Sa>z%6;rNroo?4kx6{r#80a;Ln> z42>+!m)Q7qg)t%j%4;gZfkZVn$en%eq-*$`vRnNl$FA6JVJC~+fSdN>hh5iWMZf7g?4dF9 z5ZF{7uFt29PMGJ5Jr%;6>9D9Z*_5KejB3O5L{@3(G!O{*8@3KpuiQJuL zywpC0ug6S+jURdYod!YEYs%9ycIGAeHZ!iNgM2IK)SNp{Mg}iQyhN++QFb{=7sJu9 zW-g*85XmblM!bLjUXPtG4@c5%B{8UF$#vI$m%{I8WZzQgj|JilEXQj#hHhi!L+!TT z^bbD`IR}YrYdp1>%M#X77;h2$Qv9xUD9qc7022!=W1`{loq)2i6WhWOfJT z$Ahlij06`ivH^S$3M|_eF!N!&a-~<{L0rN8RQ-F@L;eVJTe8x1i-C))Lsl)LSrP?E zSh5oWmnHoz{uLH$bWfO+D!DRSyWi^VMB);I%I!jz1;0b8>3zeSDd#fL0TU`WJpmzM zYMbs!oE<5dG%e!GyC#tFf)e*$Ue}k84{yi*qBFCM4u*A^9|}@3sqvY$g;0sOHUSWW zn+jhHH1&Ufu^N1_%}AnN@HMm7q(HkhzP8#VO)=ka0kTLoVSzKUH33*g<}bU{@eM|B zd$RhV)t$bMwAl+EL{B<5|9H$1Me9uK4b0#}+~T0=FFb5a48P#Tzg}AjV5B^?>_qM- z2NaaU_t5`;jD2-flj0Z)W2^l;4# z=jC9}f_@GR)gFXw6CNQ;_@C4!&ieX#Zv%l9zB5u%CUHzs9B6W;1c2x?E?$h9B69lQ z+Z&w2%W#ew}YWdqQr&C|YI1*A(r4X2R(<+fKz4pAEF7ENRb<;FCWM z`w|lqTNS*a1x;lT7=I$`@Snul!~Js%c22!twUhATI;I~@-#ROVQLvr{j*qC*$lK~C zN7_!}$5Uf|*e$oi)_RCH{J(#*brN%NbGL$y&T6(j-P`oIAr>X00{yp)%Dr9ajl8mO zfZ(CHpO=c^b3galT2xOqJkWh3t0;r8hh~^PY=Av9-H=4|zaH=%d?<35Jw^Kq;|6Ek zHG$hzy)zXpPL$KnT)!@h(CFi*tY_g1%HhDaoXolhr17hB+B1_DQyn`5#>_i{}FmHzF*Wc&53OC9~1T#@G+BliWkfx`t1ZubwDDx&! zKE9R{u`OQ>v5Y(HK%4kOV;w;2k^~-q%kIo{0%gmSz9d;rll|RLO)cU>Qt0k4<4(Q0lp=7=vJH2X?4SWm>y>4gs*og+`08z0~pfEViKdN?%spRS#?X%1rT|9rcn2RvQOex@F zW5a!StG&l2A#oW>Lmpyc;(2Kfj`!uM{d2x9L6o zN69l&sRqO#I}i_Rk2qXVI8V%K&HatqseO%Hc7#;?`($e|h!qUSZ1>Bte-0aiy z#ogjJ*Ti#px>oygENTQb@D#rRTSWt$O$7PMH~xQQ6Coc!^T!mv9BVM_Vs|Hq_;0b; zAVhoHhF`keG-&m}wVOzaHo(;B+WDuW6(eWc)68ve+a)@;y^cNlXIvqy4Z_6fXG{-f z_S=9Qo!JPIq4p-dm?hxecadEzarB+?5f9F+GOC#VJm=FhTDHSPyd#SA;Fa6Pp1E9~ z4|gscS21wu6}^ohawT6e)$1&;gs(B zT=oy(U&P&b0|qK_N@vfFdoXP+^mjUw&(YNQi)1CT@_dLh`Y**Nj`i?cHJ#mWlT#{D zU2=2r=tnd-c1KQuP{VkpF?C7ujZ!YRaYUF}_T89g_Oc=vc$asy=i3~IP2 zxXFJ73wT2JfrrSC?uLbWkM7hJH9&D-o4F7a99&cTJEz3_FS`cZX4nuWSxO4+M?`tF zcm+dBDwZ)q{r$74k#DLq)4XRD1F+FijelX9KP9a^?5gMFb1NAZ@Zij2-~_^YZX(0< zXH((A*bLBf^bo)<&AcB<}-jBkQ86T}GapT3?1%cKREFb}}#1R)k( zchi*;h}HSuUDn^L8Kc71eF1k%Ll&=z!0M+cXbdS34Ne0#U6xpq15aTO5ig5n%?qVY&BmKXg$6s>)NX}t856AGuIqgSZ2US`A zOKV3h`HetmN4BN7+Y%^H-QaaA<@d8(G`$y$X!tG_ML3SU)jQ)jz;?T4^WNe}rGEMe zQVgcqREl(TQnF`7QzuU8R}#bjJOFbz;d9Gf{cq_=cZ`djj@)r7Dt4uC@?N2laLend zol*|`UpqQ5Qt@Z6E-zLqQ^6n>b(}2G?Re+K;>X<=hT6nEFj!W}jANx@a&mH}_I=N8 z8s0O_r5IXhjl|1Zoa=phUw6>rnL|CX_BigSzs|@}@Ls$RdRbFGX;Z(=%M5b9UhfL# zLywy#(C}#Uo@@qUp@5m+W~vMr<1N#DrRj75^?}x*vSCWn8TM!g29eiONBl8-$2-(? zy~K;(s^N`@hn<#doq?MHKi9byCtqK&4F{7i-`HPcc^bze0AsR>8~9npUZOl94lY_x+FTj3HL3qR59t! zY!H+5W;iV$?a5G*(5PNdYujbTZT|-kAGSWwP+#AE@XA$U^GV2s@T&WX*^k)vrQK#@ zhEAG+9zvqH>_#qj5&^lGQDUAZFIgoDkQ@UZZTz$G| zTj{0M-22aXZ;ss@$yx3m41JUaO&k<;Y%hq5X z#o5wo!&rx`fXXhn3PcGYiWd~!r4>`LfQ?~t^>_a~4M>)T#SH606!UPl-7Zj(%D1x^svD|}$C4MW#x0ZXYK*T5N zI-@p9;8MnU?%dG2O}+3a^4T zc}z@|*zz>ce8SVDH-#;e_J<1N`+M4k1qe)ul9EBu%xXiCCJh>hD=+>-qVd?TR_c1Z zedYU`Kfu1F$2hFT#*sSIOg*ipv5A!c)EPC4%Rb_q=x;_Tol>?lf<(yH;cZlHP0KPC znhF|?CRAy#vd-gp9*f2&AZLmbdudKKRAt>pcl`|1C(B`^$4@_2g-otxC%Svy(98H6 zy*o$V^tUyUIpO$3bdJUtR2z^MZbEnZT3U|t$Xl20d?mE|`$FyQ-`}^rEpqWvm^XN; zIXAv_zRAUU{+Vi5XW%xs$CFx_bCY_?W6y)6cx(QhkJ8uqM|{%!0Xwx^o!KV?4-6tU zg!+BB7xtqU@b>nvT}KaesvInXeN>Nn9JH1K2Z^QhF7V8?L6XZ!5J0=O2tD>!A7gC; z0Z6>7CDV{lx~Docl5m6@29!zAv16H8EG#VOZpOZ}$*ajZ6JYrAhRPt2pt5AVyNw_0 z%N%RU-@yM%h;5J^7`fHO@yS5tPym8-NgZOPUQsjUqiMzi%#zOXU~hJM;L{On^xK>G z(qEmg93eX^w0Gr1#dqG1^CRpZZ$CY`8>Ccj<-g}AyZa<-q)tQolurV1Oz^_M34f=yNfn_8+vRw6 z40@;%?S=O%e8GMMOyOIVtEXX`L54b#wjYqSN5`%Ur+IG@5CobFu>pdB&o6VY7-B$Xt{ca#-AEYhzD=dZ$3kXTE;ft;Ci)zeax>nsB4nT zUtf3B%s&Xbe~G+RKQ~5eV>r*Dd9kQFWRhe^@=%=yNorPsf=EnJX>K%w8K`rQ}(Ff5TW**Y;eK2gnCbJ38|83l#(17Dy-y9de+ z!$=J=FM9Ryo5{zT#}le7-pYKUXPicOL2#c6?uBY3w7dzX4Upq`vG(^*2R?(xl-c-? z^jqFyH{OFi6CbM>y(Mt{KSk_+Be^+2``a~RH;~nTM`3BP^Ir3fv#{GdXcw8hP5oc} z?2nhv)rki9!;$p`?wqo)7wUE8mow?Jufqm!0q zUlbQ3Jg@u4>3aRU=t=HCp!|}^AsknYYJ$^|Te?>r08sZsy}rDixhx?n^* zAkCc7Ah-)_8YchplB~y$JxE~y<)YI=4*&f%RqG3AIYJ;?T(DNPNIg}!7!B)CHSOe|;S7zTH9ADF_=%yHj>YD#Z>Bzdri zor1H^XDi8go`r7M`3kuTx{)sH==*T=FVB%h8)rNUXM9#?0-^s)M)pAGlm3R#r*RHn zUGwC$8ie4@YmJ^th+~%y$O&J zjyjrn4*U>{{D1virkgz8Y0=cRJsuzg?qi8i;}tVYfUTY0BU@)t{J7MYO1brNfpF9m zV^m=(J*9+O<_f?#m&bB`2i56X`0VW4*a?*BMB{&8&&wcoXp^wdNelRtdw$&MB-3-M zMebQGM7`AeFb_u0ts%rTMPSw8I)TGaV#ikk3Zhs@ixY>I96BsTdRQf8;jBdED-$By zibzYt67H|TqxHlN+iIcYM>Sg$2j6Po{mNVFi~FPRtjbIsmqR<5M_gxG4uiF=0U{Ly zaG4h;(Don$;e-FdFVC-5cPDUx%Qj0!os-SN+8nUeUIH1%BM){9R};u^t(%(Awq*60 zV|Q;qk-QF|AxV~&1AglpST)+rZrkWkG>C6-lXpAZS&P`sF^Cc!TM1B|;q~ZwQ(RYwoFzeE~P}l7n}^V6_HjyX(%Xg>~)4Hhc$x zwDR7m*L(XO+H8V?nz!CHG*-c3CmDd#(XR&bwJRJe8o@_WsBU27Yn6Ai?go%$_>$}B zFE6qvy~-_1mCj6j11o@yHvODM*bgT&Gvd$fcETIZ*?4gUC27JsIp4dl%aSoJ0^j{c z?prK18R$n5Yn|rA_k=1_chHXciW4Jc)*9gY6ph&QpzYFDMd^8TtG!(6!|NsSnG#n% z=Lh?)x9|ipU#lRA2cc36h;VzpGwl2<_4!woeLo2O)|qScs4CB{ft)(c@YNOEflKLN zRzgBv?OH%mAr?5lJHTs-pkDc}Hf;bTVn#=fd4eED>aAxe4X3WxL<;)M_)Ywdw=c}< zO3o0n=hVv*OioTN%g&*7K=7&Y``1dqQwd%x0dU_B*%1?J*5u1|^P3oM{kAF&#krXH z9`TPz5YWWz*IYSAqM(L*%}9OL;x(eWa-zly_(AwniALL^pv623+o&;ZyWg_N_ww$Q zjW77t==Z?5M;gjOnhkPdFD%xkkN@eC>8Gqzx|P6!8veGW;WrwfM8C5TawvbbzeLU| zV`$)khc^_urGOvy*TCR^ik6V;dtMD&+wHMyyIXDcwIp>=e7x|jus#m&=ZJ{r|fg639@r9vRULpVx z_jeD{Gx~Ne+q_QSeJhVQQqTG;kLVhLM3e>x*Gu8UZgVxPBez>8FnbErFuIY7ii$li zEq?KUN5CuQ!Uj)GuO5MLk%Ri!k>;lS@<7REdXW(bnQ%A^#6(;aWka#Dy4o^`RI0lRVV{05en2r=9r=dflNh=L9UjsL_vjPqPc!y!^9!Zw# zGeeX@BGeBpKs@6ItmRBf_<63NPV#}7%}3a+D}zRn=QmFdU;N8o0jAA{Q0Mj)DAzBu z5AjiC?T4u+4Gb7}9`B&u&%x8axBdN#D&L^_auwLPy6*3|cz;bb>M4!~Za?ley`J2o z@!ktFK*V1V6PNCbI20ocg@^aar_~x)c|7kPIsMz`rSIBL)e(j#^=r7Zj_sCchzz^~ z&IIoUPT?OE-#B|Vt8r42K90`yjnfhSSc}6V2y6Xec9A526j4nNnUGtPaAyKuWLUvy z(Ub(TwqU%)2k-s)fB%NORn81=0WGQ|Mt5_Dzct9eoxDodJ0htm>}}yCRKT^bUdG`DPRIsQdRx`tx5`b&-v)+%%Lht zGAA;dY(O^nzBlNgX21wiUyDi93ITqv7FRk(AE!ZNIU{#hYUYcmXdyD}c{0TB62~$8 z@0q{xeY_M#sJWBCrt0xgU17Jq&q@?)MQ_}zMi#EzOG@GZbAV)?T;EGTd@Y#al-$K% zI4=3U9VCJXgH)HYJxs)!V>!f*TQ= zos$4j)LX|mZ*ZJ?kflsSM8x;VYB4#c<1_vHXT6JquZ}4Vpu`)Bjxo8_%h|&=|8>wd z_j2gefUrj&E`*NBLt)49a#J%yiuc!}DCZ1IFuAoKu^5@|LAO5>nWMqFK8CY?ka{v3 z@o5b_dL=8TUiv?`6l9Dmy#1bu%zq9kW4>M+KGWY2P9Y%HAz7IxRsK5mo4W^raX28) zM$d^ThXH|GjPwdeX>#M4^n&y$rFtHAxrG_o97-T z(>}dy7__c$L$aZcsJD_cDcWL$Y@|{^6X&?j`b66!qrE46#Ds@bN$)>2P&LXR^Raxa zr#T~sj~U5hZh8cVM5~C@PQ#f;vrU8t={H;nC(rG1NjqE(8`vaxq&AVNf1bsQCF-c; z9+E39#wU@dix?k#1-C=pxOWrMA%Q3vEj-dD(DOXXe6;}W^P}i;<=+_rq`b>67mwhp z9!%c1g~yE`^VQz=iq2UYo5%~VsQ!EH0!zwSk;MXJBtb|0AVcHI!y&u1A(>P9Tmb_o zv0CR;qG+j%*?A2fCk$oTpJl(DgjGjO-FR1-BXtXui4lAc(PZ%(KC`<-Tzfy3JNNGX zYuh62gW1}CJc@q$i@BGM@;}kZmivSvFMHMcjn{L_na8SS%+O|DZ8_^J)f<1Gn)ig# zL%E=XCFvWTAImzA3O&LdFo)iWlgCM9DFXi@Mo7|Pip**C?v%D9AVSoF(}S=rYVgB{ z;$uvsJ|XK^y08KCRBFKSkR7|{g_#+E)%QJ* zS+@LZJ(LK*95n%SjwYYZn&)5~&}nT@zXg!HZT)V7-SX)^8zgbG>KZMEGN0`g<@u`=X);u{yTnVn)R%H zk)GD?-@I``1GO55cP@ z@!mT4%Jb{vB-63(r-7%8y-k@{#_4ump|BcAL^Hglhjb481HH!;oK!_7<~jj16YO~!>~uQ} zQXcDoD@AG$;cQZA1L`3i{dyP<_H-f}Id1JN-mMho$Cp7F_Z4cD`_RCvE`|I8B!31T zA#Z()d;f|7Z4BavGAP&-c_hop4t5}JYcxxEWIO~X>94YU(Du)AEx&=2A^qLGDhrN4 z?(aTEEm>s(-uO%hZ@p5K!l3^aueJv*89 =u{2qUZa6BQT^s`pXJJF{up2BH5RM# zesl3YCAMiFiq>Y66nldbGyHKm;Z-2!pH6Hm((hu4aCt7_3QTr(7z4q+6tS=Ri8G+~ z-DHz@CjWvbPL#063HS+3)Grvck)1kX4(OIpt*+lDxXAO53*7O@*!$H;{Rbsmq`}@6 zPP-8jybM}w{@ftv)6b8WE+f%BPqjs-dTNgmp4q71X78(z>}@$L9ctC^4#J64j`ci0 z*KVvr7uT(2`C1Jow|%4&7Z@I~u)9sKE85KWl2CAZu^S^(sic&fOq6)%#fZegwaG^8 z&gaY32*HV+zBTwM~ z*va4_^U?D&mc%aa2np!Zwh-B|@3XCEfKvgHjuS7JnP`1MKqcnujCAp5Q!&5Pox+$e zi(?(6>BZpx)4q(F{o_XlqXq>wm?%j#^|hP)8bA1DW@^xIyDelT1v#wUSeE5+amKtF z=8V+=2fsx@M*KrxdU>V^abZDzaF+=vTM@|)3v{E_Plz8;GM;hdEiGKKmuEprxRnb= zxtpOsbmwEhtmg8um0PylIez(C&p7|}oFG;-@N(w*OB%o)r^0@53?U#Q@zQ(#?D{cD z*N@sdyn|2IoecIdg48f7e(BPL>;od+bHa5v zPw;a1IpJsX!N?d!swr+8pbEP=XtKOF>N%bYh>UTcdezr+G04iQ#5_z1Xk8%MDy>?c)z;IyI5`0qUzek#TJR<>RYwO3Ix^hny_IUi>s7)+E1? zE!FiZ6aV(%H$y=U9`wNj{1T_Hy=A+*wMgaL@bC^exA>M`t~Ij8_?A9(1B+>Gf%xk$ zb))2^3PNEMz6e&W$k<3bSMHQo{7q^5$?-yv@pXer=Jl`#oO||<9Kl@Sb<=-|;hm^( ze6h&n_?4!v2h=yG^yPHz?RdyU4u#|?>jaUji}_07DD9T)Y+k>$kH@XSSq1U51{On$ zLD(^WS|QVGV?GO~zJ3@XS+Za}T&oQDyb@z}efmiqJgrJKtoKXjILh2xe1PtJQ7YN_ z(uI=W1_a%GB4k_>Z3s=_>)1yAyN2(~pyOcLf~XgR(XbjflE5!2qWF#l%l0#!xn|F+rlzKPS}1NgCGjN(_)joK_Ep%GBq+;aBIr1An+O2;l{yLx}Gfb_5F9ZZp)FU-PN5m^TojM zYt@h#YOd89o|(&0x>RCg9b75GKxN-F>v;6|Yfy<=BWdomLzOW)8aAxJ1u|VDe zsqewh{yMVs#MRpuE5G<;wWdMl36kTYO&UT?=r2|Ng>j38*YH^yoO~@WEt`7KiZsKc zrMh;ol(lO2mZiN{>(S7DnkK@RZ$)D;*p|8dciX|MVOx3$`! zN|owYFfG4TD0Y4NmjO&IzoszRgl{T>yAmoF^0{mT^jD;AN9{r20J9;wH36_;sTkWs z6x=vcUNJ+FFu#xR=$FjU19TgxV3Jj-XQl>8VIZSGPm^tS9QVYX0c;M{N^cQS+_$CRoKH*vbj?<4RM> zzt%nvph$_PVR5#py)}I1q|8v6HR-Rrl7wvtqm6pil3odVzNK}0_ zZ%!UtPzY8N?^?;1q|&TD@O=cT#L~Ud+ttGp$!l=VzhUgm{8Q-ED&>vGys_>ZWc_-N z|5&$x-;{IE;$Z3JAjNf!2g43U1iER|X1>kAsX$LONEA{>8^(F~gR%iOBL}@hMkad{aO+-)x zIc&V=*{;a^GeF0SiU6+w0Trn}4c&VUAqBUvx#T-(?{6aUzx0VekWs*BciIWJItFz>i{pf+T=Y$h>81y2uvI~Q?#IBrqRu%22w2${`GX@s^s zh4z+@C^El2{V!Qd6a}_%CGDy;;M{Ss5=(=v&~93D3MwGvA(9C7(bj33zJobKIKXeP zi2w0|L|XS1fOTr@#{N_!t0Dvow!WNqYY#4;sPL0#xm#Hk-<#8W5=Npxy>1T^;ikd5 zxk~aip_sRjp4Y*ZxION$PQapm5NDkaFde(QBKsYDH~rt28-G%cc%IktUFjTg=?2|< z4qmw^TE2p@aFeBnhykFebt~=HfokxqC<8;!Y$k?35-js$1iE1XKe|-s4bW#oW0|E5 z^91_|QmDLyCd=70xxxD8YK=zuPL}U+egn0Mivn-j*;GtS&oc2*7b)>ZUE5B*`#ut>Tnkw$iO8lfpV(W6_Vq`Ij_a)gFPdR`VFiG` z>-vnkXVjF~pU2cx8*e2OcA%DE3c1I$L}MoE#&`FCX_AdE++@S$&$CS}tUR$g*?{=8c~1nQvmS<<6K{PcB)p!>U%!IZ zPLd=o&5UDycTB*LHtPqjd7dcy$Q8zq+Vx%?ZtoolI|UFYUkBAyi%P$uIn*T6Q0c7p$OHI)qGF! zI^=suX|(=*JcPJE7ns?CS~>HQuuM<1L(7vy>;meV*~co=Be|WlLG6;+%Gpa{@foK1-z&b7=#C+MX4JMtA=?B8;g{fFaO21kbcUx~3qY zVER0}j=!8I4t9!)xZI}*9^pSVe9m97mSaz)X;(i}uynWC)MS7R`>qb=M_UEn@qg-M zRZMknLHrNiF#`}>d{(t@w@<=~K!6&tEexvgrq-jGl@Ybae zRFygq1oSLZf|g8}ncxe{a>)6Eef_b313&j0g;18eLbh=mjKo&N1+siUs8jIDnV&}4 zlsKlIq&)2onrXS;JC?iiPhS*GLp%vL_EPK$Yry=N({{zm2Ufj%1uB^&H(%XXY|Wt6 zQ{>Pnpky!G)7zp>GPw7dBb20A*(7S}o9ex-O^@5ZI=_9oEA5#fWoxtCUL)p~8-8=P zLuw;u+qbj*?%4LOT<3P>1i>yye0_&|nQ8G=wa*LXWe4(1-^vg=p-Y}&(!D{{Q#-F5iC;YHZ=sCLdi{hWP0 z?eX3>LLFWc|VdUytqv1<+n;K{yP@q4+oC# zeuPo*?lPkzI*!o$06yFaDZzQ?ESJVZH#j%n^XjT`8eA*zm2!d&N%YO=3>L#H(Mwjv z2~>k{RwVyYh>d^m5kVyF>8JDe6G;+KG9YF9@a?+mU}9)qw#7E-J$`}<9U{Fc#m2n9 zeB3v#lk%Ejz9P}EW?*j1Y97T%`2J7lhNEZGuIPhX-kCvOBDuF`@-VyvQCJS$$Cwd` zg-S))92QL~UO_-*3riFFrVsz_@Sn&hvdQBQz_@z%Tu1_CpmCnZ1@SEy1hgR~qh013 zaA>+xZpRK|*Oy2H35+cqxL&`%1%Lj8yKFl_iCl!d6!()w`FFv#=_74sPAVzz%X($@ zc4@&M-X3|2&|n<&CSQ{@PA7tHUXR6lhN^O|AX>9AU-sOfuhk~INhs3|uw(R#JhEpZ zs?y9I^V)@VCTEV@Du|g-y^%9cQW0j-Ll`eJ4$x`mXF9!Wq0OvWD5+XMqm-BTMSJOqk*W8|m0!-Lt0q6cJl5kZ zHm&(7w<&8^2(Ys#xXtC8_CX?;6Bp+%CWA?)tJ{AU053hkLjQ~7%V6CK z-67>=#vZvS2M`E~zU{PvSjzOuMYy4ELYF~Z^++{CLc{cL0BE$r8Oz#apvhwmUv>5!8 zG9;*6f8+nYB;m1o3Fv&(~LBMeMBtb6xZE&K{>SrJ4YZ3!uhM5{C&IE$c(rd#V8NT6Y(zBOqO48R^hHjs#bX?m{fyJ!qb|zjkQps3DgVsH`YY9IyQD#L)4> zw>;b;B8Um>;`N#6()rGFc2@uxNMJ!3o2ar5T!l7ho=-u=A>l3^aR=tN2M*=Eh+Qsl z0Pev%$z{xL?~?hwjuU0l`!RltR#sIYXM_DcJr6B|p#9$mX-xr7_52`R&z$^NF^tf5 zqrBX7IHW0xdFSuw21NFEoe&KJzWzPHrdq4LH#EiI3ZpBZ(Wdi2?I7~8tL7)kV6g9W zw&z%Se8l$87$<#H6eoc{L(@kp8d=-JiXEr;+#kt7=}|HH~jaI zQBwti|Jn)a2AvC0d$Lw|dKF#t-FisQA)l_c4bg>r%^#1O2_jP>-;Gaa6(16ZGywu} zt9&Gpm|cGwS}#(cX6I&NMsJAdZaQ%zIOxrCr;Djoy1Z}R(pa%R52B_yR}jQea{F)< zQ8E+6)Fg}n)9*fvbK0P+cmQa>cdQ6qax8jMAv?}8PU=E)pTOg6w+<;A8J=V-2tNvX z#<5Lbbky<|n)yzG38~v@)5c1dl99b0WXqQ%h(G`PEpc4n4+DL;jZ?9BB!tgsh_A8f zYM-jW@J>>pbh2oGW>U?^q?*{pt(B2RJP!sf_urf~YlhuEa!VEZ|H zyZoAnIODG4<0c?bD>}W(wNQNi@V}qyJr4Ok!o(6_6^(jY;-odj*`*)HQpHYwfDQDr z8jn7V>}Ifp}iRZag?7knUROxxH zT(}Sxx%@z<@3UDQRDeXpp|HBler~S_9qf%CEZX?}y;TtqHfd9~P2bO8YX)g}N>){w z9D8wlRNM4r>&+d}p-4>oI;8V4a4_E#B)gO;_#UQ%-OnT}U6_V1Kq7%PFfPV@1lrTtgogp8;2}RU0*6T-lJ2mz)FRiGnedFvi3Q|u_g)K z8hduk&bL9$_{b1UH61Fbe8aCp*z)Y{%-!=4UanIo%23c($27kSM!;4!rAzxP`KAy3I@ zR!ZkZFVwX&Wzxu8HBg=NT+bC~9v(oa$DM?J&q?Pon{Jyye6zITnc$J(v~oqSRn0rG z$N{j!iMv7e+^UNA$AR+tO8u_SDMfHZ+9adJ4?sEZOk)+t8ajEIq8muMIdj62?cRqF zgI{jEOj+=>g3JgMFRpX>;TZ+5s+($ZCP=N+1x@PrCQodjIQ#?lmd?^t*HW8L8gLj=8*aM4bk}dSI_$L!&WyMT?+EaTg6KCea;<#YT($SCwR zx3UZYEQoPK-`ti`o_Ufne_rAb+Xa`Z@TP3JfmCyP=kDU(imkv?0& zPgFe84&HbO(}0E}!1--4-=D*JF&eMT;9$2iAjXlFJR+RMhnICw;m*mugu%cQcq%QG zbvuJ_sj+0o27e*ygJ(aD?h%OQ2+CkwtOVbN>pmjvX1WwI=REVY86&e&z0v+siY}dv zk_@H^;&HTf)2i>7gV1H1XV3O;6pjRgu^nd*zb+g=Vg&D4PIVZWbzY~!#Nzqe_E`q{ z+b;h?k$sS+7rN7V$w9+c=|nQ+Q;09fEN9^m=u*AaUy`lfX5D?_8HR~G2+T9TN`C=P zr^NVp{_ng}CZev<3qNAa0xxg>{&@xVfFMp>&>~E7MWU6{?EM?Mlr_+|WnIRs6KkM7 z)t`y_rpDz={Y|i(CraLtlI=v;UE$Yn_G6k&guK;e)ZX$my-(PI3G90R3DTJ|?n@ zfK-i7{^4`VPAOUEe+ zlARE5mTXLj=TM~gP647on{P(Y8&G$h{rE9G8g;@g8A!3|1=EuW%*&lhJJg%eghv%I z1t}s8Nw|df%2VCHAzGQ;=(>Aq9C<)ROCj!a+%b3_+ z4w4gNEyb8Dv(XlTg#^1Km?&Vp%8aWrWD=Jn+7$MuOBdqs_51-xKCvF^hv`rfO{`?w z*8>N=6Ih1GAJO=i(N`L*3Rbfk|`n+k!Z+2bwtP0yX6o6~i z^EW0nE|}6=juNePL0`yjhr6}N`n=NmsUsuw-gSJgP6yh(wkKtRu9^JM<|9)LYXVh+ z6&Oo3vMXGtxD>^%@Ju9<)Ai#mP4h^Cb+JpSpC#Qh&k2s&%{i##O<+nT$vmm9tQOuR zMGkBO4BIE=GfKi`xKW<0UzB;KMfiH``XS(rM`lao%2iQ|o4IzgxZ5$oQ}X zozC5JN?-M|c*KG&Qg$&=u}P<`(MR$zZN1J4DsZyAW~*uA)Uxv_?L>)4hv>amhDDOR z>!D7Zd%0NY`C$2XX3q6QHkx6AZ?-x6vaP}=*bwaC->&9JHZ?Y^O!jw@d~4~_OH;(XRh_zG=AK|3}tXo2B4Zt zzA4}s{l5V{#3(^}Rw0j3fvT^0g6zk!^N@VZ&DO9?GoLOMoUJtA_n6g$Nz(yNMeFV; zV9Pm;os@VBUf1iuGid|tll$;+_+N-i)_-A!~%WJG5LuJ%;sn*+}kL<Z9P6UJG^n}bl=PJ zWWe zn#Hv!nFpEGSp6YS!#mtEKvX17c59$|yTA{hN+GNn2y`~~VF_OqswjV$hP@&R8o7Oo zOr0WKaVrlgqF_&kk$9acgUw6HxQcwt2U7gyg)^VW{K#hMt#p2lULA${JD)1T=^@>_ znxb(<1J15^5P_ybIA8|v#Y-9CU#a##fi7O3J8U@;6BqVo+Fp|q-x z_jaJaaa{hTrVV4^fftpf6=0X##Vx^rru#rPL%@Y83Y8F*OB<;Lm~l6P2y=A)CZ$UB z2NF^lj-cjC3LFkd!E3^9^+4I7NPPMO>4h9DjnA4Sj({_^KsLu;`|y}kR>C@x&T9%^ zK)3ZgxG;b>mh14#Tz2UPi7`OLpq|6pJ|Ctrurs}S+TYLrJ;A&LzcCZo_w4awm1ai>$o;H} zoCS%*%Fa9U0uj6eC50O18QOMEN)%CKE`_or-R_F#RZ4Qo6O=4gSl^w=@C!fZqXbHX zlYtDgcM*Wy_7E?C8MsfR*$&+Z(oDR<-PA>2bYzevpCfXB{JUcQ^*@((i3&ex=yNOi z1rO)i5mtJhMAxWL_DJ_p_x|+v2Ck-s;xl9r9PUv zR#``hr&iGhbT_3lT48L1SpRL-Wlmay09d<96%QB>w+RHzm>0aNSE9ElHsoc-+V~&fLMKV3W@KXsoK{&Xz znwG6S~o_buN zF}OYQeFf-8(v_%R&&JKOi{7&{#}H!}W;v~{8ZUWSJ>tD4eS54rPgHO+3*EubbSXb( zs!~~w^TpRti^rV{dxuQ`7e9gI&z4zMNoVus(~S-IxV2{fz_+utg!S0TMJ!wR4Axws zwG^Omo2xRv1MPr(2r${rTFAn_(2JeGv!Z9%d!(73BqY!^O0lfo!^CckYx_*5+DF27 zy6$d;k@UO63J%$r)I3mWMhVZs1h>Bp@B}-1epey#>ig8Zl>Ekc4B9Mx%|$a7vEE_* zBaO?pxrA-!2DX!TO~hmrugP}D@ENN>qaCV17ou^)yW0h1PU_rbz87XfwBaY&0)w9C$B@MWOf%B#hsYB0 zJ)(d5sl_9Rja_E*74Do)xxHtJa^6rvX`Q0vI&*5UK2T6^^0)=#6aAPP0P4h>Fs~`J z&kFAYQGMMbP@d!19=sYYN1~E-#EhT3*&q1$1BMMvZ&!ElyQ6lzv!SFOyYdnIfE>+fJ%jgle1eKUK?1c)qsA7DKdyXMdMQol#RMVF` z3jsettYO{aSLb=Yp>M`tqch>MkBrBb5KD z0_rNUezN!hi{ev!1R_eTbhiI8oslx`_0msQ<&bCRu(S3a&30Q}AU zvjPHKfo9q)lisGgqzZtroMYD&Ia2n(JI9L~&wL!LP+xQ7QZINeg&>1rGPZZga$F4A zYd#ul<;#-1ph-kc671d?um~sazWON3HEMzh!I$7@q@u)r&U5O9ijC|h{+b``1f+vM zK|>)r&A&~YWuMQq7E=@BZdJ()S@j~)r^@&)#IxL5=In{%`hrTu7nQ+ON56K->3L!g z#vIKLTjQNWOxwL#8sxvqkTLYaLUV%kdqKy^2K6wJ6`C?$v7Jbs!~bH&$m&Abc4%9Tj07 z^~?yMm0IR4F>?M!^Rg>7WZ@RjvswXssfd5QnLOfX+|gYTfNGVFXn~`D$GHVTnq!N- zIe=dxU+)-ZLRV>h1?gZmGz)l&BkRZ2=nAt(k@-sY5trX^)OmRjfBOPGAcG+;!d9sy zHi0mK(JD^3mcuB**FdJ3eA&$^CChJXko)O}-q`BFC@}M@4oAy_Pb%o}H$d8o)w!8(r+f45NzT4$!?Q;J_zpLGz@Ud_ldF)35wGRnPzogVpr~Y84>frr0K@d8oz>#YK|7_#Uwg!&os3f80cQ0IMH-V^5J-c zvu?K^2_ycD95iCnndRl@hnk<7 z3bGveE_9dlL$28N(Hqe>xNxlFZeoa)t%OlYtXmb#f51efx~tF&$#O|ti&|^DWmTBS z*W`~tz6{$8{p_w_W_xYBWUo3*l1Ct}dD)mDW7JB}bp?}ZVf@)rj{<=j#7w+L77}ig ziI<&!EKOXz(XAnrz9&F0`cTPnZxA2NWG?6M%35)$Q#SqF9_$@ELO_Wp`S9_r`hu3W2sV|2ETWKHX18{chhBnRuW7Lk zqwiji_$)kc#Q(5D#2`?lDS4XQFU!E{>V(Yu9VRM=Wiql?`PhTc=mOg=S)R5aN3!PQ zWm9bI&37Va<fTP0A$Tqd9q=qBrqb&K zwdu%NVrmXc;WU@AggMHeBUgn*wdfB;uu_)lYMJchI`}wqrl)q4bbG=_T!pOzvvU`3 zY6Sn5>0$i_MYjX%sAZ9L&ps6%55zf3sIZw(vAF_IGapz9Z+4QHX?uaA{tlcjpFQy7g#x#5n=42(7Yd$LeiCuyBMw}na0`&U3gpZKys@o?Y7Uu9bqT&eYgfYf7QB}YKTrriip_v{*8JHm$irjvjL0(OI+7T-!7O?gq@>)z z4GSAF*}h>e;$1P7tkZ(s*N|z7F72-vu?}H(RU{}OnZ0?>^n&<#E(sI%F8bFp9*YB$ zdtCtFF_N(x9$vA0f8m&sHvHP*df(Uis69oAu{YHoeYfp^ThZ(_MU;FI=5f*GqKNOm zp{h#|#t64?@psa7Sm#$kb06~EOwSV)d$ZtKA`jaVU`uK?DCfKc_xhEQPUj%@WUAO6 zee+>S>x2ZwD`KmD7C_v6&Q6$6`M!Be{t4lC8je_+7T$}|+;>6q;9I3~ zfizB8jij#NwRjlKXB!u`+c$`hl^~hsTAwHjN*TrN%;y8atMSwSVe7oZss7`?ZxiAe z$>HEQ#|+sVd+(J|kqS9h8OJ8FXVy6s*@cW!_ROBgj!^bEMzZ(j_woJR_jUhs|JhZS zD}2uT^LoFY&*$S=LtP*G-$yu@OlZ76OKxhKuCQClmP9qodoS!A9FWEoZ(|#Mn2s&t*IBPaSrS@^{y8f37yh4hHvN49 zimUe(FK6qXEwGv<=kRd48QkN0byIcW>KL9|5}(@$UhJlV$_4 zGjfnj-FRl`lwww-4*3e%M}RdC4xMwtr`iI1`gws&-aAW?hh-ZsrPaVs6^`^dvGJZS z%t;s(Rg&*7nMa)C9xOqkeMtDQR2&vqt{yBF%bemGRP}PKcT@u(j%9z_lI^n??F(ja zJ^Q{5e2Xv}^V9P2Rc;&AG6`gZu#(@r_8B5|3i)1SCqIb^#RZvfYB$ZKOz5i0` zJZ4)o4Hl64T^59~w{znzQ#K0)--1iJT!c_RK=T1DpJ zQ#|FAIeJR||0n^*e6mDQ(wrle2=MB9e05xBT@o0-?v~ZO4Z^QDBjR@e@kB)X2B2Z4 z+>{}efXS#c&Jj-a9&0aNuFRhlbde6%0B(~qG|L|FZ0P;s+oBm-z4q{tm+sGPr%0L=aYg( zfdcLWnRm{QfgAIS2)qeviT3T%b}CWYQ0H<&+B+fdFR7%KKn{OOKY?RV_3jGuq7BsG zEjwg9y7M;>E;k-(cM0q=?s|w#&JohI?Rp|pW8I)uPTt1U7Fz!p)IVJTWRCcLscji! z%`-hlv|Kkuz##_%a$BS_&~w1O(S9KF=g5BU*XiR*?Aj_!>E;-)U;E!uzSie6bi;T3td$1XWyO9AvM;(%f`EqXLfBesv@6!d;3^-Vku}14Z<} z#QC?GaBKUM1)nA<0CAXfsd+a!cp3purQgz`Ywaa0h|69$$gzBB#Y9AX*`BJt#2?QI zL0nt{LpLKWAZ*WxZ{tpsSjqjNbV5xA<7Rh;0^l~pYYQ6cuJQ+Ql)~hvuhmq4S>zlu z8bD=2z%)OADp1i0wo2mr&Z$WNDTk@ipNzVTr(6!J{GYN3i1Ik1Djt1>OAi%L0&rPn z z{yI$@Y;G|8?HME~|J;0L9S^uQu~%(NJWJS$(W>08ZH^qS+&vwgu$2#ZnsPMk|5PED zjDwiqp2K_k6fK!lZL*KMO~{_a(hTn+kJ&QBT_9`)yDY63lAo$E<0AaaaQERsrVFWc zDPhbb2Csl{(N>BcmYrYQRtGIp+w7j;i`Z8o@kclE9z>X5=n{eraN=6@$`AzJDs&nD zWN{tw;Yy$fg&DDA>+`q9?l-%a-)lk4M#yRcjYWFnqlDD5mgRSD4D2{$d3Tp#cYx}Y za>qPY1NIpJpxWvx%M-(CQ|cLjCS{Q~$LB0lM{wURc1;p(!~_eyJ@-CA9UUa~G6UA;%_PQO-x_4-d_5!6X7U(g7RoOlpsox13c6TRV{>HCo9Y{#b{CzrL?J1YWR%3r%4&1B8 zb6ewgJKvcZZO*5;{VmfVo+<`TQ{Eff3$H8qkR$OHzVqIwG4z={1Kk-?`Z(m^edo`Z z_>EgdCpY9cSBbNQ8i2-A!FVH=`yNd-LofNh429^_#@i0EaSNQR9Sha-tz5B2$h3Bx z8jM~5KBpMsT?W4LP(HCYXCB4~W+yj6T>U&A{B4a8C5+IH8PftB<4HFGp}z$`5}dTg z0k2!Hp#}>lph0KdjGyWnXpJY2*#@Y3woVVX2EVqS{Gx-?}5xF8XH zYPtAVTrnt;O;Oc6@Xk^<)HLe7>vzxs{edl&5{J|}Db{L>Gj>dqOW8-UxPlt&8Jmt& zg$<}(_niHmYYx;E6@*J^L~(`47uKwLQs?+ct%hD$0}mujN)`LY^Xd*Q(=*brh%WaS zKbDW{!;KGufvex~BF*;Wt!=B?bwls$>f$+`xxrH-{U2X`oIAbwMwSO5(Duoj<{YEb z_8^MNuxV}Mi2nPqY6pZTNO=);a^&7cqt~^_!2RMLbBqRz%@^u`*Mqxb7FsR-M=t|m z*c@r-FFZZhu9?GG$MyU-=iBdj7aCA{>{}?VWe63d5FmD(G1fEu0BODV6c`pERi56kfo`^@aJ`rzR|c}T)N!5 zQTML`cwKhf#m~z}kHFJITNua;Akxm(#g!crIBuesd0mXkCdF*{x^bYWX}}lrL0V8{baGsOk#){n?0Ivt`Y zBe~;g_cvOUkZnXd5BkX;hPN9Z*#I|Aq6XWWQIG^E4v<2`X$=uOeuw`!0o<`LmHZD& z`Gqh#T?s;D&{Q!F*ttL9di^1mmMjTH8OcuUd6}VGspe`<_CiD#OSCVlBNG10tFRhH zNjny^LH-*fF{7_9qJ-Un;ywc#VxWnSI(2dN)8wz?n~zH!X#ThfwV=Gu3_DHFL~1>D2fcgu_5{92fA9_P5lM21hVg~)--_}uhr>thP)7?Nxzq16khJRP zQNX;}rCI$pgp)X1-_XFVK}MDUF(m&!{kD=1#}}p8Pz-0U%3+csXSobI$|OdCpq?s< z5(kheziWiz3f70`YdikUv}{|6Z3f8OpqaH8Oj z+O_=jrT<2w$ImY#KuV!3q>P3`h&X+@Llcz;K5yckZg$ETsonMn*HD6W#1YiGAqq12 z`FewyFEQGY_Fp)tO3&5+>Po>I@<@V8O~eun%B8+BoS_@Yga%dap~qSg8tNf_8&*$4 z{?2<-gDHfWG|4pFj}UWUy2}-v{vw|IIFICkoE>RaGx+F6j%|1f`*vk7hWel!SU?V< z8?dLCPu-Vj`J_Yp&_~#n4|0B9S$Xq-Rk<;Zf5hqOxl$pCd0TFCB^?B&t#&0+Y> zzHj428I@(m@L{3k;F;V(7dOM4$}x?b7qTyLZ9i|#%qcI-nA8Ngl-dx{4#}WB~frW>Oh)^u|wr{qO+Pylt~@aXm@N%`GB+DO5( zrN1?}>0^wmm; zz?wu(bRV@sQ>XWc^s=i*<0y*r)nB>}8gcm+>LO93EjH`Fk!(o`FY)YV+y+WD!HX%o z{Z1F-K#J2j;9PT#J(6B0^h3*O6TktpC{hsNWn}IVf#-$@WBV9gdcLUGikUKybBL)8 zvpe(3v-Z}yDB3?bkI~iOs0RMqgm5dhapnnUM$9NOSh1f&WI@TIEJvDRtLj z@CA(dCjL0RpMS+Hd9%;H{q5!@A3gTylJzwl+_!D@dW{nN!#V31-}5UB4Ff!!7}#AS z1C{^QSRv4$WI<|iwU31~A2s=&{8ha;2OAoc{nR;@(J!vSeN;~C9rEpRExK%N!q(4U zM9#OGh5h>3$MaDK`H79UEa39>>EGOhSi&7ZCp_YmX@S_WcBmrMpP>QL3pjBRXb=`L z?0c@tK&1k!7h-FdU3n4ZO#y(Mk+*tK*TpKyvMdBd` z4`IxvMhVgTdoWo9>EJ4$LZSgb|L`cE*3!QA`zFp_=^$TZ$Y491IBV5rgx zH>S6(uJhC_JC~J?LldCPY&t7tN893BeM@<|&B!OLSn?36(Qa2aR`~UfDGKLioki&Ht$~}OAk*lRc`>JyhfvNlyfca_9dB4u& z{Qt55Dl9k-%+?sxKB7RHuZJbL6a(}_+k!=W69@vzGBg>wU(xbLOpiu8TbBoqlF~`R zp1j}qvoAwHx`TIj2On7U)~Jf-d^3seJ3x6x>MWSNMLgrY9uX=2srwt+&pgtJURz~xv*AM_As`QsE`%LXh&4WngK0yUKj_9E+s+v@v$vkePY+28nh01~4qY&!0O0hY&=6 zXLhb-FRp(GNpNI?m9qyEbW=ppWnd7OEe?P<(lmLoCI9aguw;s2BN(kvOr~CySCW^V zMv~%~hy<*qCdko6;YwbpE?`a&IZkUyQwp}9N84mTzuew2f8x@Fu?V)F4xOOmiL}q{$|<*fgns~|P)1Psk&Re^nUkJE z>@7|_nqGy$AJOr{V~v&qYut4E2EwRgVhx+D_k3k+pLt8l=obI%*bx+OSlF@!PwIT5 z!seiFs3+(8ehM|i5XL-Wj{P>1_&dPf*ROit44j2*iTmrWVD<@#NXYpMuMN(g`aopZ zz!0fl+qFcu3Qi^Zo1a9CCYJzu#Nq2U@Pt=mUu-g*koY<4vw-IpU7$rIM9rZ2Ji?f& zAzjSj1&1*~iN?I0tL`2cY1<}@ERWLt{-o;5wAYjq*Ce=mdb-Y?_*pgv@6@UnI#xQBFm(o zwuKJ5&jRpB@wq$4J%2Cy;?$8Pp##mZSL}O@rT`rQGjRqQ&T-&06+K zcslQgM9R3|y!#8!8YWA4e<$S?tw2Pctu-RxGFFQhV~0pH8Z*5>5$?wPB@{Hu6bOip zAdT;-7?jqD>X6yP!sEO|tFf~)ij&le5KNqQD&O; z72+pIQ*p%O??HX1rc%wR z7hdX_cBj;g0dU0W^&HrGs5$L-RfgkRM^%S%wHj{Ur!|B`45B)oSG|1CZi;DxCJ~LO z-IzKS6Y#7-VFE^~1({xHU~|Uq=`eyp1Cc81Y=|bAo$l_sl)GR#7bEir$s5W*J{u_e zd3XtXznMZgtD9XGkqj%50JY|eNf%(dTRO8hs}e%p4NK(+CSiXA@DWlsY+f=Oew<=5 z^F{_V0PoKHm0S4i#V#rXNm5h^s$%7PWXMnV@BWs`@Jl+Eh1M2Xh3FRl7|a-Kp5{?I zlKykSSI%&8Yzqn6IR~Pax+`1V?()eb-_o$co9Q~ocBI-xlbCZB{eXs)hT%=6Bsn&H z^)G>f#_rTB3P?Z9VP`D`%_K0Z$(q@d8Lb2|T7&k5%f}gOgiGa?-x>E$_cze225!_p zzl8Y(#iv+sRQQ7@_J-6?H%lz?j8g9nUVeAfKGQuN1Z)**<1WwmWW2V~V5n2&$daG;m%1p&g({a% z?LJI)s%#c>^hgtH*cH>7YBC@9uQ%cv_`p>&Cuid2JYfZ6#mTB!Ie@zQB=txg z+L-E|TxQ`=CwWeZbC&?s$G-gahSvN=+b35b)jCxJdrcD9bQdw{io#fhQ~8T9h^=-E zNv%RelR?8eNHMBv8n`-Rqc`N_Q>+?ahbm9^hf9c0uG$=s3ZPS3=X$guzhwtOp>H90 z+J#|>?6&rjrn|l?WC#k3NASm6DLbXz5iRpq*wZHyj2R9`-lly$QA$TKj@KGRk$iC}*F5J};os$u-O=1x_T{~d z-e`v98iPzW$O?8QTtxFO*6nOnoWU)@3KDD&^nPn@e4s0K!uqW2AXltT+Z4@^#}E8G_p z>`->0khmsq^hTPWe1~^Oi@pKqD@OaJp?Ow6R!004HKc4DEqe5(-~;q#U;U0(&VOx2 zzgo&leyjzkp0Hl}$tmrZ%{g7n!`DwK2#}24Q2GxRbbpiuKv6v7Ul}KC`cp7ORc@dB zlZC&R>H-fRCcegkX!ZI?&wTkf?)v?-XA!e*OzfRh7Ms5A_>I!XMYSi0&C{-bQcT$n z#qpW6VWgHqm_76PZgMdvZdsy(G@@k|}h z5?=U%rNjr)ks z7{H?+2Agw!?6s~~3|Dce+fpVbQ3gw9%qf50NVJ|}?>2o02&cFpF*{Spff~n_jexoRFN zGU+9>N{)lPgF^dhInQBRgwuRMGK6g2kx|CEc=~jpZ&0KV?-8d8)z~cOBEezDHA~rcMvA7DEeeW)GkotF5b=YMSFl5ALa_cjhu1@ru`Plxrc0IOd0LeTy$qsmDMARz5xZdrP6)3ED$Il0k z;u~u72VKU#3ayBbeT#Ag*dn$WUBcL$H2WJA_QX?njy@>V)P(M#=92iT87Q>Bt+m&M zts6!Y0~{)O5<{T-u{8WUn76?QjjaD-Cpj8HWxyb`6^iI1pg`e*Du`QCah)$HxujD+ zLIK{4aNH?7k)$=V^&lVz>voZ1Ru1SKSU9$n!8lTDTK(6O4or@Lnk*SnqgL zIT7WyF1z5T_6)x%#(q&$9qM^!TNnnJ_Fz+krh+V=20i#FZvgDxksE)?&ZoB>GpUdd zp&1luHX7rK2Hdz!;IbzHhG3NpaRe{YcW>FTwUSOpf>+re^2T2Pf5$YT^>+U?4eR{S zYT+%dbgyYLuV+|^l|RUy%TB$JhwQ2neH)WsAIsWp$itKy?_^ zF|>T6f$XFGVCXjU@or09FreTJQ+i+B`EmzkH{0=a;RZOiCTgqMXnQ;CwSOktI^Rq} z@xLXfuOZ>Hzzes(izgQM1dQr%v9 z&q~esLdaw;26rCo$=Ct62CgiT))(q@aXYAE(a~3jF=5K;bAYOguK@VUc2qQL`2IH) zryAY@M5!|f!u8%Lq$g#9cHhv&^X^t5|@pZ(AVEDw2rfq>Yno@kvSW(z#13?ij)!`Jk) z=NfsQho$`3!ee;k4F1~a7ZvT;8Ldjh6u)E2L{p7OLie_@Q`dzM-XGUbH9e9VsYdPK z?DyP8hPei1qwt%)j@Iso<`qZvQb`)6#L|$_lC?a!Uv#fr&Ife?lo?wS)T@aZ&HzI<+=O>Ypg`rqt0@OY$~JHSKrbR#EOsJYwwBk z;KmhAG1{>+gO4$6_+dBPA=P%YfbwoADT3UW##uR6MWj+cv~ETA9$ji7V^LRlZ#Zs1PC1vSi=e<5TlUx>i> z{v|_WR1E#f9}vV{qEKgQ%I@Ey$0IIEfxFV6vk_rAE-y)6!3BQj+`bT(6gLM}C7qxo7ACvXMH=-$WY{PF0b;}qaWsigqC_Sc zszMUqmBo>*0!fLL%fU73=2sd1*tKx$>L4i`TYUQi^%Zhe`Ez$i5xE9RWhPkoP&gm; z-?8V0E;uGd52#?*pUv=xN@u-3x_ZHYSKF6WWz}N%Q~!4CB+m^i<%Yo|;WP(}o2o*? zr^GR>DqTx`KdB0+NJmVhWZXII{HiwwX9dhs&5VR|Ly(VLMWjYV{bkImj65gy&ebt{ zgWp+i&BaYs3yFJQlvn#xe^8b&<=p`I4XOR^$3^UFB&V-l&DYkf-7K0O5E+4k|M-;?JsAeT8OBK|muak{H7hv|-c`MV2v(*kdP0YXzUQX=TU$&a!`*q2G!$ zA}Hwu3@uJg>j-h6M{KNR;QV61h4Dp)9_>a&()#VCyxIW!jYvAr=zhj0hpO+4EGvMS zr5vysCOHj%eJlvKB8Uz>cqg8bVn37gNlCRbdt5FaF&NC_feI1A=UdNczvbI`=P}u# z_g}(9Ue%~boxMK+YZWl`7cz9&A+WC}>#Snu#*~CiqnP!LyI=v5vgAyfc!u~3rvPbW ziG?HwubfaN8C@2%xPY`D0GMLW{Wir_ECGbr>?ru--}{~tXtz25+Tw46zZneGsO1)t zKaI22bQE^30uYjjSfKkrbxQZAT^GDumeDS8H=tch2_=-QJd2VKU?e7ng-8}%cO3VW zApD8+7}lSiX2MEtxHjprOC=0~iCj+cN!A(ljE!>;E{E$H$qHD;q~8y3sqz#MM5f&4 z_YtJ0p9gNElY$Ys^HqvSBfs73q<@(3JBitZS*nemt!B?bWzaXj>*7^pf=blAg|fSJ z1lnXrma$S; zE~82y51h}Sh@jceS}kCHL-Vl(mWq!sK;hAJMyu2V=?AWt63^r9;=`?D!dZsnKx}_o zxXqUYCMXchmt@qCCvo0{Eogwo-TDVX+y0N0c znokyVRsV&<(vi7B`49F92_mj;tQ&j4wA+itz~69|qJ;K>Vp|u;Y@Y_MdxULt1Z&g# zKGq;eD0GbiJ%dELb9!c*sNrp1O*#JdBlUd+1U&Jx`EH5V%oJ2lV(ZU5i0jjobnWG^$X@)b ze*do7?ir`N#dX1^6Xn8Z^!-3%Bfb*D5ujs8?sFiopi!wfT8_5ukPb#AL9+ZI~8_fBey zk)c?M;hH5{Vq{yV5S<-yHn4IQB^f?}D2`0ln5{m`)$q-Zd zTFSVU+nmP>sEhi?7;luSM&!QNyG$@zyE;^W2rTw;L+%auPP#fMhr%gvz4ucFq9d!Bdj%K-_Rq zH8Pah@H=7)_2dbh7JbHrY=@RbRJ`k~NTK@`@F@FEu!$1h>K_0N-M<|+X9?YnhDR4# z1r)^6p`*)$%B7=ZyHoX7NW`UumXc5bNvDy;@5M9x(Uha~pDd-^1T-C#?UlP!by`ps zinIw&NW3n}x+(qDnYPRO?k7G0XE^m(;@wi0IlewM<9*NI_t?nH?pf(kc5|MG zSwX1=+0;YcnI4$ykvlfSnJcEFj#163e$<}%AB?_bL<^+AiHswKnuGu@Bqp0f^)~`PtTzQInNl|oQMhbVca;Er6Oi$=e zix^l4R5#$}RTbLxl+P|g4zeY+rRAp#q?;M~&>VI2M zR@+`i%pO+}&X1QN6Yc0v?b`9|e?KTQph73ioD<1W~}% z%$^Y%e96s3T~4^liM)FR6h5TGaL5;>_I9ozM0aRrKqkm&^e38l*Kaq%$r3f{PdOu1 z!?9SnL#LCtx*n=7s;EZ+KR_(>vGL0Ye1{$vjO&NF zkK&qla}tUsS})s~JXN90jDqOtauN(kV8UvuCHl!{?K|uhtwW4SwJt)eX5H3>LyGx9 zaGYBX^Q!VVvzzert3^F8ba14#7ofD+PG=%~6W@I?f9QO90sc?WvS0fpvbg$tDeS9E z-;`)U>f!-fxO0Z=50o%*0}FIGLaM+gO)Y0#{On(HjJ_oNtpwf%&F3zUv8}^5sb1-E1}6YZv-`J zc>?*CqK*~GVHT* z)QF38`cjYF3MJzHXt&T7?gniA)1?IPJ&5Q|-qbjyFUaGv&$s(+7Ph{h*MaaP4_)i= zw1QH~j#9bA7Vv-Rrnwc9h7;AsYmE`_tV*Ngd>-hUlxQJS{@Zi|AqW!Q$&Q*^KKr zB9&+%*2*5tHl7>q!Rq&o^7``Dhmg*Z z{lV)%)x4;4t>zO2)F;QG$rMEIcOxTx-!C;DeoIWgeqCY?K;omQ5e3Na-7~wfxv^wV zGYk=>s1}Z#g{T~oXp1l*Bmspe>=55%IS`WVz{uyZtLEQKGVDKBVc-v~F~DIf<_l3l$aw zS#)m4bk|0V8WzX#Qx8sUUkxG%FiKsmKwZ(lsoPyngW1B|G;yx)2zG!IDo!de1Rv4t z1KuZi+vFbCGkx-U?RR-6@45sMV8!`t@*0&-&ekmr8vR(FcW3HZ7Tv=1YOvXBUMRLn zKfly{=T&Eb`Gf$-vGAhtkA^DXqn~nnesuzFJ+k{G+vysYt_PiXeq`#BDTsO^ zGVt;?)2q{b-L}-Zlei^yUM4FjzNFDKSyn81`n?=3Ty-pcQf2mY^D|3o@pR_-Aoa{9 zAfKBi#mxs8SZpf=eY{gXgpQ8$aOBX*`55M!^NbXmb(3-P=(BA?DG+7@O#il6cc6Jr z7_0)K1x0$vV<8?uL`R*WFY7M&UxTDo8_{`ko!xF$W=gIH-Yu%!Hx%%R!S3D>6s4;qOgOfxKY59Uy-gj?_u`*vz zH3sj*ou!ub$X01I=*bD0X#;=2LZH#H2~i?7e$J-^r@#!m?z&H(H}wY}M{byz))dfBAfz{aLKnd-maTfK2KL%|dDzA&r#y+>U7%%74xFq>K zicOik3*p}8&){8s=FtTCofGcLPuD{i{cDUakA6DJ{cEd(z!I7w?Ii2jTEy7rz}L`-nVXk@m4X=zK|iKuVo1nu)| zD}2o^qE$8n8NeXeACgu~$-LJ8K{20X*c&8r!e>8w|nV1Oelw*4v(=v)>&+XZqw!KQQ z&T`}l2nC2r_Dz}#mW(^+WQXQRX5zwOLk;UDm$@b`W1<2&lHr~|=cC33sdG6_+48jE zI-g#6Pa&;@)RV*+U$qZgRM-yq4>x^^$Cn~E3`?SvVi&}*h7!iR%3@-76Xa>0MVo+D zsn;Nagrr@5|A^<2%T4>8y`SCM4ctuOD)a%;Z+Cg)a?b?LR`LUgt9r+g-r)CHZn z?xoo^NLiF@_Uz?m;0K85Cba0ur!?cBX^dcuqTBfX2O4Moq=#Mf%ExDauDC}r$N7zR z{`Ak!ffOAc(FdFry>mCztj-%6c>;hJQ_om0^cYCo?L^4S0PbU_tnpoP>%n>;+P421 za6b8h+mI(#The^fGVHS0j9|P^$*k%h_4#jK8>O{V-w*I{Inw5zG8n6Fp_ndCFuojA z3;aA2uxfh9_30M1J}t?+TeXR-W%Wy#D#ES#ZQC4Qy_X-KC+(CHaqqZUGtP2TcndN} zs)|lUT099@IMPo@)+H+qk}GelQAx*sD`vFy4hyAz(w?`F6mRfEe(f}GE$O?#r2N`> z-fq(1ww*onv6FE(mI!(`$PsT3A4^v0{JRUG9=*Y?EdtS^Y{q?V^UCqbW)*$%L2H_eAb`E19&<^{vP_OVunWQ~R#^0SnbL7~G-zawY^%=^tJs7x)=k*lU-0VD~`ut)d~k1(MLu zE0V%vtK-DxZ6b&xU6NZOtn$LXK)Fzl1qSeaGp~_ocF0?w?sDlJr&WHQU~igEqhxWD zpNUsvM{%6<5IF;TMR6G)b*_%fb7X&1iZH92F7qbyKZK?qJ71_M(@59QU(tQ%t|V2V ztsxLg_5F8oM)8m5pp(#2Gj|AJR2DgG_x{{>`DW>0_zm*+)pK2qE7r`z`S&7=SLb^@ z150yosq017j>Gw5*9JQ1&*cVp zPxXA6Eq6|GJol@hJ25u8_xW*R=oeNl(lLbUm&b+dHktJh2U>*?zC=FE!+Sbz)qZ_F zm`&q?D?_d+&ctfZxy9(9Ozy<0NC2rhC<`FZ#(dp%y5zR>{=|Ys`$bblrU@M{-vQ>6 zj)u9mTOK%8EeQlkw9*P3Uu>LlHFbT`j~ndR-wD2c;dGM9CBGBG@4FOgDw&zM8BFI> zcj?~nsM&q^*_I{nupV#;Z@px-Yx@|?AWP>;!kTjxMGkA@$)bCjaR2iG7XwIW4zUKr z0&H{ATIS?@awlTq<%Ui2T9S?;2kW0F$ywZvVaK%E=hF!jKc7#=s^0@vsN+wn9UVM8 zHs=5bc33E$KK?%eN|uR-4fcfpyiKqk*a(=|$i7aBwbio;*RR{jEED>bQ%3^jGp=pU zL#}U|ZKS2!K8tb)%oHU(7`erLAcQ1DQ_l}8z1AB161TVCU$Pue8rk>QodJ96TfF4t zchzW7cB0ao6*vVSv%rdagjA)whES#Rqp_>LHw~(w zyQ-6}n?L6ZTtMu}E$oW`=6f>#2O5r+QOz{YK)e&SYmHJCj4J!{*=3YGc%Fbxa{R)% zhb#C3YHb??A7ap7(N#Lj%YI1oA`Xv=>1{2H-A0sey1RwF!}O*vQFMG^$O{rfnH6raGp6j*tJ3DW17RaHOw!-EAs zWIm=PYPZ7@uxpaGg`T$o)x3^fLRYqWir*Sq_>uCjC|>;H!pU~%$d-4_T-6b~3?}04 z%bL9u^IoYqq)t4DJs~DWJ@2tRVYzy8_VwcQ)ByM~dQ3FJz1gla&N3;EwVz}crOZh& z$Z7kug(e~A*~!Vc7*7nq8DW zN&%-=+&FvKKe^NK0hgtjr*jCN%>ak!nYu={%^Bash9*m4Lb1$BL=w0HJi;F%5s@e*7}03M8N z5_fFUnp*3lu6X-y$+rpnQtYhVNAj?uiWr`Hf+`iiQi5r<+i*8~l8y*!X8sgOvTLq^LOq?~vOYmkK7$ z@mp^aWj&q-sz@k}aE1z}Kz|T(-#aduU>iz46G*@DJoVNYSa5%)E_vt8$}MDyur7|3&g0QJ? zS^56qeX~d);yMh5b^-;>2tFDLzN&k?eUfmt`gH!u_0u5=zp#U$qPYoTQ}%|+-yMD1 zPk%ad5HDC6(60LNkT%S4C)%wS+u<48T{dAmUkS|~Yo6)DpgVwdnp;`2l3FVsk1C#I zGtD=Pn8qCJ09Gb?oWtaBnRmPo(xCOVbB=c$nBA~{>yqR&mATlZ|69jKdUYNI7Qr#$2OiTU4Ikq@zEmKXEqnNQ*CJ3&b{mul9NmU{{aVe1RzR28 zF4HqPnkW(-a-zu9ClF1yR_B@t#CTppGFvl}k&HA08k>ZivM{yB$Ab5WqF7gt>0>uO z8YEvFz-9g<@I2(BTa;(}M`4&98N@~w1K2LpHJ_}TDzjy7+^;F44kHD#gIHzJ0;>Cv zk!mPW{yAc}!FIYJNJ=$=C0n^F^y>U%7q?HA0XU$;CdV3veBxv25fR2IJr!j_5{cmy zt!=`>unb(|EKWY`xjfZv%|oe})xNQ$?f0~#DXt+}M@*`u_*`psegrxv@iqlcDS-H> zx6?i=x8K~WHN`2%2H{bOyq$EHg?HE|+u$lU^7?Lb3INL)FNCA!3SD>bM*z3b$Wof< z(o#xE;&dgdFfK4*b>pq>*dU8crWCR|Z(Bb}x8SFDXEAxA8E;=|E7#VA^wW-B+hkYB zFJ`%03FX}z+!g^4{(c6sfP27Z)qTDGSJ6Bf1*Q1i;w&u zqD|;+$@hS~D4LdqsOein^!F$(o}owH{z~io4ln?#r4P1_XG(Z~f*XIkuWfY)Hx#IT?4VH6MQwPw>y)| z<~;v=)}sOVx!juGo!CVdr|rhcN*{sE5bL5v&(?*ERjJLSGWegdBm0RD6(A|GO7l3)6vQi_mjg zx7ML3x7_PpSTsSx&|$DHqxj2rb?T0*E>RS)#xlTF96ffe(d`e|V^0~fZMj$3kk(kC zqx{*NU7i>Gs`T zRMdH#HT|-!zfC_}TJD3A<@`l9K+MLJF|QzUH(k)0=2-n28iAPhk?{mv4XJCNOC3)S z)szOqDWVe{M6Mn*dFex9vEnhWN8cQG<+*KbG37@;!LTcDu#|_53VRx1U)EjyCi+nH z7`D_GRTyFEw?4z`wx&Y(`QjGovdrk#v-rHf$xcQhKl0qK=PY`q@u?Y&a+xJcQmUA* zFy#+3=IJ7R$ZhUSjV7{O_lOT_ybR$8QR;Aa3ED{&vIip;ldtkpj{oE;|f zKbv_cz0c1lBZ9R+Xv^QXuyPoGJK#Nr2c-AIofu%*YTsF`NBF0~yt7$tN;*B8g7V@A_tN8qfhSfjX?8NKG=Nd5x>gDjq ztQHM5T#0Q`dw;Ig998}fjZfXH2d0!I_5bbxZAv->*?PksabyxN({>cuz~E{{%9wn+ z*P|h@AVQjQLij(S|Do!v8tPi2HH!uJ;IMIbJGi?A4KBgmA-KD{yKLMYf`ufwdvJGm zhhDke_o4p)5A3Q{Rr8y3jD*XdMud#k!9`s%0$Kp|A{cet+6L?Ni<=4i)6%P_vw5+N zU}}bTwK{Vfx4tm`Bq54vaj-2Iul%FoOY8Yx@|7G(Z?|(d*`_;TIo>;A0i2_pm-EV! zy@c~GV>_-#6#RaAEDRRRX~Vz6hq!NWWwVo)GY-E~AMhx?F3VF2Jaw=7PCDXqo?uK~ z!1xYqsWj;A`Iy38l%+FL&F2JV?Tu=%#>Ly|a?4vuqt=)%6I+NXK4H#SKYGp-En2Z3 zrA<30h+|^3M2W|3=nLeM#60lqN1!*cYYyfASqAP2qFj;rVFDf)p$h=$|8xIIoQ{cZ z!ID@P4>QtiZP&FN*|q1@c0Vk46j5hxwahm%kccUFOMSwBdpcri^#$M!V0wUSg)F}u z<)=kNvq_I}tleoi7Cl-J2RR!&6Uzbh8OQ#PL`+)~dy?Nt&;NYwQpkVgBcr{npsmKU zp(OQnj4L6dJMjr1|r?mnw3_W zBlh(cnhAWTlGXJ$RL_ly&pZFwAAm>)ScYCHSp$)&$@_Y>dla%-Y=9imlHPZtTT^af zm0^d#4-_ZJuHM;tfM-?NsE8w-DK`)3#2Il_*@O~dtWfc5XYkDwsG~Kh?|@8?z*rq2 z9;U-l@-GTISNT&I8+WiHHDUH0U1s}vL&hc^JlcNhsk8_Mj9_4;X;Fu)=e}3W!5B+s z6_?Gz7!h>QIsqiBq}6f$jg&CaM~<uPvFS=5VpWWGWf=VVF12rG~)@K9SC)=Lmd9T>9*D72AL5<1q0z zKPwRT#eP=7(NZxSddRb6qUM*d$Jje`v)w+VT!uc#PG_T&h7G@oZ3&GgL)y?HoQO9< zTcfb(_3E~m)qP*4ZMm;wqRRbHoz6kTYV-{UqH-5@5h6^=GKt#cx5O>*UivbHe~Y`| zh4-^n2bJj=ZtqY$2k!7WYbTTL%gf#6gp}^6z zSzTOCilntG+J0}jrzS)6N~Y*2BXm0@4pkAfwQE+0XcfXizq*0^U=+6_&5pqakN zh;Z2R7+COK7(hdx1SP}psAGbQ|CJ7!YH=|64o_r8{89t#F!6wHT)(%e)|N!TD(MS$ zQLv>>4w_5_CQoQHD-5kFS(C-P{Yuub76@6neEcU2QB7hU(^iUj|j^c}333Af#< zk@Q;H)DeDXR$|Pu4n^}n{)^Q~GwLIc=2H`$ZzxuJP4)^@_1&yHLVXXo+YUcC%7iP2 z*_>n4WI7eYrIOU^e$>U3b=sZZ4SC^b(w9wuX6j7E)17*7wc~b#)epw(k)giTtu$(I zUARG^HOj%+kG$|dERJ8ldb;mP?jP9EhT#4vMMH50zyUh6hgo@^#G(DrvDL`?q1EFE zL5L}ols8dNgbxBXFq7zWL*3(ctK6BINo#E5Wa?}(iu*5P(g&0I`3|pPt2EwOe1i5n z>m%;~xVf9@@_Rd8W2xqc9;w&6f9IRaX${`92~N8-X;|P2(u>1_S77g&aq3o|Na~49 z4fhYfcvCT>Zvm!)#2(|`Cgwe#Fn`$jg;9hKyOqiFf9I8_EAwprofsQZI0_|P9^R8n z=LW*U%#*pozdh=$c5BFV&mnR=ZR3&5W9zS6o~fqh<1Z8KjEUuJf;8#1j&9a3Ji@CSpn zQm7h5&)Fu()1_PCVBmej|NQifz9kF`p)`fV=ubP{eEVm5w4i8&mdFv$c*H;ZjB$1_ z7vk8rwWn_K=Ryn6d;!Xml5Vc=9(B=p&ZcL+5oASgC{jsd<}TVx;3Cf87k%Z$~;7u}}mo$7A#Oth8sowuLW z3mMvKSxLrj41U!djjC8?ncO_b%dyXkMV9{&Y;* zeh1gju!Ew&&1w*!Cx(O0Ju^$83x6s78y;EaH2q$O)cK~K#KdBfR2CuUW3N?$2hy9Ll~hBS|C@8T8ad%GEq08L!$mb1jB_Q-WRelThTpdg zK_>tP%E?|=lRgoJp9IWdgCz=(jmrHt8Jm~*3h%dkO+DHl%7Q2h7d?+#=R_bX)CZ_@ zjt!QYU)LYkF5jrd{>xyq-@FV>*yWbiz-HHc#mOM)IFS0s0@2nn^+U&Fvz#JLrc(@q zGocI-yo11J_`LQrtRW=ASQsn73cQ)g)1<9KnQ27-O?DjFgTO zD!@t%yV7{Eg`BxQCY-lDu3C4Ri9Q~D=5d)dDb`owqd z<;TX|lr$IPzxz*^HdJ41Zmk$Xo&Uu3tlELl>HS{g*ke|uae2D;(NagF^w7C@DsGyV zp1356rOi0o*d3?&bp?-7JLQs;Js>+mlal4=)bB6$e8-_vH^$}z)Rrhg<@XFSdC5O) z&tqFW6y5O&uey=dPcCO0s+DOETEEEa6sR2NB6g)IZt?5&MqQiJIYxQ$c(Ud@b3R&m z`zPD@CJxRf{$}Q$NIaRnG5GH>9=}o7S&ET(skq!6(rS*TIV=qED|ML>$w@rzSkfcv z0%EOdCop_vt{?be%PGiq`CP(FN>dyPKjv7`T;?ek+w5$h*GxBZ9JN)E^Q1SEqa$?& zJYFup`)Fpf*CMKv^@54&qPpVLqoVMifjO0gBf&Cbfbzs|WnWU~n5)4_D@nc=0BdNR zlRPB+ChWZkNg_Ed{cXAA0bP!^Q1+rbLIhnB1_LIAykO?5M8hl=It)x=QF*}MJ+%b# zAVf&XPhf63)lXn}%D~(A@$B|tedjjsKuYjf{`+bVxB6UwY3(yA+xNlTDey;oz5x`^C0EV_sPI+gb?+M=sgz3rcB9S4H5(- zMey+ciJpD}N_i}kx|0!vS3B`}YWXIPkO^yB1>9~f_Ch{DSXh6B74?zZ+{+xl~(wz-Va7Pe?)>4KvNw9;>JPyLSp1` zNVx@1<{K>7jN=tN9Vy}!12IWTDM>8{>FQF}D}M%o{OSjFjAj|{piu+CATWfjWP#Q6 zbTjHvS8@{>$7l|d4EuZi1%ktsms_<54_`9y$OCMWq`m4Tr6*&fmhqkcc0a#6cG(5M zZl}!Y0bc6{%hG+!6|FN)uUpG#E?p8l)9r@=62aL&teKg$3S`P((Ko*bJp(|8)u~+e z+&jQ)P;@foW==&?=i~!hnqYHp2=|g$D_hl-1#~QJ-86E!8Tpx|!a-L^Nv-k1lFMxL zLj)#b$iwO#HKGM;AX9@8MX#W7-+x7C9~9ot zf*6B96~CrQa4}HS8WHw_>4z)Fbf*h9y;8A(hF#eoY6_p%V*{I{O#ptyk2$*^!GA4H z)m2|0^-+RB)#m16MylX~3ppIw6yg$eomND#AbQfD{36PoIR4X4gy{QTP1#l11#j#$ zQlq>QPxmcg<*p}}ZxaUA(P9N2BabWNr{9cx_7pX#?4$w$L}T?c9BJ2` zNPfmNm|axbZ({WHc+M9LWJs6vkDY)3p~_r$o^(69(ID2F(Lm2k#iA9Wv1 zE|}?%ZC)ZgHyVL1g4O9#A%&LPi;^)Ph3GGU)5P;XBoeX!ogP<74_+^dEgf6bK^ezI z9lTz53`{wGle*2kG7%8Sakrpt(DQrK&2CE&ej74pLT@_M>e%i)2j4K>PgdtHHLdJu zpD30%fPU^Evm`Z0Sz&U`5B=AX+;c9FfU>UVncjRXBawnEcqNjzsrA&8x$twwqNgtY z*}fWeC>ovG^-71OpTeC1nPU~aa=r;b@l{AQXKsFM`)`P1y?qj0i>n0 z)Nlrk>UxF<8=IV8jk(6{bD`{VZreWiT4nE3N3&&Stl}3$9^DpGLpUFuPd!~4D&nCV z7|>MrdTnD5lV{$r>RO;-Z`>-1Mf-P*_%V`L#hY-_ny+c=5O+n>L-ER%kR9q&@%Ek z!CQ~R`1+HA@ObXja6wX*Jukc z6U8=?bH>3h_&?q+faVO5!dUt^KOz)?oXWlPI@a}+YmAym!rDE1|B+t_tvW;#pXGGWo& zFP~BKpK1JzPv4KEx}5D9MCuD+Wd{hpO&8lMlf?>H$$nbk3a!*b$xS}G|FpqjK)sD= zwy(x3cKpw3-4-7@9%xHwo!8rKy~&}QvfuTwPzEL+zC050_9$%)-Km z7l|j;{(h7b;CuWzj%-S zI=}m@xeG@%Y+~-0HJLXwi~`h41c@j1)UBlbAQ%kJDUM#QRCE?s(N^1~qD7|3Wi7ht zn@~|1jAeYUG%2BdESjzM%lQ*Gc{|q_n3q&Z{0(%lWEttZRJ9hXh5B|$I@i`ZT3FHI zX`)t>5lE-ap6QdTtl%&Dm{(4|X3k?w^Ko|Z^qj-4g{dP&X`GeVQvm;x()SnG@^Vo- z1a}tZ%(<@jQ>OT_>KQ9XA>cf?*k2>a*Le7$IrtImi0so9gVvbGJG*7c)0RDz`ecqx z@Rt`xjp+IdmZi4?M)MFKTzCO3W^*r7Fhw*98HQTj<~BJ+t+|Vq21=f1TbOXue+i6K>qp$S$IFUU+IpFo0_fgd%{I2A7~ zg$Fg=8@#|J-)}!}i6?ij%B^{TA9zy(qktkYdISJ?@8KN>!VxFLi8B=^Mi&Ac%28Vr zbE51Iyv$@wX3k3xeHTA@UvR~O!u90xaGlG`; z#v&c;dQg`COIO6SvGeSRbp@Spy+`PXFXN-iua!geLco{6{O)O6?pvdD?T~1Z4zNk6 zjxmC*^fZgnEuO(^wIZNjUxBb$sF92(7No?z{g?Hn5(h3q@*zHrh|qvGB(G=#4OUm8sE|5m!tff1=2?O$2P-5(Y9UIW*UTO zOl%75O9bHYvVvq$orKeyjg4U*O_hcR6S>#xKVP7sNqwlt9q79O+RV@i(PaGKik~e@ zp1v?rtie$fR$Fyl{4i33SlMr?VaZhs2H+N=$w%f;#nlv-b`__d}GPxV9#9kDT7SFkj|Ls*R%^m)dm$_f0ld4=2V0Ujh7x(seWv3Fz zk|{f5kcKi}pa4|v5_NQ-_l9Z(VCmUco%MTCw6sLTwvcFSw^_}?>X~HG$g>(Lqbccn zbbq|RBpD>zQc4XRgmZ}9j1n{jO!r83=&!{_U$>R**P<)K@A5+dn3UXI*MlJ8&Zp<+ zk(f(>2{uga%&a!Fx~#M}lFH#O?7R#APpdUHDG8JfQP1IL%PM5PD28TN6*Y~FUMy1{ z*6M}qhhIh>W;xX7>&NM>i6RpmWq6+5EwXtmxX3t-R2J2@5>|{07}u>8%|Df|~*vyNVKv=v$n#*yW6hUk%cH~;*Oe?mbXXXX&YwCLlT zm<-SVAdj5`>bY1@q4C487_x1sYK?#d3QVgcAnbO_IrMioJj&F0BJ*ggAdMb&Bk?dMXA zsi6B-OtR*)<&!TY8@NZY0m*sN>)rYw@OTetN@)h5dKoC`#t>5veS?>i3uK+vCq&vt z;Ha?dHaMbO4%&8AfthJnA9qfWE4N0xen>$9X=dW+&tCwt_rh2 z4=IB<=P`Bnn#`A9a8~~QqMwS!pdk6^D^v{8Lh+9DsTFf*LGd`jplj=nXpiPQ6*o#~Ef2JDb}QjG(u%`~D_p*v1rz#T&V-mORQ}sNKBZ>J z0{z(tVX9gwqyvQVXdz)?%g05n4F3-AKqvs6VGDTTRN_n$?}7u-H0-X+0O>P(q8ydl zUI4uk*WVtK-Qi1X^iYvLvY&7{fIdUb%ngfZ_gDrIk`?JPF6_GqnWdmScBb}uEpL_S z?Y)t%oND77chu+1kP$`<8O1MBQR0<_$*+Io#LKmtO7|u_A0sobW(So-Cy#z3OMk&~ zMHf2v`;>)XZKrBq#8=vk9)xz!6rFN1Oxm9oN^1VeUEp$w<50jJLZenUw!WSfUk{JZ z)iQ7@SUbDvsg>7dKR~eph+%^{3B3kR>CGLJZ49&(Ven23(^^&PBPR?DF64|o{S@cs z(zb&{>I}NUr7$h+w+dB$?3k>JgvC5F@2doUP6eM748JoRUFKYE@H8vxe+5w%|NJ_W%G_cmA*T zxcc8mRu};8Z~MllqJY0`x1^ln`jnbuipa84&tCb-n_NT3+T#B?09taA^Pfoav9(e~ zpQiy8@zA94W-*=-w&uOs6IN@_$%Uo8{khSvU-z2)VY(t3hv0}?wL8O687Ca z2`x{g!{ou2x$i6{GDmJ6J=5YIr@f1JNIg(1DUePGPKMNldAt%Oq}118VNMbAZsQ`>}J#K6UL8wgNj90 zM%sk&1sS9dKFMS^i$adWa?zSQN+pHS68yPgWBx#h|DnjN|0Cq^(6YFes&;K~5YB8Q zC2`I}ie|EsfX~MRt?+*StPzM1)Kxzc^ICG+rC+-&7^Il*|4`z=X6c>46)NN^10XuI%!BV74t%bM0Tf%_uI}Hl zAa5T-Jn${2&$MC)Op5JI{oqCoym5=-=^Qi47{tF59~4)g2dk^}J<$TrF1k_e~anXC?c`Aa zh=&KnjfnHV2#$%#Buz~_Iy+A8*&HZoZgSpPj9%IZRnFs-T|JMDIM0_+(-rfQ@r{xt z&Hu($CGK~o3_V=Q1__CqVjeGbTnbO?Mhp{})t$r^E)G<0b|CE+p2?#fe^0hUn7+Dv zKp9cr9Ce%$INYRl{+d}qpjufpr1w1;zxp+Io^hTHqz>Emr#+Ws)Ag0=)q5|BQJDHe zu>YC!UA@NNuZP_`1FdT;s;K=(;t&@}Mo`v+-1pYtR!3Xo9u)C!NBAj}%Dv+u^G{9+97OG_M&fO$!~@1t#JSWIU1 zIUDZj%=(vS%k!2WdMvj(T(J9*NY!4ZcNA5m!9H@uG38ON*uxB=!+0K7pT&+M8?M4; zkJ+D86#Pu0#zOu(wJnC`uyD6qwl2Qw9Vge=HFQSjBko^3Qp{Qw7ryw@7>UH%IxZrB zff?2Wrz8VW$yrPFZB(N!W}(LdU=M4sXhW zH1gpdkWr4nVEdIeT*q=|H3NTFg8Ii08r7ySuxKE^HS$UR-$g?L58#$3d%7>HajW?S z7}y1z$+X@FkH7qFI@e68)5lK!m2Nmyje9k7&8y{T%XHl85Vqq_^fP_uK$pnnX%4Ny zX}C=$f)1Y(O7EhdW?-0+7m2jdm*x@Z zVhyoz$)x#)nSIB!J~U1$Y%=oWn1)JMZW7s6zHFzX2=E&XpHi#7rcF3UnKb?3=?#+G z->g5)R;R|A@VgYVAFSYVskHoVNsIQy|6q#05lXM+(?;{P8eh=uc8_O>9V~+9QmcTi}eaxjtZ_RsIJ{0RcQSw zvqy2QX3Ina?lmqAISs^$fZgP0?7Rv4par?FTR6BTjr|*NaVBT{`9?ZzWmj5D_a4Qg z@YP;6bc$!ZF^Joqg7;ohd$=vUww84&3whJFUSP}4C(R+;;Sd~I;FCSxB$)O;^oirm{; z`Gd8kyam$Zsl2s)C_O7@bIUSF&$j3Hx}|NsScyz@@g{tQg+SomR$gY2VAMqFWeaYx z6@fQSGDgS$j%`&NP*tW|N-@=t#q!MPkASg7({TILHVsUkoi4Y?Yj}47faLuRJwRwHu1Rpy9n&p^Exn@5Af!$A{3*-hL`TYm#J!jx)%4;JvX?7YrX3J-G4w( zUE$NVM;cZuEq=?1RbMNTiW`3b%Gso#NUZp*S%Z^rDc>?-61$_4Cl!4rib#?XToy2i zBS7DwJI)O+f33E|Hk&UoNCpK5n{n5I>|f%sih&2Xez6899h!;f2|-VK z65rY#A-mS;M#TaGEj8xZs%BPJ_^bLx_|02YeNx0qz|yAk(grI)TQ*fFEQdVs;Em01 zwIA3lsr%ItmJjc0ieH8Q*<^c*{+(^}Vm~LHJF$F)Xsx>%tEI=|r9(Lb zkxIA_k}MyVUGAES7!e(pID7aoKwG%vhAU>Rv5<=sOp5G5guKBFO^lpIwA>8cx%eJr z7gU>;WsiNL{=3EhUD7a={f9{=H~U`#r!#s5V)D=ZVZ14BxVy}u^LtmTc zZn2;wVIj@4HG4V(&wVOFH}|vnrMWwNtGH^SBal9}=egb*ZaeUCvOsEnPk6uALHVAm z(8i*YRf`Rh`>m%ALY`KwL&}7494~Rh)YpO>qY9%U!|T2E{)#e~L3^-)*|UUbLyQBj zJn2Abrmx8dLLfVR7L@l``iJt@20z1#l6$z=!Xdo$qxVy>k1|y|bvC;D7amp#*lKgS z39IraQ@F0z6DXn|K2Wm5vNIK&K97#W^4Xfb-*(3=TG1pA|4G%)F1fyC>MMj(F$kn+ zlZzDgMB}m?^SQPN4i%2hcvGmj)bx6(!(*Aj92WQkM*0T8q4|5ZU?*{r%KI=I8IHjm z1O*LkR+K9EtjN;)$_|(ZAyxGNX-Zv;s6L zxH}{P@rU^4Z=f7yEBDiMIh5GB!E%>s%p!)gEUwA09GeROhtA=p+A@z8X z71^zxflm;=HkTZLeiK99BI( zCC_*0xS9z|iTWvizWt0KixBn<3jgIUr!v=-M+nlZQ}O~mDB&CPa2^f#!1T68t4-Hd zZoLM-g;-V%`AFIlY}XAAAxokJ%t2VV`dFYpv-l97_$>thx5g1fq%?+$wNA|wH?_L1 z@bMhp&p>)61w3O^T5Yv|JH<%2puo`%fDXYW_Tke_kWC92Mv^L`z!8}g1knOIqy-Pe z=3QNc&m%A3oOr#Yrf?aUoFaHk_5I$w6-N^c0g~)>c7ZP8$$a5&#|@Wx4K5GNl&Sw2 zot~qi&y|GrKUViBwBtZKNIRsk=wlevK4a72@Zh=;Bq zaj_W_vv;@PmpJ1s>#S<3l1W0}kTz;Y%g-SXCP+T_gJS4!x;yHYHvM$lt#mJ0?7c!N z3e$&!j34i>bwyTfpd}@ic;98`r>K%%yS>P=XmrIf%MOj<-dv5QiN-CV-xF44!BVsY z4Y~|LXU=~)u=crpP*P2<(|$nRyx6SN9)Q%i+37(1B0_N%PXNj;A5n0bn)417A*T5G zf)oq+a@wrmIs!ab4jT1OXoMp^Cg2IAXCQ2F@bT%6ygc>C6-U8$ba8b$l3`3E6+jo> z&`E`7DDNT*c&S^R!OBJg`?7t01Fxm`e@lD`-i=O!G04oiWs_r~(ut4<`^Nc|Qnqs_ z9hN`d>k7~?k@^EU@_w(pXcTv{hwXu)5-f~ zOn}Up+ZT>tnB^iSHfCbo-Y0~M_>7pc^TQ}M6z{EQ>*qNrXx`vAJ8gryx}aKqMk$V_~pxn2cBP zD13*$I{Xn?K3|5SQEh-Q6On)!nMEjtDxr&KxAp@Y7|r-?k?$J@1VF1A+|g&Q5;IrW z*w|(b-C%!1*gGIO$fkp^L_%X4;eI;Xib z#)&pE3PDy?bxktskxDTw^LmCWEU({TFNB03^Lu#sZ!+e(Oq7c?R-`;U_XK=guPnM+ zjo4r({bc>@xi|feY*(6HQ&+>W)H#LtY5x2%x_I8W9FA_f6iXJuQ+XoheIJlya6F%q zU5dvZ`mg_Q^Ppsb$(W`?;q2#bBV6ot()`Op%-@+j-+S#C5@BLMD)$=@NKyRv ztNO0Zg7CiqOSMvke@W=sQi;|r9kCL3|7O+Z_A>2CJzkD^PhL=1{(V**oLVpgj2sV? z>-GYoO=UC`?)C`M zIW`f_-f3&PP2wNw0U2rrphp(?>*oQg43|w^^MyNLFSWg|E-4lY`*tE z_75Z)`~4EC6@sVJM=&7g;4&~BqRxJ+t^byJ{+-or5-tK8s|^kf1k!Qqx)L5 zzhiTeN%jgDFGpw0nTc*a?pk~w<>Gw#n6**AAkvs6#Gx@Wo?_6Wp`l3wBi5z`vPNa- zv{vw()^qUSs`@g%SWz@{5Iu0QTixq&yCJZRXPZrahyebZ@_}mJ&{WHR!%;y=aa6E* zS=ASf>o=8qW`~Npr84 zxpeE!1_fg>o7RCVHYn8OA^Jc`(8bYJ#90S3Nv+9}_3rsVlQ3CHD^N6wo=H@^Dx%bp zhk;K|aE%Fdqjux%`li?aTS8qSignPlmp{oPQhfReXOr^Hre$7i#Gm-PG^m#JFXHK@9P!Vi?6`71U+-p(1xf* zAE=JC{|A#XCTSr+$J`6(I%Oe85n-%%QSjMeF1jBKP(P?ITwJ?)0m?s~pciKxh@Tpo zn&7{;n(=bSvzmkCxyrkafnqD)mc@VNVnB(Trv3)#+2j5siS2^>z)z2lLz*?c_w?LR zAI+2dlb_Lq9!Y5lCJhIHM)1n-O!sy4n<_Fr+uGheeO(kbh{Lu~`t^lUesi@ryIvws$Hhl?-;hn_Ob35_;E1FzeiIuiQN#;>2sZf#e-(&2sZ*$g}j0Gwb6}<{*@O^8T&0^ z|D{M_4Z9H{`)M@?Eyn8!l8GVX(NpCB2h1ent<$1!TTbjg`MYNmCsy50``LH`zMQJJ z(fp>45!+?!_V{R~o`UheScyYrpe4*1?*tWOnb}Pia?Hu*$06^&wd0!jc@gr*U8Exg z$)(Z{Oa4R?Hgz;P$%O-%j~#9m1!i`FvxZ}xAb+t970XKtZ={9${ArU@cdtA>u_+P#DqB zaOL6LH4chC;yAM==qAFNr7L>k4xfIJ%0dD~32NW#&}54(JR4=%ZF?~>XFdDyN%fD> zvWcA)Zrss=uolqhVkLRLO=i3J8nVtB>Nr^Zbg0g|n))VZJzd3W_dHirSN=dd_kMi0 zr-UJWP<$ucWTrH}{xN^t<0_k%6k9_kR(YxRO|wp13cEec5NyZoZ#UhP{Q9{5xo#^9 zKJTvyv*LuKlOtF4wiWt{N9l1f@D5%jf~p=fOvrx_g5{Ud{J!<;lc#>meV2aa zS3221$z_ITOuYIs`;2Y`C~of2pta~p$y?cDs^G4>1>MF;APd;t%>%??PaS|y^qM1i zXSvORWzi9gYWCmR{&+UWXZ#9CvDy2R`Kt8S>Njpc)XcjMKp$JauvcsYI;*5sS75{o zDDJ!v{{JQ4L3qbR5FTdCR|mMYL^VvzPr0dY(bj1Toso=9Ya0%I6@t80ARjq1c-GDr zQ(jEP4;nFpgW8x-t$T#rr4QU9idu?#F?{^LhWu4xmU>;h@Q4U547xQ%jGYIqYMp4K z)O-zS(We}`X0Ky8CSf|FT5>wqWBxmGSP~kpxu$1tbyoSko6A?VpwS zOr!Xf%&XKJF*i>6vHeNx1CTc~9rj$mLcKyIqT3N!mh(O;zTVzQX?>oV7Z1>GLKC=z zV1D;fr~^zNlI#*eR|2kZY?iMtQ%*jDo@89iPYdRgjB=GRA!Hf~n&rCcLW}P$JBIsy z$a!54eU#JAWHi#bqBM%12Yx5S}b0h#I1cNM#T-9yA=${o&Tfd5L}8YN2;`!4|? zoQrA)cJ586*U|!8^vwMru{Uz{q2Yh9RU%KeB3Z1~#r3MWUkABu6naMOR0qb1t5{DD z^zf()_X~iXKnnz$l5mhSdYsKFDuub9o|5$qN3ivSveU!I2wq<2-7lrmx8S|IaF>Ob zL1vX2KZOSscWyM<%WIeK&x$~>xJo&x7jGjl=Jp)^E~Ek`P8Nz5C8>*xRvW8bHv2E_ z<(5zDG(5kJ{8eFuwnIL5S|{`2^*EBF+OMO=d4HX-PW5U_wviG+j( zwHe#3wDtqK2vgQzPTaYGN+8=+Feq@@sq1}D0_HB2^3(cgVa?iz*F!CO^CNH3-7`A< zGs{K8d&86Af`aLP?Sem69T{$zV_v-AmnqOJlq&9i76dcNJIVbnSei5{YTxq78X ziKuzsUwLwGVD!P3+t8i$Y3lceg~7BJ9Sq*snP}-Xd|1wxoZ18c(_hQgKIu!}O)6|x z+~fs*iyy5rqMZ-&(q2E$a zZ5MLr_vayR2L)n9MU;~Nw_rojAZJeINY-WDjVs8Zr^lI!u?*TwTBVr(D4g4Cy$`@W z+E0{Sha)L7b>?OfFB`{pT1VqWrRg@EF>sBH$6j=*^*HAQXLHaC(6+amsJH9=VS7~h zAqOAlARKWS&%v(KV#~#3soJY1Kdht>w_Q7lEF!1M{=V!d0xR4OLHQpJlM1{jD%x4h z2#QTWv;s4I6=y{*T?RA%+OGc&V3iZ0_S?5_w_+7TM z33B0kHyeMvMcEW9?*zq%*MXg*qarcqB~={noFQy*^-<=$!H}=!$yR@ro^W0^-`dEgjLZW~{u-wAw`Ku}Q7>9g)Es2ZNL zaVGU(GzyjPo68Pu+jp-nYL3H^2J^|hSl|VN$J#vEIp2Fp^7$Fa>ZdZL8sZQIA>EE=I(y!6{uD+3bG+pO?L-hb@`LGt*jTzM5dhx@?B>CJb2qy z$+TkhAw|V5+AqT7`K_1Fw4*AX3c#y=wVLd7F8g?|S|p?BI~a24ED_3Ws*)9WY5lX@ zk#BNvjQp&jVbXl$&GLA5Do>KW0wM23%D5XB<^BuRP&wfeIx@aQ2tBB=( z?#m6#K#i}Gz(;Gsj`B`*b*f?b>J#;c3kSl;giS@z(E2?@h2l~9Vr3+F#YilY{a-WC zJ=xC#YuG#B(06~KRtbq4^A@D*#k(a8Plst5`Kl!TubEoxJ9qPZX zFIt!=94N5rUs@PnenwBI3Y<~f(Hj{IPQ)I2e5|i&Oau9RXcw_@!6ZLPsfE(U8z(b#b9VlS*HRwhn`qYiCURDBv^ z3hJKKECYyMmF8A`4(bQJi=2yNss)*{$GhZ0d~?4rJ2wn}I{2NOH?sOxpMiE%*AB5e zxtNSI^0bJf?V+d8dN@6ukVNlNZ|kuAd1sTJ-stx9@4(uj=cKQfzVo~k@eFtAmwtKS zNogFFiDd_p%aoYFyK@_jQm|TS^k_cWdr4h^{fL%Z5Y%t+R311?MZ@2ac=5}j)wo5urM+| z+T+BF&cIK-!J((2cj?(YsuoWQHaB~+eL9kFYIxe2f3)6)Qh4&L5MZui!Mo&Xx9Xe^ z2>+Hzs!W;F7hyuKQU>%Ri4tfF4YGS4w8TcMG<_HU{X*Gt$rTYW7$!No=fatvAOGQ` z9M>0VIoYoh>LOn_-Iw3RWnJEpx%zX%Q<`S97y8Cz9>oUHdABMcoR|K%TdZIcV^e2< z`0ZCvzV?@#zA(GGx5&?~Akt13q(VE@p$k2Sr4`R#mFti`O(!HRykLgEkaM zbDRaMb%=@yZKCM~>SUsPWOv~eBoUjJ3zXl98Ygjw%+uPw#im`C0$!xv}rHueEkbLU_1eSUVFJd1_oHS-ltq+i*8j zW~!gx-_q@ylV%8B#HomA$$UMOYrVn=U>K3v)1&hAVNP^0a&sp1^fMojklKFL3#TBh zS>9OBMy^vWkt!~);PbKLM4-pu?}w-o!RTx5C{q(0GsC8!e9a{-Xld~of=oh82^m9| z?dv#{F{LLdl(N>h4CmJ=_}7^}Zq?IEqfwT~olVzTR^n+AK#ch2l7`zotCZZTIb~b!|~| zGF@g$^B9maQ;T7WY&S#bUsU0Te)Yd{ceGOGX6?V(b^zvQ`ueBDa|Qn=djfYm6Sz|M zE}IXL3&K$_!MA@%ntZwu)>FLh>A&(3KYNlC;CCp5U0xjw@9?H3S}kxj_T+mXv__)FK z3ncTqITM~ooLC&C%VmB`T|ruU@r_h%SDaEWW)lSP33<^I5UgLK@}evby@R77RP;9T zt9L4Sbq}egGYQMMQz%P*AugiE#m8p+nk0j4?$l|)tv=HTHOdUfpQL2u!WZ-|l=4(D zd$=6x>w}A1BqpWB$pl-je6D-kjS80C0v1CLV5d&(P`7VlBJ8Ch;QeJ7jd#A(U503) z9T$?S#2~B zoNbGh;vBcm6W9}dRmkPR*|{PP<@j}dL_~B0+H8JW!QCpFzbeQ|o4o}VfH$x|O?f=5 z5_FW~T-l-v_B{of$`hp{igTA+SLueuDpJ#zan+_rq{HO%rJB?{BVN;-k;QvW5^x3$ zN2qS;vXQ@=PH^KGuKUy5i7EZG5PPA5qAT{W4aE-r|q*-2m;)qIYvZ!ZIFMAwry7@8-MI-KwH^{(8zRH zCCEXk{P$FGCjJ}~sB}Ir(8LY~zPCtA(RO+4o#JAIfbaQiH;)R(l}+f=f_eJ-l92L! z^sa@YfRz0EcF7i>iEo~@$LY_YGY39G3_lhHSlhSh7gpORRU$6h67a!BEMEX8+#b8W zWp>F|BVj&T6T#5AH*sQaxQvJf6^(E5faq-jAFpk1l8}ZZ@&lZm+=WQRdgR%1qj;~A+}U5N|Hq$zl<%ztdERXY z3aWkBV(YC=3BMI}J+Ffr4tSOaX{;eR4Gaxyd_KH0xSW23BOi`zHJKrEQI1qs&-5*& zLB4uY^_z=FV(OPie7=vbq5t&mX1Z*|^~m!wNLV-lJQ>#a=~Gqom6G!Q(`{fPsgW{N z0B2*>Zj(D7yeTf1ql7t!I*!HT#rhTXx6nISuAiEAQ_hZ#wT&KO8wa}wV2Z7j%x(i1 zm<4HPk1G=6X{=)^$+)ZKs@2h%>5V5Lj3QaWts@{|k`*_9rrySkz-j(=HA#nu4T-JC z`tQL9YVmrYEKX|2JN{fTt+*+nETcBnFo^kE)B*X%e$e2M3@9LWAq4d&hvSeqHazd1 z3?D}>n9tj%@p<>o5ZoNRsx^}mvZx~EFEPcYYq^DcT}^gB%e&l{qLC*MpONW72pk_DU2Tynt8>ICV4iW=2C|Xz$`v6uZ-R=2W zv;2B9=1~}e;NM(Uu|j#$?OCZpVRNJ~$OnDr_Q#Tgz{XIj+izgA+zzn5lalIRZS`Qh z-`oTgT?%So&k8D+$O(q0A0{Wz(;r&%VN@#@WamPL$JMx-tTo#)Z5ht1HUNS=6(~B1 z58wqL-Ix9N*C?76hQwU@{5a$#@u4&y>8CrHy(pLkSH5*K7md#w4jfBZXk^k~%FQa4 zfw8di>PIQZSf$)<=MIl-ofpSZif=2pTZd?&WAY!}Bm!NaMGBi_YF$?rSKOt*OO*&6 z-hZJr9}+cMv|E`6XO)R;LvE-~TZweZ5dDo#vjde5{{u(yvgx1YSa>v@KUc$Jv;K`+ zommrNjOGAt_LU5GtYa=&3$*qGAbmy=NxQ2kHtOHTu)-14>YS z|DOwkw`_+x#fr?7FRM9z-nAg)!t6f`tpnEcBlo;r)TJw3@g{g+{x zA37*09talRm5>o|^v}^^fOZY7-e-fSZ~_};-Cit zkocfshncUgr}#hia8%%}r^EWTps0BfaXEa4hlf46b-dxFJzZ&8VCS{kUFEqNFM!Cw zx0GOPMIyNhWY@ho@jrIEVxM5|WBXH+_>Y#i_MgW;x5#j?m=Z_i6klRLt zN7hSn>ph?Cfyr1nDI9jhYWs|iM{>`7TSEZ39ss~7Bb^!P>B*gSYkS+_r*?4?KPP_l zHYYxRE%xFCpC}87Xp(lH;jVVPPGJSO8%%!h_W9=7)AEMTYRnJB?KK;UoS0VCuC>IKc#^A?MS03i-l~k*F#Omr@QfR)z?i9A7B1 zBpEk8C%$5`xOVbfzA>4@&%?|W`x_J`rl*Ij^9($*s#@%-l<;%4g6!L6S>a^ICnr|*(PO`o^7AMi+vVHm-s0)D%&{%^tOeYdlIvrwUqkzdD z-1oO3vbk23COH(e$BCfS$)Xb;*!d1i$V6XG!t-&QcZ;uRIed=5gW>UsDcOaDg$oU7 zx?D?JB*-Ve2Iv-O$~G&R;AxH9|h#FMV9kYKFd7Zrg;oEMxz)KFrAMkPeNE7Wgwg zr(hB$;Op{bQukfcw5H__iMnW zH_AfV{9yc(>+Ju_0$3I%uTcQ!#)Q7Ux)(|=#&5*DU7jjBRgqA0q%$H|3$%T12&HZn zIzINR+Ie0UC9_^bv?6N2r#0$gG3WY}U&Dk5$D|bVezsj@S`HEM#-V3_GLiJ235v`L z(CC8T5`x|1946!mA)M6%-f(c=dFZnUrV@ZNX&z2D!m@9=?esXy{f7dqmMEFF9YZ+B zEX7r`$-@vw$7QIa$P!nRPjr@8e~^!{o?%Z-L;RuZQrqrK?JsgIl#H>0p71u5h+@7p zfAJz7D+|o>)!iUHPG<1?Go>fKW1g8)Ls=ZWL7R!JpoiTTY-icfu#jxkFBy3EhbA0y zjAzIRm=RA(L@e|f)b0oId%o*9O+SiXdqpn|mx|G@j$F{DJ*8EjSSg@lPW(*YjDFqe zUc>6VTM<2cIKY>hm6pio2gADp{dzH*CrxWZ2H(`lJs=Cvh5!(kNHYDKcx?F)1d0oJ z{dBo-fwYkrfJHf&lb-(ru$Lj-K#f9KdJl{>tMag)eWt6zOIvEPK3rWIK4}2(RsXLQ z6$gX}I^K}nm}dBEmh;FAm7NpJ-NM*NPf@6RBtMc*}j*omI`Oc z?`)63-EjNzlk$bM8Sp7FQ&pekUiTS)*&W^d7E1;Wbn3_>W4Y{5KC}i`0rO_U!bRU5 ze!kJ4fH3xI8#RB0Tp|p`>HL7&BQGWj5+(yhFvZ?QLq!F9 z{JVgnP*(Fd4QLZS$N)**AIpXx(533?vl^26_C!A~@U|kj@Y3?VhcJZBYJx-)2mP-2 zzrQ(sltWW0m*R5qJ>1{sR3dS06qYS}*e55+oe!FIaZfuymR5eE%QvI=L$yzP~ced9N)N@=J(_5eit z=BLh5Hz6o8Fc$a0SCG2$uGb6h4(l?RPvs`~O8`g$narmL?T_h9o@Hecf!oAZga719 zcenq-eQk#1q^zBtT`Ct|g;-57G0h>xgH3LJy1SrwG;R;@DvFun`+)b0qSk-w9FSnU zj*e4wOI@Ynokf=o?hMB2`<0_O#E|jgPEN%)EArS~CDcc9^P=1gr80f4ii+da@rL5X ziEU57kq%w;f7OKuF@a+NPckS@~{Q-y}!SwT3XH|D7bw3-qm=))AIdA9QW&2 zJoYM)JOHsQAp%BU*eltAWna?5t)K8TI=Xv~ zU0%asw$Hz?V1u55UlnY2sNlon%~XhgZx_hB2~@0N%T5HIoN-s$!B$l*WBGZ8sG=+k zS1z+h<`$@gPC^>S?Or+yK}8tas^MKl-fnH8ojVZryqxXp=zOcr4}YKd2CO>gE0C^6 zSXEYUoQ@=r*Vv7bMP~hrhOXOl>`uAF@gYGpej9~VM|rOhyY>1p`ifJt7-y0fTl8I})E4yHM&- zb~!sM{cnHOF0dXeQJ z;QMx5C?mnvJcUZ1t@73OayTT`d55brr5+g#U(FvKY4!2f2}eJ7KOxsOWV`k~8maZ; zqx|%c3wmHV2mpGc(t;nq-+>{?h&lD(L}kS$a)>>`Le{WZzTr(cf#L&lv5>HclIzlQ z;_oU{VpF-8onae~nLiE|>a^1BCF(uCgMbMGrssl%=ju%l4)d9NvFNhnW+*Q=#oP9q zU%^v9^t!LOZF-rj&k;_1{H3!tfUno5`~xkUQvfb-SXR)ckC8gLKE*!?767J1$%fJC zXxxLZhWEMIgw{b`zyu)o4L)^%iG;7`_;eHYzBuzCio0a zNQ6tXs95Y=`;*cUN{+Wv{O66N1Mxs)!QvKotY7bA(I4;M2ngsoie(Pc?b~CP+%V2B z&3&Xaz~R+oJkMF-(|94ZQcl(F4N!Ts+XJCZuU|XwCs(r?f7hdn3~GTf(?(hL?a?#* z`S|kYc7jRuU}ibLo|n1YW$ZEE*UU>mJW7q_gU=b+cF_t4^v1aO-mZitxeaTC@x7<- zcu~>N3Ok{Wt)4vGxz7QgRlNDwa4HH8P6PlBkN6IqXH;`F3gu9cFqqF%xMk)J#$+*; zbeo3*fi*`?)Uk~|AMdKL@yts--IcuaE=^2~WZ?|Mf~_+Eg`z(Z>~zFw0en#nWLLKl14;z;zp_Mo2T#V4l)idB86$n#zAG);tM7JRkJ{Z2rLM| z42bBGGyA4HT7_8Ye)#q;t)6mFi2Nxj{ZFsO0x@v_e4E(Dmle6(2|!H9AET~j&4Jd1 z87CzlNgM%Q#FcxW>aZ!QAaYDY|sc_Rak5cQE>Fz?CysuPm?#szb6XE)eLc0c>J)Tg#{IAYGJd;RL{On#-@R)UqA1tzdlkx~81U-AF4`Q^Llsi8#5 zD4!e@IbBBFi?aKlxW@Cek`1Tu$yRpF)627i@Ia&2#V60dp4Q8nrj9l^THHQZzdm^U zwx(~6*zd7uo-FWMc^^v}`hJ&KO-9o(aHcx4K0r&nM^F3#o>-_sQC#Z(JLqRo06kvl z0SB3^e~i++O-8Qhzv>)dl0iUjc9PL>yUns*5ZBP-^!E=G-oWtxb|(17&ZfMalKXF* zz*$V#;~c}9DPu1rRX@BXXQcTX$usKh@oW-wf<@sRRta^#J&n&7GnmI5_l>h_dS!oi z)bQj5+XJ054?%5bWMmbb4%G@7(as(XNA@CR;gAT})-8nRNyD_zmm}n(V}g{F-?`Ud zK@F@620@;f9c#%wjgLFxa$`_=zry<@U@{{Mtn>2e`J+;2(-afZBnw)pB=VUPUx>wi zjsqty&iKs*U^f!{DT^mXBu9gCv|LB-e6a?@^>i;?-fAFMOBe-$p>T=EVJo1LBfl!1 zF6BKQus{dctx*P}a6$m;W@oQ7;WLsTkXK5s(?vKUhs`W(hd3YQ8xiqs3|hl^9J+S6DJ6_O;Nc`nJ4o+irvTo`n%S9qZ1m+sG_N&l#HsipXpR z9Tnu2lQ9pZ5B$k@&n1;_Ety!42n=3NeZ4t>zSu|R6{VR9v~m;UDnQ?9A)G}NS@5- zB3%y#!c|~t-RnbyMc;iB9sdj!_AZVs9#8_BWZ0*uUjEA~vg6bTtaS26xF~e4eFAbM zYpqWgw|}^w@%8h!?A^|hfXLQ}vMKQ9@7%c+y3kZfrBvQjeNzKSVJLQ3h&b|2`KiAm zkR#uW$^0)XqMi7wlCcIqGcM4vqr*qLEOog&Q#fTlja-NXeDEeJhfVSY8G`Vz-*K>l zMuBYl`0Ags`J5%rK>~JyzJi0Lip4uX)z8R73Mopj-Ks>m2(D7d1UDImw+6Hn<+}NLm2+Kjhjn>i^()HE1HZ!&qS`q2dyuc2xn;cQKtY2d%L0Os1ehJa zcGIMW!vP!QY>d@P=JWCjj`%O~{zIlMeJk9C2~-dydC?>TWR^QKHH(I%v8SriQt5kMQrN4wjPPs z(Hek$JLndoIyT;}kh_1zHwRdgo10I#&FS9U;Q^G$SKqmiQKeueB)xcTy902d=#> zoz+$+LGgZ6*d*WS=@y9K{l(1qu3V7fNBEN?I8XcuO)j0ZR^M!dJZOqwg5x#us33{D5KspxXZ&q50L@_xNhzOb(77nkA_Re{9a@vlcmN2pE@ zJezL?*c9@52iqg@dHQ43np=y_{ud>bLj5Zp;72Y;{(95HzRvr>4RS?gd`Sm=-$SJZ zOu$c;Yp&Lh)>`UxzO6R`Q4zVDrzCNf-O&Q)(2A`veEyKVY1%w?7yx}P$hF}Sg%=LP z@9FE2eHO7ajFUnMO0YTgy0&6HV4#^sNF5g03JE)ay`1&Tzm<#6dwrgkXv%b=lYb!* z87=DT6AN!|ba{4m6iK+L01ZQfR17ZO4>wAE8=ht)D7?u8x#H3TvU_iLm1HpxLnk=O3SgXeG(tLC zZ?!sUOJq?sID>p_8qsYx7?Fa$1JA=oSfd0Ub-Nb2VS!ROb_D zWqN)0wQLi%Q%HIY6tT4y8kM|yqHi#FVk}~Xij%Z`eY1@Q_x(KKw>9=!qz#`Bug}Zx zvU0;ZOQJ1@K+E0^O_1WNZ*AD_1Pe#F5^_QU^=v9(o}m*rD_8=-@2|ArzjX^ty>!hR zfv+9-`L&B|geOFat_VQKB@CT4B$;S&rm`F!9v_pJ`yTF;y=YMM{<2=zEly_fMnGDn z5idykFBkc#wh`+*Ck7|~{B@Bt&VO0?(&nxLC6i{IPW^ksJvE(-V_d?YD z^gsP1Vr~kF+JUO46J08zMj1L3x4o00O+_T#fM0O?sw%!Fan~tyM zd9k>0O1b+8!^QFon{X&svw*S3lC1fQvj4@FwTR~k1;HwG>7B1M1aseBCQf~IQ#Kwv z{ZdX-GS_p6Lr+itXOyNZ@>ZwO5=$%wA3>!_3*{?m@h+YIS~QZJv8|Nd)MRVX?aRao zH@ke0YNwJYpw5iI@@hI54unXRMdaS{4y>Yd=z2*b-cFc z2e{u-L|Qrietiw2Lb~=eG(r$_?6r?8>E6`U{M+VYlduK=dQwD&CBz4g8h?HDf*k=;y;$>VEs3Ll->X&^X2nlv^`OvtA*t&SC{TdW-!P#1va=~bz!eKZlQehIW+x_y`PMZNqx`vU#o zWxv@pbFU(rr>+GJ>8cq-8ao>XaV=a8|CT3Yoolr5o=sPXvy=kzV3ef6rL(XOt6fkx zW#7QTpy2z1PF0cDCVVv{D}Z!0804?G57=NN`=XFFF%k5rRbp^IU8Mw7HXm{^>%8#S zPLc)>0NgI`7Q%t*c19TkZ2=QmdXmsaN;3`c=fxKS()=vf8W#*q^a zNZWFyO8+Z7O@_OOYtvg3T?Xh}tV<^#4?w7xL`G#Z5p~g)j|3|6!SU$aG+1=I?mQ+F8K?YS z{cB{>4D;=8T?&tJ?S#`ZP-cV)V|N=NJ+j2iGK5Hym!9P03uy-}pj{?k~xy}={1JI@HD?v;Qm;076li$Oh4mI|56 zDZG3}ePBFljl+__^Gc8gC}iws56O)M?fNnh{bTt5VG0Ms*SyXr(d$NsBp=OnGvrc< z8u1o|?c>}-{N6_Z-CJ{hnD3JL=r~4xxw~*sgaSHvB%VS6+ZzRu7ysTmB%>uojtSqr zqb{r>_7yk2%`5BX*yn4Q&ap>SjdWQC&;9ES+fi-7z`_IhMsJw)^t7Ig>~w!6RqMY5{&@t`V1G0N;9Y>xW7=GgcR^>n2KSH|eLODQ*-~w+IQPZJG z^cGdU=T!tmXStq~7Ec4d`n!{bF^16C^yievg*#r%z%7F&%jH^V6c)_~=;-tqVSJ}q z^<~9%LBV}M>=}EFe8vP=A|S571^Q2|0r1DDwY%0-6wTr+YeT~`ZwdO@bWT+=3I;D| zwy6U*`8v-T^cu+3ohNDprV*^W2T+xh{-@0afqdXCr zAFl$mpnz-pJ4~9~iOo_ii@YS0>4U@5brij=^482re}`>_3HP<%@3bph)ShPwc^FJ1 zizVVNUbYj+PX^8juCxExOMJT7g1c>UWRv{MhZZ-|;TOAX^d4GG3|AK?5xO@FZs#+B z2n2Sm%#7DEH7;hU_q_)PM*y)cBo3y5vee^ENN&?_}gV_Wh(BZRuNEzrVWH zH@GB3)7qUaF#=AueidNjl;4-E%c(oE=*BP+4d5$!qj<C3 z4^-3_3*k*3=y(8u4#wSvfF&hftfyAlt2XG%bsh@82Mrw^;xGD)5Gm!=2-9d1Gf!#6 zP>gy$bOjaXQ|MR=ZX!lRe19~JDMXvKpl=~je@_h>qBhS9MiLkfiklG3xdV5#Ic(qB zLAQ2(EAsFPDmiF%q591xj*%3IQHar`1-88F4*Cx<)$?3nFUjEZ|8s{wvIWqX+=XZK zg{W)F>rk2K;1J~Fzs$2Hp8wvo952_thE!+x198C}7edW!c%?vFir%=Z+v@>DJCLy4 zv9<7NxH}|;QcE4EuuLZ-k@^Q&l|e)Txm zqzyoacULM`nHV(XWUr$-1Io}G2F}u(n^$1HN@gL&NMd)(^1Y(3XL)1NPpO5X$DP|) zOXk5ciGGKCf;bj&w$Qb0X+P63=+;p6!Yg zw5efu>;c$H?r*YaYdq(0S%9N1{Oan82gbGJzGVN=;FA3I{s?HboUO~~+}^&n+B_O5 zeLgmFBnWM9Wer7l?&iOLuBx5zZlG$t0-QSrfaW=HkA8dC9*TBNZ2f@EoRj8kX{G9t zphl<@(HS0kx)@9KkFt#w95n%)HdJyg&x#y7oDAx0t^KQVxrRyVii44ggp+4I&g^LO zi8DDXRKJoZ#A7q-YNIDumd!j4_g~AT30ea9zF{QYZ#@W5?fjmo-maHE_8tkZtJ}bP zSQyS%4X2#KIs(1xvT9=xFqn)v=UO*tJl)++O`G+S1Q(}a;?Vm``#I0#U?PZN*Vcj% zLEk|O*&F2z3q&{N>@qCC3Vd7+<^q;<8r}Cw^sV>vrcI;ifZvSI#*Xf@W|BSE0OcuZ z-Zwlf(bvb=mX0Xvab!^>n;k8gKz7W9fPhrO^;x+)6LrJV!MaTW)XE=zyuM_*u(BqK zTpuI7k&zJvi%@0#3PeLzm};D7<8i(N<~gAAU_{74$q5rem)$+4iIH=V@LzQF2xVv+ z2Ew8d+9;H=e^>GcEd;mgPiZ>68wrJs=4b3Bu(_=6!wygO}+Nu^Z8+H-k zk-THNe*rzPQ1{JF1f2K6qllm9{SHm6)^O{PG|OQ}LA2M;n1R}ZzxbrHWG)v*r9v&P zL(<#i??>2`m&$5=)MVZc6QAI*tEnqyM|?Of7bA9ZKHcu+Sg|eN4vlrehCnOSmhvc6 zm9t#9`B2Gp4PsKnWwg(so4z@38aKL)32#~(Ny)~4@&h5}=+9A6MJ zT3k`TfwKx2jkA6ag?Ck|&@+cO00)m)*_*_sVXWFa%Sn3+8R?Z+pH* zN`v)YQ~}SJAwYCtOR~)skBiD&nrA7qAS$8k`TQc}8bK9%F?A(*;dL18;( zj{;ZcB~kg{b?J6vbpmQ%N;NP!pB=SoK*G=M_T9gAzWY;8F0Ft8nkqs7sng@z14zb# zys2+YChl{7slR`J51MydH!x{nCFvl6Fg(xgAu`rfQ^S;C%=<3@3=aVne^G8EGzAnKEVYGl?B8hpDK=fM%^*k#t^~xp3V$e#dwAi@6{kOUK~3B7 zd0q9t79@nsc?{zF*CLv=KU7WQLl2QATKSm2^yCuV814;Fub8yyme%c%msy}1L|(eM zM4bkx*ZtB&SYox=z=i6)cj8gIPWzqai+(K&Wcx`#J@`CSfiZ;VMRo4I6n-;55*0Da zmAITOR6Qn!%_G(>2tz+66crUM47fv_O~1o%uZAJrkJqwq$$Gn`^&#|Ivqp`NWzvmw zX=3K)zGYjx@ZRSId&NOm2-%Sz_Tqu=gv$)ev`IvuQd!vBx#bz&runtvM;s3ZPiHDlwvaVz_2#C8%jiz$Gj}L|O>(6Y{YBiDWDC>pPAbOEQ+lHpWeeICd=?y} zb>w?728^+S+vj;7mjS=c!s&{E**`WWg-mfdlP_LtROB8sZQ6goP3x9&oE4byV4Q{UQi3PhnXB8wN^$s1l?m315qoP<>S}Tx zO=;S@UPblvmR&R9y75L z2&7r)_5GE>)Tml}wil>|Dy_ z34PsvJSWK5x!W>X;sfFbmAD|l+7!SA!M{Qt3Td(j=Kxjz0sLjUrsCpa0ZGwl*)o>goY3F2>b2m2;qyzFmi;cUo0%~D+TCtUjJ z%0=Crc%yGcE2rhMAEh2Zmwz7#6cZ%P`{A_^UAZ2W&5sx2Nea82FUWg!G>WGp>JGoT za1>2Bl$39t4(VF`lT?e-5&KsozR-S>lP;dn9kYCpyPNB-SwC8{EBDWb9KjzCWqvKJ zkonwj{p1B0q~=W~GU?mLHQZOFht0imlOo54k&K*dTlx*mTpTI``bL5TBy-!LhCVy6 zD$6u3iG89;e182;3E7A1LjG5t8W21?L;F+t*AiE%{~e97oXErOW_YP!?0j(l`$Z*6 zv->^OM)h_!n}tyj_?@o|ZkrGm7qxhCts|9eF_ROOYH_U-m2NT9Lxwe3g5~?~;_2A-TpwZ82a$}mOV0Cnm zCOeV8ZbR7{e5^fNT~Nclm0;2vtx=e=0YD`Z5L{pkcCX)OUlQ+lLpy_+x_7Dh&S-!H zXIaYJo7h-nzn{fG5|bG(EgwE`m&8hgyWgJ#(P}mlQc?YIM9Qnr52t-`@qT@yW@V)uUFYwE}IQt>&Qs`$nry7xTus@Y#-1?FH0d<})Ebh|xhZn?DVm8tGXrZlSP4Y1QWKqm3(GA-&uK}Cra z?|HnYIKwBdj0>IX7d$IFP4`pVL38=`=~oDSQQ!=V=RIh?Hz+%J$5zBXC+9v{iarX6AIkJG z@|xcSPA_hRwzO_?Y+8g}ec?Z`Pd)2_6U~`No68R z>Zw6RX@Pw!#GxUxJLL9~b;)K$_INlG+x1Jt6Ri3^cA>7T0cmym7V4F zZY6RBxg9^&(eIR&=PGr`ZN5}?z;!P|kwmSE_^rT^XQ|`Q#0X;f`~E%K459iP*t-li ztyo}9U{QB$NbkE>3L`p3;#b(}4|0JTk&;6$+#U3CGlYRT3#3?j-OhUaq?n=q>N5_| zRCwTC95x~klqG*95#ULJ6rLP8k{o0H(Tw7~HcJ4Km+;cE3>z|5N ztqWUwCm}~I7JPB=?TtBZ&<245Mt@%P19&^}9XhgeaK^TVOCE*1VgdC=#UdHe-OEDG z$_Yr4b}g?28P)?$3Ieh}KccD97A4$y5%BGct$6yP6EfyZ=6s=n2+dd01=W+Tu9!wzz+Ljy7VWP5Z)7zd!#`^eiruuI!BH3xrQ9X z(t|d4T-WyN)6N!4v(m_ieRRcWRN4AC7fHJ^-|(g87wp1%ow+fP*#|t%O{*Cb$-}l4 zek9KyFEEdg<-s2`oG^K~QEZ~U<09kC2~N-3Qerhn{)vVMyTw56!)sGR@7)oXq)DBc z-LC5wv4xYcpm*{d+ZGpw-8=r0nHtK*DNVY&M4I{Nk0@vf7`lT zdsi(I*BGW#X6w_G-w?XjyWU=33pzIAPsY)g>+G(gc8+2Np&hFjePd=Oa)!<0)en>U z-F?S$!WhX!vX=#$w6#Zh^d{en2C=r0gkpRU7v&*eV=&Of3gNv54sF{d0m`88l=Ld9 z0F8N>MS`*g5`*iu@|?Fx2Kw*cKWJ!Z*L20<+99$vXnyPC7=buqQQO_U{X2d+RPh{p zXLsb{8)qtqVtW@VkK!8_s(@nqCsRch#nxeO5M6)-taNw*h2iB<58QoXupPv6Z!)r22ZQ*Y+ z>?4T;AIX)9YP%lFYH^}}#qc9~QQ;qFl(8RIL%lMZ*2V=~p6yn2P)^80V|os#tUukIr-45DER6JC5`VW|HJ< z`~lUZY(P>(m(ZLYZ;jm$28-$Rm%ZulliqpxZt1|tauz?G@0^K*HV#>DOSpa+zF(A0 zWimKW?k;bv(iY4ij$dN`$wgta+J5wa@z{m;r_^=j%O!`0I=Mf;i%s5PYO~Z=tW40W z5;a@!rj+%qI!vNkD=F_B_nJZ>MB2;srpX)y8IL9B$I9~YtlEp_vFA9>!7j3nL}M-K zKVF_LX=Fp`mk{68LF5PJd+bk(W&iUphhgP}>*m|8<>YeK#i!A;h@Iu0MlB7TVrk@S4_creOtSX^AI8rua43E}h zCfL`nB6Yy%nX%vYcRbCy-|vgFfdv(Vx5<1+80%KW#|h=oIg1-Du-a%<1B}udk*>r= zoU<4!j>PSay4p?p2dz}CgXcoO>3bi?@!{M$70Am%Hvf^seoi#Wu3hC7s?@BYIx`!8x0*`1gLoHNI5vic5aE=lsS zlGe#^(X4U$%J!U$@Ki>$Vg-F#oN$K~-utVPu2@ zjIEH7kx}qeGR3L{VT*ttD3-USw*YWZ5t@N-cs*(>l_?#wj%F8l6u%qdCHUt~FEHXgtR?Txqv&rdn{Z~B71(RT_VY#m%dg_M)vd%x`6aDh zC#VKw{3@4A)QK`Qca||N5gm54v42bWphIj7`UZVIf36-+Sw9zt- zzE#fJ7}0?AjLm&3qBw?)#1>xF`&Z2$P?oy@@fv+R*V>Z~C(`G&=XRJ;{X|Rh**ejO#9_Dg9Ah5Q2#Fb@#_y_NeXU?$ zMJ4@_Bm9cE^x8KT*)aYGw#*axj$ciMIB`fZl_zmbahWG^N)gKooVvKU_NBsT({O@NF{3_0e2mJqQ-o=0FP#DMA7zaPgf?0^XxhM2zGT5)XtdLs2;0c&!^xl{G67KY7wJrWqnj5_nbVHT{CNrXH9j`9is>wphh zs%gigbNy6kjo$f9obZ*T8w`K>1NZi;i4gd~cxnJJI{**3BSr)3#yk~?Goa~vqcjJJ zu7K3@UgUy4KO!kof(IsRm9UuaM?MT(q*Up}H*QqEiRWd%_*6D~sPpM+x@k8|~w$4v{-_ z8vmpOLnHV4sT$X7)^7J0dIZhUMuEAI@?@28Zt}efpDP522F^dMun_b)UgLff`Zn{8g7!a`cujH(+|yBwiQ4-3)*IhPu?r>%0U(0PG0y5moCwQ?rJj$$O# z5=bPPRmj6)`UcYY6Io?Qy$ad5V?w=uPX}Ia^Ik^r*xJtJ2+Z6_1GC$8wuj@!+b%ui zhPGky&hhg1Vl7DJy9Z%k-X5oJyAhPV=TBzgAypGJ8c!uT%G*az`r6tSHXP;7qd9~UtPDYU$oLc$2rNyzIre}HG>D7};PpmE2h6dG3{QYRm#$xO4Fdj>T`R4eOD7GBiAz0Bq&6OOos+0?)OZZVY|>6_UvCfJ%~$ zjEI)pzBK(3&OZoj4A>2Te`)u#Q@KScUtSmj0RgcM#CvDNaPxNW8`^`D%W8jsG73u+>^Ye11XM;{{H3>rH$$f;wWG$GudXpF6(2ZhXBK!xd1pTx` z1F0IDD(B){S)=*gJoel#JY}ys(v>dPXn*Y1@PV(lISn;3`j9V>&af4#L_rI4NFhq5 zAI7EtlQnS|ar&rT2E*<>Y;BK|z76F!A}C^P-~9~`5)vUug0K00M-lwSte7KH@CC-q zBkn$fPo%k8lhJ(x4&<8tBQ4ZVs`yVqsLR!vHQ`(O-~QMI=Bwp5dHU$MBpVic1TA#y zKPfc8CJK`NKTLgNbYAV&b!^*q)3~v1Cyi~}ww;Cz+t_Gq8x0y;jqT*yd7g95_x|V@ z9lL+-?(5nMbIvtaQwBKmw>5XvpOl(_9^29WTx{mG#A(1Jv1kH~a2FBJwsztD*nxMT z&)glg#CsUc^d`bMRB>5n%9Zo*O#&vSqsMX9`zu%Uap+lF?7R4DaBewb&k1+%rVAyQ zzUyi9r!+?6x0lC}R(JVx&#Oy)iGXJ@y&;M%tSe;T0t<^ic*hA|p$>aY30)lwdOJbX zeF1ZE+yKPog3m&xkrC^;bSDJwJWkGJEk?7Pl z*|3IH1lRDRixn~V_^RTU$YUZ(tK_!G>0yORo_t)xM`_Y$kbmLIal>$^Jc!JKwerKl zW;g)(bxBHQlRT{n8$P6?1T)M@d_jiuAflZeBV;Gx?M96u_$XTif~M4^vuIGZBeR>_UUzc~7flnRO2y0#%_G}M75E)Jd2IwG89`anlh4OM-_}S&3la<6R zXU^I>r<+^0cf4NZ zx88eixl2}Y1|mgC=xpw7Jw_WfdO~EnmiXn8l2_1-gTfcIQGUp6rL23ob9}QrNm_wS z92deuEec*$OQj*%RqLV&%h3ub_b2L|X=$6T_eSnnN(gs6^uHXyc5sx!UuJva;CJ4a zmCfPBWyv_H-07wMfS)L01EhbVL5v?vWQ9BK3{tMqVrn1p1e_^+cuE25VYUGIPS4p6 z^o;q4#juPgm9#C%D||t^o>K{X?{a*nCRY`FP2t42RmWNbESR57XZq?dwt7ptV}4h`g+)Dm2;9LMoOH zga{6$Y_B0MV34sd3?T+sh)g4hSCr^Auom%=GXYG+I&Y@b;ip+|J6hb0$N?tAw4CjQ z9QfwpGum^#mdJ0!jiTCN&&^Ze@U46|?h~J_NxEOjwhtno#riL|0DeLO<{}`R+~mP6 zP7sPzaMI^&dWxjx(NH-QgpVm9g6mcJ+XygO36YsOpF7!GNG(*N)5R^#Q4!J`J4&{| zdab8k@{%)pafD5;Cpd{5JRdMjgJsdsFI?zmD1?I8U%mmH z(k~%31U)W7t@wt*FHvUO*;H+)c>9~!tfBL;(cx3#&+4{`V_h)YFE|1b5d(=A70lmY zE25waMZ-LfmF) zjt3*MU2Z`2`%X#I`vc4K?;Ne7;xC;RCuLnv9soMM_=ZYyz&MkvTto*+wLVwU8qJ0t z#RT^uel~pFM?B;+hVjWvk!533%U24(jY%C|WaWUzk)%eTz#~cay>Pk~Hju>FR+U!L zA|3Evr_sChO}YCVwI_0r|K3vyNHvN-X<+%w%3{Q@yDO@RNT2>qbk<<83CpX@pDUU6 zyE(9!s5(&POPbE~ePnif|E1pCiCzA{i%Ztoaa*I{;IO2A@@`Fz=f5D8_lrV~arWd- zi$Ute@kRw!=Nc1-UmAj^+Azk2%WY7O?!g>=p!j&E!eJGMd z7FlgvXWbjm9QnIoBXSwsJ=&|en*0eP4X)s8Hu7O1lM!;??POl3lD4%gris}$!v&ukWT&~pQ@Ut#(I>xDS zaZOj%BF01inmS*)jbau*x`X1nH*-{lP!@l>dj)&rFIY_V;kxFL^tYe9r}6+t$E4r+ z^viLwtH1ZD{4$D1VMBF6IX?dukb*8>t*b)$k$|^+zGeh=I}cg3fl5g9Sn#})h3t5L zg1JkVP5c?k4g0Xt%oP_7&TZ~=22EgNHB2nLH&yp+E`cCwb2HLuZVn*1J!Ps zQ?eTr#LF+@&v+bte;eQPmNyRorgMmzj)qY|fB27rI!CB%oX&V;`eHeVOp^&WTOt$; z==XQV@iR(^S1!Jpo%^jno*s;&DYW2O6Hv4FoZfdfWoZf+?5b~3 zsC3SUv4UXgBUQ#CGc$9ZH31|KFmxNFVlGeqD*;|SNB2Rirf<|DBF1pWA-SbcFh^LE z|BsM)G+QdKZigYeME_B(YI89pHT^CkR8ZOE1 z{9ZYVI)Jf$_neSbRJs^^HZ*KT2pG)66hWmtK~SO-$u!n(=sn=uP7NCF#`BC^5 zo?*JmRf{0N>>TCXn-M&u)L@}hYuD`i%#K9B6N1K99(`9Rp3D!me#TG#_5JkQ>vJj{ znMrU`_t95M?Haha{PcNKPBRxA3Qp`+1w#61-%30V{mm09(rdr2IP{Ro(t_Y@Y7C5) zZqb?FqY+cQ>LWB%=?pRHBf^z`E9SB`RGI=BB+NRYCrI$A0+ z#BdZv-`UxQmuXgV7^IxL&$HPfS{W)h8FH<)`|U;g=^F4P#$mU?$>I0S+%8S5QURcC zAvVp`579tHAc&gD7rRxQHurP+`4HNf?fNNxbUIO^9V18PL#Qy~^zi#mJCO42pUF9$ z=Eg2cidv~Oo7x&B;$twad8(i3FnL*5u~+HSlfybK0~`f!dg_Du&KbomckT( zG;(UD+od*7yY(9X6(Mu5x&}4;J^iJg$zciO0b@L?Cfb3I1g{)_2t4Febx*S_tcyg| z&+lMH)R)#k*!C-O?!buLbLg-30eGXi1<1oM#yGrAp45MHm52||hgPB?#u1akD{jMH;x^dQhiALcU8F-sd+-@Gou|c)4i- zWZHDfkt?T0qs^bKHqOUas2BBTZQ05zNZFXUO8cxc&SrN3Am)Su{1FDQ=M*hSD(+%) zg$sCV{V)#iI!3(8*OA8QcysG-{Jfi&qg)BKG5U13<5E;9zv^6zQ&ANdmDYDD3U6my zTO1*rSin+hk4{fx0S43X?_6m!jst4fcy@SH=T8TRUaJ_|8)kObtmqYgV(`?T=4OSB z)4>8t*vSGwO{;sz58oEya|k|Frt ze`$2v$jW|MlE9b{>o%%zGJ>bQJY)t?-BRi%gorP7lrn!R{~H-&woE9?Av*f@YS@ye zDw67?=&_8PyF;;1w}}AD+|a@7ZbM88graF*hM# zgE8a*NKiVPC7R#cqxqoB)U0{3VPIh3pIYN^Mayq7XYKGG6mKL7iQ(l3jYq@v7noE5 zd$o3PVWaz66=VDCoszP zOOaT|k~=@N-uFCHDf5-!d#6$v&s@bQIT=g#jG;8D5kGNR$$Ojd0Htqh!?|d|CGDZF z%dI>D!=gM2-Nxf}8TM(1ITE@BZJHksK1QCjMaL3f47yAnPsgKYH@V@;iqH8dO|hyx zUcyC3x@M~5gUK?AkbW6p;|}x3UAm&JM!jrQvdV&24H6wvy@WqyCX3G`lFJ>{3?Wo) z0F6$g7m4z$L}zXaoxR_gN%SCfJvPP0xD_vI%=z9x?U}lgxIfc<8KM&^q1P=&mKb=NPk)mz#jsGst3AuOPZC95hr@hj8G@A= z#|Gd}U>$=f=P-4il4ZVGAUJjrcoN=0)W|p(5uRi5`03gK1i`>t>&IN7IpY@{>j?e6 z!{;$PQ*ok=e$8|vV{=jM{5ndANjq-!>DXt^T1#T*bZtnwa&vd^&^(C@FEv37>}stk zToF`{TOC#FUMyHl2`pJDvM)H-ep)Zi<1jk8 zxVs2!<9^;qw#KA))-S@WO6={31jn$g(@@7{hLAY0?*&%JD>W*h=OyfjLbq-NF2E)} z!8}l~a=u@NFghCb>7D2{5E0+m#tWNDZ%;0jYw)^2*?n)Pv9P{PXUCE2I=nLab{Uuy zEW>WRSX~aeJo+$LfGKS}n?FFK$5jiZ;q$!W^RufuuSRgVBLgc&k|{9g`JF*0dMKWF zXDhbN!K_uc7H^U*>m;wtKsqJgTO!nXnQy3= z<5z8bY;)H+Srrpu94mBOq0f?&#bOoVlk8u>DQB3XMEAG1pN~(RpqpsG^TGN{g%iRC zL0=Pd5PF-C?2U{3B#o1zxkTak&W6ow23Z&rRr}G8pyCC5txB0+t_wr`I4G!v!CaH{ zCP9+lul=r|gwp_&xpY~SV6va8yWB}i7t z1yvn(+gAZYn~0o2@+J;CrmdqS#7|`Iw*@tndBwwX1~uh0YFG)z>w^T#SDd(Wbo&w0 zH6#(z;8cjT+`iEhF%tR6A<}5Iai91zLmq$c=Na?_Nx2oCJPgWZZ5~gk1O{!#8En6~ zxw-{6l`A9}n|_N8PqXi9`7UuWaaB5Q=>)s;*B=ax@%*YU4XOCye$#S%q(&TN*Jiry zOK)z-_Dfaag<)WPEwD|gNs&MNSvfdS?UZ*OQh1DoVj$*)!2io55%Iiz&^2;({w1UA zn0Wu8TXgd-`~#Mu5c6dhY@%VE3A$-PSgovT);N`_94t~J#HUEEXN*r_6MfGE(y)^X z1(l`xUHrhHMjT+h8=Rd3*pd&{8V^An%mAq0^v^MwAvSBqdQV zE?F#3@|JDly+z%R|P| zmlQ~<7?wgobV_!{V>QBW_gRrnXEg2qi2i2=dE*BW}(6E-&TX zn`Y$#JmsMVjO~0+I%Oi`h9<-KQ{{kNW8Ywj53s#Fh2;ypkK%3kH@?boVs$*THEAjSsqT%C8Moz5>wNJ8cNBR}`?16#gdlyz9MFu`(4x)(8C~ z*-Jwxqg_buk=EVX?dFop*maX@2PcjWm|_uABYRNP_mZa`aIKsVf)m;MMX`>h^<-6t z!~+*qAL69KDClroK8H6l7N3J`b5=~%QW5?9OGOA7;#dz?mj|TC(A8zZxt>EM0gv(UkqNjfj4h-@YrAp;3M#l;v;L*@Q*z z#HOjp2vLw4=hfrA4Ij+iT7Nu#xV{7xg5LdN@F$FhY7P$%ee{r{zx-~O%D^bJ(_$l2 zsc}!G08mLwA>JF|Lz>y3Vm<6Jq|j{M7Kk8uiL_s|!Vn^;^RXeAQ-AYGoX#e*)mXii z*mb`i09KSh=J>;1Jw843^f)_@J-Z5S*NFc*zw^<4489Jyf0D_tiJ8yAB;m)IvGycTh~|)ZbU@K2K(1*9dm-|&~!OUEIqyme=s zhC`s!z1qzeV{Ln~gZTdo_F-42X<^8hGopYJ#!$&bC2)9Vkj>hcna+I9b}7 zz-*!JyRTrodTGaFIEjbm+v5g@T~!0KEMQhP4HahuQ@@X@y+T@H}5QFEU`RA1}w*U<6GAvS_}Kk^s__ zj`}5ZSqhwka!2Ff4h$5TgHip`1X`)0!_0~L=IvSg#Bk0Hs7d_+xyQ#4NgXv+nu%YdDI4$Izkx3Iq-!eGoFJa0Adgd0s7 zExY~9(WAFJ+%!@#jsNGCIb*^439#C%aa_)g@W7)x!33HNswSL(jPGG2^cT4Ncyl7n z;wm-d<(cU4pq}23a1B<<)*fBVbdG&WQqy_cN75j$5b2zaMHNDljOB0ud`U z=W+6<7Hs4F@%o_Fc8mSwv;o<){Haj3kB;We(6eOya&k7>HLiw~Y8He}({DcF$$C7U z`H3WQ z3BaSNT;hXgPR4#b)>l>-MG$aX<@Os>HJ()(zX>;0t<@YK`aQ4%%aLCO{9=Mv#yR(2 zec;;v^l$J=2=+ikm2QW=StY|MEw}H{OtJaUYzn)Y#v%kQth_e<3c-(ZeFfq1(+$?+^V;6roiE|*uPDDs@Y1`*zG+qb6Ah`aKGqZ<8g@aEnzbjpnAZSc+_o_p!tfB#5>VK^?2mf zS2ueP=h#?2Lv*008rz&)ak}8HAh%)Ji;m=EynF52xC`$-3a+lZgM!8s(OoR~HdxKW zea~#@4`J*IE-p4#=hgL@{BPXsL-`Ofy7fLf0e}yn7^77#T8c<#^gl!NhP-wRpbI80J-Tlxonvf}e2-|GrNi(@9F80-PgzgxOw0&{Pk zqQ!E;>Ax&kub!wBd{kX(WS1ZGzDp15_9L$xR0(Ey5$9Vg7cwKl!3+ zp-euq6fO}ebXF#fwiCjGBQFq0su(`8$Wb_yOOD1)`Ir+VduHWclJ3CQ)DNSWKs(7L z-%wEG(OB2qL2hlfG_lI?*rA{3 zWy#5Ngjo%}U!FCf45yZYYpq|D4|`op{0g~te-iN2z&e{_L-rPuC5(}OePJr7Cd_bt z@0xFO02Tn*7ImV1o~6wE_Dy8{~QA_ zwSxyrSInqhk$xdVc_&_o+GMxZ3v9b%b{|#bq|H`Jbd>G-T|;)YKo_ZDyYCl49=FTL z?R&M{Yiwl1Q^^Q zH8UPX_v6`In50sz>Pe93R0sEpwJ#5UNrNsZEY#n~u;2O!U6f$l>QagoVLJiPpS6w( z!uX}*b#izUUj7mXre!e#0wXw=3@J*f{(JYzztCz#91Yd_#Ma_3QB_%8(e~0;Y9kh$ zk?gZ;XWuG7I?L0bx#N!GzX-fUAsIjAOLfH+aAQjmu|?ac)`viGG*TPIKn0e~%``*~ z0;*23=Gtch=`U4>CE8)O#ecV;y&1QbJDoY*H#x5kMu2UW+pE~79D5*^rsXQbO1-kz58G=0EfbLIJJ z(N^|952cC}3z40Q8qZr<*bl!m;^jI-x)hP$7%H||qua?}y#~*lZ|b)ad}GiLQyTIQ z{XC+_$dOqX3s7f97$jVO)sHDb$j%Ye!DH@lEY!AziVhPb{klkl$nAlag9BoC#43_G zk|CO{rU1dKS#vF4{UT37xQ3>*XKes|hFM8b3L-^Y?kqZ23qhhZ>73+dL;J#3nPp2c za-)6}@@EzvM##6;stqIR&hBs0;yMjsd2JwMTEZpJb$d?@n&cf z+C@Uf4vNnSgWU;V^!2km%V{ExiwS5PBe#E$@=no}we5@4b~QmDeHh4N+6M|q{W;%1 z&iG*;r^qhkX6=&%U+DAmGr7Zt8paV#4p&NNg89S@EJtrVJqZcO7b^-m_@pmi)0pe2 zK29i|{HpMSPLU!NTm5}3pS%INz4V6*5ZaX z9lOH}L1uwSsYp^In_hNNlsBT9so!wEe`C7BQKbQQ6`Wlm;X-1Ap{ zf<=bRXy^6CnQu4dw;vIzvka#ZfjDt$qv(jF?~Q}6XpMZc{b%0K2?`A8zz2`~SE-lu2O!324G5_d zEl9Z(*-t(Sv{eRZN?uNuTry9`=YC8LWBRz(_8GV5LW@;B9|CQ!@u9;Y-J17j%!_+Z zXo0Ep=m2<7pb6y$YCdRUVmE)X0*)*3TD);)^1Vdn+|RBWhzH!{Bfp^8mI?~T6nKU&Op)W?s8DR7QN&;^fD z=9?&BuUTWe!cM^NAW3uI1RY`^URizV+?dbFZ${XQvIBe7iQTo>$CmYC#Ur?vfSs3CXk4t_V0%iu-cFRaMPq^eY=*x_w}B)+B;+ z1p0o=AjSK($=Nl_YGX8XeJEpo&6MKZx_h9e+0uEgva3lC$#Od(dMZ$46ci9V{@U;d zDAwCZ)jm$&#!$+m#6n14QnB6=(Foetd<|!Lkl2*+CcAVAvsWBAD}5E?|Zvn3%DffcXy{Ng};Xtl>8KvZ^St8 zV~8$(cWJQRDtrhK0nsL=I!3%9Akv-z>MWa@(Hq@f;4d`}TfL$>7l~k+ z44P`kaG4-rFd0e6zo^+(`CSr^+AtO6HITF7V*Ap+OX5=v?=>v^@_k?^LLSF z|FBMW^#a5bdkQLgJipG+{P97s%gBZ7Amscf1Dx-2idL!x-kQ}%H4W!3HY=@&PM&c_ z`j`Wu98M5UU|>|qu*B?kAw4VRB;RHjA~Ti@faQ1i?Yh4Gt$V}l$@3vYTY(OjsEg8M z60fLaKto))0Q&{_@WI1aD) z#w}Se$nO~g>`Ql#^81NJ2Dg>+sn2()3QOVs_@iwph(LCU_k|%UwYpd~w?yV1KR7;o z`oIJ_P&VIMQoc|9c=sy-=7k@>3Fgy&$R zVYOc*5m{`-SrbNL!#^cp_+7E7zn%$YFU4^=@3+Ia_3xm^lX8(|vNBA&uX{oR44&^+ zO7wXex_+hlC!qcf&*HE*0@Q*e(5A{b`=T}vnOtB?u%K;gNVBt?zE5n2gGakZDi3)= za_x&XEK%(A@R~gwW3pXL&e+++xJ-`Q{n#~1R0Hb)g(VzqL(#TU9gzUOAcY+a)&l1^ zb3y^)h4qG`{_SU(Vx<24Z8-5}cZDkq99%E9HC1>WLY9tbR8-#L%{G-Cyf8o*N>w9$@t2aSgc z2Cc24k)!mM3CY31r^p`aj*nMFxlV9gqvB&nGh9OpsmZ_KnK5hT{i1{PWvX>_Hp-f} z6Eipjx6lv{C0{PFMNfm9TFQO>f)`rWb&NsYIIz9SwxT_6Up zTA~OFjOQc8Z#gKg|1;z%1JHhxmzHu>|0aBHBGOlFkM14Jn6DKYq>8Mld@zB1r(9sF z^77jf{ifLZWCt+#afY+QKOp*kNNj3Rr-nc6GfsrE0SJl$|B^yMyY)q*L<+FB-+1X=~u;Xla03+J7IB>l#$ zIg+}KiQltQy>m4x@&KsXo5`t}LtfA&NQOvI#yS;%;oT^zoz^};893vrJu#kdpGe+h z&OhVFRhwu5K^(ejJn7Cca{hY_{4K~o-@VrMo#AGQPf5AB4+SgKXWegl_$Mu#Gu~Y* z4Pn8~jbaPupxOQSJm7MzZo#KJQ=u=BVx^8-<;jQYtRGHYY`61wot3lkT_DA~tKvdd zuTtxayj<$S#k(rzC%8TisO*tzVRmSUR3ySdOmt?|zWI7jg7IR?_iE61TF6D|(fRF81 zlq>d)Pw*DFdmtEF0L|uzUV@^q`~0v+MT};??{B^?$7|qy^6&JtnS_0VqdSSn zS`3-5U|kO!{~)Tp`EJB_J0bLA@7EywM_WNT&p$cek3ATzcLj1xB`c+t5= zzSlnvYQV8T3WThxz?!2DA@?}!74u!hsT*!~2QCp{cJhAYTP~Owd=4bLRJc6Jcx2JG z-|h}JDTt4_jhM*S)M0dD8$H)|!bBFm!1yuq{^~i2k~1@_xOksL7QCI6d#xQ;-RIE? ziF8s3JY+{Y*-&OAbj>{fH391o!7gQ5d4X@_J-gBWc^jZ{0T5uko1~y9_Wye#C{7~y zMErqr0c*Y-09!I4gbrZ1t3>%{R9-X&qq4knzQG7JKu-^Tt=v@WDmlEVF#CjIX1;qV zoqKJb|JX|<$?qEhvjEc>%#;q=56;b!L$&}=;=@MR8KT^nN)V%OT zak(r5U{J`w8U1~o{jX-~_fhOKtur70+xWn;6XDybyvrnqPVMg(#shwb)2)PLI+Yj1 zOWX7LXuffcL%n!*W~yOBLnETNpK#?wzA5O3bF0J%Gk+kK(- zVbJjpBtR02DoM9V>US%*1ADRcKajf{6~u%EHwuH6?8WVHS_mTv7&+;qsh5J{(IDfa zpP|~lVxZyHledkDSm;?2BgH+bS&QhNcxTwocm}`8zKt~j zeTGr&d3}d|7PDQ+6cg&|Jnrgkh^S#qLhWi+XKjOweSm7ECzw!K5~$1sCxrqyo1l?j zpu&qQMPj80#jvZ~=1Fw0!7A0^xt_P~&_KWb{8W%lZdm_E)HS67?wbL#G0fy^2lUr! zeUSkoMAU!ILFX+f>BWg*$ z&RWp*Yaui$7%5hkWf5P<{e)K7ZSyD2A=ApXS9eu?jiY~ckA2>Y%bBQ80}xPJBMtSd zq%BtF3MXn{qA{mZUd}@mXSa$@s#fRsqd~~JM+lW%rb+qj^}t6lXdfr|F%#f;FV(*u zi$*v;l2NK|xfc-whkcr+g5SaCV-U%rv{XU^(J8kf6u}I(*5=mtjoCl)?x*-qbws|x z=!WIWe|}@E@aNTJr97!|N&SlBm}+LTaU4ZRCXRo=(to2bpg1ME@Nho;c=x(ygTE1cyH4%p#UPwZFn|+@U zFNcMSc1akCWIkggX2%AmFwy98>n7nIWj|7Fj9>s8B9(l403x}68gI6Aq3{o8G_x$t zI(zx!yrj~Mg)n^j3Oc1x?x_bfd=A@?OGi!w>R{0}p4#KGRW(>R2WM|W(3W~-6c7In z%1bQ3J7d?YiR2Afi_(t>WXu1iA5O4RVIZ(7L*j2l{wE`Gf*nN%07L27p3X|vqR%FT z!D8Ijx}=DL(v{`hvD7(!6t=X6U|k?j!Jq*=ryv9K)n0+d^CU2 zuzE};eDq9A(JN1(Lrapy^J#IqvnBZ`M^&6NPn^L^crK}QT4ONL))Pv}D(+%r2xL`P zK;3|hGafQ*wg;;O2{pN5hnK6xiBkx1Gc^*pbLS`B`H11|$$Ob+1;f5Mv2ANPu}`|y zMu_VD15sZ+fx&?7wPnl?TU~lWZtTeuCu%b|bw0})@g9q4)Z=gDEA;C16scysOmai_ z-2k;`$b_@aarv)}%D1gNh1fW}#12xnw zP|D!Vc44+BV;+3#o~`NoNXf_$=r}ByFX6jRgv!l`w{mZ-mG-jslcv)FnCR+4zE<(L z@qKdVPwSe){jKox3}fkN`_*3WaO^dJF*!r%bp(sZG)Yd9*1JWp92+{;Ny0VK#W-rP zd-03M;3R6M^&Wg6{w81$B~b=1_Z!9|(@P0U{W7?ibdW|T%n`L_a>b51HuP^qEQr?B zfESSS;w*-5OMMXJk+0w)BW*cH8S4jnC4HVYw5C@4vsL8u42-aC-N`#rkfQLZu0JE+ z;NE@juT5e+g~^TdV)H+rmfr z>wFeFp7ChzJ~ZjynHJnXNp!RLVR1qKhieukPD70z!cZ;okq0`f_Bj65#)%$m zr0Z#4BjTa=KWH-$TWeteItDxyPd!{Whs7Mxw8u*0+t1{3)*LYiQqFD7I83z0fn^lb zi83CYAC{?rlUE?oTI`>giTS*AK92;QW;f6QzqkpwT}ZwgYpn#P zFYjCPw!3H_N`oeL_*Y`DcWL*%51d6q$q)2XL{v;d zUhc9K4D?gx3qLPBKXO0@LLejHsI9$U8A30-s;Mw}uVG4${(BOzSBI0c>h7|XTjfO! zcwhKYSp*(>-NDyk7?o6%>s76wOTg<3Zo>Qk0b;Nus7CuoWBKoA#{w1@j!aCZ zA1PeQj}d8T-I2jr+8dNN4L!{~V44IEEH5$9le0wi)QI*U>sIngV}}%7#0BQsvF3o%ay5U6J$1u zXZcyyYTTD1fPza9R%VO8-LZ_h^>;5&!7RRe&iGSe8f4R1b_W=K;i%QUu71qgCALf%6zbY-@=k&8lh=0E+L#8^E&`*sZl@7%uxD0l!rcOE?ce zYnt7k@G8E#7Sy{rxdHt#*G6Go(KX*YkJ$80G{ZC`U*EoFwAf;1rZ}U!zQ)pRjP4&% z_xlnR95?anKP@WMHVi=E4Sx8U;0Rbu1O>XZCz7S#Is zqZ?U~UfotOatjd<=_kyAI?S<|hi9Usgmgr4kLE|go)CQ%BLzEw{wjU-U@%31R+MkB z26U-RkHgA=`=f(FI+fvfP)FVgw%_Y94C8YO_7e0iXcIVQ{4!2OV)j}jYqsB=-Pr^V zG^jsv7+?n;z&ZxC|AFW_Kqv=+P(sLNa>AB}3sk40ucQU7EA30BpIT~@lDdu0HHh&d z4!m`7Y)#o0ZEl2Gqr6c7aMx?e)aKdo?Y34zW-Z}qVG8Y5)n!NqadJSzlov>TsFGL`5e1mm9S>bz&c$1Zw~V2)94@ zw*doAkOg&9A#(&G%KgL0?VlSdC{C(aYb3VX=7BEV;jwQjy)V+crbT5%G`0<*;2H=s z1Ko$0^~%C@JKkdI$RcxPHWurs!EMFwv^N@R_R3Ahp5}oP459aZViF+Nq+w5lH|BS+ zy3J~PR~QwNCMnDIOJ?gB0LIzzVD*b3@#x>R-a0Q|xP7rtSQo?NSVIxrInWtDLPyW( z1p>L%tP4y=k}^D{d_LGfK`Qa?jSXVRj%zZH=j(HsaFw3{0>4wI#mw{$p6AIAm@Ych zAAGw-Pab^<--vh-$;;gaVs}7KGEbxAcc5YB{X}h37xs_NLYr}TBn70$v!j{|l%usS zsue+_!zaR48P0?iOE8$0jSXs~X}(7jvY|JLX&0bkyr6h_Q?OM;sh4H4QOYC^aqW!f z7<;_G-mBE%pO5`>wEw)h?oTig8uX3>~vUhk#SfK6m2=stUI>ncRL)4EKw*0 zePowfPEocwEjX%(Nt&|6h2e5$;INR<8N75z?=Q_T!BB{3$AcgGWuO720aI<^^t!Ql z;WI+Qz`8s)Y2DA*87HB3HLLf=t}+BXaV`Kci&Xfx&GXH^LuOm1oBXZxCBvGFj*W|C z_79a8fp!!A;u}wHkqqD%$%sr$Wx$|&tLZGNUGZX$i8ogk{!da5UzUq@aN{cq@Ni=; z!|*Eb4oN66Pw+1L(-9_~)XV(Sx~uIk2HXK-1R%98cKN!V`@h1LAP@p(c#u`*0(Wa` zYue(6B?;PD-^Tw9roUhmpIHU~26)6->iWk~BqS?6ILiB|Ko_Y{tF7pPV~3aGK8sh6;sigUY3tZwHxp8cWbhU=wyyofaz*k^Jo<12LjZPau0QCw zz`s6cgirV8wJYi0MlI~L(brBmcec#1lx+Nt>1udGCRc)5CoWr}{dZEJ#$p%&0gnyl zVGKbV%XV`Gi}}z9)K& zDw@Z4hq=zvp5XCqT3}^Yti(Il8)I=}3C1;RKAd)x;Lra3qvOk_p=xIxH(9~E-&yYW zsG}@ZCB}jLQ8*0suiQV*<7LNBnTfIhK0#0a7r3?b!H6wJp5P@cCjnA}-EX{L_i<5q z%)Q)C^0m^8TIj*e!>e5g;ZDE!?c(_k32rsm%C=a@en=#DCy01D)lpyz9 z(f|jg7y!1XCCIQ|0+`NJIh%BoV?z@I&pyskIxV1GvJRk@V*K_}1(9qs)O)RwUKv-f zDonq_rcFdz7}Fb(8;{LFMzJoaI2?Bb@|dLR2|X`L{o%D^p8b5};j<-aaokVmio7e& z@g!Sb_y?}OBP9+I^HH&`c zPLz{`(lUO6S2Kgg!Qak9Ti?7h$yxaESUAZT@xE`E@p6-)oE&ogK<4h6L#9T0iM%|0 z-Z>!L$lmx|v7ycSd0H%LUQj5AaN)ZIDlE8N*Xv!)WO%Sj02ro19`y%#STUhmYW78Txt_BoNCZk`R^cbvX}_gMw*R7a(#p{30|;ZK zXFZJyLMtF2<862QYCsvKZ0=k*W>7^GA4kYzG*H7OtqZz3_cAa~ADd)kP6`KEnt1n375+)_f{NwUcyKfbsWTu><9(Q%o9 zNac@X6BNT@!a+D(YvcH3vl`RDCjn+jx%>Sasr`0A0)3Kg1U96^8dkQfTu}S(+6MNF zG*;aoYAjeJ|F5#Q49hC&)`g|JF%>0 z72mzD{q1wE&wnmptvSb>qwZ0kf5d%W$~l(%YB=_x+l;5$V^sMAt)d~tTDMHn=n_iW zbo@_AvI&R3lR_k+mK2%s$ zhdwO#6H}w!_D78F{=J7Ua~Uyp&@HW!6Bpdm#&isyc?q^|ur~A>b}4%Zaiq(ztR7J@ ziF?OQUMoqQ34K{n15$nGk(H?OO!H_j=~v2hLwSjEB&F!L27X!~lF7ZZ(LymFh~+oB&r&HcHM~7Y zrE}S%rxF9cdPH^B=HPnX54(_-zmofW5bGrORvwG4TNS|`LC!8&)Ve8u48@P|u#Ch< zQG4QM?s{&L4@$y%?qZ+(q+aUrrS5ozl&@jTxq#IxHUbv3kL6#1_oT= znc2F8=2M3@Hm#;Ys9E*{diR~UL>J8k{ZNmqk{Q259v*-7A-a{hD*Nsz+sHyx9EP9D zN1?-b`eS?BUW&`GXVUyFOEpM(KGj4@2zIgb_ktMR!!AR&&@LCdzRn5)XA2KvyzxGzp)y*$A4CwXkd_{m}%8SBEGB0;7cql*nA z6wIz9yg+>r$bcfZ7-x>*VvH~0y|2GN*iVwH79(}+vveS`AlQ!N&ufj^)!T)mRVg;C zr}=gF2L@a1OhY~wKIGB>7BL&#{lKw<{_7FpRxT;n1K7orVHpNOUdqve4Ikd@l}DzU ze!-U>&4EfTg4pnjX#~um#{u$k?`EOxg^CnMw5ji!!KN8*RG^RzTrh8)VBzvQ(qPAA zpp=QZC4^`zt*AD{?F9uI$%hf9L&J!YPLV^jyC|OS{$o1VG{j!xdk1E4Sscpwc zsH@}svi5JCxL6P+94OW3uIA?UpGW#9)}&qXVO4AK$^8q=7zXCQNPMepDAVgHA_}Q= z>!jj8?!sij@2=u}^NRD?GXb_&;v#Qn{u&Y>_|#`=u7OdBP=N3T@2P{H^bi>+YvTlu z%OhNP-5myhEF0d}j9?2`mbF5pL%+7>M+CYgd>`<)-4`k>sG+tU8 zEWbC4kw-G2|CqFttr@`^zGf~lN->xc*4Jld7be7h`S>Yk=qTcw0-VqzDmCgo9=z@r z2ZDp_izzuh=+@p4ROSm*$D$v3-dR5T!PB|s)6Uy`dz9>Z&LfofrNetOFmCe9i___| zs8`}+^qYjXgfDX^g+l3yce($NLmA_ zy@H{s5H0yz5`t*3z{xcV0_Pykax9m`@`aG={hqe-AG5I|a=Pd&$=%(4u9)M5rgm(M zwCfF{NWA76>g*JJP_RliFVt_1yF6U$E!Eb=Eik-7?CIzm!aIxxgBg}J@ii}xM+`^9 zX=8Evn~3eIq}fj&-)Qw~A2C<>&?}-}u7w?vG443(-yTDSknQ>PO_#|3NF6ik5T0n- z!M94eC!<;vA~jR`*+zPOXHu(?#kv>&BR$khAY|OmYRP7MG+RuN;@BK43$n4m19Dq# zjNxoW-GcmO^3?rbMIkqGJDd_ZU&iLr39Z^h|;D=++U z*xF93piw{ip3BQ1BOvg)zurt~Pz)%hoho+vh9RXap9LU|GyKkWl?Q$!XsRB({4F0e zD0gx8UXORvO&V7fca~j}lj}k^b$utye$V?AQAlAayr@i1I7yZ02pB4{cC%N3c5c8; z{D<_ukcg1k4WA`ep3RH@AwJ-Bz`rfi#CrK|sLe9B$LQMOWtG>mr`emw7HQ%EyuNQJ zRCW-=@37>xK6Dd3(yl^EZpY-Zo0h0AWXB+9cz0Bv(jXIaBu1R+p~-o_G4E^Rbg4rc z%je#fQOY>(F`Sf)A}DXinx2%jn(Pu@7A?PtWvr7CB~6Z_IA9R;xI6R(=B6t{;Y=8_ zo+eEV^(@>s>K}y{nK7w`^�+>%Uh@8QcPy>$BN1eNP<69Sj-n=|aGi7`_;tN>t*d z`U)7MSXyoREc$mdcIu}m^I7QbaV<0ygU`n=nbK*(AGY&wAbWLr?Nu{i+FH?RE1C=w z7B|iYd)d2)iLp zEOoSd%oF-$g{pu}C@7Uh`gOdWT^9=*^;7UoNA4IDqc1*&%mP^etf79FcrV=reNohj z;m^^S0ytH*NXt32TrI(1JD1DOO9B^|1G+?skyf2sJk-#5IossomOsE~)|mMbmLOdS z^oJYuXNG;F2`Ge0$e*dGB(U+RefgdQGx4L z{t9#?qHRp*>HO7IFWw;PE_Eeercn3MV&3a=L7mMw-_=9WJ76@z;cMf|xP1h%u`2%j z9Z+vviP8^=8#=Evky19+AWE+U?aBJQPG~~S79>kmuW&yoI5sa8;tIIToIhd(lq9@e z;SHJ|awB}w&nH;1E>nY!qI`AMQtPvXP2PLT(sRz-OAkraBDzhil;Rzm-;w7<%pGQ# zOt`zfOxl02zqZJFR%|F$b-a9=nd=mxs$OTvlY-*KqVB>iL02-93~kn}W^P?;(~PRz zq8E0s1`8b?_jobsJwIBEp{vWqhhC|{W+0k2*B&Vr2s=0%W_Cl>Six*`#9_QKPfhc2C>TJph-?UFSHEecE)xF%uKY-Mu=+r*L zzWJnc($@ets_u2=Icmso@Cd7mclI3I|IK2uc;lc;>W`lXKrW5GGV8^|PIEnR6jJCo zIBLHzS0JA5J$z;x(3X$oVe(koWp?bmRYAld%6{b_XIOlb$|Zb$NiqTBnA}x=G_*#U z%xa2(o{c{-3j)mzWA!|LWI6iXccrrP^TM%azf}fL;y7h~dbr8wOgQ)P%pYh`-wqLM z^m4luR9ji*Gqi=|E(NM;cWI@y@Ts+lT@bkMbxJ>+)8s$i(H2j&huUXe}Sl#)0kCLKx%GPFEwWiCu@r)lu&XH1AZj$>$|-I_X*5 zqc8+pf_xZ!n_m8OtEOehoP%rZ`|e!s;qhw6NooyQE<2tyJ{Q!PJP_8AOlD2P@$y;m6UHyD~!^8+*agf z;{CAuRwD85AqfFQ_6$kt3mDXp>?X7`WLsWLGX?_b;R@6vNc}le=q@6v9Q4Kkox(kC@?9*5cnVOPOqfzWG8;cFKro* zS;X`}rBb}ibJ*v+z!MKufuZ%u5dKb3(OsWTqQ9K;%7ki$jCEp_o=LUz1pP3k{pWXu z+V&pn)UjquE>8|?ugU`!Ny#=txgZ74pyK|7(0K{DhfT!0K^r4sn721!f$El48VVu_C)z zAOdT`>e$f(-*MLvhIFZ&22C*I1?w5UKpGRZCtW7IyXA>Mi(YyFubN&2pm{nTbUf@l zLK1}?A9gTREU-Lz1lQ{!KCXW=N`B= z$sm>D-f|AHD&aO6A{x>SsxZLVU~7GoM#@3M|7H7&4`pu*R0HHBE(d&}2DrMj@*r_o6wQ_eg8%p`BWOtia5 z5v_uDJ(cT&*BY@LGMGW!N@=yFbz_Vqohvrp9j`4-*EZ|qAPekvW7cLG4;=dRrPJqZ zB=>qr0-NgJCMPm7X{Xn{pdit%K0t3oQEsRhIWET6-og z->s~~gwT>mX%D&N&Dm*)o{Khf(V}U3*X4(kugzM(t;-?H$iXIUo~MKcUb)r~+|!V! z(o9F3gn}Y@zhbKxBDFwDVv~Lc6=9pCqt<yH@YEAo=3Oi;lOi z4Jb3~^~=YLSBCA$$MXo+8RfRrv>oCOCpk-C@N-q|x-)s(;kQW4>#I}+N?k26-g}f1 z*@Fx*@Rh{6<4i(CsNX1=pD6e_9q#LsmgEb|X zG1uF&ueNj6Uqy0b$M@#%u9%;^gl^_oH5vNyBbtY4KdHPwM2y#jNE!s@Q6#Q>|GFeP zqLzsP(@G#32qP+_XUA1WKNmz8f>x!35E>mi{BoN#hA|@6!U#n~S>=x3i$0Q8w^Z|# zR`TJ9*i$m7gkd$3P?e8PLRB))59ceBr=NAXY@SJa&@0e_iUn^7;u-@8WUCa};ud%`Fy}FgTt?L*4$Z%flO`7SLq}Y%?Z~yF2BDClhWxcS6`#ezaFclaVzpYR z!7~+nBs#1kMD1-+&Mp9hJmTS$VoeCxYWVW`RP8Iy+O}zgc^b+R+4j&V&V_I0XE+a) zUrjVp7t7BBH)?Q}U(rOJX z2dS-L(H1k{pwNqwNn`HRd{B<*%)KNdmj@-HiB*cFrUx8Sm-R;82InXg5c?4b;r^=M z-dM)`WA6E}QM6$Zn{0kw75{7Ebu%9gGPmjjs|jtXW;^hyRTxddl}INvvsY9yakq+msQP@E&KWFd=u3`1;H`2X7_Xd{;m-iw`NJt z=)X3ZCd`TEN;^LB=kv+croWo)vv3v=@7*5%j70v{U3T~O`OvK9TN_uDJF;P_V;3(p zD9;?3!p?LUwP>W#637zdw<1jT+&UsPN!6HDu@6nP1hpeHFDKN} zQcK;8M=HtR%@}Bzf5;wuhO#n9pUx0%l!DRbK%-4 zvn$immWe>Ll>(>L>?c2=_q9?JJ1k*a64o)KnNTOGA>*gz_oh{q(=WD1fP#avuVX+_ z%eG_tUMNizIB5CT`Dzu`<>0?UD8JH!BL>^mz+=UHXyfc*pzET+ZQXw1Zgf`(*QLb3 zH!%YqI5z{aO}Hc<WUMHQ4 zFxEM4=lD0yIg`M#E%+gco7|`I_yF-XL-=`@B`@yddxLtkJlc#(nKJ*L(vV4KyKu^G zBKp3b`a)M%EBW=%gk%}U;%h9$Zro9odG;!cuEyVSm14T0)R6{V&@VI;9vPSA z*`8WO_hCs(PmV`#JJx!K($%}u%RXws8;EHgCq`^0-9YDxGkAAyHC0YS3d}5(Q>J00 zD&yi03^7E!0S_H=4aAmrbPR<26pEu9>cVu>(Vk!!AqyI&Mw5|BJ}ne2WEhnfsaZPP z*ukW2!vPk|GTYsBF=h_@^QcwNUrO(>7m*0w9f^rw)l?qvQlO(?VO@ zDd#4;X{7CmCIP|wb>(^2wJ4ZWOpkvX%ZJ82qETkXp$2>WV1euAH^|h83{3IqxLT=L z?kp%U*g`_eesu}D?W)P?xz16tA?M`8Cd$}H)yuI*7n?#*YUEfIm2<2bsjVSV#NMto z&WmWYO!(o~f6Coti*{h)Os%YuaDkI>3TSGk=Y>G~G7FUk$bxC&CbPL9g>4ClQ%9w? zw0%RrnLb?7xe&tE$JMAUA!Q24C=#o%)c4;Ikb-3cdg%S}C`aFLJw{LC^M|RIVDohW zZ}}-zuKN#O%<@F6G;_Q5)Nxb&E4~adj@+BoTfGIS(51z8}UE*b*Ix4Ln-6f{!k39)E^bx07GAi=s{IPOYE$xEI364N~T z3rjamYr$@{?=i|vPG|F_h!!=mQ|7lXGn@PO-@_9+H?zWdP;(`tM1c&5i2WIU^ndD@ zB35n89#F@`9>jmmY(*v*BG*>aR5RBYY-$Wi7V0^CLE&uE~h_-Ykx zfIlo>(|fc?e9QnMws3K&Uv1{M!2>DC@6NWZlDK~E?xA#v6@;o#=yaPZ`t31cvc-|gJ zmi{_{_4F|g-ru&=^(KiC9EWmFKsvUzpeK<6sX9eKme`FQ58TsjtClPvCTI}UaF-t1 z!lHWDp{4V=lxMx+w+0xc3I1&72OJ+xS-?$=JrQE98-pJ;CP$qm>3?O3%gJC>4}q zdheec7@BlQWY_rN>7XxvEr9q}en7<9aPjug$o6sT=pnblaAc4^yEcfkJHcxN!Sx5> zmFpy(quYIdmVCJtPEKSMi&>WneVsOBHEG3n^Pt5-?LzH?v#}!=aGZ17aiI2%J&`XO z_lVkvs3)nHrMX}D%I7PrYP$2zc+jDmgx|X0-y^Um1L^Y)BU*=ju%wzcf4mxSy_puZ9=slmR`{mS zne;=b-TzXstuKxO12gw-HcJss-}DLW8%TQwMQn0Fxfb}>Mllf+u9#knlOk@fW7LX0 z?|juXYlRN9^QzD5f2_KqXEz_kjYwi_PiJ;P;Y}P_3y>`HQ!PXJ`8CI>vT@(`raF6) zzG7z7ZBm`Z5kSH25r6okPJNgUqGnaZ*sd+7Y3+`)$uBr`B~IU6ITQ9$%XtZ+{*g-FDx_ z`zqUZ$O&N9b5`RQk|&P zXKwB7$-WcNCUIHbNfN?UOiE(Zg^1QFo1g8uWp1$bX6p7ehDPW#I#!e7^@B@Y?jRIe zj${Arh`^ zKkR+%2Y^CSX4%RojRW8WNPWwlIC`FbYCX{+KbWlTZX<}6qiAN7oLef|oJ@<>t2Gh~`mR+*wj}`ToVvzW7&L4^Z3-v)tydf@wJ+Ey_0M ze_TJ%2M|^)&f}!>3BpVHBXXfNQ!lmPyzjfYc#(+wDXfQUAsncqrXV9*>0t7deTtsI zU{8+e3o`V#`N~XyNQ)nUE09dFZ zd{JAF8XUR*nHMB`s}j43!y2bKS>AQr42-xOX_5TC%VE$$rQ|mKadzgagP&0Q3!Jj< zBQsD03VZ#n>feDu6#Q@-TSf7fS$jl!;<|91HZ%6sFzSr9O_Wqy`&*Hw>0Qda_d>|l z!>uH8Zx!3!mKg*OII%)Fy&{04#<)eh3#7B&1zEJ5Kqk;GB1h1p^cVHgd!jlwd=oR8 z68o$wPq``>8@_%YVt3eli9L{-4rb?g4hR6Mp5xF9)qXXwgRPQt07uT=S7{nwtBkzk z>2*Z@JtO#I5p`Ddc&9$o{C8+I$8UIg2a7=~ogqg3l^QcbCNCo&A}p;xdGc0SW4>E_ z2@*KikHn%^1qblS1aMIQh9a|suQByyN=`0QP9p!Zor(N1FaQYL?E1pH6)j263Fb@^ z>fvS|zF4(55@-aHV>*&?_3O(>`0{Mc(N zIx`l3Ax@uBha5Cy!v%{e6)kpubB=Xu4^GtaJ0Y#KoMsx*;AP(Sh?Gr8PJh?A5yl}= zb>LrSL4zi^HQc^A0OH7c1Mw062Ht2i!GG(b@o32@2B==U`3^3&8p;$RS=yhA*mWuw zEz{Z+Zc%%@UbEr8-$FP$oI~@vIWxcxM}oLcegf%yg>`Amm|CLz)&D32u&J30)P6m< zGw3$qRwvE?z%G1DZ$MXM? zTX{zwRh6-37TTMyVvw1d4(MtT@f66;+T%W42LP|clR;=)-K4uLNo3E^J&!8Dm@QPV;2KH%`@jNbT_O*t zl!tp*=jcyP#?7NDSg$P_9oa#4H#_H@A>y1-whE1k606Df#L2F0w6YCj{;11imgfYC zBq`e)%&~{GKS1DRF7aaCID}9?L``Z5pMfpWi=Vl1W&J;T?xtz$z z`@_dfePRSLFlm}mz<0T9X3c0%-h!~ITW!OanXdwD#WRtOO?i- zDQM4ewRyj)6XC%`F|l919>CWL@!<}ouV|{~A3sj}%K;!710ab^<_czc<*#Z5(Ig84 z-6-rV17NT07BBqw729;_qVV%^?Rtwff<7j`NUP0n+q=ZJJ**yM6a&$PggO;=H_&lR zzM>Y?t0s$O)+r+SV>(wr0_~)_sFkrrQ+L$(B|edll^m1494wxxV0d5CurDpc6D?~) zC5sT3Q?6=enZSLKAs*iz*%L*OBtbm<>FF}RVamGGvZ2l7FOYhY%iYhnf7a4Z4QnIr zWf+kO*|}{M^N=CR+fna@eUXB4sk<3$Pj6%+3gdV^ae&@!5>Shhi=+Q5xrzam06Bb) zR@l#;p7aMbDiJ?)rh+!c8DW&+WZGng?tA}rrcBI&@sDxu_)yZ-?`cL9%7c;3zqqsB zh8=HD6k*b-6obaId2pZ9I4Bmd8IK+zp8jtlnFWkNcQrYqPo6ab$$Q=zsc$kK8gqoT zN#%1v0TGT)rUOUDK}H?W)T9Kyzi!O{ki2O{{bmf1#?_wR()hsA;x)GGQ9GR7cEsVz zy`0;5FvENq=bnCTn2MuGeZNXn5uPbj5z)ONM;0w7-FA3ePFgwhZ1g7=G|9$9>(Q?^ zOF78xUQdUcC9DXXuK)8YsHY`Jlx$ytR6Qtgxs0ZEn-SOmP>h3diXG3Eo zn=s==VEbR{;F+8Vh)$98qtiBg7$z30qvBI65Gz5GOOHNXVfV&*NNa^tK5&N+%kaWj z6SupHtsvxi^u5b?I%`D6wk0$Av%!&%1%KElUe1rcydDy1bEMb7E2D#Np=Y^dj6@^} z>&79D=ck-q+!5ZrAD`YxIG=vAx573WC=tU!|2rsXAlDye48Gp%`RBgsejL4hB3jJ>x)LPs7N0eB6CscRW+#IXBSD@SETXi{vj4IAWc0y;NqyzPgz>TpgIW zo4$y;gna5W!`d8yM+(`&PeuR<*Ll2$hJxeo)t7>w=Ya-pOAGY6MMnt9ZutG- z0kXTHJx6+X3e^X3S~y96R8T&uA1~3TBJPAl=!*6b_$qf+!gkbjv7kd;oq$;)J<-Pl zuS#H;Fv|=^K2AdC?{rt-g2Wa8Sz_z`9n?=02W+L*#|J*3S^!0Cl7^opo7tX;D|qAW zoi0flCmearyDlk8;exS{4Q>fMb~){dfj1`Y=-HkJJU+9>&Rb(M)ow45VdI7a|HyB9 zgqeNknubQkU~f*O2bpi$b4;G3OPD!Mtf4P^_3DedhzFm^=2IwxR22f~M4`k;om93R z)WS~ox$Eqi6Qe%`m}a`e3b>yw-^zqF@A9+!;lZp`cmQq|d#PG;ieOCrk=C_*>-2Kv zU%i83Rt=jI+Ht&vd_ia>nSt)FFk=Jgek3vm3w9)@b;FdyWO4JH7a)TLyt+^W`4;uLHQ!psqG-dK#8K0Ey@7_B|f>G`)wMp5v%WLZsu248 z3&BmvF3RR?6YAKg*tcUoX5PK9cuxcOESyawT?9^9)L37lyFdO#-%mW6_IRqDRVLkZ zSre@F9M#RF-Yh4`@2OnO1Lh7S;LTu3E-!i;2NQvdI56e+onsFT5>u z4%$8X_2dHpsfX00YGoIPOC$u-<-Ju=LaPCdQk}JW*ZwL>?6ncILo5jCBN-L{+y zU*E-)d`|1`5JK=O_Wf(AH@mF$=fvV&Qb7gsAzDG1`S05&>X=to>WHfBH)OyT+clK^ z-+TeEgCGgW_;8HWf1!&kW9Z_yMgBnK)8HgIO#Qkeb%s};c*0bGEHknxUHXk=xJKutQ#($SRXpjX3W8sTFBov(|*Jgj9YWOoZjMHaV_^K;B8qmG#}s zVF94`Ic(gU%6c`o8SPKf@;tB}^6&H~v*q*Dk)`;)9N@?nF5#$XzXN0?5g=>=km3L1 zWB84ex8-bn-bh&He^O91*btc`A>VVPFH10~v%DUM3m+Y|Tpii8(Qh{GzO7U>qFY9b z$r@{`?|B#-Yv?;^8N}D}fl_*QJM*X%;KseWySix3)~SAbEZlmel$0=+g0@1E_bfQN zYu8##4}w4vCjv%TD4V2S6Kmjzu}4~^aYm5VMldTIB%Pe=f%zGsOz%myO}1o*2`-QQ z3#P_j)#w>8|48WzDS_EnV#WhSEb(Ps_sN2bw*wktMK?HX8Fm*ZT#XO}#LgU~RHiA( z%cIVtDlv!|bA`po3Fnc~t@j=S0b)T9!eG}=1v)$ulSyJp*%AwqfcawCx7GeTsV3gV z4*$rvoT8<0MaC+lK z@82@UPVFUX#Up*C&$0be5CE_R2)+tjx^XoBfUz3p!2O#rV3Ce);n&wE-E_4Yapig~ zHPdPfm*|uReP}bKNJ6DZ(W%cVf@9jIaf_EGqYylZ^KJ z(=O=bbln$B0y=+TppVk=b#;_tI>^r|C_j;&QPy|zz0$VIm7Mo_8+nhc%smoQIspcP zk^zFVSrgse#W0R*^Ys_A>1Fv+oiEtP&Y*|$RpKXlf?5H1r`u+j;z_V8hC_qLUjSg^ z@`j%nOY4Xw7=vWTdx#xT)V&K2jSAG$e#ZAHG4RVLQ&P2e+7=GiX_bv^SzNFq(=GNh zX>CN`c+>5bPG6^EUV<$NMO_$KD$Jf3qLB04EjR%QuRx4Xe}$r zCgR~B5@dn^=*6J(2Bkh%o0u$cMHsu)jA9YNZ~Hk*7~KyDz$0nA+UdKY(x@u%v>B7chb$@p z@xjj0K+V}ZEo*2Y)>OGGm2`sC1#peOirQS<$Au;6EVfNMaO%%?P=d#a<>ZKF23L(@ zt^rQNAEQb!3mu4bFt(t>nX3J}Ac`r_>jQ8abA|xqe02Y={fr7Ku3=AIJ-?6(Pd_q7 zJb#+*U`7DKZR@>3>U{5pizuv8e9CZc$6fXh7K@3(O6?cQyqtgRej7-OT71A#Y+EIJ znT`0oVk&IXMT3~Hx;a|(rR%+JUihSMzoAN&HW7^)0_+gT@2HD((PHov{?FWx$!M5Y1mKJEG0EMCMG64Due4Glqctgk>^RD zx|f+d^yqV>OdP zLq=dTc09ZcvAew*4$s}Vy0`tzr`SA@FdABcl&W>7tuVqLVU)@Xap;g132u{J}t{%nTmK~r@gvv< zNx8XmxG_EPFDSLGqV*wsjQqQb@j3Lo&@t;(34VvYRqHfd!FPySH7t0yt4W^GaPoTC zFG|O*_9}f%b-71NRTV2e1U7Gf4MzPTi=!W-hhXO&%;}ihbyik@vFSUAoVOo!ZO}z5 z+cum&DjXN-+>$Q)L`Hg4{2DA>=Au-&1rcFWWw?Ns-hFocPbF ziTY$Y2}@uWYJGiA+N~1f!Dr;&*go^vLuHoMAd?#uD89Hue|R<7DaJ8Jz~pZO?sW4j>ZIBXj;I?n;pW5^DIs{6WOQOP0|l<>Mnj z!e(e|3OYT`d^M75(YyEBQU2#ILRqs>lGG_{Veo_nM<#x5@It~#ZO^uq&JJ#IVZ8*9 zbfa3u6*Ll7dp22-VsCC=$)<5*OzY`YAHJdlP~@lBv0^z)eMhc#YZE`ulaQ5>X)|V9 z*(u2ExtX*)?%lPi%38n$!rO@xjz;+418Nii01j-J3ve8-? zs+6Z2RJd7;2=W)t`FX$Y`T|ZH>x`0N1uWV>ioZetf}^kcPwSsfC7#a@h&&i>4t+}I zwkH%MWPzH4V+!OwUs|o{w(Hn6rf#{i#RMiDst|^(vHs?ZWgkc=Smd@{^N6h4oA8D8 zUp;!P$B7Tpl?0Vux6Z#a;mz2)1<{CO|3O^wHGuY}yhl8``Y)da+5#Az7nIoPt*Kre zrjM+Q{z@NpkJvJrPKi4-0`mD|OXU9)`(#}~8v;Gw4QFhBB_A175l!5`=1p`=4uu+Q z>DrAEY6pg58gQmY>|gySVhWp26#wchn$ z1q$oAl}cicy;S4+H&$ko#VYDCo$bFB3aO1BP=>jBl#xjWg|T8~kJXP8fMfKkmFs9A z3&V8}NS(UgND4WPB~1PIfp`RPxn}KNXzF8-E;ta3m zTQ==fnNEn7O*0lt#B&jo_WWcYENV0o7%tORZRY_)n@Jn#KY8BOC>qe9P?kHN0> zh^W^@^uE^DY+xjNEClx7vN*7<;O7GaD6RWjbZ&c~7uV|Quuu5X)BOgdXrN--+Oa-B z)?_wox^L00gwtp55i@zGrK&}V2aE{j;YlFbMU{<&d~uZ2I~XZ^-I~obB;YJPxgC?>y#swQURU7fm&(3s{q(YeHx! zB)`pn`qC5-o4bt7ScT=Q@WX6uJvWZSIN7GzcQgkUKOq52r@sX0Pe{=3IW~9*&Z?7=`ofl+ zS(@RFq@Y~FudbWk#h(1C2o}?u)MQe~+0y=aH0;d$zt$+YZizv&+_zKiiOh;wdEoHg zF`%yW*QUPL7nz7nG=G6uEv8<*WcKN3XTE4pal{5PM7x3L4Vk6?pSYv&4k)&pT`CGc zsN&KqVpC@>=b$-Cv2111*3@L}Xp_XwcJ1rcUWgv6_b+bnND;PY!%vYR@a51Zt;pFx zc7=8^`Y&8(2P2l>L~KaVNN+SsWnvxkkq z5(>V|S9_A|@jpRXfMIog`$fcT1~C2^)&I`mAML>}e+Nbs@X|v5#(95p+W-7bfR~Y7 z0~h1}xo!Wp_Fr}hIA24+uYq22qdnpG|MN}1rPDTW@!^|kpHfo)myZI0EFhWboh|X- zq`m*|ZwmX3BC#xExGP6XKau;tt?B8ngjtcaK}P@{b9C+5&5!c`cqs%TG)^olGTvZ) zr4Hzb1wRT%J;J$IGx~RkPp|#&J5*eSWD6!U!o#VHfFvFp8v`)m|G$3))KK!KqcSD! zb+r5oPyhFi{O8j$vcf$~#>iqlY)n=-F#N_Lz{K139mkHfW9^yDnE(69X9-s!^(6;I z>h$4C>N1Y_hNzZEB+#iW+j7^BQ!sM~{y&Zo0QnM#*xr#D;jjhAsVQ%SCQid%r$r{_ z<>$jbOzxfgiJTOBW-L8;J|X`9+u?vD+O|$buxXMw_>A#Oy1KgBTCbx%;~sH;Rd#lE z*8db5nbjwBLi#(w`ac}?KaQA`5YqlQs9hiajuk)3ZR%J3Q9TTzt9Csm$&4h8*h hUj#Vgv+nXEgxV*(8WXHRk7vNYR}%8#<)Zrj{|A+>yBq)j literal 0 HcmV?d00001 diff --git a/keyboards/redox/keymaps/nrichers/readme.md b/keyboards/redox/keymaps/nrichers/readme.md new file mode 100755 index 000000000000..6189e8e9b26b --- /dev/null +++ b/keyboards/redox/keymaps/nrichers/readme.md @@ -0,0 +1,28 @@ +# A tweaked keymap for Redox + +This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben. + +![Modified Redox keymap](https://github.com/nrichers/qmk_firmware/blob/master/keyboards/redox/keymaps/nrichers/keymap.png) + +## Changes to the default keymap ![#99fcbe](https://placehold.it/15/99fcbe/000000?text=+) + +These keymap changes are meant to improve the usability of the layout in everyday use: + +- Move `GUI` (`SUPER`) key to where default left `CTRL` and right `ALT` are - gives you two frequently used `CMD` keys on macOS where my brain expects them +- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive +- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?` +- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position +- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes +- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer) +- On thumb clusters: + - Left: Move `SPACE` closest to left thumb and move `BACKSPACE` to the right of that - put the key for 'getting it right' closest to your thumb and reduce usage of my right hand (purely personal preference) + - Right: Move `ENTER` closest to right thumb and move `DEL` to the left of that - put the key for 'getting it right' closest to your thumb + +## Changes to the Redox layout ![#99e6fc](https://placehold.it/15/99e6fc/000000?text=+) + +These are physical keycap changes on the board that make reaching the `Layer 1` keys easier and that, subjectively, look more balanced visually: + +- Increase the `Layer 1` key sizes from 1U to 1.25U +- Decrease the 1.5 U key size for `[` and `]` to 1.25U + +You could even make `[` and `]` 1U so that you can use keycaps from a standard ANSI key set and also increase the size of the `Layer 2` keys to 1.5U. diff --git a/keyboards/redox/keymaps/nrichers/rules.mk b/keyboards/redox/keymaps/nrichers/rules.mk new file mode 100755 index 000000000000..a81250cdf6d9 --- /dev/null +++ b/keyboards/redox/keymaps/nrichers/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes + From 50475032305b142ab6eff3b0a6411edf49b28376 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Sun, 17 Mar 2019 14:16:08 -0300 Subject: [PATCH 339/445] [Keymap] Jotix (#5424) * ortho_4x12 jotix2 layout * ortho_4x12 jotix2 layout --- keyboards/handwired/jotanck/config.h | 2 + layouts/community/ortho_4x12/jotix2/keymap.c | 87 +++++++++++++++++++ layouts/community/ortho_4x12/jotix2/readme.md | 8 ++ 3 files changed, 97 insertions(+) create mode 100644 layouts/community/ortho_4x12/jotix2/keymap.c create mode 100644 layouts/community/ortho_4x12/jotix2/readme.md diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h index d7707d48fb1b..38b77586ecd4 100644 --- a/keyboards/handwired/jotanck/config.h +++ b/keyboards/handwired/jotanck/config.h @@ -23,6 +23,8 @@ #define QMK_LED B4 #define BACKLIGHT_LEVELS 3 #define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 5 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/layouts/community/ortho_4x12/jotix2/keymap.c b/layouts/community/ortho_4x12/jotix2/keymap.c new file mode 100644 index 000000000000..636476488e9c --- /dev/null +++ b/layouts/community/ortho_4x12/jotix2/keymap.c @@ -0,0 +1,87 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 1 +#define _RAISE 2 +#define _GAME 3 +#define _ADJUST 4 + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define GAME TG(_GAME) + +/* Funct + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F7 | F8 | F9 | F10 | F11 | F12 | ' | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | home | vol- | vol+ | end | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +#define _FUNCT 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_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_QUOT, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_VOLD, KC_VOLU, KC_END\ +) + +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 | ; | del | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lctrl | lgui | lalt | ralt | funct | space | space | funct | left | down | up | right | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_QWERTY] = LAYOUT_ortho_4x12 ( + 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_DEL, + 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_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_LOWER] = _FUNCT, + +[_RAISE] = _FUNCT, + +/* Game */ +[_GAME] = LAYOUT_ortho_4x12 ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Adjust */ +[_ADJUST] = LAYOUT_ortho_4x12 ( + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, GAME, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { +} diff --git a/layouts/community/ortho_4x12/jotix2/readme.md b/layouts/community/ortho_4x12/jotix2/readme.md new file mode 100644 index 000000000000..b023227a7774 --- /dev/null +++ b/layouts/community/ortho_4x12/jotix2/readme.md @@ -0,0 +1,8 @@ +# Jotix2 ortho 4x12 keymap + +![keymap](https://i.imgur.com/WMfIpH3.jpg) + +Tested on: + +* Planck/rev4 +* Jotanck From fcc9b4b8e7eed87d25d744e3891baf878816d427 Mon Sep 17 00:00:00 2001 From: DDRnJn Date: Sun, 17 Mar 2019 01:34:54 -0400 Subject: [PATCH 340/445] Added 4 new songs to song_list.h Added Liebesleid by Kriesler (or Rachmaninoff), Michishirube from Violet Evergarden, Melodies of Life from Final Fantasy 9 and Eyes on Me from Final Fantasy 8 --- quantum/audio/song_list.h | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 35098304411b..bc886f41a804 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -576,4 +576,56 @@ Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_BF3), Q__NOTE(_BF3), H__NOTE(_D5), \ HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), \ Q__NOTE(_G4), + +#define MICHISHIRUBE \ + W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), BD_NOTE(_CS6), W__NOTE(_E6), \ + W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), \ + W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), W__NOTE(_GS6), H__NOTE(_CS6), \ + Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_A5), \ + Q__NOTE(_B5), BD_NOTE(_A5), \ + H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), \ + W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), \ + B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), \ + H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), B__NOTE(_E6), H__NOTE(_E6), \ + H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), \ + W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), H__NOTE(_CS7), B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_E6), \ + H__NOTE(_E6), H__NOTE(_E6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_CS6), Q__NOTE(_B5), \ + BD_NOTE(_B5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), \ + BD_NOTE(_CS6), W__NOTE(_E6), W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), \ + H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), \ + W__NOTE(_GS6), H__NOTE(_CS6), Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), \ + W__NOTE(_B5), H__NOTE(_A5), Q__NOTE(_B5), BD_NOTE(_A5), + +#define LIEBESLEID \ + Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_FS4), Q__NOTE(_EF4), Q__NOTE(_G4), Q__NOTE(_D4), \ + Q__NOTE(_GS4), Q__NOTE(_CS4), W__NOTE(_A4), H__NOTE(_E5), H__NOTE(_E5), HD_NOTE(_G4), Q__NOTE(_E5), E__NOTE(_E5), \ + E__NOTE(_F5), ED_NOTE(_E5), HD_NOTE(_D5), Q__NOTE(_E5), H__NOTE(_F5), H__NOTE(_CS5), H__NOTE(_C5), W__NOTE(_G4), \ + H__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_D5), Q__NOTE(_D5), E__NOTE(_D5), E__NOTE(_E5), E__NOTE(_D5), HD_NOTE(_C5), \ + Q__NOTE(_D5), H__NOTE(_E5), H__NOTE(_B4), H__NOTE(_BF4), W__NOTE(_F4), H__NOTE(_C5), H__NOTE(_C5), HD_NOTE(_EF4), \ + Q__NOTE(_C5), E__NOTE(_C5), E__NOTE(_D5), E__NOTE(_C5), HD_NOTE(_BF4), Q__NOTE(_C5), H__NOTE(_D5), H__NOTE(_FS4), \ + H__NOTE(_F4), HD_NOTE(_E4), Q__NOTE(_A4), HD_NOTE(_FS4), Q__NOTE(_A4), HD_NOTE(_GS4), Q__NOTE(_B4), Q__NOTE(_A4), \ + Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_FS4), Q__NOTE(_CS4), Q__NOTE(_G4), \ + Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4), + +#define MELODIES_OF_LIFE \ + H__NOTE(_B5), W__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), W__NOTE(_E6), H__NOTE(_E6), H__NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), \ + H__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_E6), H__NOTE(_CS6), \ + H__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_GS6), \ + WD_NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_B6), H__NOTE(_CS7), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), \ + H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_A6), Q__NOTE(_GS6), Q__NOTE(_FS6), Q__NOTE(_FS6), \ + Q__NOTE(_E6), W__NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), WD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_FS6), W__NOTE(_GS6), \ + H__NOTE(_A6), B__NOTE(_FS6), + +#define EYES_ON_ME \ + Q__NOTE(_A6), Q__NOTE(_G6), Q__NOTE(_FS6), Q__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_G5), Q__NOTE(_FS5), Q__NOTE(_D5), \ + W__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_A5), M__NOTE(_FS5, 256), H__NOTE(_E5), \ + H__NOTE(_FS5), B__NOTE(_D5), H__NOTE(_B4), H__NOTE(_D5), BD_NOTE(_E5), H__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), \ + W__NOTE(_FS5), H__NOTE(_A5), BD_NOTE(_CS6), W__NOTE(_A5), H__NOTE(_CS6), H__NOTE(_D6), WD_NOTE(_B5), \ + H__NOTE(_A5), H__NOTE(_B5), B__NOTE(_A5), WD_NOTE(_B4), W__NOTE(_CS5), WD_NOTE(_D6), H__NOTE(_D6), \ + W__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_B5), H__NOTE(_B5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_FS5), H__NOTE(_A5), \ + WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), W__NOTE(_FS5), WD_NOTE(_E5), \ + H__NOTE(_CS4), H__NOTE(_E4), H__NOTE(_A4), H__NOTE(_CS5), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_G5), \ + H__NOTE(_A5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), BD_NOTE(_FS5), W__NOTE(_E5), B__NOTE(_D5), \ + H__NOTE(_G4), H__NOTE(_FS4), W__NOTE(_E4), BD_NOTE(_D4), + #endif From c74b11a959f58ba52f14f4c1061abc6f84042e29 Mon Sep 17 00:00:00 2001 From: Samuel Jahnke <118westmaine@gmail.com> Date: Sun, 17 Mar 2019 10:22:35 -0700 Subject: [PATCH 341/445] [Keymap] Improvements to Samuel's literate keymap (#5428) * added my own keymap * changed thing * updated keymap Samuel * updated laypout for better one handed use * updated stuff I want * happy with my lagout * formatting * Added new literate config * made everything nice * cleaned * fixed spelling and two small bugs in macros * Made press and lift function for modifiers * made taps occur on press instead of release * added oneshot keys and chars cant be negative! * removed debug message * Added command and qwerty layers * fixed bug with oneshot layer * same bug, different key --- keyboards/planck/keymaps/samuel/README.org | 509 ++++++++++++++------- keyboards/planck/keymaps/samuel/keymap.c | 372 +++++++++------ 2 files changed, 593 insertions(+), 288 deletions(-) diff --git a/keyboards/planck/keymaps/samuel/README.org b/keyboards/planck/keymaps/samuel/README.org index d0750ee03a38..3c0f08a9d908 100644 --- a/keyboards/planck/keymaps/samuel/README.org +++ b/keyboards/planck/keymaps/samuel/README.org @@ -5,7 +5,7 @@ This is my qmk firmware for my keyboard. I grew tired of organizing the keycode array in plain text so I made it a literate .org file. I've never done this before, so bear with me. -* Keymap +* Layers #+BEGIN_COMMENT #+NAME: empty-layer @@ -19,7 +19,7 @@ before, so bear with me. #+END_COMMENT This is my "pretty" org mode organized table for my main dvorak layer. If you -don't use org mode, it won't be that exiting, but if you enjoy working in org +don't use org mode, it won't be that exciting, but if you enjoy working in org mode, you can edit this table directly, and this file is tangled to the actual keymap. No more organizing spaces or converting to and from comments. @@ -31,23 +31,45 @@ keymap. No more organizing spaces or converting to and from comments. | T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | T_RGUI | |--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| +This qwerty layout is just so normal people can try out the board. Tap keys +would need to be customized I think, more on that later. I also put another +dvorak key here because I have nightmares of getting trapped in this forsaken +layout. + +#+NAME: qwerty-layer +|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------| +| T_LRSE | Q | W | E | R | T | Y | U | I | O | P | T_RRSE | +| T_LSFT | A | S | D | F | G | H | J | K | L | SCLN | T_RSFT | +| T_LCTL | Z | X | C | V | B | N | M | COMM | DOT | QUOT | T_RCTL | +| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | DVORAK | +|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------| + I tried to keep my layout bare bones, just what would be available on a normal -keyboard, minus some keys I never used. The bottom left copies a normal +keyboard, minus some keys I never used. This one secondary layer should cover a +majority of the keys not found on the home layer. The bottom left copies a normal keyboards symbols from shifted numbers, and the rest is placed where convenient, with some considerations for one handed use, hence the shortcuts in the top left. -#+TODO: qwerty layer for ma friends - #+NAME: secondary-layer -|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----| -| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | F11 | -- | -| -- | ESC | CAPS | PGUP | PGDN | F4 | ASTR | 4 | 5 | 6 | 0 | -- | -| -- | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | F12 | -- | -| -- | -- | EZUP | EZDOWN | -- | AMPR | PIPE | -- | EZLEFT | EZRGHT | -- | -- | -|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----| - -But wait, we are missing several important keys!? yes, well, the modifier keys +|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------| +| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | -- | -- | +| EZSHFT | ESC | CAPS | PGUP | PGDN | HOME | ASTR | 4 | 5 | 6 | 0 | EZSHFT | +| EZCTRL | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | COM | EZCTRL | +| EZGUI | EZALT | EZUP | EZDOWN | SPC | AMPR | PIPE | END | EZLEFT | EZRGHT | EZALT | EZGUI | +|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------| + +Basic command layer for one-shot macros and function keys. + +#+NAME: command-layer +|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----| +| -- | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -- | +| -- | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | -- | +| -- | F21 | F22 | F23 | F24 | QWERTY | DVORAK | USER | EMAIL | NAME | -- | -- | +| -- | -- | -- | -- | -- | -- | -- | DIR | -- | -- | -- | -- | +|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----| + +But wait, we are missing several important keys? well, yes, but the modifier keys all do other keys when tapped. More about that in the keymap section. * Keymap Conversion in Python @@ -55,7 +77,7 @@ all do other keys when tapped. More about that in the keymap section. This python can convert that table into the array needed for the keymap file. It simply prepends every key with "KC_". I used to use a dictionary to convert some keys from the table into qmk keycodes, but the double convertion was -unneccessary so I simply prepended all my macros with KC and moved all the +unneccessary so I just prepended all my macros with KC and moved all the implementation to the `process-user-input` function. #+NAME:layer-to-array @@ -84,54 +106,68 @@ return results * keymap.c -Now that we have done all the hard work, lets layout our keymap file then define -our macros. - -** Headers And Layer Declaration +Now that we laid out our layout, lets lay out our kemap file. #+BEGIN_SRC C :noweb yes #include QMK_KEYBOARD_H extern keymap_config_t keymap_config; -static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -char last_mod = -1; +#+END_SRC -enum planck_layers { - _DVORAK, - _RISE -}; +** Keycodes +#+BEGIN_SRC C :noweb yes // where the 'T_' communicates how the key does something different when tapped. enum planck_keycodes { - DVORAK = SAFE_RANGE, - KC_T_LALT, - KC_T_RALT, - KC_T_LGUI, - KC_T_RGUI, - KC_T_LCTL, - KC_T_RCTL, - KC_T_LSFT, - KC_T_RSFT, - KC_T_LRSE, - KC_T_RRSE, - KC_EZRGHT, - KC_EZLEFT, - KC_EZUP, - KC_EZDOWN, - KC_EZUNDO, - KC_EZCOPY, - KC_EZCUT, - KC_EZPSTE +//DVORAK = SAFE_RANGE, +KC_T_LALT = SAFE_RANGE, +KC_T_RALT, +KC_T_LGUI, +KC_T_RGUI, +KC_T_LCTL, +KC_T_RCTL, +KC_T_LSFT, +KC_T_RSFT, +KC_T_LRSE, +KC_T_RRSE, +KC_EZRGHT, +KC_EZLEFT, +KC_EZUP, +KC_EZDOWN, +KC_EZUNDO, +KC_EZCOPY, +KC_EZCUT, +KC_EZPSTE, +KC_EZSHFT, +KC_EZCTRL, +KC_EZGUI, +KC_EZALT, +KC_DVORAK, +KC_QWERTY, +KC_USER, +KC_EMAIL, +KC_NAME, +KC_DIR, +KC_COM }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - #+END_SRC ** Import Key table +#+BEGIN_SRC C :noweb yes +enum planck_layers { +_DVORAK, +_QWERTY, +_RISE, +_COMMAND +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#+END_SRC + #+BEGIN_SRC C :noweb yes [_DVORAK] = @@ -142,6 +178,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #+END_SRC +#+BEGIN_SRC C :noweb yes +[_QWERTY] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + #+BEGIN_SRC C :noweb yes [_RISE] = @@ -152,50 +198,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #+END_SRC -** Process User Input -*** Tap Key Functionality +#+BEGIN_SRC C :noweb yes +[_COMMAND] = -These methods define how I implemented the tap mechanic. Basically, I believe -that /pressing/ any other key should be grounds for the hold functionality to be -assumed. My natuaral typing style experiences no delays from my method. +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC #+BEGIN_SRC C :noweb yes }; -void mod_press(uint16_t hold_code, int id) { - tap_timers[id] = timer_read(); - last_mod = id; - register_code(hold_code); +#+END_SRC + +** Tap Keys + +I don't like tap keys coming out on release. When modified, I often let go of +the modifier too early because the tap button doesn't come out untill release. I +guess you could save the state of the board on press and then apply it after the +timer, but what I really want is the keys to come out on press when they can and +when it is most useful. For me, that is when they are modified a single time. So +I kind "locked" the board into only doing single modifiers, making them faster. +Disadvantages are double modified keys must be done with one shot keys (its +actually not that bad, it feels like emacs!) and triple modified keys are +impossible at the moment. + +#+BEGIN_SRC C :noweb yes + +static uint16_t tap_timer = 0; +char last_mod = 10; + +void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { + // this first if body makes double modified keys impossible, but stops the + // delay when modifying a tap key which would result in the tap key not + // getting modified. + if (last_mod != id && last_mod != 10) { + tap_code16(tap_code); + last_mod = 10; + } else { + tap_timer = timer_read(); + last_mod = id; + register_code(hold_code); + } } void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { unregister_code(hold_code); - if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) { - tap_code16(tap_code); - last_mod = -1; + if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(tap_code); + last_mod = 10; } } #+END_SRC -*** Set DVORAK layout - -The function that filter's user inputs and applies macros, the begginning is -pretty basic, setting our main layer and configuring our secondary layer. +** Process User Input #+BEGIN_SRC C :noweb yes bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; + switch (keycode) { +#+END_SRC + +** Layouts + +Set Dvorak layout + +#+BEGIN_SRC C :noweb yes +case KC_DVORAK: +if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); +} +return true; +break; + +#+END_SRC + +Set Qwerty layout. + +#+BEGIN_SRC C :noweb yes +case KC_QWERTY: +if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); +} +return true; +break; #+END_SRC -*** Alt and () +** Alt and () Left and right alt are ( and ) when tapped. I put them on alt instead of a more conveniant key like control because parentheses do not need to be shift modified @@ -204,24 +296,24 @@ ever, unlike some other tap keys seen in the next sections. #+BEGIN_SRC C :noweb yes case KC_T_LALT: if (record->event.pressed) { - mod_press(KC_LALT, 0); - } else { - mod_lift(S(KC_9), KC_LALT, 0); - } + mod_press(S(KC_9), KC_LALT, 0); +} else { + mod_lift(S(KC_9), KC_LALT, 0); +} return false; break; case KC_T_RALT: if (record->event.pressed) { - mod_press(KC_RALT, 1); - } else { - mod_lift(S(KC_0), KC_RALT, 1); - } + mod_press(S(KC_0), KC_RALT, 1); +} else { + mod_lift(S(KC_0), KC_RALT, 1); +} return false; break; #+END_SRC -*** Gui and `\ +** Gui and `\ I place gui in the bottom corner because I believe it is the hardest key to reach, so gui seemed like a good fit for a dedicated key that I never want to @@ -231,24 +323,24 @@ number pad or shifted number keys. #+BEGIN_SRC C :noweb yes case KC_T_LGUI: if (record->event.pressed) { - mod_press(KC_LGUI, 2); - } else { - mod_lift(KC_GRAVE, KC_LGUI, 2); - } + mod_press(KC_GRAVE, KC_LGUI, 2); +} else { + mod_lift(KC_GRAVE, KC_LGUI, 2); +} return false; break; case KC_T_RGUI: if (record->event.pressed) { - mod_press(KC_RGUI, 3); - } else { - mod_lift(KC_BSLASH, KC_RGUI, 3); - } + mod_press(KC_BSLASH, KC_RGUI, 3); +} else { + mod_lift(KC_BSLASH, KC_RGUI, 3); +} return false; break; #+END_SRC -*** Ctrl and [] +** Ctrl and [] Left and right control are [] respectively when they are tapped, making { and } also very convenient. @@ -256,24 +348,24 @@ also very convenient. #+BEGIN_SRC C :noweb yes case KC_T_LCTL: if (record->event.pressed) { - mod_press(KC_LCTL, 4); - } else { - mod_lift(KC_LBRACKET, KC_LCTL, 4); - } + mod_press(KC_LBRACKET, KC_LCTL, 4); +} else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); +} return false; break; case KC_T_RCTL: if (record->event.pressed) { - mod_press(KC_RCTL, 5); - } else { - mod_lift(KC_RBRACKET, KC_RCTL, 5); - } + mod_press(KC_RBRACKET, KC_RCTL, 5); +} else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); +} return false; break; #+END_SRC -*** Shft and =- +** Shft and =- I place shift on the home row, so having '-' right of my pinkie is standard, and it only felt natural to put its opposite, '=/+' on the other side. I put an @@ -282,24 +374,24 @@ extra one on the right side in the secondary layer for the num pad. #+BEGIN_SRC C :noweb yes case KC_T_LSFT: if (record->event.pressed) { - mod_press(KC_LSFT, 6); - } else { - mod_lift(KC_EQUAL, KC_LSFT, 6); - } + mod_press(KC_EQUAL, KC_LSFT, 6); +} else { + mod_lift(KC_EQUAL, KC_LSFT, 6); +} return false; break; case KC_T_RSFT: if (record->event.pressed) { - mod_press(KC_RSFT, 7); - } else { - mod_lift(KC_MINUS, KC_RSFT, 7); - } + mod_press(KC_MINUS, KC_RSFT, 7); +} else { + mod_lift(KC_MINUS, KC_RSFT, 7); +} return false; break; #+END_SRC -*** Rise, DEL, and / +** Rise, DEL, and / I use the top corners as rise because I decided that I do not like using layers with my thumbs. It feels uncomfortable to hold keys down with the side of my @@ -315,36 +407,78 @@ corner again mimicing a standard dvorak keyboard. #+BEGIN_SRC C :noweb yes case KC_T_LRSE: if (record->event.pressed) { - tap_timers[8] = timer_read(); - last_mod = 8; - layer_on(_RISE); - } else { - layer_off(_RISE); - if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) { - tap_code16(KC_DELETE); - last_mod = -1; - } - } + tap_timer = timer_read(); + last_mod = 8; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = 10; + } +} return false; break; case KC_T_RRSE: if (record->event.pressed) { - tap_timers[9] = timer_read(); - last_mod = 9; - layer_on(_RISE); - } else { - layer_off(_RISE); - if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) { - tap_code16(KC_SLASH); - last_mod = -1; - } - } + tap_timer = timer_read(); + last_mod = 9; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_SLASH); + last_mod = 10; + } +} return false; break; #+END_SRC -*** EZ keys +** EZ Keys + +EZ or "easy" keys do things that can already be done on the board, but I want an +easier way of doing them. + +*** One Shot Keys + +Since I made modified tap keys occur on press instead of release, I need one +shot keys to press any key with more than one modifier. + +#+BEGIN_SRC C :noweb yes +case KC_EZSHFT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LSFT); + last_mod = 10; +} +return false; +break; +case KC_EZCTRL: +if (record->event.pressed) { + set_oneshot_mods(MOD_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZALT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LALT); + last_mod = 10; +} +return false; +break; +case KC_EZGUI: +if (record->event.pressed) { + set_oneshot_mods(MOD_LGUI); + last_mod = 10; +} +return false; +break; + +#+END_SRC + +*** Arrows I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became lazy versions of themselves with control and shift already pressed. @@ -355,77 +489,134 @@ left hand like on a qwerty or colemek keyboard. #+BEGIN_SRC C :noweb yes case KC_EZRGHT: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_RGHT)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; case KC_EZLEFT: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_LEFT)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; case KC_EZDOWN: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_DOWN)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; case KC_EZUP: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_UP)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; +#+END_SRC + +*** Undo, Copy, Cut, Paste + +#+BEGIN_SRC C :noweb yes case KC_EZUNDO: if (record->event.pressed) { - tap_code16(C(KC_Z)); - last_mod = -1; + tap_code16(C(KC_Z)); + last_mod = 10; } return false; break; case KC_EZCOPY: if (record->event.pressed) { - tap_code16(C(KC_C)); - last_mod = -1; + tap_code16(C(KC_C)); + last_mod = 10; } return false; break; case KC_EZCUT: if (record->event.pressed) { - tap_code16(C(KC_X)); - last_mod = -1; + tap_code16(C(KC_X)); + last_mod = 10; } return false; break; case KC_EZPSTE: if (record->event.pressed) { - tap_code16(C(KC_P)); - last_mod = -1; + tap_code16(C(KC_V)); + last_mod = 10; +} +return false; +break; +#+END_SRC + +** Commands + +Start command layer one shot + +#+BEGIN_SRC C :noweb yes +case KC_COM: +if (record->event.pressed) { + layer_on(_COMMAND); + set_oneshot_layer(_COMMAND, ONESHOT_START); + last_mod = 10; +} else { + clear_oneshot_layer_state (ONESHOT_PRESSED); } return false; break; #+END_SRC -*** Standard inputs interupt tap +Just some strings I notice that I type a lot. + +#+BEGIN_SRC C :noweb yes +case KC_USER: +if (record->event.pressed) { + send_string("mhostley"); + last_mod = 10; +} +return true; +break; +case KC_EMAIL: +if (record->event.pressed) { + send_string("mhostley@gmail.com"); + last_mod = 10; +} +return true; +break; +case KC_NAME: +if (record->event.pressed) { + send_string("Samuel Jahnke"); + last_mod = 10; +} +return true; +break; +case KC_DIR: +if (record->event.pressed) { + send_string("home/mhostley/"); + last_mod = 10; +} +return true; +break; + +#+END_SRC + +** Standard inputs interupt tap Finally, if just a standard key is tapped, set the interupted flag. +Keep this last. #+BEGIN_SRC C :noweb yes - } - last_mod = -1; - return true; +} +last_mod = 10; +return true; } #+END_SRC diff --git a/keyboards/planck/keymaps/samuel/keymap.c b/keyboards/planck/keymaps/samuel/keymap.c index 53760da76715..ff1424489fc0 100644 --- a/keyboards/planck/keymaps/samuel/keymap.c +++ b/keyboards/planck/keymaps/samuel/keymap.c @@ -2,36 +2,45 @@ extern keymap_config_t keymap_config; -static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -char last_mod = -1; - -enum planck_layers { - _DVORAK, - _RISE -}; - // where the 'T_' communicates how the key does something different when tapped. enum planck_keycodes { - DVORAK = SAFE_RANGE, - KC_T_LALT, - KC_T_RALT, - KC_T_LGUI, - KC_T_RGUI, - KC_T_LCTL, - KC_T_RCTL, - KC_T_LSFT, - KC_T_RSFT, - KC_T_LRSE, - KC_T_RRSE, - KC_EZRGHT, - KC_EZLEFT, - KC_EZUP, - KC_EZDOWN, - KC_EZUNDO, - KC_EZCOPY, - KC_EZCUT, - KC_EZPSTE +//DVORAK = SAFE_RANGE, +KC_T_LALT = SAFE_RANGE, +KC_T_RALT, +KC_T_LGUI, +KC_T_RGUI, +KC_T_LCTL, +KC_T_RCTL, +KC_T_LSFT, +KC_T_RSFT, +KC_T_LRSE, +KC_T_RRSE, +KC_EZRGHT, +KC_EZLEFT, +KC_EZUP, +KC_EZDOWN, +KC_EZUNDO, +KC_EZCOPY, +KC_EZCUT, +KC_EZPSTE, +KC_EZSHFT, +KC_EZCTRL, +KC_EZGUI, +KC_EZALT, +KC_DVORAK, +KC_QWERTY, +KC_USER, +KC_EMAIL, +KC_NAME, +KC_DIR, +KC_COM +}; + +enum planck_layers { +_DVORAK, +_QWERTY, +_RISE, +_COMMAND }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -44,202 +53,307 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI} }, +[_QWERTY] = + +{{ KC_T_LRSE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_T_RRSE}, +{ KC_T_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_T_RSFT}, +{ KC_T_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_T_RCTL}, +{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_DVORAK} +}, + [_RISE] = -{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_F11, KC_TRANSPARENT}, -{ KC_TRANSPARENT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_F4, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_TRANSPARENT}, -{ KC_TRANSPARENT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_F12, KC_TRANSPARENT}, -{ KC_TRANSPARENT, KC_TRANSPARENT, KC_EZUP, KC_EZDOWN, KC_TRANSPARENT, KC_AMPR, KC_PIPE, KC_TRANSPARENT, KC_EZLEFT, KC_EZRGHT, KC_TRANSPARENT, KC_TRANSPARENT} +{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT}, +{ KC_EZSHFT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_EZSHFT}, +{ KC_EZCTRL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_COM, KC_EZCTRL}, +{ KC_EZGUI, KC_EZALT, KC_EZUP, KC_EZDOWN, KC_SPC, KC_AMPR, KC_PIPE, KC_END, KC_EZLEFT, KC_EZRGHT, KC_EZALT, KC_EZGUI} +}, + +[_COMMAND] = + +{{ KC_TRANSPARENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_F21, KC_F22, KC_F23, KC_F24, KC_QWERTY, KC_DVORAK, KC_USER, KC_EMAIL, KC_NAME, KC_TRANSPARENT, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_DIR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT} }, }; -void mod_press(uint16_t hold_code, int id) { - tap_timers[id] = timer_read(); - last_mod = id; - register_code(hold_code); +static uint16_t tap_timer = 0; +char last_mod = 10; + +void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { + // this first if body makes double modified keys impossible, but stops the + // delay when modifying a tap key which would result in the tap key not + // getting modified. + if (last_mod != id && last_mod != 10) { + tap_code16(tap_code); + last_mod = 10; + } else { + tap_timer = timer_read(); + last_mod = id; + register_code(hold_code); + } } void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { unregister_code(hold_code); - if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) { - tap_code16(tap_code); - last_mod = -1; + if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(tap_code); + last_mod = 10; } } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; + switch (keycode) { + +case KC_DVORAK: +if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); +} +return true; +break; + +case KC_QWERTY: +if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); +} +return true; +break; case KC_T_LALT: if (record->event.pressed) { - mod_press(KC_LALT, 0); - } else { - mod_lift(S(KC_9), KC_LALT, 0); - } + mod_press(S(KC_9), KC_LALT, 0); +} else { + mod_lift(S(KC_9), KC_LALT, 0); +} return false; break; case KC_T_RALT: if (record->event.pressed) { - mod_press(KC_RALT, 1); - } else { - mod_lift(S(KC_0), KC_RALT, 1); - } + mod_press(S(KC_0), KC_RALT, 1); +} else { + mod_lift(S(KC_0), KC_RALT, 1); +} return false; break; case KC_T_LGUI: if (record->event.pressed) { - mod_press(KC_LGUI, 2); - } else { - mod_lift(KC_GRAVE, KC_LGUI, 2); - } + mod_press(KC_GRAVE, KC_LGUI, 2); +} else { + mod_lift(KC_GRAVE, KC_LGUI, 2); +} return false; break; case KC_T_RGUI: if (record->event.pressed) { - mod_press(KC_RGUI, 3); - } else { - mod_lift(KC_BSLASH, KC_RGUI, 3); - } + mod_press(KC_BSLASH, KC_RGUI, 3); +} else { + mod_lift(KC_BSLASH, KC_RGUI, 3); +} return false; break; case KC_T_LCTL: if (record->event.pressed) { - mod_press(KC_LCTL, 4); - } else { - mod_lift(KC_LBRACKET, KC_LCTL, 4); - } + mod_press(KC_LBRACKET, KC_LCTL, 4); +} else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); +} return false; break; case KC_T_RCTL: if (record->event.pressed) { - mod_press(KC_RCTL, 5); - } else { - mod_lift(KC_RBRACKET, KC_RCTL, 5); - } + mod_press(KC_RBRACKET, KC_RCTL, 5); +} else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); +} return false; break; case KC_T_LSFT: if (record->event.pressed) { - mod_press(KC_LSFT, 6); - } else { - mod_lift(KC_EQUAL, KC_LSFT, 6); - } + mod_press(KC_EQUAL, KC_LSFT, 6); +} else { + mod_lift(KC_EQUAL, KC_LSFT, 6); +} return false; break; case KC_T_RSFT: if (record->event.pressed) { - mod_press(KC_RSFT, 7); - } else { - mod_lift(KC_MINUS, KC_RSFT, 7); - } + mod_press(KC_MINUS, KC_RSFT, 7); +} else { + mod_lift(KC_MINUS, KC_RSFT, 7); +} return false; break; case KC_T_LRSE: if (record->event.pressed) { - tap_timers[8] = timer_read(); - last_mod = 8; - layer_on(_RISE); - } else { - layer_off(_RISE); - if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) { - tap_code16(KC_DELETE); - last_mod = -1; - } - } + tap_timer = timer_read(); + last_mod = 8; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = 10; + } +} return false; break; case KC_T_RRSE: if (record->event.pressed) { - tap_timers[9] = timer_read(); - last_mod = 9; - layer_on(_RISE); - } else { - layer_off(_RISE); - if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) { - tap_code16(KC_SLASH); - last_mod = -1; - } - } + tap_timer = timer_read(); + last_mod = 9; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_SLASH); + last_mod = 10; + } +} +return false; +break; + +case KC_EZSHFT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LSFT); + last_mod = 10; +} +return false; +break; +case KC_EZCTRL: +if (record->event.pressed) { + set_oneshot_mods(MOD_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZALT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LALT); + last_mod = 10; +} +return false; +break; +case KC_EZGUI: +if (record->event.pressed) { + set_oneshot_mods(MOD_LGUI); + last_mod = 10; +} return false; break; case KC_EZRGHT: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_RGHT)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; case KC_EZLEFT: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_LEFT)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; case KC_EZDOWN: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_DOWN)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; case KC_EZUP: if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_UP)); - unregister_code(KC_LCTL); - last_mod = -1; - } + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = 10; +} return false; break; + case KC_EZUNDO: if (record->event.pressed) { - tap_code16(C(KC_Z)); - last_mod = -1; + tap_code16(C(KC_Z)); + last_mod = 10; } return false; break; case KC_EZCOPY: if (record->event.pressed) { - tap_code16(C(KC_C)); - last_mod = -1; + tap_code16(C(KC_C)); + last_mod = 10; } return false; break; case KC_EZCUT: if (record->event.pressed) { - tap_code16(C(KC_X)); - last_mod = -1; + tap_code16(C(KC_X)); + last_mod = 10; } return false; break; case KC_EZPSTE: if (record->event.pressed) { - tap_code16(C(KC_P)); - last_mod = -1; + tap_code16(C(KC_V)); + last_mod = 10; } return false; break; - } - last_mod = -1; - return true; +case KC_COM: +if (record->event.pressed) { + layer_on(_COMMAND); + set_oneshot_layer(_COMMAND, ONESHOT_START); + last_mod = 10; +} else { + clear_oneshot_layer_state (ONESHOT_PRESSED); +} +return false; +break; + +case KC_USER: +if (record->event.pressed) { + send_string("mhostley"); + last_mod = 10; +} +return true; +break; +case KC_EMAIL: +if (record->event.pressed) { + send_string("mhostley@gmail.com"); + last_mod = 10; +} +return true; +break; +case KC_NAME: +if (record->event.pressed) { + send_string("Samuel Jahnke"); + last_mod = 10; +} +return true; +break; +case KC_DIR: +if (record->event.pressed) { + send_string("home/mhostley/"); + last_mod = 10; +} +return true; +break; + +} +last_mod = 10; +return true; } From f9f0a31904d937fea625d1ee523138cb5733c800 Mon Sep 17 00:00:00 2001 From: cubimon Date: Sun, 17 Mar 2019 18:35:14 +0100 Subject: [PATCH 342/445] Unicode fix for new wincompose version (#5082) * unicode fix for new wincompose version * move wincompose case to linux * Change unicode input end to enter --- quantum/process_keycode/process_unicode_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index b64feb7003b1..d0a9cf2324d4 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -118,6 +118,9 @@ void unicode_input_finish(void) { case UC_WIN: unregister_code(KC_LALT); break; + case UC_WINC: + tap_code(KC_ENTER); + break; } set_mods(saved_mods); // Reregister previously set mods From d8df01ca5e43b6322ba2ef5c7613a871ce69282c Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 17 Mar 2019 17:36:59 +0000 Subject: [PATCH 343/445] Align docker and vagrant base images (#4905) * Align docker and vagrant base images - update box to debian 9.6 * Align docker and vagrant base images - lock docker image to debian 9 * Align docker and vagrant base images - update vagrant docker to debian 9 --- Dockerfile | 2 +- Vagrantfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f78dc2bfe8a..6bd5acb33573 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian +FROM debian:9 RUN apt-get update && apt-get install --no-install-recommends -y \ avr-libc \ diff --git a/Vagrantfile b/Vagrantfile index 5aa56bf2a723..2235d9c2ec7c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,7 +6,7 @@ Vagrant.configure(2) do |config| config.vm.define "qmk_firmware" # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit - config.vm.box = "bento/ubuntu-16.04" + config.vm.box = "generic/debian9" # This section allows you to customize the Virtualbox VM # settings, ie showing the GUI or upping the memory @@ -55,7 +55,7 @@ Vagrant.configure(2) do |config| # image, you'll need to: chmod -R a+rw . config.vm.provider "docker" do |docker, override| override.vm.box = nil - docker.image = "jesselang/debian-vagrant:jessie" + docker.image = "jesselang/debian-vagrant:stretch" docker.has_ssh = true end From 221ac2eabbc73c9d59583c6d78c779bbfec0d7bc Mon Sep 17 00:00:00 2001 From: M-AS Date: Sun, 17 Mar 2019 13:38:51 -0400 Subject: [PATCH 344/445] New RGB Matrix effect: Single color reactive (#5330) * Adds new RGB Matrix effect: rgb_matrix_config'd reactive LEDs * [Docs] Adds disable for new effect * [Docs] Added new effect to list of effects --- docs/feature_rgb_matrix.md | 2 ++ quantum/rgb_matrix.c | 19 +++++++++++++++++++ quantum/rgb_matrix.h | 3 +++ 3 files changed, 24 insertions(+) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 910a70469125..8d1efb12a275 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -147,6 +147,7 @@ These are the effects that are currently available: RGB_MATRIX_DIGITAL_RAIN, #ifdef RGB_MATRIX_KEYPRESSES RGB_MATRIX_SOLID_REACTIVE, + RGB_MATRIX_REACTIVE_SIMPLE, RGB_MATRIX_SPLASH, RGB_MATRIX_MULTISPLASH, RGB_MATRIX_SOLID_SPLASH, @@ -173,6 +174,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | |`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | +|`#define DISABLE_RGB_MATRIX_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_REACTIVE_SIMPLE` | |`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | |`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | |`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 2ed36304dca5..56a97e3c7d5b 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -221,6 +221,20 @@ void rgb_matrix_solid_reactive(void) { } } +void rgb_matrix_solid_reactive_simple(void) +{ + HSV hsv = {.h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val}; + RGB rgb; + + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + uint16_t offset2 = g_key_hit[i] << 2; + offset2 = (offset2 <= 255) ? (255 - offset2) : 0; + hsv.v = offset2 * rgb_matrix_config.val / RGB_MATRIX_MAXIMUM_BRIGHTNESS; + rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } +} + // alphas = color1, mods = color2 void rgb_matrix_alphas_mods(void) { @@ -755,6 +769,11 @@ void rgb_matrix_task(void) { rgb_matrix_solid_reactive(); break; #endif + #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + case RGB_MATRIX_SOLID_REACTIVE_SIMPLE: + rgb_matrix_solid_reactive_simple(); + break; + #endif #ifndef DISABLE_RGB_MATRIX_SPLASH case RGB_MATRIX_SPLASH: rgb_matrix_splash(); diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index e43532d11e77..e6acd2d4b512 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -110,6 +110,9 @@ enum rgb_matrix_effects { #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE RGB_MATRIX_SOLID_REACTIVE, #endif + #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + RGB_MATRIX_SOLID_REACTIVE_SIMPLE, + #endif #ifndef DISABLE_RGB_MATRIX_SPLASH RGB_MATRIX_SPLASH, #endif From d7b381128e503a57315261841c66c13d3ab5be25 Mon Sep 17 00:00:00 2001 From: Alexander Kagno Date: Mon, 18 Mar 2019 17:31:09 +0000 Subject: [PATCH 345/445] [Keymap] Arkag Userspace Update (#5438) * fresh commit for a new fork for PR to upstream/master * gaming mode added, lighting changes for other modes * rules.mk fixed... * fixed collision issue with aesthetic and shifty modes * fixed collision issue with aesthetic and shifty modes * troubleshooting game mode failing * moved game tapdance key to default layer, fixed issue --- keyboards/mechmini/v2/keymaps/arkag/keymap.c | 13 ++++-- keyboards/mechmini/v2/keymaps/arkag/rules.mk | 4 +- users/arkag/arkag.c | 42 +++++++++++++++----- users/arkag/arkag.h | 4 ++ 4 files changed, 48 insertions(+), 15 deletions(-) diff --git a/keyboards/mechmini/v2/keymaps/arkag/keymap.c b/keyboards/mechmini/v2/keymaps/arkag/keymap.c index 0b1cc4dacb61..4f4cbda3f37e 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/keymap.c +++ b/keyboards/mechmini/v2/keymaps/arkag/keymap.c @@ -7,14 +7,15 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_2u_space_ortho( 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, QUOTE, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, XXXXXXX, KC_LEAD), + M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, GAME , KC_LEAD), [_RAISE] = LAYOUT_2u_space_ortho( - GRAVE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, _______, KC_7, KC_8, KC_9, _______, _______, + GRAVE, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, OBRACK, CBRACK, KC_EQL, HYPHEN, _______, _______, KC_4, KC_5, KC_6, _______, KC_NLCK, _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT, _______, _______, _______, KEEB, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST), @@ -35,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, M_SFT, M_SPC, M_OS), + _______, _______, _______, _______, _______, _______, _______, _______, M_SFT, M_SPC, M_OS ), [_KEEB] = LAYOUT_2u_space_ortho( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -43,4 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + [_GAMING] = LAYOUT_2u_space_ortho( + KC_ESC, KC_F13, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, KC_F14, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, KC_F15, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_F16, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX), + }; diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk index 1330a2738aa9..64f65f7062e0 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk +++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes @@ -6,7 +6,7 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = no SLEEP_LED_ENABLE = no NKRO_ENABLE = yes -BACKLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c index 80f7b1bbc14e..9e8c7af247e3 100644 --- a/users/arkag/arkag.c +++ b/users/arkag/arkag.c @@ -121,7 +121,7 @@ void check_state (void) { case sleeping: if (!slept) { - rgblight_mode_noeeprom(2); + rgblight_mode_noeeprom(5); slept = true; activated = false; deactivated = false; @@ -359,6 +359,26 @@ void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) { } } +void dance_game (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + + } else if (state->count == 2) { + + } else if (state->count == 3) { + uint8_t layer = biton32(layer_state); + if (layer == _QWERTY) { + layer_off(_QWERTY); + layer_on(_GAMING); + // swirling rgb + rgblight_mode_noeeprom(12); + } else { + layer_off(_GAMING); + layer_on(_QWERTY); + rgblight_mode_noeeprom(1); + } + } +} + void matrix_init_user(void) { current_os = eeprom_read_byte(EECONFIG_USERSPACE); set_os(current_os, false); @@ -379,6 +399,7 @@ void matrix_scan_user(void) { if (current_os == OS_WIN) { long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE}); } else { + return; } } SEQ_TWO_KEYS(KC_LSFT, M_PMOD) { @@ -442,7 +463,7 @@ void matrix_scan_user(void) { // end format functions // start fancy functions - SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { + SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) { surround_type(6, KC_GRAVE, false); pri_mod(true); tap_code(KC_V); @@ -564,30 +585,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ if (aesthetic) { aesthetic = false; - num_extra_flashes_off = 1; + rgblight_mode_noeeprom(1); } else { aesthetic = true; + shifty = false; + // snake mode + rgblight_mode_noeeprom(20); } - flash_color = underglow; - flash_state = flash_off; return false; } - case M_SFT: if(record->event.pressed){ if (shifty) { shifty = false; - num_extra_flashes_off = 1; + rgblight_mode_noeeprom(1); } else { shifty = true; + aesthetic = false; + // knight mode + rgblight_mode_noeeprom(23); } - flash_color = underglow; - flash_state = flash_off; return false; } - default: if (record->event.pressed) { state = active; @@ -605,4 +626,5 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck), [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck), [TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT), + [TD_GAME] = ACTION_TAP_DANCE_FN (dance_game), }; diff --git a/users/arkag/arkag.h b/users/arkag/arkag.h index a5f2a6a352a0..fdc4a5fee64b 100644 --- a/users/arkag/arkag.h +++ b/users/arkag/arkag.h @@ -14,6 +14,7 @@ #define STRIKE TD(TD_STRK_SHOT) #define HYPHEN TD(TD_HYPH_UNDR) #define CEDILLA TD(TD_C_CED) +#define GAME TD(TD_GAME) #define RAISE MO(1) #define LOWER MO(2) @@ -40,6 +41,7 @@ enum { _MEDIA, _FUNCT, _KEEB, + _GAMING, }; typedef enum { @@ -92,6 +94,7 @@ enum tapdances { TD_BRCK_PARN_O, TD_BRCK_PARN_C, TD_LALT_RALT, + TD_GAME, }; void velocikey_accelerate(void); @@ -129,6 +132,7 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data); void dance_strk (qk_tap_dance_state_t *state, void *user_data); void dance_3 (qk_tap_dance_state_t *state, void *user_data); void dance_c (qk_tap_dance_state_t *state, void *user_data); +void dance_game (qk_tap_dance_state_t *state, void *user_data); int cur_dance (qk_tap_dance_state_t *state); void spc_finished (qk_tap_dance_state_t *state, void *user_data); From 3e7a2c49a6e81ba51a8079494bb99f61942e3d7f Mon Sep 17 00:00:00 2001 From: layne001365 Date: Tue, 19 Mar 2019 01:33:57 +0800 Subject: [PATCH 346/445] [Keyboard] Fix matrix positions for HotDox (#5437) * Add HotDox * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * * Update - keyboards/hotdox/config.h - keyboards/hotdox/hotdox.h - keyboards/hotdox/info.json - keyboards/hotdox/left.h - keyboards/hotdox/left.c - keyboards/hotdox/rules.mk * Replace EPRM with EPRM - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/keymaps/eozaki/keymap.c - keyboards/hotdox/keymaps/kloki/keymap.c * Remove keymaps readme.md * Remove twimaster.h/ twimaster.c * * Update - remove FORCE_NKRO from keyboards/hotdox/config.h - keyboards/hotdox/hotdox.c - keyboards/hotdox/hotdox.h - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/left.c - keyboards/hotdox/readme.md - keyboards/hotdox/rules.mk * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/hotdox.h Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * [Keymaps] reverse the K5C<->K5A, L53<->L51, R55<->R53 position. --- keyboards/hotdox/hotdox.h | 8 ++++---- keyboards/hotdox/keymaps/default/keymap.c | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/keyboards/hotdox/hotdox.h b/keyboards/hotdox/hotdox.h index d79f335ad0f1..0eef4ea7905c 100644 --- a/keyboards/hotdox/hotdox.h +++ b/keyboards/hotdox/hotdox.h @@ -95,7 +95,7 @@ void ergodox_blink_all_leds(void); k49,k4A,k4B,k4C,k4D, \ k57,k58, \ k59, \ - k5C,k5B,k5A ) \ + k5A,k5B,k5C ) \ \ /* matrix positions */ \ { \ @@ -129,7 +129,7 @@ void ergodox_blink_all_leds(void); k49,k4A,k4B,k4C,k4D, \ k57,k58, \ k59,k47,k48, \ - k5C,k5B,k5A ) \ + k5A,k5B,k5C ) \ \ /* matrix positions */ \ { \ @@ -151,7 +151,7 @@ void ergodox_blink_all_leds(void); L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ L55,L56, R50,R51, \ L54, R52, \ - L53,L52,L51, R55,R54,R53 ) \ + L51,L52,L53, R53,R54,R55 ) \ \ /* matrix positions */ \ { \ @@ -173,7 +173,7 @@ void ergodox_blink_all_leds(void); L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ L55,L56, R50,R51, \ L45,L46,L54, R52,R40,R41, \ - L53,L52,L51, R55,R54,R53 ) \ + L51,L52,L53, R53,R54,R55 ) \ \ /* matrix positions */ \ { \ diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c index 1c0f69d9b09c..0ec7b352c15f 100644 --- a/keyboards/hotdox/keymaps/default/keymap.c +++ b/keyboards/hotdox/keymaps/default/keymap.c @@ -46,14 +46,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC,KC_BSPC,KC_END, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - //KC_RGHT, KC_6, BL_OFF, BL_ON, BL_INC, BL_DEC, KC_MINS, TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, KC_LALT, CTL_T(KC_ESC), KC_PGUP, - KC_ENT,KC_TAB,KC_PGDN + KC_PGDN,KC_TAB,KC_ENT ), /* Keymap 1: Symbol Layer * From a6c9e53510d129e6e9fe6936fbfd061f2296a892 Mon Sep 17 00:00:00 2001 From: holtenc Date: Mon, 18 Mar 2019 12:42:26 -0500 Subject: [PATCH 347/445] [Keyboard] correct indicator light states (#5434) function of indicator lights was inverted. these changes correct that. --- .../handwired/prime_exl/keymaps/default/keymap.c | 16 ++++++++-------- .../handwired/prime_exl/keymaps/via/keymap.c | 16 ++++++++-------- .../primekb/prime_e/keymaps/default/keymap.c | 16 ++++++++-------- keyboards/primekb/prime_e/keymaps/via/keymap.c | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c index 815090bd1939..1dac7825e4be 100644 --- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c @@ -113,20 +113,20 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B6); - } else { writePinHigh(B6); + } else { + writePinLow(B6); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B5); - } else { writePinHigh(B5); + } else { + writePinLow(B5); } /* if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(C6); - } else { writePinHigh(C6); + } else { + writePinLow(C6); } */ } @@ -135,9 +135,9 @@ void led_set_user(uint8_t usb_led) { uint32_t layer_state_set_user(uint32_t state) { if (biton32(state) == 2) { - writePinLow(C6); + writePinHigh(C6); } else { - writePinHigh(C6); + writePinLow(C6); } return state; } diff --git a/keyboards/handwired/prime_exl/keymaps/via/keymap.c b/keyboards/handwired/prime_exl/keymaps/via/keymap.c index 4a2631c369b9..c01c247c8967 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/via/keymap.c @@ -71,20 +71,20 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B6); - } else { writePinHigh(B6); + } else { + writePinLow(B6); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B5); - } else { writePinHigh(B5); + } else { + writePinLow(B5); } /* if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(C6); - } else { writePinHigh(C6); + } else { + writePinLow(C6); } */ } @@ -93,9 +93,9 @@ void led_set_user(uint8_t usb_led) { uint32_t layer_state_set_user(uint32_t state) { if (biton32(state) == 2) { - writePinLow(C6); + writePinHigh(C6); } else { - writePinHigh(C6); + writePinLow(C6); } return state; } diff --git a/keyboards/primekb/prime_e/keymaps/default/keymap.c b/keyboards/primekb/prime_e/keymaps/default/keymap.c index 47692c5413f6..0aab745cd583 100644 --- a/keyboards/primekb/prime_e/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/default/keymap.c @@ -44,20 +44,20 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B2); - } else { writePinHigh(B2); + } else { + writePinLow(B2); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B1); - } else { writePinHigh(B1); + } else { + writePinLow(B1); } /* if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B3); - } else { writePinHigh(B3); + } else { + writePinLow(B3); }*/ } @@ -66,9 +66,9 @@ void led_set_user(uint8_t usb_led) { uint32_t layer_state_set_user(uint32_t state) { if (biton32(state) == 1) { - writePinLow(B3); + writePinHigh(B3); } else { - writePinHigh(B3); + writePinLow(B3); } return state; } diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c index 9cc3e2f3d770..8b5b13866a6d 100644 --- a/keyboards/primekb/prime_e/keymaps/via/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -43,20 +43,20 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B2); - } else { writePinHigh(B2); + } else { + writePinLow(B2); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B1); - } else { writePinHigh(B1); + } else { + writePinLow(B1); } /* if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B3); - } else { writePinHigh(B3); + } else { + writePinLow(B3); }*/ } @@ -65,9 +65,9 @@ void led_set_user(uint8_t usb_led) { uint32_t layer_state_set_user(uint32_t state) { if (biton32(state) == 1) { - writePinLow(B3); + writePinHigh(B3); } else { - writePinHigh(B3); + writePinLow(B3); } return state; } From 68d4f78b2580a2f216112880b18341ca6e429d15 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Mon, 18 Mar 2019 14:53:47 -0300 Subject: [PATCH 348/445] [Keyboard] layout fixed in jotanck.h (#5432) --- keyboards/handwired/jotanck/jotanck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/jotanck/jotanck.h b/keyboards/handwired/jotanck/jotanck.h index e8dd93edafa1..e253940ddc93 100644 --- a/keyboards/handwired/jotanck/jotanck.h +++ b/keyboards/handwired/jotanck/jotanck.h @@ -13,5 +13,5 @@ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } From bd61b5b0ed76eb3b9676ef828b9e833cdb3301e5 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Mon, 18 Mar 2019 14:56:12 -0300 Subject: [PATCH 349/445] [Keyboard] Add Jot50 handwired board (#5431) --- keyboards/handwired/jot50/config.h | 38 ++++++++ keyboards/handwired/jot50/jot50.c | 6 ++ keyboards/handwired/jot50/jot50.h | 19 ++++ .../handwired/jot50/keymaps/default/keymap.c | 88 +++++++++++++++++++ keyboards/handwired/jot50/readme.md | 37 ++++++++ keyboards/handwired/jot50/rules.mk | 66 ++++++++++++++ 6 files changed, 254 insertions(+) create mode 100644 keyboards/handwired/jot50/config.h create mode 100644 keyboards/handwired/jot50/jot50.c create mode 100644 keyboards/handwired/jot50/jot50.h create mode 100644 keyboards/handwired/jot50/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jot50/readme.md create mode 100644 keyboards/handwired/jot50/rules.mk diff --git a/keyboards/handwired/jot50/config.h b/keyboards/handwired/jot50/config.h new file mode 100644 index 000000000000..2dfcfd2d2808 --- /dev/null +++ b/keyboards/handwired/jot50/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jotix +#define PRODUCT Jot50 +#define DESCRIPTION A 5x12 compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* pro_micro pin-out */ +#define MATRIX_ROW_PINS { D7, E6, B4, B6, B2 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } +#define UNUSED_PINS + +/* leds */ +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 5 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/keyboards/handwired/jot50/jot50.c b/keyboards/handwired/jot50/jot50.c new file mode 100644 index 000000000000..a1d2258a5814 --- /dev/null +++ b/keyboards/handwired/jot50/jot50.c @@ -0,0 +1,6 @@ +#include "jot50.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} diff --git a/keyboards/handwired/jot50/jot50.h b/keyboards/handwired/jot50/jot50.h new file mode 100644 index 000000000000..b7e67ae61ff5 --- /dev/null +++ b/keyboards/handwired/jot50/jot50.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_ortho_5x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c new file mode 100644 index 000000000000..84fa9eea4b73 --- /dev/null +++ b/keyboards/handwired/jot50/keymaps/default/keymap.c @@ -0,0 +1,88 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum planck_keycodes { + BACKLIT = SAFE_RANGE +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +/* Funct + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | caps | F11 | F12 | | | | | - | = | [ | ] | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | vol- | mute | vol+ | | | | | | | | \ | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | prev | play | next | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | home | pgdn | pgup | end | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +#define _FUNCT LAYOUT_ortho_5x12 (\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\ + KC_CAPS, KC_F11, KC_F12, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,\ + _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_BSLS,\ + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ +) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | bspc | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ` | Q | W | E | R | T | Y | U | I | O | P | del | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | tab | A | S | D | F | G | H | J | K | L | ; | ' | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_QWERTY] = LAYOUT_ortho_5x12 ( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_LOWER] = _FUNCT, + +[_RAISE] = _FUNCT, + +[_ADJUST] = LAYOUT_ortho_5x12 ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { +} + diff --git a/keyboards/handwired/jot50/readme.md b/keyboards/handwired/jot50/readme.md new file mode 100644 index 000000000000..fea08b82dcbd --- /dev/null +++ b/keyboards/handwired/jot50/readme.md @@ -0,0 +1,37 @@ +# Jotanck + +![Jotanck] + +A compact 50% (12x5) ortholinear keyboard kit inspired in the Preonic made by jotix. + +Keyboard Maintainer: [jotix](https://github.com/jotix) +Hardware Supported: Arduino Pro Micro + +### Arduino Pro Micro Pinout + +| Rows | 0 | 1 | 2 | 3 | 4 | +|-------------|----|----|----|----|----| +| Arduino pin | 6 | 7 | 8 | 10 | 16 | +| QMK pin | D7 | E6 | B4 | B6 | B2 | + +| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | +|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----| +| Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 | +| QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 | + +| | Backlight | +|-------------|-----------| +| Arduino pin | 9 | +| QMK pin | B5 | + +### Compiling the Firmware + +Make example for this keyboard (after setting up your build environment): + + make handwired/jot50:default + +### The Defaukt Keymap + +![Default Keymap](https://i.imgur.com/4WTmcSN.jpg) + +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/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk new file mode 100644 index 000000000000..36a100c9631f --- /dev/null +++ b/keyboards/handwired/jot50/rules.mk @@ -0,0 +1,66 @@ +# 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) + +# 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 +# + +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 = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI 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. +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 +LAYOUTS = ortho_5x12 From 83937573d176b87785f4c6eb058ecf8e86033283 Mon Sep 17 00:00:00 2001 From: Adam Newbold Date: Mon, 18 Mar 2019 14:06:31 -0400 Subject: [PATCH 350/445] [Keyboard] Corrected layout for top row keys (#5429) * Corrected column count and adjusted layouts to include missing key The original version reflected 14 columns and omitted KC_GRV, the 15th key on the top row. This revision adds support for the 15h key, and also updates the default (Tsangan) layout to include the HHKB layer keys. * Reverted config.h to version in master branch * Moved K413 to the correct location * Added info.json * Update keyboards/1upkeyboards/1up60hte/1up60hte.h Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/info.json Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c Co-Authored-By: newbold --- keyboards/1upkeyboards/1up60hte/1up60hte.h | 11 ++-- keyboards/1upkeyboards/1up60hte/config.h | 2 +- keyboards/1upkeyboards/1up60hte/info.json | 15 +++++ .../1up60hte/keymaps/default/keymap.c | 28 +++++----- .../1up60hte/keymaps/hhkb/keymap.c | 55 +++++-------------- 5 files changed, 48 insertions(+), 63 deletions(-) create mode 100644 keyboards/1upkeyboards/1up60hte/info.json diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h index eb4082f1ae75..b6d3c8e0d15d 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.h +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h @@ -19,12 +19,12 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ +#define LAYOUT_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + K400, K401, K402, K406, K410, K411, K412 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ @@ -35,11 +35,11 @@ along with this program. If not, see . /* HHKB Variant */ #define LAYOUT_60_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K401, K402, K406, K410, K411, K413 \ + K401, K402, K406, K410, K411 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ @@ -47,4 +47,3 @@ along with this program. If not, see . { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \ { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413 } \ } - diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index c7e023a5edcb..892a8b9fe82c 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -62,4 +62,4 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif +#endif \ No newline at end of file diff --git a/keyboards/1upkeyboards/1up60hte/info.json b/keyboards/1upkeyboards/1up60hte/info.json new file mode 100644 index 000000000000..86521d36bd33 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "1up60hte", + "url": "https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/", + "maintainer": "1upkeyboards", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_tsangan": { + "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_hhkb": { + "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index 8c3916629f1f..7fefebd0b19a 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -17,21 +17,19 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), - - [1] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) - + [0] = LAYOUT_tsangan( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_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_LSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_LGUI, KC_LALT, KC_LCTL), + + [1] = LAYOUT_tsangan( + 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_INS, KC_DEL, + KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, 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/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c index 1b06739b68f4..7658087d1fd7 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c @@ -17,20 +17,19 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - 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_LSFT, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), - - [1] = LAYOUT_all( - 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_INS, - KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL) + [0] = LAYOUT_tsangan( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_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_LSFT, MO(1), + KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_LGUI, KC_LALT, KC_NO), + + [1] = LAYOUT_tsangan( + 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_INS, KC_DEL, + KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; void matrix_init_user(void) { @@ -45,35 +44,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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)) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { writePinLow(B6); } else { writePinHigh(B6); } - - 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 { - - } - } From 473dedb309800b1ea11dd6a16948e72bbdf158ae Mon Sep 17 00:00:00 2001 From: FiNeXdesign Date: Mon, 18 Mar 2019 19:09:37 +0100 Subject: [PATCH 351/445] [Keymap] Updated layout after some months of testing. (#5427) * Updated layout after some months of testing. The current setup looks quite better than the initial one. It's not perfect but it allows me to work quite well. The only big problem is the Alt modifiers on the home row which sometimes break the typing if keys are pressed too fast. I'm also not satisfied by the TAB key position on the thumb cluster. Main improvements since previous push: - Shift layouts on both halves - Moved around symbols - Improved number/fn keys - Reorganized thumbs * Used enum as suggested by @drashna :-) --- keyboards/redox/keymaps/finex/config.h | 4 + keyboards/redox/keymaps/finex/keymap.c | 398 ++++++++++++++++++------ keyboards/redox/keymaps/finex/readme.md | 57 +++- keyboards/redox/keymaps/finex/rules.mk | 3 +- 4 files changed, 350 insertions(+), 112 deletions(-) diff --git a/keyboards/redox/keymaps/finex/config.h b/keyboards/redox/keymaps/finex/config.h index b23342ce0fa0..8852a4cc8721 100644 --- a/keyboards/redox/keymaps/finex/config.h +++ b/keyboards/redox/keymaps/finex/config.h @@ -32,3 +32,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 + +// #define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 200 diff --git a/keyboards/redox/keymaps/finex/keymap.c b/keyboards/redox/keymaps/finex/keymap.c index 8b8f5f183903..5a508815b2d9 100644 --- a/keyboards/redox/keymaps/finex/keymap.c +++ b/keyboards/redox/keymaps/finex/keymap.c @@ -3,47 +3,161 @@ extern keymap_config_t keymap_config; // Layer names -#define _QWERTY 0 -#define _COLEMAKDHMK 1 -#define _QWERTY_MAC 2 -#define _COLEMAKDHMK_MAC 3 -#define _SYMB 4 -#define _ADJUST 5 +enum{ + // - Base layers: + _COLEMAKDHMK, + _COLEMAKDHMK_MAC, + _QWERTY, + _QWERTY_MAC, + // - Symbols, numbers, functions and custom shifts: + _SYMB, + _NUMB, + _FUNC, + _RHSH, // Righ hand shifted keycodes + _LHSH, // Left hand shifted keycodes + // - Adjust layer: + _ADJUST +}; // Custom keycodes enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAKDHMK, - QWERTY_MAC, + COLEMAKDHMK = SAFE_RANGE, COLEMAKDHMK_MAC, - SYMB, - ADJUST, + QWERTY, + QWERTY_MAC, ASC_SAR, ASC_DAR, ASC_SQT, ASC_DQT, + ASC_CIRC, + ASC_TILD, ASC_HAP, - ASC_SAD + ASC_SAD, + ASC_BKT, + ASC_CBRL, + ASC_CBRR }; +// Tap dance keycodes +enum tap_dance{ + TD_SCLN, // ;; -> : + TD_LBRC, // [[ -> { + TD_RBRC, // ]] -> } + TD_QMRK // // -> ? +}; + +// Semicolon to Colon +void dance_scln_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_SCLN); + } else { + register_code (KC_RSFT); + register_code (KC_SCLN); + } +} +void dance_scln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_SCLN); + } else { + unregister_code (KC_RSFT); + unregister_code (KC_SCLN); + } +} + +// Square braket to curly bracket (left) +void dance_lbrc_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_LBRC); + } else { + register_code (KC_RSFT); + register_code (KC_LBRC); + } +} +void dance_lbrc_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_LBRC); + } else { + unregister_code (KC_RSFT); + unregister_code (KC_LBRC); + } +} + +// Square braket to curly bracket (right) +void dance_rbrc_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_RBRC); + } else { + register_code (KC_RSFT); + register_code (KC_RBRC); + } +} +void dance_rbrc_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_RBRC); + } else { + unregister_code (KC_RSFT); + unregister_code (KC_RBRC); + } +} + + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_scln_finished, dance_scln_reset), + [TD_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lbrc_finished, dance_lbrc_reset), + [TD_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_rbrc_finished, dance_rbrc_reset) +}; + + // Shortcut to make keymap more readable -#define KC_SYQT LT(_SYMB, KC_QUOT) -#define KC_SYGR LT(_SYMB, KC_GRV) -#define KC_SYSP LT(_SYMB, KC_SPC) -#define KC_ADEN LT(_ADJUST, KC_END) -#define KC_ADPU LT(_ADJUST, KC_PGUP) -#define KC_CESC LCTL_T(KC_ESC) -#define KC_CBSP LCTL_T(KC_BSPC) -#define KC_CMIN RCTL_T(KC_MINUS) -#define KC_GBSP LGUI_T(KC_BSPC) -#define KC_ADEL LALT_T(KC_DEL) -#define KC_APLS RALT_T(KC_PPLS) -#define KC_LSEN LSFT_T(KC_ENT) -#define KC_RSEN RSFT_T(KC_ENT) -#define FN1 QWERTY -#define FN2 COLEMAKDHMK -#define FN3 QWERTY_MAC -#define FN4 COLEMAKDHMK_MAC + +// - Adjustment Layer: +#define KC_ADEN LT(_ADJUST, KC_END) // End / _ADJUST layer +#define KC_ADPU LT(_ADJUST, KC_PGUP) // Page Up / _ADJUST layer + +// - Custom layers: +#define KC_SYSP LT(_SYMB, KC_SPC) // Space / _symbols +#define KC_NUES LT(_NUMB, KC_ESC) // Esc / _numbers +#define KC_FUTA LT(_FUNC, KC_TAB) // Tab / _functions +#define KC_N_SH LT(_LHSH, KC_N) // Pressing N key, enable shifted keys on other half (the left one) +#define KC_T_SH LT(_RHSH, KC_T) // Pressing T key, enable shifted keys on other half (the right one) + +// - Custom keys/modifiers: +#define KC_ATAB RALT_T(KC_TAB) // - Tab / Alt Gr +#define KC_CESC LCTL_T(KC_ESC) // - Esc / Left Ctrl +#define KC_GSPC LGUI_T(KC_SPC) // - Space / Left GUI +#define KC_CBSP LCTL_T(KC_BSPC) // - Backspace / Left Ctrl + +// -- Mac os mode: +#define KC_CSPC LCTL_T(KC_SPC) // - Space / Left Ctrl +#define KC_GBSP LGUI_T(KC_BSPC) // - Backspace / Left GUI + + +#define KC_AEQL LALT_T(KC_EQL) // - Equals / Alt (left alt) +#define KC_CMIN RCTL_T(KC_MINUS) // - Minus / Right Ctrl +#define KC_ADEL RALT_T(KC_DEL) // - Del / Alt Gr +#define KC_RSEN RSFT_T(KC_ENT) // - Enter / Right Shift (standard shift) +#define KC_LAEN LALT_T(KC_ENT) // - Enter / Left Alt + +// Home row mod tap keys: +// - Left hand +#define KC_CT_A CTL_T(KC_A) // A / Left Ctrl +#define KC_AL_S ALT_T(KC_S) // S / Left Alt +// - Right hand +#define KC_AL_E ALT_T(KC_E) // E / Left Alt +#define KC_CT_O CTL_T(KC_O) // O / Left Ctrl + +// - Tap dance: +#define KC_TDSC TD(TD_SCLN) // ;; -> : +#define KC_TDLB TD(TD_LBRC) // [[ -> { +#define KC_TDRB TD(TD_RBRC) // ]] -> } + +// - Keyboard base maps: +#define LR1 COLEMAKDHMK +#define LR2 COLEMAKDHMK_MAC +#define LR3 QWERTY +#define LR4 QWERTY_MAC + // Send custom strings or change default base layer bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -63,12 +177,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // SS_RALT(SS_LSFT()): Avoid sending dead key on software intl layouts SEND_STRING(SS_RALT(SS_LSFT("\""))); return false; + case ASC_CIRC: + // SS_RALT(): Avoid sending dead key on software intl layouts + SEND_STRING(SS_RALT("^")); + return false; + case ASC_TILD: + // SS_RALT(SS_LSFT()): Avoid sending dead key on software intl layouts + SEND_STRING(SS_RALT(SS_LSFT("~"))); + return false; case ASC_HAP: SEND_STRING(":-) "); return false; case ASC_SAD: SEND_STRING(":-( "); return false; + case ASC_BKT: + // SS_RALT(): Avoid sending dead key on software intl layouts + SEND_STRING(SS_RALT("`")); + return false; + case ASC_CBRL: + SEND_STRING("{"); + return false; + case ASC_CBRR: + SEND_STRING("}"); + return false; case QWERTY: if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); @@ -98,91 +230,157 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_DEL , KC_BSPC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,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_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LGUI , KC_ADEL , KC_CBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // Colemak DM-MK Mod + [_COLEMAKDHMK] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,XXXXXXX , XXXXXXX ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_TDSC ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_R ,KC_AL_S ,KC_T_SH ,KC_G ,KC_TDLB , KC_TDRB ,KC_M ,KC_N_SH ,KC_AL_E ,KC_I ,KC_O ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_GSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_CBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), - [_COLEMAKDHMK] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_DEL , KC_BSPC ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,KC_A ,KC_R ,KC_S ,KC_T ,KC_G ,KC_LBRC , KC_RBRC ,KC_M ,KC_N ,KC_E ,KC_I ,KC_O ,KC_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LGUI , KC_ADEL , KC_CBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // Colemak DM-MK Mod, Mac version (CTRL and GUI are swapped) + [_COLEMAKDHMK_MAC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,XXXXXXX , XXXXXXX ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_TDSC ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_R ,KC_AL_S ,KC_T_SH ,KC_G ,KC_TDLB , KC_TDRB ,KC_M ,KC_N_SH ,KC_AL_E ,KC_I ,KC_O ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_GBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), - [_QWERTY_MAC] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_DEL , KC_BSPC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,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_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LCTL , KC_ADEL , KC_GBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // QWERTY + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , XXXXXXX ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_TDLB , KC_TDRB ,KC_H ,KC_J ,KC_K ,KC_L ,KC_TDSC ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_GSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_CBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), - [_COLEMAKDHMK_MAC] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_DEL , KC_BSPC ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,KC_A ,KC_R ,KC_S ,KC_T ,KC_G ,KC_LBRC , KC_RBRC ,KC_M ,KC_N ,KC_E ,KC_I ,KC_O ,KC_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LCTL , KC_ADEL , KC_GBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // QWERTY, Mac version (CTRL and GUI are swapped) + [_QWERTY_MAC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , XXXXXXX ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_TDLB , KC_TDRB ,KC_H ,KC_J ,KC_K ,KC_L ,KC_TDSC ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_GBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), + // Symbols, home row arrows, function keys and macros layer [_SYMB] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_CIRC ,KC_BSLS ,KC_PMNS ,KC_UNDS ,XXXXXXX ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_F11 ,KC_APP , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_PAST ,KC_PIPE ,ASC_SQT ,KC_TILD ,KC_QUOT ,ASC_SAR , ASC_DAR ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_F12 ,KC_PSCR , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_HASH ,KC_AMPR ,KC_AT ,ASC_DQT ,KC_GRV ,ASC_SAD ,ASC_HAP , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_UP ,_______ , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_PDOT ,KC_LEFT ,KC_DOWN ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_HASH ,KC_DLR ,KC_PERC ,_______ , _______ ,ASC_CIRC,KC_AMPR ,KC_ASTR ,KC_PLUS ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PIPE ,KC_PMNS ,ASC_SQT ,ASC_DQT ,KC_GRV ,ASC_SAR , ASC_DAR ,KC_QUOT ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_BSLS ,KC_UNDS ,KC_COLN ,ASC_TILD,KC_EQL ,ASC_SAD ,ASC_HAP , _______ ,_______ ,ASC_BKT ,KC_PGUP ,KC_PGDN ,KC_HOME ,KC_END ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + // Numeric keypad layer + [_NUMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,KC_PAST ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_PPLS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_PMNS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_PSLS ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , XXXXXXX , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + // Function layer and some extra keys on right hand + [_FUNC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PSCR ,KC_NLCK ,KC_INS ,KC_CAPS ,KC_APP ,_______ ,_______ , _______ ,_______ ,_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + + // Left hand shifted keycodes + [_LHSH] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,S(KC_Q) ,S(KC_W) ,S(KC_F) ,S(KC_P) ,S(KC_B) ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,S(KC_A) ,S(KC_R) ,S(KC_S) ,S(KC_T) ,S(KC_G) ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,S(KC_Z) ,S(KC_X) ,S(KC_C) ,S(KC_D) ,S(KC_V) ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , KC_TAB ,KC_BSPC , KC_ESC , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + // Right hand shifted keycodes + [_RHSH] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,S(KC_J) ,S(KC_L) ,S(KC_U) ,S(KC_Y) ,KC_COLN ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,S(KC_M) ,S(KC_N) ,S(KC_E) ,S(KC_I) ,S(KC_O) ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,S(KC_K) ,S(KC_H) ,KC_LABK ,KC_RABK ,KC_QUES ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , KC_DEL , KC_SPC ,KC_ENT , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), + // Adjust layer (RGB, Reset and base layer switch) [_ADJUST] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX ,FN1 ,FN2 ,FN3 ,FN4 ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,RGB_M_B ,RGB_M_R ,RGB_M_SW,RGB_M_SN,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,RGB_M_K ,RGB_M_X ,RGB_M_G ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,LR1 ,LR2 ,LR3 ,LR4 ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,RGB_M_B ,RGB_M_R ,RGB_M_SW,RGB_M_SN,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,RGB_M_K ,RGB_M_X ,RGB_M_G ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) }; diff --git a/keyboards/redox/keymaps/finex/readme.md b/keyboards/redox/keymaps/finex/readme.md index f1b6fa7c7ba9..9b88469a1339 100644 --- a/keyboards/redox/keymaps/finex/readme.md +++ b/keyboards/redox/keymaps/finex/readme.md @@ -4,27 +4,61 @@ ## Features - Enabled USE_SERIAL for Falba.Tech Redox keyboards. -- PC Layouts: QWERTY, Colemak Mod DH-MK. -- Mac Layouts: same as above with CTRL-GUI keys inverted on the bottom row. -- Added redundant "Space", "Esc" and "Ctrl" keys. -- Added macro to print "->" and "=>" strings. -- Added macro to print ":-( " and ":-) " strings. +- PC Layouts: Colemak Mod DH-MK, Qwerty. +- Mac Layouts: same as above with CTRL-GUI keys inverted. +- Added redundant `Space`, `Esc`, `Ctrl` and `Enter` keys. I like to have this + keys on both halves. +- Added macro to print `->` and `=>` strings. +- Added macro to print `:-( ` and `:-) ` strings. - Added more arrows. -- Added "(" and ")" on Shifts keys. -- Added Shift on both ) "Enter" keys. +- Added `(` and `)` on Shifts keys. +- Tapdance: `:` (`;` × 2), `{` (`[` × 2), `}` (`]` × 2). - Removed Mouse and media support. - Added missing "Print Screen" and "Menu" keys. - Added missing "F11" and "F12" keys. +- Added `Alt` modifier on home row. +- Added `Shift other half` on home keys: this allows to shift the right half +pressing `t` on the left (or `f` using Qwerty), and the opposite pressing `n` +(or `j` for Qwerty layout). -## Layers +## Description + +This keymap use the default one with some changes to suit my needs. Mainly +having most used symbol on a separated layer copying the common symbols on the +number keys on the second row and adding other symbols and ``|´` dead keys for +accents. + + +## Main Keyboard Layout + +[TODO] -This keymap use the default one with some minor improvements to suit my needs. ## Changelog - 2018/11/13 - First public release + First public release. +- 2018/12/04 + Added Caps Lock, Num Lock and Insert on Symbols Layout. Inverted KC_GRV and + KC_QUOT on Symbols Layout. Added "Toggle Symbols Layout" and "Momentarily + activates Symbols Layout" on bottom row. Added Space/Control on left bottom + corner: now both halves contains Enter and Space keys. +- 2018/12/23 + Moved around modifiers key. + Added MEH and HYPER keys. + Improved symbols layout. + Rearranged layers. +- 2019/01/04 + Added new layer with numeric keypad and rearranged symbols. +- 2019/01/26 + Added curly brackets on own keys (normally unused). + Added tap dance for testing purpose. + Minor fixes. +- 2019/02/25 + Major layouts upgrade, partially inspired by Steven Hum's Beakl layouts. +- 2019/03/17 + Aligned qwerty and mac to main layout. ## TODO @@ -32,4 +66,5 @@ This keymap use the default one with some minor improvements to suit my needs. - Bring back mouse and multimedia keys. - Add default Colemak Mod DH layout. - Improve top corner keys. -- Improve bottom row keys (mostly KC_BSLS and KC_QUOT). +- Improve bottom row keys. +- Improve README.md diff --git a/keyboards/redox/keymaps/finex/rules.mk b/keyboards/redox/keymaps/finex/rules.mk index 21550e9fe10c..f248688fb49c 100644 --- a/keyboards/redox/keymaps/finex/rules.mk +++ b/keyboards/redox/keymaps/finex/rules.mk @@ -1,3 +1,4 @@ RGBLIGHT_ENABLE = yes - COMMAND_ENABLE = no +KEY_LOCK_ENABLE = yes +TAP_DANCE_ENABLE=yes From 3a2eb68e9e37fddc79ec59769052846a5e1051e8 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Tue, 19 Mar 2019 02:10:18 +0800 Subject: [PATCH 352/445] [Keymap] add android studio keyboard shortcuts to dvorak 42 key atreus / ergodox layouts (#5423) * add SCREEN_NAV layer for copy/pasting within screen * working readreg/paste macros * working read reg / paste macros * write log and tran patterns, and expand * add ls -la shortcut, add tab on combined layer * put delete word on the right pinky key on shell_nav layer * add TAB on the right side, add reset key * added Cloud9 macros * add cloud9 shortcuts to atreus layout * added BROWSER_CONTROL layer * finalized browser control layer * adding comment * add browser control layer to atreus * add flashing command line * remove the tab on combined layer * remove the tomouse * remove mouse layer, change log/tran expand patterns, cleanups * add dumptlog macro * add "delete to home" shortcut * fix conflict * remove unneeded mouse layer * add meh shortcuts on the browser_control layer * add/modify some macros * explain the various layers * putty paste is right mouse button * add android studio shortcuts * allow switching between base and alternate base layouts * replace cloud9 shortcuts with android studio * more android studio shortcuts * add two meh shortcuts on keynav layer * additional android studio shortcut * added defines for android studio --- .../atreus/keymaps/dvorak_42_key/keymap.c | 23 ++++- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 84 ++++++++++++++++--- 2 files changed, 92 insertions(+), 15 deletions(-) diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index a6efd1befa37..0fda245e2ee5 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -8,6 +8,21 @@ #define COMBINED 3 #define BROWSER_CONTROL 4 +// aliases +// shell +#define SHELL_DEL_WORD RCTL(KC_W) +// android studio + +#define AS_TABLEFT LALT(KC_LEFT) +#define AS_TABRIGHT LALT(KC_RIGHT) +#define AS_SYMBOL LCTL(LALT(KC_N)) +#define AS_CLASS LCTL(KC_N) +#define AS_FINDUSAGE LALT(KC_F7) +#define AS_BACK LCTL(LALT(KC_LEFT)) +#define AS_GO_DECLARATION LCTL(KC_B) +#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) +#define AS_CLOSETAB LCTL(KC_F4) +#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -37,10 +52,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [KEYNAV] = LAYOUT( - KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, - MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), - MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP, + AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), + AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, + AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) ), [KEYSEL] = LAYOUT( diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index 0d48711ed3bb..c342b9076987 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -55,14 +55,16 @@ enum custom_keycodes { }; -#define BASE 0 // base dvorak layer -#define KEYNAV 1 // arrow navigation (right hand) -#define KEYSEL 2 // arrow navigation + shift (allow text selection) -#define SHELL_NAV 3 // bash shortcuts -#define SHELL_SCREEN 4 // linux screen shortcuts -#define SCREEN_NAV 5 // navigate between linux screen tabs -#define BROWSER_CONTROL 6 // control browser and mouse -#define COMBINED 7 // combined numbers and symbols layer +#define BASE 0 // base dvorak layer +#define BASE_ALTERNATE 1 // base dvorak layer, with different layer toggling +#define KEYNAV 2 // arrow navigation (right hand) +#define KEYSEL 3 // arrow navigation + shift (allow text selection) +#define SHELL_NAV 4 // bash shortcuts +#define SHELL_SCREEN 5 // linux screen shortcuts +#define SCREEN_NAV 6 // navigate between linux screen tabs +#define BROWSER_CONTROL 7 // control browser and mouse +#define COMBINED 8 // combined numbers and symbols layer +#define ANDROID_STUDIO 9 // macros @@ -94,7 +96,17 @@ enum custom_keycodes { #define SCREEN_PASTEREG_3 30 #define DEL_TO_HOME 36 - +// Android Studio shortcuts +#define AS_TABLEFT LALT(KC_LEFT) +#define AS_TABRIGHT LALT(KC_RIGHT) +#define AS_SYMBOL LCTL(LALT(KC_N)) +#define AS_CLASS LCTL(KC_N) +#define AS_FINDUSAGE LALT(KC_F7) +#define AS_BACK LCTL(LALT(KC_LEFT)) +#define AS_GO_DECLARATION LCTL(KC_B) +#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) +#define AS_CLOSETAB LCTL(KC_F4) +#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) #define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \ @@ -164,6 +176,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE ), + + // alternate base layout + [BASE_ALTERNATE] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + OSL(ANDROID_STUDIO),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), [KEYNAV] = LAYOUT_ergodox( // left hand @@ -195,7 +233,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, // bottom row - RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RESET,DF(BASE),DF(BASE_ALTERNATE),KC_TRNS,KC_TRNS, // thumb cluster KC_TRNS,KC_TRNS, KC_TRNS, @@ -294,7 +332,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - + // android studio shortcuts + [ANDROID_STUDIO] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, + KC_TRNS, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETAB, AS_CLOSETOOLWINDOW, KC_TRNS, + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), [COMBINED] = LAYOUT_ergodox( From 99a8628383803d25c07d3f170ce5791da2c80a51 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 18 Mar 2019 14:12:09 -0400 Subject: [PATCH 353/445] [Keyboard] CannonKeys Instant60 Keyboard (#5433) * Instant 60 * Instant60 changes again * turn off LSE and features * Working RGB underglow :tada: * Add missing files * Update keymap to have reset * Backlighting on * Backlight code for instant60 * Move 072 files to common folder and use it in Instant60 * Updates * Update keyboards/cannonkeys/instant60/rules.mk Co-Authored-By: awkannan --- .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ .../cannonkeys/instant60/bootloader_defs.h | 7 + keyboards/cannonkeys/instant60/chconf.h | 524 ++++++++++ keyboards/cannonkeys/instant60/config.h | 92 ++ keyboards/cannonkeys/instant60/halconf.h | 354 +++++++ keyboards/cannonkeys/instant60/instant60.c | 1 + keyboards/cannonkeys/instant60/instant60.h | 17 + .../instant60/keymaps/default/keymap.c | 48 + keyboards/cannonkeys/instant60/mcuconf.h | 176 ++++ keyboards/cannonkeys/instant60/readme.md | 12 + keyboards/cannonkeys/instant60/rules.mk | 56 ++ keyboards/cannonkeys/stm32f072/keyboard.c | 120 +++ keyboards/cannonkeys/stm32f072/keyboard.h | 23 + keyboards/cannonkeys/stm32f072/led.c | 252 +++++ keyboards/cannonkeys/stm32f072/led_custom.h | 6 + keyboards/cannonkeys/stm32f072/ws2812.c | 150 +++ keyboards/cannonkeys/stm32f072/ws2812.h | 20 + 20 files changed, 3597 insertions(+) create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/instant60/bootloader_defs.h create mode 100644 keyboards/cannonkeys/instant60/chconf.h create mode 100644 keyboards/cannonkeys/instant60/config.h create mode 100644 keyboards/cannonkeys/instant60/halconf.h create mode 100644 keyboards/cannonkeys/instant60/instant60.c create mode 100644 keyboards/cannonkeys/instant60/instant60.h create mode 100644 keyboards/cannonkeys/instant60/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/instant60/mcuconf.h create mode 100644 keyboards/cannonkeys/instant60/readme.md create mode 100644 keyboards/cannonkeys/instant60/rules.mk create mode 100644 keyboards/cannonkeys/stm32f072/keyboard.c create mode 100644 keyboards/cannonkeys/stm32f072/keyboard.h create mode 100644 keyboards/cannonkeys/stm32f072/led.c create mode 100644 keyboards/cannonkeys/stm32f072/led_custom.h create mode 100644 keyboards/cannonkeys/stm32f072/ws2812.c create mode 100644 keyboards/cannonkeys/stm32f072/ws2812.h diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..9d10fbd754da --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + 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. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/instant60/bootloader_defs.h b/keyboards/cannonkeys/instant60/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/instant60/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/instant60/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h new file mode 100644 index 000000000000..d7554c172f67 --- /dev/null +++ b/keyboards/cannonkeys/instant60/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x1600 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Instant60 +#define DESCRIPTION Instant 60 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B2, B10, B11, A9, A15, B3, B4, B5, B6, B7, B8, B9, C13, C14, C15 } +#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 14 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + +// EEPROM usage +// 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 0x01 +#define EEPROM_VERSION_ADDR 34 + +#define EEPROM_CUSTOM_BACKLIGHT 804 + + + +/* + * 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 diff --git a/keyboards/cannonkeys/instant60/halconf.h b/keyboards/cannonkeys/instant60/halconf.h new file mode 100644 index 000000000000..38743e0904fd --- /dev/null +++ b/keyboards/cannonkeys/instant60/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/instant60/instant60.c b/keyboards/cannonkeys/instant60/instant60.c new file mode 100644 index 000000000000..25b7099b0b1a --- /dev/null +++ b/keyboards/cannonkeys/instant60/instant60.c @@ -0,0 +1 @@ +#include "instant60.h" diff --git a/keyboards/cannonkeys/instant60/instant60.h b/keyboards/cannonkeys/instant60/instant60.h new file mode 100644 index 000000000000..cca1b9a29c2e --- /dev/null +++ b/keyboards/cannonkeys/instant60/instant60.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, KC_NO, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, KC_NO, K4E } \ +} diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c new file mode 100644 index 000000000000..e898a3f3b708 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2012,2013 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 . +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_default( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_default( + KC_GESC, 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, \ + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_GRV, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/mcuconf.h b/keyboards/cannonkeys/instant60/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/cannonkeys/instant60/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + 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. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/instant60/readme.md b/keyboards/cannonkeys/instant60/readme.md new file mode 100644 index 000000000000..9cd91e9516ee --- /dev/null +++ b/keyboards/cannonkeys/instant60/readme.md @@ -0,0 +1,12 @@ +# Instant60 + +Instant60 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/instant60: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/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk new file mode 100644 index 000000000000..cd366c76aa7c --- /dev/null +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -0,0 +1,56 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c new file mode 100644 index 000000000000..4316d5186794 --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -0,0 +1,120 @@ +#include "keyboard.h" +#include "ch.h" +#include "hal.h" +#include "led_custom.h" +#include "util.h" +#include "quantum.h" + +#include "tmk_core/common/eeprom.h" + +#include "ws2812.h" + +backlight_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + + +bool eeprom_is_valid(void) +{ + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) +{ + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) +{ + eeprom_set_valid(false); + eeconfig_disable(); +} + +void save_backlight_config_to_eeprom(){ + eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); +} + +void load_custom_config(){ + kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); +} + +void eeprom_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (eeprom_is_valid()) { + load_custom_config(); + } else { + // Save the magic number last, in case saving was interrupted + eeprom_set_valid(true); + } +} + +void matrix_init_kb(void){ + eeprom_init_kb(); + /* MOSI pin*/ + palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); + wait_ms(500); + +#ifdef RGBLIGHT_ENABLE + leds_init(); +#endif + backlight_init_ports(); +} + +void matrix_scan_kb(void) +{ + #ifdef RGBLIGHT_ENABLE + rgblight_task(); + #endif +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BL_INC: + if (record->event.pressed) { + kb_backlight_config.level = kb_backlight_config.level + 1; + if(kb_backlight_config.level > BACKLIGHT_LEVELS){ + kb_backlight_config.level = BACKLIGHT_LEVELS; + } + backlight_set(kb_backlight_config.level); + save_backlight_config_to_eeprom(); + } + return false; + case BL_TOGG: + if (record->event.pressed) { + kb_backlight_config.enable = !kb_backlight_config.enable; + if(kb_backlight_config.enable){ + backlight_set(kb_backlight_config.level); + } else { + backlight_set(0); + } + save_backlight_config_to_eeprom(); + } + return false; + + case BL_DEC: + if (record->event.pressed) { + if(kb_backlight_config.level <= 1){ + kb_backlight_config.level = 0; + } else { + kb_backlight_config.level = kb_backlight_config.level - 1; + } + backlight_set(kb_backlight_config.level); + save_backlight_config_to_eeprom(); + } + return false; + case BL_BRTG: + if (record->event.pressed) { + kb_backlight_config.breathing = !kb_backlight_config.breathing; + breathing_toggle(); + save_backlight_config_to_eeprom(); + } + return false; + } + return true; +} diff --git a/keyboards/cannonkeys/stm32f072/keyboard.h b/keyboards/cannonkeys/stm32f072/keyboard.h new file mode 100644 index 000000000000..94c973d6153f --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/keyboard.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_config_t; + +// Backlighting +extern backlight_config_t kb_backlight_config; +extern bool kb_backlight_breathing; +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); +void load_custom_config(void); +void save_backlight_config_to_eeprom(void); diff --git a/keyboards/cannonkeys/stm32f072/led.c b/keyboards/cannonkeys/stm32f072/led.c new file mode 100644 index 000000000000..d69d946855ab --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/led.c @@ -0,0 +1,252 @@ +/* +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "keyboard.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// 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; + } +} + + +uint8_t get_backlight_level(void){ + return kb_backlight_config.level; +} + +void backlight_init_ports(void) { + printf("backlight_init_ports()\n"); + palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1)); + pwmStart(&PWMD3, &pwmCFG); + // pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3, 0xFFFF,cie_lightness(0xFFFF))); + if(kb_backlight_config.enable){ + if(kb_backlight_config.breathing){ + breathing_enable(); + } else{ + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } + +} + +void backlight_set(uint8_t level) { + printf("backlight_set(%d)\n", level); + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + printf("duty: (%d)\n", duty); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD3, 0); + } else { + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#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; + +bool is_breathing(void) { + return PWMD3.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD3); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + printf("breathing_disable()\n"); + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(get_backlight_level()); +} + +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()){ + printf("disable breathing\n"); + breathing_disable(); + } else { + printf("enable breathing\n"); + 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] = {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(); +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + 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(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/cannonkeys/stm32f072/led_custom.h b/keyboards/cannonkeys/stm32f072/led_custom.h new file mode 100644 index 000000000000..28e0f02ed34b --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/led_custom.h @@ -0,0 +1,6 @@ +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); +void breathing_toggle(void); diff --git a/keyboards/cannonkeys/stm32f072/ws2812.c b/keyboards/cannonkeys/stm32f072/ws2812.c new file mode 100644 index 000000000000..665763931e31 --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/ws2812.c @@ -0,0 +1,150 @@ +#include "ch.h" +#include "hal.h" + +#include "ws2812.h" + +#define BYTES_FOR_LED_BYTE 4 +#define NB_COLORS 3 +#define BYTES_FOR_LED BYTES_FOR_LED_BYTE*NB_COLORS +#define DATA_SIZE BYTES_FOR_LED*NB_LEDS +#define RESET_SIZE 200 + +// Define the spi your LEDs are plugged to here +#define LEDS_SPI WS2812_SPI +// Define the number of LEDs you wish to control in your LED strip +#define NB_LEDS RGBLED_NUM + +#define LED_SPIRAL 0 + +static uint8_t txbuf[DATA_SIZE + RESET_SIZE]; +static uint8_t get_protocol_eq(uint8_t data, int pos); + +/* + * This lib is meant to be used asynchronously, thus the colors contained in + * the txbuf will be sent in loop, so that the colors are always the ones you + * put in the table (the user thus have less to worry about) + * + * Since the data are sent via DMA, and the call to spiSend is a blocking one, + * the processor ressources are not used to much, if you see your program being + * too slow, simply add a: + * chThdSleepMilliseconds(x); + * after the spiSend, where you increment x untill you are satisfied with your + * program speed, another trick may be to lower this thread priority : your call + */ +static THD_WORKING_AREA(LEDS_THREAD_WA, 128); +static THD_FUNCTION(ledsThread, arg) { + (void) arg; + while(1){ + spiSend(&LEDS_SPI, DATA_SIZE + RESET_SIZE, txbuf); + } +} + +#if LED_SPIRAL +/* + * 'Led spiral' is a simple demo in which we put all the leds to the same + * color, where this color does all the hsv circle in loop. + * If you want to launch the thread that will chage the led colors to the + * appropriate value, simply set LED_SPIRAL to 1. + */ + +static THD_WORKING_AREA(HSVTRANS_WA, 128); +static THD_FUNCTION(hsv_transThread, arg) { + (void) arg; + hsv_color color = {0, 255, 255}; + while(1){ + color.h += 1; + color.h %= 256; + set_leds_color_hsv(color); + chThdSleepMilliseconds(50); + } +} +#endif + +static const SPIConfig spicfg = { + NULL, + GPIOB, + 15, + SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us +}; + +/* + * Function used to initialize the driver. + * + * Starts by shutting off all the LEDs. + * Then gets access on the LED_SPI driver. + * May eventually launch an animation on the LEDs (e.g. a thread setting the + * txbuff values) + */ +void leds_init(void){ + for(int i = 0; i < RESET_SIZE; i++) + txbuf[DATA_SIZE+i] = 0x00; + spiAcquireBus(&LEDS_SPI); /* Acquire ownership of the bus. */ + spiStart(&LEDS_SPI, &spicfg); /* Setup transfer parameters. */ + spiSelect(&LEDS_SPI); /* Slave Select assertion. */ + chThdCreateStatic(LEDS_THREAD_WA, sizeof(LEDS_THREAD_WA),NORMALPRIO, ledsThread, NULL); +#if LED_SPIRAL + chThdCreateStatic(HSVTRANS_WA, sizeof(HSVTRANS_WA), + NORMALPRIO, hsv_transThread, NULL); +#endif +} + +/* + * As the trick here is to use the SPI to send a huge pattern of 0 and 1 to + * the ws2812b protocol, we use this helper function to translate bytes into + * 0s and 1s for the LED (with the appropriate timing). + */ +static uint8_t get_protocol_eq(uint8_t data, int pos){ + uint8_t eq = 0; + if (data & (1 << (2*(3-pos)))) + eq = 0b1110; + else + eq = 0b1000; + if (data & (2 << (2*(3-pos)))) + eq += 0b11100000; + else + eq += 0b10000000; + return eq; +} + +// +///* +// * If you want to set a LED's color in the RGB color space, simply call this +// * function with a hsv_color containing the desired color and the index of the +// * led on the LED strip (starting from 0, the first one being the closest the +// * first plugged to the board) +// * +// * Only set the color of the LEDs through the functions given by this API +// * (unless you really know what you are doing) +// */ +void set_led_color_rgb(LED_TYPE color, int pos){ + for(int j = 0; j < 4; j++) + txbuf[BYTES_FOR_LED*pos + j] = get_protocol_eq(color.g, j); + for(int j = 0; j < 4; j++) + txbuf[BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE+j] = get_protocol_eq(color.r, j); + for(int j = 0; j < 4; j++) + txbuf[BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE*2+j] = get_protocol_eq(color.b, j); +} + + +void WS2812_init(void) { + leds_init(); +} + +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { + uint8_t i = 0; + while (i < number_of_leds) { + set_led_color_rgb(ledarray[i], i); + i++; + } +} + + +void set_leds_color_rgb(LED_TYPE color){ + for(int i = 0; i < NB_LEDS; i++) + set_led_color_rgb(color, i); +} + + +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds) { + +} diff --git a/keyboards/cannonkeys/stm32f072/ws2812.h b/keyboards/cannonkeys/stm32f072/ws2812.h new file mode 100644 index 000000000000..3b61ddcfa9bf --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/ws2812.h @@ -0,0 +1,20 @@ +#pragma once + +#include "hal.h" +#include "rgblight_types.h" + + +void set_leds_color_rgb(LED_TYPE color); +void set_led_color_rgb(LED_TYPE color, int pos); +void leds_init(void); + + + // This is what users will use to interface with this +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); + + +void WS2812_init(void); +void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue ); +void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void WS2812_send_colors(void); From d63f954b25624de5477a707f449beead90182e17 Mon Sep 17 00:00:00 2001 From: Riley Weber Date: Mon, 18 Mar 2019 14:51:24 -0400 Subject: [PATCH 354/445] [Keymap] Add vim-style keymap for lets split (#5399) * initial commit * initial commit * fixed indents * spelling, capitalization, and order. * added dota mode keymap, removed old comments * fixed default keymap always having tilde, instead of grave accent and tilde. Improved dota keymap. * lower does not change backspace to delete anymore * corrected pgup/pgdown * changed period on lower from numpad dot to regular dot * added colemak and dvorak * made colemak/dvorak border keys consistent with querty * updated to match current practices, added custom metakeys for dvorak and colemak * added disclaimer about audio * renamed to lowercase * replaced include guards with #pragma once Co-Authored-By: rileyweber13 * removed unncessary include Co-Authored-By: rileyweber13 * removed defines included in core Co-Authored-By: rileyweber13 * replace defines with an enum, switched from custom function to set_single_persistent_default_layer * removed ifndef/include/endif left over from previous build system * removed unnecessary ifdef block * updated soungs to work with set_single_persistent_default_layer --- .../lets_split/keymaps/vim-mode/config.h | 39 ++++ .../lets_split/keymaps/vim-mode/keymap.c | 196 ++++++++++++++++++ .../lets_split/keymaps/vim-mode/readme.md | 22 ++ .../lets_split/keymaps/vim-mode/rules.mk | 0 4 files changed, 257 insertions(+) create mode 100644 keyboards/lets_split/keymaps/vim-mode/config.h create mode 100644 keyboards/lets_split/keymaps/vim-mode/keymap.c create mode 100644 keyboards/lets_split/keymaps/vim-mode/readme.md create mode 100644 keyboards/lets_split/keymaps/vim-mode/rules.mk diff --git a/keyboards/lets_split/keymaps/vim-mode/config.h b/keyboards/lets_split/keymaps/vim-mode/config.h new file mode 100644 index 000000000000..25512a5c97c1 --- /dev/null +++ b/keyboards/lets_split/keymaps/vim-mode/config.h @@ -0,0 +1,39 @@ +/* +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 . +*/ + +#pragma once + +// comment the following lines if sounds are not desired +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + diff --git a/keyboards/lets_split/keymaps/vim-mode/keymap.c b/keyboards/lets_split/keymaps/vim-mode/keymap.c new file mode 100644 index 000000000000..4b25aa5dc756 --- /dev/null +++ b/keyboards/lets_split/keymaps/vim-mode/keymap.c @@ -0,0 +1,196 @@ +#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 layer_names { + _QWERTY = 0, + _COLEMAK = 1, + _DVORAK = 2, + _LOWER = 3, + _RAISE = 4, + _ADJUST = 16 +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear + +// keys in multiple locations: +// - parenteses in both raise and lower +// - asterix in raise and twice on lower (normal and numpad) +// - minus/plus twice on lower (normal and numpad) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12 ( \ + 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_LCTRL,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 , \ + ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Esc | 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_ESC, 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 , \ + ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_ESC, 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_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 , \ + ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | * | ( | ) | | | 7 | 8 | 9 | * | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | _ | + | { | } | | | 4 | 5 | 6 | - | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | - | = | [ | ] | | | 1 | 2 | 3 | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Alt | | | | 0 | . | Enter| | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_GRAVE,_______, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______, \ + KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINS, KC_BSLS, \ + KC_NLCK, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, KC_1, KC_2, KC_3, KC_PLUS, _______, \ + _______, _______, _______, KC_LALT, _______, _______, _______, _______, KC_0, KC_DOT, KC_ENT, _______ \ +), + +/* Raise: featuring vim-style hjkl arrow keys + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | Left | Down | Up |Right | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | Home | PgDn | PgUp | End | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = 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_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, KC_PIPE, \ + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ + _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| |QWERTY|Colemk|Dvorak| | Prev | Pl/Ps| Next | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mute | VolDn| VolUp| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, QWERTY, COLEMAK, DVORAK, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +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) { + 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/lets_split/keymaps/vim-mode/readme.md b/keyboards/lets_split/keymaps/vim-mode/readme.md new file mode 100644 index 000000000000..9bb6131b1c45 --- /dev/null +++ b/keyboards/lets_split/keymaps/vim-mode/readme.md @@ -0,0 +1,22 @@ +# Vim-mode Keymap + +This layout is designed with the vim philosophy in mind: You should be able to do your work without lifting your hands off the keyboard. Some movement keys (like the arrow keys) have been directly borrowed from vim, and other keys (like the numpad) have been placed in easy-to-reach areas, following the vim philosophy. + +Based on the default keymap. + +## Features: + +* Vim-like `hjkl` arrow keys in raise layer. +* Right-hand numpad in lower layer. +* All brackets and the most frequently used operators are intuitively handled in the lower layer for easy access. +* Ctrl is just to the left of the left-hand pinky. +* The raise layer provides the symbol bar on the first row that you're used to. +* Media keys available in adjust layer (complete) and in the bottom-right corner of the default layer (frequently used). +* The two keys that are traditionally the keys for `space` behave differently. The right-hand key inserts a space. The left-hand key inserts a tab. This is intuitive: Both keys that would normally make up the spacebar are increasing the space, but in different manners. + + +## Some things to look out for: + +* Page up, page down, home, and end have been placed directly under the `hjkl` arrow keys, and each key moves the same direction as the key above it. (for instance, `h` moves left. Home has therefore been placed on `n`). You may ask why this was done instead of placing page down on `f` and page up on `b`. Here's why: + * In short, `f` and `b` are in prime locations for other types of keys, and using those keys for page down and page up would interrupt the space available for other keys. Using vim-style `f` and `b` would require either divide up the list of function keys with unrelated keys, which is unintuitive, or move all the function keys to another later, requiring restructuring that does not lend itself to an intuitive layout. +* Audio is not tested. If it doesn't work, please open an issue. diff --git a/keyboards/lets_split/keymaps/vim-mode/rules.mk b/keyboards/lets_split/keymaps/vim-mode/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 618718e04253b8e528f748e11b140bac5b765dc7 Mon Sep 17 00:00:00 2001 From: Luciano Malavasi Date: Mon, 18 Mar 2019 11:54:59 -0700 Subject: [PATCH 355/445] [Keymap] PyroL's TMO50 layout update (#5435) * keymap + alpha * some fixes * keymap + alpha * some fixes * drashna changes * linked main Alpha repo in keyboards/alpha readme * missed a spot * there's another function called FUNC lol * keymap + alpha * some fixes * keymap + alpha * drashna changes * Fixed include * Revert "Fixed include" This reverts commit ea92f261f86d8433eab313cde498adca1682a006. * messed up my git, fixed include * starting work on TMO50 layout * Update keyboards/tmo50/keymaps/default/keymap.c Co-Authored-By: PyrooL * Updated PyroL's TMO50 keymap * Added task manager/Ctrl Alt Del that i stole from the eco keymap * Clean up task manager and ctrl alt del macros Co-Authored-By: PyrooL --- keyboards/tmo50/keymaps/pyrol/keymap.c | 61 ++++++++++++++++---------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/keyboards/tmo50/keymaps/pyrol/keymap.c b/keyboards/tmo50/keymaps/pyrol/keymap.c index a37370c389de..f67d26092f6a 100644 --- a/keyboards/tmo50/keymaps/pyrol/keymap.c +++ b/keyboards/tmo50/keymaps/pyrol/keymap.c @@ -15,37 +15,54 @@ */ #include QMK_KEYBOARD_H +#define CALTDEL LCA(KC_DEL) +#define TSKMGR C(S(KC_ESC)) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default layer - [0] = LAYOUT( - KC_TRNS, 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_TRNS, 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_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), - KC_TRNS, KC_GESC, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3) + [0] = LAYOUT_all( + KC_VOLU, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_EQL, KC_BSPC, + KC_VOLD, KC_LCTRL, 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_MPLY, 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(3), + KC_MUTE, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(2, KC_SPC), KC_RALT, MO(4) ), // Fn1 layer - [1] = LAYOUT( - KC_VOLU, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC, - KC_VOLD, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, - KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, - KC_MUTE, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [1] = LAYOUT_all( + A(KC_TAB), KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_RBRC, KC_LBRC, KC_DEL, + C(KC_C), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TRNS, + C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - // Fn2 layer - [2] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + //Fn2 layer + [2] = LAYOUT_all( + A(KC_TAB), KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_LBRC, KC_DEL, + C(KC_C), KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, + C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), // Fn3 layer - [3] = LAYOUT( - 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, 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_all( + CALTDEL, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + TSKMGR, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, TO(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -}; + // Fn4 layer + [4] = LAYOUT_all( + RESET, 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_TRNS, + KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + // Game layer! + [5] = LAYOUT_all( + KC_VOLU, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_EQL, KC_BSPC, + KC_VOLD, KC_LCTRL, 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_MPLY, 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(3), + KC_F12, KC_F13, KC_LALT, KC_SPC, LT(2, KC_SPC), KC_RALT, TO(0) + ), +}; From 4f0dc945c32fce91323e5321b6bca70bca4dd1ac Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 18 Mar 2019 14:20:30 -0700 Subject: [PATCH 356/445] [Docs] Add music_map to audio documentation (#5419) * [Docs] Add music_map to audio documentation * Add link to planck as example --- docs/feature_audio.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 38861e8c14df..e1dd4c5a85c1 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -100,6 +100,16 @@ In music mode, the following keycodes work differently, and don't pass through: * `KC_UP` - speed-up playback * `KC_DOWN` - slow-down playback +The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: + + #define PITCH_STANDARD_A 432.0f + +You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: + + #define NO_MUSIC_MODE + +### Music Mask + By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this: #define MUSIC_MASK keycode != KC_NO @@ -120,13 +130,26 @@ For a more advanced way to control which keycodes should still be processed, you Things that return false are not part of the mask, and are always processed. -The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: +### Music Map - #define PITCH_STANDARD_A 432.0f +By default, the Music Mode uses the columns and row to determine the scale for the keys. For a board that uses a rectangular matrix that matches the keyboard layout, this is just fine. However, for boards that use a more complicated matrix (such as the Planck Rev6, or many split keyboards) this would result in a very skewed experience. -You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: +However, the Music Map option allows you to remap the scaling for the music mode, so it fits the layout, and is more natural. - #define NO_MUSIC_MODE +To enable this feature, add `#define MUSIC_MAP` to your `config.h` file, and then you will want to add a `uint8_t music_map` to your keyboard's `c` file, or your `keymap.c`. + +```c +const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12( + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 +); +``` + +You will want to use whichever `LAYOUT` macro that your keyboard uses here. This maps it to the correct key location. Start in the bottom left of the keyboard layout, and move to the right, and then upwards. Fill in all the entries until you have a complete matrix. + +You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) as an example of how to implement this. ## Audio Click From 28e182bc8a2976562e0d76a1332527e0a4be81ea Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 18 Mar 2019 14:21:10 -0700 Subject: [PATCH 357/445] [Keyboard] Reduce compile size of the Lily58 Keyboard (#5412) --- keyboards/lily58/config.h | 10 ++-------- keyboards/lily58/keymaps/default/keymap.c | 6 +++--- keyboards/lily58/rules.mk | 4 +--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index b88ec06bf41f..fb1cdf3962a1 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -24,11 +24,5 @@ along with this program. If not, see . #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 +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 5ff5dc318254..b8dda17d535d 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -21,7 +21,7 @@ extern uint8_t is_master; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _ADJUST 16 +#define _ADJUST 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' - */ + */ [_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, \ @@ -235,4 +235,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index f6b922eeac2f..f2947c81cc0a 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -65,9 +65,7 @@ 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. -SUBPROJECT_rev1 = no -USE_I2C = yes +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 From c534a4c775098f2b6cc8e7f36d35cf642f4323a5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 18 Mar 2019 14:22:02 -0700 Subject: [PATCH 358/445] [Docs] Smallish overhaul of the docs (#5281) * Fix up Common functions doc * Add to extra commands to flashing doc * Rearrange and touch up Macros * Expand Newbs Flashing guide * Update process_record documentation * Add git to best practices name in sidebar * Expand FAQ for build/flashing * Add deprecated info to functions * Update docs/feature_macros.md Co-Authored-By: drashna * Update docs/feature_macros.md Co-Authored-By: drashna * Update docs/flashing.md Co-Authored-By: drashna * Update docs/flashing.md Co-Authored-By: drashna * Update docs/keymap.md Co-Authored-By: drashna * Update docs/newbs_flashing.md Co-Authored-By: drashna * Update docs/newbs_flashing.md Co-Authored-By: drashna * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Update docs/faq_build.md Co-Authored-By: drashna * Update docs/feature_macros.md Co-Authored-By: drashna * Update docs/keymap.md Co-Authored-By: drashna * Fix up Common functions doc * Make pre-init example accurate * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Zadig Driver catchall * Spelling Depriciated * Completely remove fn_actions section --- docs/_summary.md | 2 +- docs/custom_quantum_functions.md | 44 +++++++-------- docs/faq_build.md | 9 ++- docs/feature_macros.md | 97 +++++++++++++++++--------------- docs/flashing.md | 19 +++++++ docs/keymap.md | 56 ------------------ docs/newbs_flashing.md | 69 ++++++++++++++++++++++- docs/understanding_qmk.md | 2 + 8 files changed, 172 insertions(+), 126 deletions(-) diff --git a/docs/_summary.md b/docs/_summary.md index df876b794f06..c9d6c2bb14ec 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -3,7 +3,7 @@ * [Building Your First Firmware](newbs_building_firmware.md) * [Flashing Firmware](newbs_flashing.md) * [Testing and Debugging](newbs_testing_debugging.md) - * [Best Practices](newbs_best_practices.md) + * [Git Best Practices](newbs_best_practices.md) * [Learning Resources](newbs_learn_more_resources.md) * [QMK Basics](README.md) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index f291fc2d2141..655fa1578e57 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -116,29 +116,29 @@ Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macro ```c void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - PORTB |= (1<<0); + writePinLow(B0); } else { - PORTB &= ~(1<<0); + writePinHigh(B0); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - PORTB |= (1<<1); + writePinLow(B1); } else { - PORTB &= ~(1<<1); + writePinHigh(B1); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - PORTB |= (1<<2); + writePinLow(B2); } else { - PORTB &= ~(1<<2); + writePinHigh(B2); } if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { - PORTB |= (1<<3); + writePinLow(B3); } else { - PORTB &= ~(1<<3); + writePinHigh(B3); } if (IS_LED_ON(usb_led, USB_LED_KANA)) { - PORTB |= (1<<4); + writePinLow(B4); } else { - PORTB &= ~(1<<4); + writePinHigh(B4); } } ``` @@ -189,16 +189,18 @@ However, if you have hardware stuff that you need initialized, this is the best ### Example `keyboard_pre_init_user()` Implementation -This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. +This example, at the keyboard level, sets up B0, B1, B2, B3, and B4 as LED pins. ```c void keyboard_pre_init_user(void) { // Call the keyboard pre init code. // Set our LED pins as output - DDRB |= (1<<1); - DDRB |= (1<<2); - DDRB |= (1<<3); + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); + setPinOutput(B3); + setPinOutput(B4); } ``` @@ -270,16 +272,13 @@ This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_ ### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation -This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. ```c -void suspend_power_down_user(void) -{ +void suspend_power_down_user(void) { rgb_matrix_set_suspend_state(true); } -void suspend_wakeup_init_user(void) -{ +void suspend_wakeup_init_user(void) { rgb_matrix_set_suspend_state(false); } ``` @@ -356,11 +355,11 @@ user_config_t user_config; This sets up a 32 bit structure that we can store settings with in memory, and write to the EEPROM. Using this removes the need to define variables, since they're defined in this structure. Remember that `bool` (boolean) values use 1 bit, `uint8_t` uses 8 bits, `uint16_t` uses up 16 bits. You can mix and match, but changing the order can cause issues, as it will change the values that are read and written. -We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `matrix_init_user` and `process_record_user` to configure everything. +We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `keyboard_post_init_user` and `process_record_user` to configure everything. -Now, using the `matrix_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like: +Now, using the `keyboard_post_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like: ``` -void matrix_init_user(void) { +void keyboard_post_init_user(void) { // Call the keymap level matrix init. // Read the user config from EEPROM @@ -447,6 +446,7 @@ And lastly, you want to add the `eeconfig_init_user` function, so that when the ``` void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 0; user_config.rgb_layer_change = true; // We want this enabled by default eeconfig_update_user(user_config.raw); // Write default value to EEPROM now diff --git a/docs/faq_build.md b/docs/faq_build.md index be26a7c581fe..45d9439b48a3 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -15,7 +15,7 @@ or just: $ sudo make ::dfu -Note that running `make` with `sudo` is generally *not* a good idea, and you should use one of the former methods, if possible. +Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible. ### Linux `udev` Rules On Linux, you'll need proper privileges to access the MCU. You can either use @@ -47,7 +47,12 @@ If you're using Windows to flash your keyboard, and you are running into issues, Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. -If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUS(libusb-1.0)` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. +If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works. + +?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here. + +If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question. + ## WINAVR is Obsolete It is no longer recommended and may cause some problem. diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 79419abd20a4..743fc3ad550c 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -146,9 +146,59 @@ send_string(my_str); SEND_STRING(".."SS_TAP(X_END)); ``` -## The Old Way: `MACRO()` & `action_get_macro` -?> This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. +## Advanced Macro Functions + +There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. + +### `record->event.pressed` + +This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is + +```c + if (record->event.pressed) { + // on keydown + } else { + // on keyup + } +``` + +### `register_code();` + +This sends the `` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`. + +### `unregister_code();` + +Parallel to `register_code` function, this sends the `` keyup event to the computer. If you don't use this, the key will be held down until it's sent. + +### `tap_code();` + +This will send `register_code()` and then `unregister_code()`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). + +If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds. + +### `register_code16();`, `unregister_code16();` and `tap_code16();` + +These functions work similar to their regular counterparts, but allow you to use modded keycodes (with Shift, Alt, Control, and/or GUI applied to them). + +Eg, you could use `register_code16(S(KC_5));` instead of registering the mod, then registering the keycode. + +### `clear_keyboard();` + +This will clear all mods and keys currently pressed. + +### `clear_mods();` + +This will clear all mods currently pressed. + +### `clear_keyboard_but_mods();` + +This will clear all keys besides the mods currently pressed. + + +## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro` + +!> This is inherited from TMK, and hasn't been updated - it's recommended that you use `SEND_STRING` and `process_record_user` instead. By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example: @@ -222,49 +272,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; ``` -## Advanced Macro Functions - -There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. - -### `record->event.pressed` - -This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is - -```c - if (record->event.pressed) { - // on keydown - } else { - // on keyup - } -``` - -### `register_code();` - -This sends the `` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`. - -### `unregister_code();` - -Parallel to `register_code` function, this sends the `` keyup event to the computer. If you don't use this, the key will be held down until it's sent. - -### `tap_code();` - -This will send `register_code()` and then `unregister_code()`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). - -If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds. - -### `clear_keyboard();` - -This will clear all mods and keys currently pressed. - -### `clear_mods();` - -This will clear all mods currently pressed. - -### `clear_keyboard_but_mods();` - -This will clear all keys besides the mods currently pressed. -## Advanced Example: Single-Key Copy/Paste +### Advanced Example: Single-Key Copy/Paste This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released. diff --git a/docs/flashing.md b/docs/flashing.md index bc418c415060..cafb43910b7a 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -49,6 +49,15 @@ To generate this bootloader, use the `bootloader` target, eg `make planck/rev4:d To generate a production-ready .hex file (containing the application and the bootloader), use the `production` target, eg `make planck/rev4:default:production`. +### DFU commands + +There are a number of DFU commands that you can use to flash firmware to a DFU device: + +* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared. +* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon. +* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ +* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ + ## Caterina Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina. @@ -84,6 +93,7 @@ or if you want to flash multiple boards, use the following command When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. + ## Halfkay Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0). @@ -131,3 +141,12 @@ Flashing sequence: * You will receive a warning about the DFU signature; Just ignore it 4. Reset the device into application mode (may be done automatically) * If you are building from command line (e.g. `make planck/rev6:default:dfu-util`), make sure that `:leave` is passed to the `DFU_ARGS` variable inside your `rules.mk` (e.g. `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) so that your device resets after flashing + +### STM32 Commands + +There are a number of DFU commands that you can use to flash firmware to a STM32 device: + +* `:dfu-util` - The default command for flashing to STM32 devices. +* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout. + * Eg: `make ::dfu-util TIME_DELAY=5` +* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. diff --git a/docs/keymap.md b/docs/keymap.md index 49e6654a26dc..457dbf67e1cd 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -161,62 +161,6 @@ Some interesting things to note: * We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer. * While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer. -### Custom Functions - -At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them. - -#### `fn_actions[]` - -We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this: - - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() - }; - -In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section. - -> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation. - -You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h). - -#### `action_function()` - -To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`. - - void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mods_pressed) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } - } - # Nitty Gritty Details This should have given you a basic overview for creating your own keymap. For more details see the following resources: diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index 9d2bf920f53a..a985e5d2b2f3 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -131,6 +131,16 @@ If you have any issues with this, you may need to this: sudo make ::dfu +#### DFU commands + +There are a number of DFU commands that you can use to flash firmware to a DFU device: + +* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared. +* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon. +* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ +* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ + + ### Caterina For Arduino boards and their clones (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: @@ -199,6 +209,14 @@ If you have any issues with this, you may need to this: sudo make ::avrdude + +Additionally, if you want to flash multiple boards, use the following command: + + make ::avrdude-loop + +When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. + + ## HalfKay For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: @@ -226,12 +244,61 @@ Waiting for Teensy device... ``` Found HalfKay Bootloader -Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage Programming............................................................................................................................................................................ ................................................... Booting ``` +## STM32 (ARM) + +For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: + + make ::dfu-util + +For example, if your keymap is named "xyverz" and you're building a keymap for the Planck Revision 6 keyboard, you'll use this command and then reboot the keyboard to the bootloader (before it finishes compiling): + + make planck/rev6:xyverz:dfu-util + +Once the firmware finishes compiling, it will output something like this: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` ## Test It Out! diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index bf4b5eadcdde..a94c9c3191e7 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -135,9 +135,11 @@ The `process_record()` function itself is deceptively simple, but hidden within * [`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 velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27) * [`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_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216) * [`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) From 161d469f2c9cf0ddf7aa5907eb2329d6df1ede85 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 18 Mar 2019 14:22:33 -0700 Subject: [PATCH 359/445] [Docs] Recursively clone qmk_firmware repo (#5378) * Recursively clone qmk_firmware repo Specifically, so that it grabs the submodules, since ARM keyboards are becoming more common, and we are seeing more issues about chibiOS not being downloaded (in the error log, rather than by question) * Wrap in shell --- docs/newbs_getting_started.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index aefa1b73850c..ae4b799a9c53 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -66,8 +66,10 @@ You will need to install Git. It's very likely that you already have it, but if Once you have set up your Linux/Unix environment, you are ready to download QMK. We will do this by using Git to "clone" the QMK repository. Open a Terminal or MSYS2 MinGW window and leave it open for the remainder of this guide. Inside that window run these two commands: - git clone https://github.com/qmk/qmk_firmware.git - cd qmk_firmware +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` ?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create and clone your own fork instead. If you don't know what that means, you can safely ignore this message. From afdc67184dd6aedacb321aa1f8fe0d7ceaa438a3 Mon Sep 17 00:00:00 2001 From: Rob Rogers Date: Tue, 19 Mar 2019 01:25:34 -0500 Subject: [PATCH 360/445] correct typo in eeprom split target for dfu (#5445) --- tmk_core/avr.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index bf3e269fdf3c..f6af3f5e2908 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -194,7 +194,7 @@ dfu-split-right: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(QUANTUM_PATH)/split_common/eeprom-righthand.eep;\ else\ $(DFU_PROGRAMMER) $(MCU) erase;\ - $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/eeprom-rightand.eep;\ + $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/eeprom-righthand.eep;\ fi $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex $(DFU_PROGRAMMER) $(MCU) reset From 29bfd634e16e196c86b0a5f63e179af1f9a52902 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 19 Mar 2019 07:37:22 -0700 Subject: [PATCH 361/445] Fix dk60 compiler issue on newer compiler versions (#5444) --- keyboards/dk60/dk60.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 93aeb33b4a3c..8b9dc547d4ea 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c @@ -1,5 +1,15 @@ #include "dk60.h" +extern inline void dk60_caps_led_on(void); +extern inline void dk60_esc_led_on(void); + +extern inline void dk60_caps_led_off(void); +extern inline void dk60_esc_led_off(void); + +extern inline void dk60_led_all_on(void); +extern inline void dk60_led_all_off(void); + + void dk60_blink_all_leds(void) { dk60_led_all_off(); From 0072fdd799ffe61bf64f12c23335da3adeb083e5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 19 Mar 2019 12:57:40 -0700 Subject: [PATCH 362/445] Cleanup Default Keymaps (#5442) * Cleanup Default Keymaps to conform to QMK Firmware standards * Minor fixes * Revert some changes --- .../1up60rgb/keymaps/default/keymap.c | 2 +- .../sweet16/keymaps/default/keymap.c | 2 +- .../ut47/keymaps/default/config.h | 2 - keyboards/amj96/keymaps/default/config.h | 6 +- keyboards/amjpad/keymaps/default/keymap.c | 4 -- .../tiger_lily/keymaps/default/config.h | 7 +-- .../unloved_bastard/keymaps/default/config.h | 7 +-- keyboards/candybar/keymaps/default/keymap.c | 4 +- .../chibios_test/keymaps/default/keymap.c | 2 +- .../christmas_tree/keymaps/default/config.h | 7 +-- .../ckeys/obelus/keymaps/default/config.h | 7 +-- .../ckeys/obelus/keymaps/default/keymap.c | 3 - .../clueboard/2x1800/keymaps/default/config.h | 2 - keyboards/comet46/keymaps/default/config.h | 8 +-- keyboards/contra/keymaps/default/config.h | 8 +-- .../usb_usb/keymaps/default/config.h | 7 +-- keyboards/cospad/keymaps/default/keymap.c | 4 -- keyboards/cu24/keymaps/default/keymap.c | 2 +- keyboards/cu75/keymaps/default/config.h | 7 +-- .../deltasplit75/keymaps/default/config.h | 10 +-- keyboards/dichotomy/keymaps/default/keymap.c | 2 +- keyboards/diverge3/keymaps/default/config.h | 7 +-- keyboards/do60/keymaps/default/keymap.c | 1 - .../ergodash/rev1/keymaps/default/config.h | 7 +-- .../ergodash/rev1/keymaps/default/keymap.c | 2 - .../ergodash/rev2/keymaps/default/config.h | 6 +- .../ergodash/rev2/keymaps/default/keymap.c | 2 - keyboards/ergodone/keymaps/default/keymap.c | 2 - .../ergodox_infinity/keymaps/default/keymap.c | 2 - keyboards/fc660c/keymaps/default/config.h | 7 +-- keyboards/fc980c/keymaps/default/config.h | 6 +- .../fortitude60/keymaps/default/config.h | 7 +-- .../fortitude60/keymaps/default/keymap.c | 1 - .../four_banger/keymaps/default/keymap.c | 2 +- .../hadron/ver2/keymaps/default/keymap.c | 3 - .../4x5/keymaps/default/config.h | 2 - .../4x5/keymaps/default/keymap.c | 5 +- .../frenchdev/keymaps/default/keymap.c | 2 - .../hexon38/keymaps/default/keymap.c | 2 +- .../maartenwut/keymaps/default/keymap.c | 2 +- .../magicforce61/keymaps/default/keymap.c | 2 +- .../minorca/keymaps/default/config.h | 8 +-- .../terminus_mini/keymaps/default/config.h | 9 +-- .../traveller/keymaps/default/keymap.c | 61 +++++++++---------- .../woodpad/keymaps/default/config.h | 7 +-- .../woodpad/keymaps/default/keymap.c | 4 +- keyboards/hecomi/keymaps/default/keymap.c | 1 - keyboards/helix/pico/keymaps/default/config.h | 5 +- keyboards/helix/rev1/keymaps/default/config.h | 7 +-- keyboards/helix/rev2/keymaps/default/config.h | 5 +- keyboards/hid_liber/keymaps/default/keymap.c | 2 +- keyboards/jc65/v32u4/keymaps/default/config.h | 4 +- keyboards/jj50/keymaps/default/keymap.c | 4 +- keyboards/k_type/keymaps/default/keymap.c | 2 +- keyboards/katana60/keymaps/default/config.h | 7 +-- .../kbdfans/kbd66/keymaps/default/config.h | 7 +-- keyboards/kc60se/keymaps/default/config.h | 7 +-- .../keebio/chocopad/keymaps/default/config.h | 7 +-- keyboards/kinesis/keymaps/default/config.h | 7 +-- keyboards/kira75/keymaps/default/config.h | 7 +-- keyboards/kmac/keymaps/default/config.h | 7 +-- keyboards/knops/mini/keymaps/default/config.h | 7 +-- .../kona_classic/keymaps/default/config.h | 7 +-- keyboards/launchpad/keymaps/default/keymap.c | 14 ++--- .../lfk87/keymaps/default/config.h | 7 +-- .../lfkpad/keymaps/default/config.h | 7 +-- .../mini1800/keymaps/default/config.h | 7 +-- .../smk65/keymaps/default/config.h | 7 +-- keyboards/m10a/keymaps/default/keymap.c | 5 +- .../mechmini/v1/keymaps/default/keymap.c | 3 +- keyboards/meira/keymaps/default/config.h | 7 +-- keyboards/meira/keymaps/default/keymap.c | 2 +- keyboards/meishi/keymaps/default/keymap.c | 2 +- keyboards/meme/keymaps/default/config.h | 7 +-- keyboards/miuni32/keymaps/default/config.h | 7 +-- keyboards/mt40/keymaps/default/config.h | 7 +-- keyboards/mt980/keymaps/default/keymap.c | 16 ++--- keyboards/mxss/keymaps/default/config.h | 7 +-- keyboards/org60/keymaps/default/keymap.c | 1 - keyboards/orthodox/keymaps/default/config.h | 8 +-- keyboards/phantom/keymaps/default/config.h | 7 +-- keyboards/preonic/keymaps/default/config.h | 7 +-- .../primekb/prime_r/keymaps/default/config.h | 7 +-- keyboards/ps2avrGB/keymaps/default/keymap.c | 2 +- keyboards/ps2avrGB/ps2avrGB.h | 9 +-- keyboards/rama/m10_b/keymaps/default/config.h | 7 +-- .../scarletbandana/keymaps/default/config.h | 7 +-- .../scrabblepad/keymaps/default/config.h | 7 +-- .../scrabblepad/keymaps/default/keymap.c | 2 +- keyboards/singa/keymaps/default/config.h | 7 +-- keyboards/speedo/keymaps/default/config.h | 7 +-- keyboards/staryu/keymaps/default/keymap.c | 1 - keyboards/subatomic/keymaps/default/config.h | 7 +-- keyboards/subatomic/keymaps/default/keymap.c | 7 +-- keyboards/sx60/keymaps/default/config.h | 4 +- keyboards/tanuki/keymaps/default/keymap.c | 1 - keyboards/telophase/keymaps/default/keymap.c | 5 +- keyboards/tetris/keymaps/default/keymap.c | 1 - keyboards/the_ruler/keymaps/default/config.h | 7 +-- keyboards/the_ruler/keymaps/default/keymap.c | 2 - .../bananasplit/keymaps/default/config.h | 7 +-- .../minivan/keymaps/default/config.h | 7 +-- .../roadkit/keymaps/default/config.h | 7 +-- keyboards/v60_type_r/keymaps/default/config.h | 7 +-- .../vision_division/keymaps/default/config.h | 8 +-- .../vision_division/keymaps/default/keymap.c | 9 +-- keyboards/xd60/keymaps/default/keymap.c | 1 - keyboards/ymd96/keymaps/default/keymap.c | 12 ++-- keyboards/zen/keymaps/default/config.h | 7 +-- 109 files changed, 162 insertions(+), 476 deletions(-) diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c index cb372e15d733..8567b780a75d 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "1up60rgb.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c index 899afaba1742..4cc754dc164d 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "sweet16.h" +#include QMK_KEYBOARD_H enum custom_keycodes { UP_URL = SAFE_RANGE diff --git a/keyboards/40percentclub/ut47/keymaps/default/config.h b/keyboards/40percentclub/ut47/keymaps/default/config.h index f88ebf7e8037..023c753c27a5 100644 --- a/keyboards/40percentclub/ut47/keymaps/default/config.h +++ b/keyboards/40percentclub/ut47/keymaps/default/config.h @@ -16,6 +16,4 @@ #pragma once -#include "config_common.h" - // place overrides here diff --git a/keyboards/amj96/keymaps/default/config.h b/keyboards/amj96/keymaps/default/config.h index 5e346088ed1d..0c01a85594d3 100644 --- a/keyboards/amj96/keymaps/default/config.h +++ b/keyboards/amj96/keymaps/default/config.h @@ -14,11 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" // place overrides here - -#endif diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c index 431537d25848..1c9122c9ec72 100644 --- a/keyboards/amjpad/keymaps/default/keymap.c +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -#ifdef RGBLIGHT_ENABLE -#include "rgblight.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 diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h +++ b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h index c55f7f9f7d27..ed56340c3914 100644 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/candybar/keymaps/default/keymap.c b/keyboards/candybar/keymaps/default/keymap.c index bf589289a3cb..8f4cc08c7467 100644 --- a/keyboards/candybar/keymaps/default/keymap.c +++ b/keyboards/candybar/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "candybar.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FL 1 @@ -35,4 +35,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), -}; \ No newline at end of file +}; diff --git a/keyboards/chibios_test/keymaps/default/keymap.c b/keyboards/chibios_test/keymaps/default/keymap.c index 11616cf55901..0edc697bf9f5 100644 --- a/keyboards/chibios_test/keymaps/default/keymap.c +++ b/keyboards/chibios_test/keymaps/default/keymap.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "chibios_test.h" +#include QMK_KEYBOARD_H const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {{KC_CAPS}}, // test with KC_CAPS, KC_A, RESET diff --git a/keyboards/christmas_tree/keymaps/default/config.h b/keyboards/christmas_tree/keymaps/default/config.h index 4553e621ddfa..271f48d0011b 100644 --- a/keyboards/christmas_tree/keymaps/default/config.h +++ b/keyboards/christmas_tree/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif \ No newline at end of file +// place overrides here diff --git a/keyboards/ckeys/obelus/keymaps/default/config.h b/keyboards/ckeys/obelus/keymaps/default/config.h index 04bf9f4a9d32..271f48d0011b 100644 --- a/keyboards/ckeys/obelus/keymaps/default/config.h +++ b/keyboards/ckeys/obelus/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" -// Add overrides here -#endif +// place overrides here diff --git a/keyboards/ckeys/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c index bdad1cacab17..f71ac562766d 100644 --- a/keyboards/ckeys/obelus/keymaps/default/keymap.c +++ b/keyboards/ckeys/obelus/keymaps/default/keymap.c @@ -1,7 +1,4 @@ #include QMK_KEYBOARD_H -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif extern keymap_config_t keymap_config; diff --git a/keyboards/clueboard/2x1800/keymaps/default/config.h b/keyboards/clueboard/2x1800/keymaps/default/config.h index 152e2f148759..dd48c69e36e2 100644 --- a/keyboards/clueboard/2x1800/keymaps/default/config.h +++ b/keyboards/clueboard/2x1800/keymaps/default/config.h @@ -16,6 +16,4 @@ #pragma once -#include "config_common.h" - // place overrides here diff --git a/keyboards/comet46/keymaps/default/config.h b/keyboards/comet46/keymaps/default/config.h index 7873cf5a72a3..ee02a94b7e1a 100644 --- a/keyboards/comet46/keymaps/default/config.h +++ b/keyboards/comet46/keymaps/default/config.h @@ -18,14 +18,12 @@ 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 +#pragma once + +// place overrides here -// #include "../../config.h" /* Use I2C or Serial */ #define USE_I2C #define SSD1306OLED - -#endif diff --git a/keyboards/contra/keymaps/default/config.h b/keyboards/contra/keymaps/default/config.h index a1635f2bab5f..d61ee2938e96 100644 --- a/keyboards/contra/keymaps/default/config.h +++ b/keyboards/contra/keymaps/default/config.h @@ -1,7 +1,5 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) @@ -25,7 +23,7 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ - + #define MIDI_BASIC /* enable advanced MIDI features: @@ -38,5 +36,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif \ No newline at end of file diff --git a/keyboards/converter/usb_usb/keymaps/default/config.h b/keyboards/converter/usb_usb/keymaps/default/config.h index 7fa3bf328ec9..271f48d0011b 100644 --- a/keyboards/converter/usb_usb/keymaps/default/config.h +++ b/keyboards/converter/usb_usb/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif +// place overrides here diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/cospad/keymaps/default/keymap.c index f782349b07c9..345e96996242 100644 --- a/keyboards/cospad/keymaps/default/keymap.c +++ b/keyboards/cospad/keymaps/default/keymap.c @@ -1,10 +1,6 @@ #include QMK_KEYBOARD_H #include "led.h" -#ifdef RGBLIGHT_ENABLE -#include "rgblight.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 diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c index 73427ee8abac..bbec2907ad16 100644 --- a/keyboards/cu24/keymaps/default/keymap.c +++ b/keyboards/cu24/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "cu24.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_grid( /* Base */ diff --git a/keyboards/cu75/keymaps/default/config.h b/keyboards/cu75/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/cu75/keymaps/default/config.h +++ b/keyboards/cu75/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h index f14678a22308..307531da667a 100644 --- a/keyboards/deltasplit75/keymaps/default/config.h +++ b/keyboards/deltasplit75/keymaps/default/config.h @@ -16,16 +16,10 @@ along with this program. If not, see . */ +#pragma once + #define USE_SERIAL #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - - -#ifdef SUBPROJECT_v2 - #include "../../v2/config.h" -#endif -#ifdef SUBPROJECT_protosplit - #include "../../protosplit/config.h" -#endif diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index 3f034175741b..b8c7ef427450 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // 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 "dichotomy.h" +#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. diff --git a/keyboards/diverge3/keymaps/default/config.h b/keyboards/diverge3/keymaps/default/config.h index 87ce06b3b8d2..fc375f08129f 100644 --- a/keyboards/diverge3/keymaps/default/config.h +++ b/keyboards/diverge3/keymaps/default/config.h @@ -14,14 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here #define MASTER_RIGHT #define PERMISSIVE_HOLD #define TAPPING_TERM 150 - -#endif diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c index 75afb7a34098..f8e4a5e92be6 100644 --- a/keyboards/do60/keymaps/default/keymap.c +++ b/keyboards/do60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergodash/rev1/keymaps/default/config.h b/keyboards/ergodash/rev1/keymaps/default/config.h index 7e7fe4f69a86..dc00328dcb5f 100644 --- a/keyboards/ergodash/rev1/keymaps/default/config.h +++ b/keyboards/ergodash/rev1/keymaps/default/config.h @@ -18,10 +18,9 @@ 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 +#pragma once -#include "../../config.h" +// place overrides here /* Use I2C or Serial, not both */ @@ -34,8 +33,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#endif - #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 24 diff --git a/keyboards/ergodash/rev1/keymaps/default/keymap.c b/keyboards/ergodash/rev1/keymaps/default/keymap.c index 6f20908bc710..a1bfb226785c 100644 --- a/keyboards/ergodash/rev1/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; diff --git a/keyboards/ergodash/rev2/keymaps/default/config.h b/keyboards/ergodash/rev2/keymaps/default/config.h index 7e7fe4f69a86..90a364811edb 100644 --- a/keyboards/ergodash/rev2/keymaps/default/config.h +++ b/keyboards/ergodash/rev2/keymaps/default/config.h @@ -18,10 +18,9 @@ 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 +#pragma once -#include "../../config.h" +// place overrides here /* Use I2C or Serial, not both */ @@ -34,7 +33,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#endif #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergodash/rev2/keymaps/default/keymap.c b/keyboards/ergodash/rev2/keymaps/default/keymap.c index b709ab7e98a4..5412eb0c0cbe 100644 --- a/keyboards/ergodash/rev2/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev2/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c index 92c140f26a84..7f13f3d6729e 100644 --- a/keyboards/ergodone/keymaps/default/keymap.c +++ b/keyboards/ergodone/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" #define BASE 0 // default layer diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c index 92c140f26a84..7f13f3d6729e 100644 --- a/keyboards/ergodox_infinity/keymaps/default/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" #define BASE 0 // default layer diff --git a/keyboards/fc660c/keymaps/default/config.h b/keyboards/fc660c/keymaps/default/config.h index 596198be1048..b89b05009a64 100644 --- a/keyboards/fc660c/keymaps/default/config.h +++ b/keyboards/fc660c/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/fc980c/keymaps/default/config.h b/keyboards/fc980c/keymaps/default/config.h index 596198be1048..20fd511474e8 100644 --- a/keyboards/fc980c/keymaps/default/config.h +++ b/keyboards/fc980c/keymaps/default/config.h @@ -14,11 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" // place overrides here - -#endif diff --git a/keyboards/fortitude60/keymaps/default/config.h b/keyboards/fortitude60/keymaps/default/config.h index 17483734816c..b6c6273d927c 100644 --- a/keyboards/fortitude60/keymaps/default/config.h +++ b/keyboards/fortitude60/keymaps/default/config.h @@ -15,10 +15,7 @@ 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_common.h" +#pragma once #define USE_SERIAL @@ -34,5 +31,3 @@ along with this program. If not, see . /* #define RGBLIGHT_HUE_STEP 8 */ /* #define RGBLIGHT_SAT_STEP 8 */ /* #define RGBLIGHT_VAL_STEP 8 */ - -#endif diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c index 5c3508b3d451..d20ca40fbbad 100644 --- a/keyboards/fortitude60/keymaps/default/keymap.c +++ b/keyboards/fortitude60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "eeconfig.h" extern keymap_config_t keymap_config; diff --git a/keyboards/four_banger/keymaps/default/keymap.c b/keyboards/four_banger/keymaps/default/keymap.c index 3fea0afd4fa3..fc04e0fb1bce 100644 --- a/keyboards/four_banger/keymaps/default/keymap.c +++ b/keyboards/four_banger/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "four_banger.h" +#include QMK_KEYBOARD_H enum custom_keycodes { UP_URL = SAFE_RANGE diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index 9b50abd401d4..9d96abd8db5c 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -1,7 +1,4 @@ #include QMK_KEYBOARD_H -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif #ifdef USE_I2C #include "i2c.h" #endif diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h index 682c7a868b07..6b0ddbfe8e39 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . #pragma once -#include "../../config.h" - /* Use I2C or Serial, not both */ #define USE_SERIAL diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 24c02215ee50..2e5cfd7cedd8 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "dactyl_manuform.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -126,4 +124,3 @@ void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); } - diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index 3d0f1fbfb864..506383a1bbaf 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -394,5 +394,3 @@ void led_set_user(uint8_t usb_led) { } return ; } - - diff --git a/keyboards/handwired/hexon38/keymaps/default/keymap.c b/keyboards/handwired/hexon38/keymaps/default/keymap.c index c3805991f0f0..65dfb4ca04ff 100644 --- a/keyboards/handwired/hexon38/keymaps/default/keymap.c +++ b/keyboards/handwired/hexon38/keymaps/default/keymap.c @@ -1,6 +1,6 @@ // see https://github.com/pepaslabs/hexon38 -#include "hexon38.h" +#include QMK_KEYBOARD_H #define A_ KC_A #define B_ KC_B diff --git a/keyboards/handwired/maartenwut/keymaps/default/keymap.c b/keyboards/handwired/maartenwut/keymaps/default/keymap.c index d318b04233bf..54276d4b20d0 100755 --- a/keyboards/handwired/maartenwut/keymaps/default/keymap.c +++ b/keyboards/handwired/maartenwut/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "maartenwut.h" +#include QMK_KEYBOARD_H #define _MA 0 #define _NU 1 diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c index 9559be5d21b5..9183ba72a238 100644 --- a/keyboards/handwired/magicforce61/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "magicforce61.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h index bf40376c19bf..c19ad7372418 100644 --- a/keyboards/handwired/minorca/keymaps/default/config.h +++ b/keyboards/handwired/minorca/keymaps/default/config.h @@ -1,12 +1,10 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here -#include "../../config.h" /* bootmagic salt key */ #define BOOTMAGIC_KEY_SALT KC_ESC /* skip bootmagic and eeconfig */ #define BOOTMAGIC_KEY_SKIP KC_SPACE - -#endif diff --git a/keyboards/handwired/terminus_mini/keymaps/default/config.h b/keyboards/handwired/terminus_mini/keymaps/default/config.h index 34ef6720746d..4817be252756 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/config.h +++ b/keyboards/handwired/terminus_mini/keymaps/default/config.h @@ -14,13 +14,8 @@ * along with this program. If not, see . */ -#define TAPPING_TERM 150 //reduce time required to register a held key - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here -#endif +#define TAPPING_TERM 150 //reduce time required to register a held key diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index 1b1038fd79fd..44f65f4b8121 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -1,6 +1,5 @@ -#include "traveller.h" +#include QMK_KEYBOARD_H #include "mousekey.h" -#include "action_layer.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. @@ -9,7 +8,7 @@ #define _HI 2 #define _NAV 4 #define _CUR 5 -#define _FKEYS 6 +#define _FKEYS 6 #define _TRNS 8 // We do the same trick for functions @@ -20,7 +19,7 @@ #define MDL 4 #define MDR 5 #define MUR 6 -#define MUL 3 +#define MUL 3 @@ -35,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+ // +------+------+------+------+------+------| * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift | * `------------------------------------------------------------------------------------------' - * + * */ -[_QW] = KEYMAP( +[_QW] = KEYMAP( TG(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, @@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* LOW - numbers, missing or awkward programming keys - Doubled 1 key allows lazy reach with ring finger. + Doubled 1 key allows lazy reach with ring finger. * ,-----------------------------------------. .-----------------------------------------. * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del| * |------+------+------+------+------+------| +------+------+------+------+------+------| @@ -55,18 +54,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+ // +------+------+------+------+------+------| * | Shift| | | | Low | |/ | | Hi | | | |Shift | * `------------------------------------------------------------------------------------------' - * + * */ -[_LW] = KEYMAP( +[_LW] = KEYMAP( TG(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO, KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -/* HI - Punctuation, shell and -url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$ +/* HI - Punctuation, shell and +url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$ Right hand nav keys work pretty well chorded with the Right hand Hi Key * ,-----------------------------------------. .-----------------------------------------. * |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | @@ -77,19 +76,19 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * |------+------+------+------+------+------+ // +------+------+------+------+------+------| * | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right | * `------------------------------------------------------------------------------------------' - * + * */ -[_HI] = KEYMAP( +[_HI] = KEYMAP( TG(_FKEYS),KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, - KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END, - KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT -), + KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT +), /* NAV - mouse & navigation //gui left and right are line home/end, or fore & back in browser -// Mouse buttons are reversed for comfort - bigger stretch is to the right button. +// Mouse buttons are reversed for comfort - bigger stretch is to the right button. * ,-----------------------------------------. .-----------------------------------------. * | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm| @@ -102,7 +101,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * `------------------------------------------------------------------------------------------' */ -[_NAV] = KEYMAP( +[_NAV] = KEYMAP( TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, @@ -111,7 +110,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key /* FKEYS - Funtion keys & mac stuff * ,-----------------------------------------. .-----------------------------------------. - * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl | + * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt | * |------+------+------+------+------+------|------+------+------+------+------+------+------| @@ -120,9 +119,9 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | | * `------------------------------------------------------------------------------------------' * - */ - -[_FKEYS] = KEYMAP( + */ + +[_FKEYS] = KEYMAP( TG(_FKEYS),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, @@ -140,7 +139,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * |------+------+------+------+------+------+ // +------+------+------+------+------+------| * | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT | * `------------------------------------------------------------------------------------------' - * + * */ [_TRNS] = { @@ -226,12 +225,12 @@ void LayerLEDSet(uint8_t layr) { break; case _LW: // deep purple - rgblight_setrgb(20,0,35); - break; + rgblight_setrgb(20,0,35); + break; case _HI: // light blue - rgblight_setrgb(0,20,20); - break; + rgblight_setrgb(0,20,20); + break; case _NAV: // Yellowy orange rgblight_setrgb(25,20,0); // brighter @@ -239,14 +238,14 @@ void LayerLEDSet(uint8_t layr) { case _FKEYS: // RED rgblight_setrgb(20,0,0); // brighter - break; + break; default: rgblight_setrgb(20,2,20);//error break; } - + return; - + } void matrix_init_user(void) { @@ -271,5 +270,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { } - - diff --git a/keyboards/handwired/woodpad/keymaps/default/config.h b/keyboards/handwired/woodpad/keymaps/default/config.h index f52a97bbc865..a72596783dd1 100644 --- a/keyboards/handwired/woodpad/keymaps/default/config.h +++ b/keyboards/handwired/woodpad/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/handwired/woodpad/keymaps/default/keymap.c b/keyboards/handwired/woodpad/keymaps/default/keymap.c index 724230e45033..838c14ead553 100644 --- a/keyboards/handwired/woodpad/keymaps/default/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "woodpad.h" +#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. @@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_ADJUST); } numlock_down = false; - } + } return false; break; case KC_LALT: diff --git a/keyboards/hecomi/keymaps/default/keymap.c b/keyboards/hecomi/keymaps/default/keymap.c index 299d9037a8a8..25bddb7df27e 100644 --- a/keyboards/hecomi/keymaps/default/keymap.c +++ b/keyboards/hecomi/keymaps/default/keymap.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "hecomi.h" // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { diff --git a/keyboards/helix/pico/keymaps/default/config.h b/keyboards/helix/pico/keymaps/default/config.h index 20dfc9f9858c..7653185198bc 100644 --- a/keyboards/helix/pico/keymaps/default/config.h +++ b/keyboards/helix/pico/keymaps/default/config.h @@ -18,8 +18,7 @@ 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 +#pragma once // place overrides here @@ -42,5 +41,3 @@ along with this program. If not, see . //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING #endif - -#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev1/keymaps/default/config.h b/keyboards/helix/rev1/keymaps/default/config.h index d95925d4e45a..0f81f5f7bea3 100644 --- a/keyboards/helix/rev1/keymaps/default/config.h +++ b/keyboards/helix/rev1/keymaps/default/config.h @@ -18,8 +18,9 @@ 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 +#pragma once + +// place overrides here /* Use I2C or Serial, not both */ @@ -31,5 +32,3 @@ along with this program. If not, see . #define MASTER_LEFT // #define _MASTER_RIGHT // #define EE_HANDS - -#endif diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index ed376757942f..b8c1041cdc7b 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -18,8 +18,7 @@ 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 +#pragma once // place overrides here @@ -37,5 +36,3 @@ along with this program. If not, see . //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING #endif - -#endif /* CONFIG_USER_H */ diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c index 67d57d0622b5..8140edc008b0 100755 --- a/keyboards/hid_liber/keymaps/default/keymap.c +++ b/keyboards/hid_liber/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "hid_liber.h" +#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. diff --git a/keyboards/jc65/v32u4/keymaps/default/config.h b/keyboards/jc65/v32u4/keymaps/default/config.h index a5568e400def..271f48d0011b 100644 --- a/keyboards/jc65/v32u4/keymaps/default/config.h +++ b/keyboards/jc65/v32u4/keymaps/default/config.h @@ -1 +1,3 @@ -#include "../../config.h" +#pragma once + +// place overrides here diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c index 9d753eb8e6ea..d5334d4956b9 100644 --- a/keyboards/jj50/keymaps/default/keymap.c +++ b/keyboards/jj50/keymaps/default/keymap.c @@ -18,8 +18,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "rgblight.h" #define ______ KC_TRNS #define _DEFLT 0 @@ -113,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ BL_STEP, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - + /* Fn * ,-----------------------------------------------------------------------------------. * | | | £ | | | | | | | | | | diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index 29d93c107223..331d33155279 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "k_type.h" +#include QMK_KEYBOARD_H const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( diff --git a/keyboards/katana60/keymaps/default/config.h b/keyboards/katana60/keymaps/default/config.h index 08c51f6cb50c..c4bea7eb0318 100644 --- a/keyboards/katana60/keymaps/default/config.h +++ b/keyboards/katana60/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kbdfans/kbd66/keymaps/default/config.h b/keyboards/kbdfans/kbd66/keymaps/default/config.h index c7b3d6ecc333..6d42fc568a1a 100644 --- a/keyboards/kbdfans/kbd66/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd66/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kc60se/keymaps/default/config.h b/keyboards/kc60se/keymaps/default/config.h index 0f756350514c..4496c5910061 100644 --- a/keyboards/kc60se/keymaps/default/config.h +++ b/keyboards/kc60se/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/keebio/chocopad/keymaps/default/config.h b/keyboards/keebio/chocopad/keymaps/default/config.h index 7fa3bf328ec9..271f48d0011b 100644 --- a/keyboards/keebio/chocopad/keymaps/default/config.h +++ b/keyboards/keebio/chocopad/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif +// place overrides here diff --git a/keyboards/kinesis/keymaps/default/config.h b/keyboards/kinesis/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/kinesis/keymaps/default/config.h +++ b/keyboards/kinesis/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kira75/keymaps/default/config.h b/keyboards/kira75/keymaps/default/config.h index 2c852d181991..a3ed4f762a6e 100644 --- a/keyboards/kira75/keymaps/default/config.h +++ b/keyboards/kira75/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kmac/keymaps/default/config.h b/keyboards/kmac/keymaps/default/config.h index a3828f7d5d6e..09b8f1bc73a1 100644 --- a/keyboards/kmac/keymaps/default/config.h +++ b/keyboards/kmac/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/knops/mini/keymaps/default/config.h b/keyboards/knops/mini/keymaps/default/config.h index 999d8876c2b6..6775ba671ef2 100644 --- a/keyboards/knops/mini/keymaps/default/config.h +++ b/keyboards/knops/mini/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kona_classic/keymaps/default/config.h b/keyboards/kona_classic/keymaps/default/config.h index a3828f7d5d6e..09b8f1bc73a1 100644 --- a/keyboards/kona_classic/keymaps/default/config.h +++ b/keyboards/kona_classic/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c index da2ff292a7a0..c793349a5d7b 100644 --- a/keyboards/launchpad/keymaps/default/keymap.c +++ b/keyboards/launchpad/keymaps/default/keymap.c @@ -1,7 +1,5 @@ // Below layout is based upon /u/That-Canadian's planck layout -#include "launchpad.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -21,9 +19,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-------------. - * | 1 | 2 | + * | 1 | 2 | * |------+------| - * | 3 | 4 | + * | 3 | 4 | * |------+------| * | 5 | 6 | * |------+------| @@ -39,9 +37,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function * ,-------------. - * | Q |CALDEL| + * | Q |CALDEL| * |------+------| - * | A |TSKMGR| + * | A |TSKMGR| * |------+------| * | Z | X | * |------+------| @@ -58,5 +56,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_user(void) { - + } diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/config.h b/keyboards/lfkeyboards/lfk87/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/config.h +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/config.h b/keyboards/lfkeyboards/mini1800/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/default/config.h +++ b/keyboards/lfkeyboards/mini1800/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/config.h b/keyboards/lfkeyboards/smk65/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/config.h +++ b/keyboards/lfkeyboards/smk65/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c index 0c2fb62b04b4..232239609986 100644 --- a/keyboards/m10a/keymaps/default/keymap.c +++ b/keyboards/m10a/keymaps/default/keymap.c @@ -1,7 +1,4 @@ - -#include "m10a.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; diff --git a/keyboards/mechmini/v1/keymaps/default/keymap.c b/keyboards/mechmini/v1/keymaps/default/keymap.c index 4a0a4dc0a698..f9e446064a53 100644 --- a/keyboards/mechmini/v1/keymaps/default/keymap.c +++ b/keyboards/mechmini/v1/keymaps/default/keymap.c @@ -13,8 +13,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "mechmini.h" -#include "quantum.h" +#include QMK_KEYBOARD_H #define _BL 0 // base layer #define _FN1 1 // function layer 1 diff --git a/keyboards/meira/keymaps/default/config.h b/keyboards/meira/keymaps/default/config.h index 5f5844a70a18..e3776d2eff17 100644 --- a/keyboards/meira/keymaps/default/config.h +++ b/keyboards/meira/keymaps/default/config.h @@ -14,10 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here // place overrides here #define MUSIC_MASK (keycode != KC_NO) @@ -30,5 +29,3 @@ SONG(DVORAK_SOUND) \ } #endif - -#endif diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index b25d789192a4..5703999a0431 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "meira.h" +#include QMK_KEYBOARD_H #include "lighting.h" #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c index 88f08ee5656a..528beb168b76 100644 --- a/keyboards/meishi/keymaps/default/keymap.c +++ b/keyboards/meishi/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "meishi.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ diff --git a/keyboards/meme/keymaps/default/config.h b/keyboards/meme/keymaps/default/config.h index 2c852d181991..a3ed4f762a6e 100644 --- a/keyboards/meme/keymaps/default/config.h +++ b/keyboards/meme/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/miuni32/keymaps/default/config.h b/keyboards/miuni32/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/miuni32/keymaps/default/config.h +++ b/keyboards/miuni32/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/mt40/keymaps/default/config.h b/keyboards/mt40/keymaps/default/config.h index 9f9a9fc10798..6c3e30ef7b5c 100644 --- a/keyboards/mt40/keymaps/default/config.h +++ b/keyboards/mt40/keymaps/default/config.h @@ -1,5 +1,6 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here #define TAPPING_TERM 200 @@ -7,5 +8,3 @@ #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 15 #define RGBLIGHT_VAL_STEP 18 - -#endif diff --git a/keyboards/mt980/keymaps/default/keymap.c b/keyboards/mt980/keymaps/default/keymap.c index bdd5a93f233a..504233a98319 100644 --- a/keyboards/mt980/keymaps/default/keymap.c +++ b/keyboards/mt980/keymaps/default/keymap.c @@ -1,9 +1,9 @@ -#include "mt980.h" +#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_NO, KC_INS, KC_PSCR, KC_PGUP, KC_PGDN, + 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_NO, KC_INS, KC_PSCR, 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_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_PPLS, @@ -11,11 +11,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), [1] = 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_TRNS, KC_PAUSE, KC_SLCK, KC_HOME, KC_END, - KC_TRNS, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, 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_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_SLCK, KC_HOME, KC_END, + KC_TRNS, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS) }; diff --git a/keyboards/mxss/keymaps/default/config.h b/keyboards/mxss/keymaps/default/config.h index 9f8622579946..bfbdb62297d7 100644 --- a/keyboards/mxss/keymaps/default/config.h +++ b/keyboards/mxss/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c index a15800497742..bf5438657a3c 100644 --- a/keyboards/org60/keymaps/default/keymap.c +++ b/keyboards/org60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h index 3df957b84c5c..ce4538b08a24 100644 --- a/keyboards/orthodox/keymaps/default/config.h +++ b/keyboards/orthodox/keymaps/default/config.h @@ -19,10 +19,7 @@ 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_common.h" +#pragma once /* Use I2C or Serial, not both */ @@ -44,6 +41,3 @@ along with this program. If not, see . SONG(DVORAK_SOUND) \ } #endif - - -#endif diff --git a/keyboards/phantom/keymaps/default/config.h b/keyboards/phantom/keymaps/default/config.h index a3828f7d5d6e..09b8f1bc73a1 100644 --- a/keyboards/phantom/keymaps/default/config.h +++ b/keyboards/phantom/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h index 205351258267..40a9524b469d 100644 --- a/keyboards/preonic/keymaps/default/config.h +++ b/keyboards/preonic/keymaps/default/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PREONIC_SOUND) @@ -38,5 +35,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif \ No newline at end of file diff --git a/keyboards/primekb/prime_r/keymaps/default/config.h b/keyboards/primekb/prime_r/keymaps/default/config.h index e7ffd3aa2013..a70a6b37265e 100644 --- a/keyboards/primekb/prime_r/keymaps/default/config.h +++ b/keyboards/primekb/prime_r/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index 5c52e1d9b687..6b3403ed7c89 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bmini.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index e83861e1f240..bf4998f0c2ef 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -19,13 +19,6 @@ along with this program. If not, see . #define KEYMAP_COMMON_H #include "quantum.h" - -#ifdef KEYBOARD_ps2avrGB_bfake - #include "bfake.h" -#endif - -#ifdef KEYBOARD_ps2avrGB_bmini_x2 - #include "bmini_x2.h" -#endif +#include "bmini.h" #endif diff --git a/keyboards/rama/m10_b/keymaps/default/config.h b/keyboards/rama/m10_b/keymaps/default/config.h index d150575c1a73..2a3bf1819f0d 100644 --- a/keyboards/rama/m10_b/keymaps/default/config.h +++ b/keyboards/rama/m10_b/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/scarletbandana/keymaps/default/config.h b/keyboards/scarletbandana/keymaps/default/config.h index 36f483c11194..8533e6f6d642 100644 --- a/keyboards/scarletbandana/keymaps/default/config.h +++ b/keyboards/scarletbandana/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/scrabblepad/keymaps/default/config.h b/keyboards/scrabblepad/keymaps/default/config.h index 2c852d181991..a3ed4f762a6e 100644 --- a/keyboards/scrabblepad/keymaps/default/config.h +++ b/keyboards/scrabblepad/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/scrabblepad/keymaps/default/keymap.c b/keyboards/scrabblepad/keymaps/default/keymap.c index 8d110dbd5bcb..6f97d87e1ba2 100644 --- a/keyboards/scrabblepad/keymaps/default/keymap.c +++ b/keyboards/scrabblepad/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "scrabblepad.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ diff --git a/keyboards/singa/keymaps/default/config.h b/keyboards/singa/keymaps/default/config.h index 0f756350514c..4496c5910061 100644 --- a/keyboards/singa/keymaps/default/config.h +++ b/keyboards/singa/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/speedo/keymaps/default/config.h b/keyboards/speedo/keymaps/default/config.h index 112836e5e74c..0ab49e8bc480 100644 --- a/keyboards/speedo/keymaps/default/config.h +++ b/keyboards/speedo/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/staryu/keymaps/default/keymap.c b/keyboards/staryu/keymaps/default/keymap.c index 3dc480299f1c..d68eb42872d9 100755 --- a/keyboards/staryu/keymaps/default/keymap.c +++ b/keyboards/staryu/keymaps/default/keymap.c @@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "action_layer.h" enum layers { _LAYER0, diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h index 4c61581993c3..5352ef06c9f2 100644 --- a/keyboards/subatomic/keymaps/default/config.h +++ b/keyboards/subatomic/keymaps/default/config.h @@ -1,7 +1,6 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here /* * MIDI options @@ -25,5 +24,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif \ No newline at end of file diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c index 184df24d56a5..8def46961a15 100644 --- a/keyboards/subatomic/keymaps/default/keymap.c +++ b/keyboards/subatomic/keymaps/default/keymap.c @@ -1,9 +1,4 @@ -#include "subatomic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#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. diff --git a/keyboards/sx60/keymaps/default/config.h b/keyboards/sx60/keymaps/default/config.h index a5568e400def..271f48d0011b 100644 --- a/keyboards/sx60/keymaps/default/config.h +++ b/keyboards/sx60/keymaps/default/config.h @@ -1 +1,3 @@ -#include "../../config.h" +#pragma once + +// place overrides here diff --git a/keyboards/tanuki/keymaps/default/keymap.c b/keyboards/tanuki/keymaps/default/keymap.c index 59f5843ea941..29c9071bfa1a 100644 --- a/keyboards/tanuki/keymaps/default/keymap.c +++ b/keyboards/tanuki/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "rgblight.h" //Layer definitions #define _BL 0 diff --git a/keyboards/telophase/keymaps/default/keymap.c b/keyboards/telophase/keymaps/default/keymap.c index d4afa65f9320..9cc6c1bb00df 100644 --- a/keyboards/telophase/keymaps/default/keymap.c +++ b/keyboards/telophase/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // 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 "telophase.h" +#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. @@ -15,7 +15,7 @@ enum telophase_layers _ADJUST, }; -enum telophase_keycodes +enum telophase_keycodes { LOWER = SAFE_RANGE, RAISE, @@ -97,4 +97,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_scan_user(void) { return; }; - diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c index 6ce856178bf0..0ec12435e78b 100644 --- a/keyboards/tetris/keymaps/default/keymap.c +++ b/keyboards/tetris/keymaps/default/keymap.c @@ -1,7 +1,6 @@ #include QMK_KEYBOARD_H #ifdef AUDIO_ENABLE - #include "audio.h" float tone_caps[][2] = SONG( CAPS_LOCK_ON_SOUND ); float tone_taps[][2] = SONG( E__NOTE( _A6 ) ); #endif diff --git a/keyboards/the_ruler/keymaps/default/config.h b/keyboards/the_ruler/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/the_ruler/keymaps/default/config.h +++ b/keyboards/the_ruler/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c index cb8e8ece8c0d..8b0f44b5edeb 100644 --- a/keyboards/the_ruler/keymaps/default/keymap.c +++ b/keyboards/the_ruler/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h b/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h index 060f5922f2c3..b89b05009a64 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h +++ b/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/config.h b/keyboards/thevankeyboards/minivan/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/config.h b/keyboards/thevankeyboards/roadkit/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/config.h +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/v60_type_r/keymaps/default/config.h b/keyboards/v60_type_r/keymaps/default/config.h index 9561b0255f2c..6f235f6ba843 100644 --- a/keyboards/v60_type_r/keymaps/default/config.h +++ b/keyboards/v60_type_r/keymaps/default/config.h @@ -13,14 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#pragma once -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +// place overrides here -#include "../../config.h" #ifdef V60_POLESTAR #undef V60_POLESTAR #endif - -#endif diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h index efd43f41b4e7..694ab6a6963f 100644 --- a/keyboards/vision_division/keymaps/default/config.h +++ b/keyboards/vision_division/keymaps/default/config.h @@ -1,7 +1,7 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here -#include "../../config.h" #include "matrix_types.h" /* USB Device descriptor parameter */ @@ -77,5 +77,3 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \ ) */ - -#endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index af60a8bd7f6b..18fb7c16d76a 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -1,13 +1,6 @@ -#include "vision_division.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "led.h" -#ifdef AUDIO_ENABLE - #include "audio.h" - #include "song_list.h" -#endif - enum keyboard_layers { LAYER_QWERTY = 0, LAYER_UPPER, diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index 868ca632efb7..b49803fa849c 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c index 9d0a8261dc0b..3d54c7395c0d 100644 --- a/keyboards/ymd96/keymaps/default/keymap.c +++ b/keyboards/ymd96/keymaps/default/keymap.c @@ -16,9 +16,7 @@ You should have received a copy of the GNU General Public LicensezZZ along with this program. If not, see . */ -#include "ymd96.h" -#include "action_layer.h" -#include "rgblight.h" +#include QMK_KEYBOARD_H #define ______ KC_TRNS #define _DEFLT 0 @@ -27,7 +25,7 @@ along with this program. If not, see . #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 |Print | Home | End |Insert|Delete| PgUp | 19 keys * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | PgDn | 18 keys @@ -36,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys */ - + [_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_PSCR, KC_HOME, KC_END, KC_INSERT, KC_DELETE, KC_PGUP, \ 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_PGDN, \ @@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | | | | * | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | | * | | | | | | |MPrev | | | MNext| | | | - */ + */ [_RAISE] = KEYMAP( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -61,4 +59,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, KC_MPRV, ______, ______, KC_MNXT, ______, ______ \ ) -}; \ No newline at end of file +}; diff --git a/keyboards/zen/keymaps/default/config.h b/keyboards/zen/keymaps/default/config.h index 38e4d73f0d84..d813085e46db 100644 --- a/keyboards/zen/keymaps/default/config.h +++ b/keyboards/zen/keymaps/default/config.h @@ -15,10 +15,9 @@ 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 +#pragma once -#include "config_common.h" +// place overrides here /* Use I2C or Serial, not both */ @@ -37,5 +36,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif From 6a4884e3bdc157a00718eb157f72489c1adf30e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 19 Mar 2019 22:33:44 +0100 Subject: [PATCH 363/445] [Keyboard] Remove unnecessary IS_COMMAND definitions from a couple of boards (#5269) * Remove unnecessary IS_COMMAND definition from clueboard/66_hotswap/gen1 * Remove old-style IS_COMMAND definition comment from dozen0 * Use get_mods() instead of keyboard_report->mods in georgi --- keyboards/clueboard/66_hotswap/gen1/config.h | 5 ----- keyboards/dozen0/config.h | 5 ----- keyboards/georgi/config.h | 4 ++-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index 6b0cfb60b53c..795adecd56e0 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -80,11 +80,6 @@ */ //#define FORCE_NKRO -/* 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. diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h index 3c409350d553..6b0f8525a3d1 100644 --- a/keyboards/dozen0/config.h +++ b/keyboards/dozen0/config.h @@ -112,11 +112,6 @@ along with this program. If not, see . * */ -/* 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 diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h index 041567719bbf..b35762fbcfc7 100644 --- a/keyboards/georgi/config.h +++ b/keyboards/georgi/config.h @@ -66,8 +66,8 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) #define DEBOUNCE 5 From 4b4eba997fd70cf6faf263384f8559c90f6d8529 Mon Sep 17 00:00:00 2001 From: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Tue, 19 Mar 2019 17:34:18 -0400 Subject: [PATCH 364/445] [Keymap] Boy_314's Halfnhalf layout update (#5441) * added Boy_.314's layout for halfnhalf keyboard * reset rules.mk to default * update keymap with qwerty layout, and enable tap dancing * fixed formatting in layout visualization * added rules.mk to custom layout * added mod tap for ctrl/capslock * fixed typo in config.h, remove excess in rules.mk, revert half_n_half rules.mk * added Boy_.314's layout for halfnhalf keyboard * reset rules.mk to default * update keymap with qwerty layout, and enable tap dancing * fixed typo in config.h, remove excess in rules.mk, revert half_n_half rules.mk * added macros to raise layer * fixed mismatched layout/comments * fixed layout switching --- .../half_n_half/keymaps/Boy_314/config.h | 2 +- .../half_n_half/keymaps/Boy_314/keymap.c | 132 +++++++++++------- 2 files changed, 83 insertions(+), 51 deletions(-) diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h index ae39290bcf20..f73fd055cc27 100644 --- a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h @@ -19,4 +19,4 @@ // place overrides here #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD -#define TAPPING_TERM 200 \ No newline at end of file +#define TAPPING_TERM 200 diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c index fa12e7ee0cd4..2eef3dc48b86 100644 --- a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c @@ -21,10 +21,17 @@ enum { }; enum layers { - DVORAK, - QWERTY, - LOWER, - RAISE + _DVORAK, + _QWERTY, + _LOWER, + _RAISE, +}; + +enum halfnhalf_keycodes { + NEWTAB = SAFE_RANGE, + ALTF4, + CLSTAB, + PRVWIN, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -36,78 +43,78 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |LShift|; |Q |J |K |X |LAlt |- |B |M |W |V |Z |RShift| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |TD Swap Layer| |Space | - * `-------------' `-------------' + * |TD Swap Layer| |Space | + * `-------------' `-------------' */ - [DVORAK] = LAYOUT(/* Base Dvorak */ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, - LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, - KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, - TD(TD_SWAP_LAYERS), KC_SPC + [_DVORAK] = LAYOUT(/* Base Dvorak */ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC ), - + /* QWERTY * ,-------------------------------------------------------------------------------------------------. * |Tab |Q |W |E |R |T |Brght+|' |Y |U |I |O |P |Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |LCtrl |A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter | + * |CtlCps|A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |LShift|Z |X |C |V |B |LAlt |- |N |M |, |. |/ |RShift| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |TD Swap Layer| |Space | - * `-------------' `-------------' + * |TD Swap Layer| |Space | + * `-------------' `-------------' */ - [QWERTY] = LAYOUT(/* Base Qwerty */ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, 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_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - TD(TD_SWAP_LAYERS), KC_SPC + [_QWERTY] = LAYOUT(/* Base Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC ), - + /* LOWER * ,-------------------------------------------------------------------------------------------------. - * |Esc |1 |2 |3 |4 |5 | |= |6 |7 |8 |9 |0 |/ | + * |Esc |1 |2 |3 |4 |5 | | |6 |7 |8 |9 |0 |/ | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |Caps |F1 |F2 |F3 |F4 |F5 |F6 |Vol Up|Play |_ |+ |{ |} || | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | |F7 |F8 |F9 |F10 |F11 |F12 |Vol Dn|Next |Home |PgDn |PgUp |End | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | + * | | | | * `-------------' `-------------' */ - [LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + [_LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MNXT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, - KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS ), - + /* RAISE * ,-------------------------------------------------------------------------------------------------. - * |Reset | | |Up | | | | | | | | | |Del | + * |Reset | | |Up | | | |PRVWIN|CLSTAB| | | | |Del | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |` | |Left |Down |Right | | | | |- |= |[ |] |\ | + * |` | |Left |Down |Right | | |NEWTAB|ALTF4 |- |= |[ |] |\ | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | |! |@ |# |$ |% | | |^ |& |* |( |) | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | + * | | | | * `-------------' `-------------' */ - [RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Reset Key */ - RESET, 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_DEL, - KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, - KC_TRNS, KC_TRNS + [_RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Macros */ + RESET, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, PRVWIN, CLSTAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, NEWTAB, ALTF4, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_TRNS ) }; void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) { switch (state->count) { case 1: - layer_on(LOWER); + layer_on(_LOWER); break; case 2: - layer_on(RAISE); + layer_on(_RAISE); break; } } @@ -115,27 +122,52 @@ void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) { void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) { switch (state->count) { case 1: - layer_off(LOWER); + layer_off(_LOWER); break; case 2: - layer_off(RAISE); + layer_off(_RAISE); break; case 3: - if (default_layer_state == DVORAK) { - default_layer_set(QWERTY); - layer_on(QWERTY); - layer_off(DVORAK); + if (biton32(default_layer_state) == _DVORAK) { + set_single_persistent_default_layer(_QWERTY); } - else if (default_layer_state == QWERTY) { - default_layer_set(DVORAK); - layer_on(DVORAK); - layer_off(QWERTY); + else if (biton32(default_layer_state) == _QWERTY) { + set_single_persistent_default_layer(_DVORAK); } break; } } qk_tap_dance_action_t tap_dance_actions[] = { - // ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn) [TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset) -}; \ No newline at end of file +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Control + T + case NEWTAB: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("t")); + } + break; + // Alt + F4 + case ALTF4: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_F4)SS_UP(X_LALT)); + } + break; + // Control + W + case CLSTAB: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("w")); + } + break; + // Control + Shift + N + case PRVWIN: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_LSFT("n"))); + } + break; + } + return true; +} From 6e7eff47b374fe4fdb550c5554b6438ec626a5f7 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 19 Mar 2019 22:45:33 -0400 Subject: [PATCH 365/445] [Keymap] Keymap and readme updates (#5449) * Remove tap dance code from keymap.c * Add tap dance code to userspace files * Readme updates * Update keymap images --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 11 ---- keyboards/hs60/v2/keymaps/stanrc85/readme.md | 2 +- .../community/60_ansi/stanrc85-ansi/keymap.c | 11 ---- .../community/60_ansi/stanrc85-ansi/readme.md | 50 ++++++++++++++++--- users/stanrc85/stanrc85.c | 5 ++ users/stanrc85/stanrc85.h | 6 +++ 6 files changed, 54 insertions(+), 31 deletions(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index 276adfe297ca..fed21b7deb6f 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -16,17 +16,6 @@ #include QMK_KEYBOARD_H #include "stanrc85.h" -//Tap Dance Declarations -enum { - TD_WIN = 0, - TD_ESC -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( TD_TESC, 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, diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/keymaps/stanrc85/readme.md index 4e978e771091..430d363f3762 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/readme.md +++ b/keyboards/hs60/v2/keymaps/stanrc85/readme.md @@ -42,7 +42,7 @@ along with this program. If not, see .--> - Layer 3 is Backlight control and RESET - `Fn2+CAPS` used to toggle Default QWERTY layer on and off -![RGB and RESET Layer](https://imgur.com/1ScpRE4.png) +![RGB and RESET Layer](https://imgur.com/mMHoJPa.png) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`. diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index 00d6f5ede498..7c095faa3bba 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -16,17 +16,6 @@ #include QMK_KEYBOARD_H #include "stanrc85.h" -//Tap Dance Declarations -enum { - TD_WIN = 0, - TD_ESC -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( TD_TESC, 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, diff --git a/layouts/community/60_ansi/stanrc85-ansi/readme.md b/layouts/community/60_ansi/stanrc85-ansi/readme.md index 2df5588af7fb..6b5b3ca9ff21 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/readme.md +++ b/layouts/community/60_ansi/stanrc85-ansi/readme.md @@ -1,14 +1,48 @@ -# Stanrc85's Standard ANSI 60% Layout + + +# Stanrc85's Standard ANSI 60% Layout ## Keymap Notes -- Layer 0 is custom ANSI layout with SpaceFN, CTRL/ESC on CAPS, Tap Dance on Fn1 key for CTRL+ALT+DEL and WIN+L -- Layer 1 is default ANSI (enable with Fn2+D) -- Layer 2 is F keys, arrows, volume controls and custom shortcuts for AHK -- Layer 3 is RGB Underglow control and RESET +- Layer 0 is default QWERTY layout with additional custom features: + - SpaceFN to function layer 2 on `Space` + - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` + - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` + - Tap Dance on `ESC` for `ESC` and ` ` ` + +![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) + +- Layer 1 is default QWERTY with no custom features used mostly for gaming + - Enabled by `Fn2+CAPS` from base layer + +![Default ANSI Layer](https://imgur.com/M7T9PNT.png) + +- Layer 2 is Function layer: + - F keys + - Arrows + - Volume and Media controls + - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script + - AHK Mic is used to mute/unmute microphone + - AHK Speaker switches audio output between headphones and speakers + +![Function Layer](https://imgur.com/YPl0JrU.png) + +- Layer 3 is RGB control and RESET + - `Fn2+CAPS` used to toggle Default QWERTY layer on and off + +![RGB and RESET Layer](https://imgur.com/8K7gSgh.png) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index bddc14d7e2d8..e8fc5c1dfdd8 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -5,6 +5,11 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) +}; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index 1d9602a05e5a..c0a0e87662ed 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -13,6 +13,12 @@ enum custom_keycodes { NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes }; +//Tap Dance Declarations +enum { + TD_WIN = 0, + TD_ESC +}; + //Aliases for longer keycodes #define KC_CAD LALT(LCTL(KC_DEL)) #define KC_LOCK LGUI(KC_L) From 8b859872dad82137a060ffca3d36b2323b7c241c Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Tue, 19 Mar 2019 23:46:54 -0300 Subject: [PATCH 366/445] [Keymap] Jotix (#5448) * jotix layout adjustments * jotix layout readme --- layouts/community/ortho_4x12/jotix/keymap.c | 77 ++++---------------- layouts/community/ortho_4x12/jotix/readme.md | 4 +- 2 files changed, 17 insertions(+), 64 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 2c622cb959f7..5bfca58c341c 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -13,16 +13,10 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _FUNCTION 3 -#define _ADJUST 4 - -enum custom_keycodes { - BACKLIT = SAFE_RANGE -}; +#define _ADJUST 3 #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define FUNCT LT(_FUNCTION, KC_TAB) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -30,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | func | A | S | D | F | G | H | J | K | L | ; | del | + * | tab | A | S | D | F | G | H | J | K | L | ; | ' | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ @@ -39,71 +33,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_ortho_4x12 ( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - FUNCT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL, + 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, KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | vol- | mute | vol+ | | | | | | | | | + * | | - | = | [ | ] | \ | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | prev | play | next | | | | CapsLk | | | | | + * | | vol- | mute | vol+ | | | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | | | | | | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_LOWER] = LAYOUT_ortho_4x12 ( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + 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_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Raise * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | \ | ` | - | = | [ | ] | ' | + * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | ~ | _ | + | { | } | " | + * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | | | | | | | | home | pgdn | pgun | end | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_RAISE] = LAYOUT_ortho_4x12 ( - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, _______, _______, _______, _______, KC_BSLS, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, - _______, _______, _______, _______, _______, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO, + 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_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), -/* - * Function - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F1 | F2 | F3 | F4 | | | P7 | P8 | P9 | P- | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F5 | F6 | F7 | F8 | | | P4 | P5 | P6 | P+ | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F9 | F10 | F11 | F12 | | NumLck | P1 | P2 | P3 | P/ | Penter | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | P0 | Pdot | P* | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - */ -[_FUNCTION] = LAYOUT_ortho_4x12 ( - _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, - _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PENT, - _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PAST, XXXXXXX -), - /* Adjust */ [_ADJUST] = LAYOUT_ortho_4x12 ( - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, BACKLIT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; @@ -115,23 +90,3 @@ uint32_t layer_state_set_user(uint32_t state) { void matrix_init_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - - default: - return true; - - } -} diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md index 608944801d21..0cff74d1ff7d 100644 --- a/layouts/community/ortho_4x12/jotix/readme.md +++ b/layouts/community/ortho_4x12/jotix/readme.md @@ -1,8 +1,6 @@ # Jotix ortho 4x12 keymap -![keymap](https://i.imgur.com/7hGJJPs.jpg) - -Tab is 'Func' on hold. +![keymap](https://i.imgur.com/fsyz4E5.jpg) Tested on: From 6eb5a25a6ad47d92c185e07e030b8ff4c8190b0c Mon Sep 17 00:00:00 2001 From: Jason Won Date: Tue, 19 Mar 2019 22:51:08 -0400 Subject: [PATCH 367/445] [Keyboard] add quantum matrix calls to zen matrix calls (#5450) --- keyboards/zen/matrix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/zen/matrix.c b/keyboards/zen/matrix.c index 6e274d3bac06..34655237b55b 100644 --- a/keyboards/zen/matrix.c +++ b/keyboards/zen/matrix.c @@ -133,7 +133,7 @@ void matrix_init(void) matrix_debouncing[i] = 0; } - + matrix_init_quantum(); } uint8_t _matrix_scan(void) @@ -264,6 +264,7 @@ uint8_t matrix_scan(void) TXLED0; error_count = 0; } + matrix_scan_quantum(); return ret; } From ab294813919d9df803946d990a6a1d783ab69f0a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 21 Mar 2019 01:43:20 +1100 Subject: [PATCH 368/445] Fix link to Caterina bootloader hex files (#5452) --- docs/flashing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/flashing.md b/docs/flashing.md index cafb43910b7a..3b4582f0057e 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -60,7 +60,7 @@ There are a number of DFU commands that you can use to flash firmware to a DFU d ## Caterina -Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina. +Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina. To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`: From cd696ed3d13542b09d34e8d78bb19ed6e7eee568 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Thu, 21 Mar 2019 00:43:36 +1000 Subject: [PATCH 369/445] Fix i2c splits with >8 columns (#5454) --- quantum/split_common/transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 3696a2abaa74..631d913f70ef 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -1,3 +1,4 @@ +#include #include "config.h" #include "matrix.h" @@ -59,9 +60,8 @@ bool transport_master(matrix_row_t matrix[]) { } void transport_slave(matrix_row_t matrix[]) { - for (int i = 0; i < ROWS_PER_HAND * sizeof(matrix_row_t); ++i) { - i2c_slave_reg[I2C_KEYMAP_START + i] = matrix[i]; - } + // Copy matrix to I2C buffer + memcpy((void*)(i2c_slave_reg + I2C_KEYMAP_START), (void *)matrix, ROWS_PER_HAND * sizeof(matrix_row_t) ); // Read Backlight Info # ifdef BACKLIGHT_ENABLE From 066465fa6fdf3013a7fac11305d20bb2846fd630 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Wed, 20 Mar 2019 14:38:39 -0300 Subject: [PATCH 370/445] [Keymap] jotix layouts adjustments (#5453) --- .../handwired/jot50/keymaps/default/keymap.c | 12 ++---- keyboards/handwired/jot50/readme.md | 2 +- .../jotanck/keymaps/default/keymap.c | 39 ++++--------------- keyboards/handwired/jotanck/readme.md | 2 +- layouts/community/ortho_4x12/jotix/keymap.c | 4 +- layouts/community/ortho_4x12/jotix/readme.md | 2 +- 6 files changed, 17 insertions(+), 44 deletions(-) diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c index 84fa9eea4b73..4ec535c31df5 100644 --- a/keyboards/handwired/jot50/keymaps/default/keymap.c +++ b/keyboards/handwired/jot50/keymaps/default/keymap.c @@ -15,10 +15,6 @@ extern keymap_config_t keymap_config; #define _RAISE 2 #define _ADJUST 3 -enum planck_keycodes { - BACKLIT = SAFE_RANGE -}; - #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) @@ -26,9 +22,9 @@ enum planck_keycodes { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | caps | F11 | F12 | | | | | - | = | [ | ] | | + * | caps | F11 | F12 | | | | | - | = | [ | ] | \ | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | vol- | mute | vol+ | | | | | | | | \ | + * | | vol- | mute | vol+ | | | | _ | + | { | } | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | prev | play | next | | | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ @@ -37,8 +33,8 @@ enum planck_keycodes { */ #define _FUNCT LAYOUT_ortho_5x12 (\ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\ - KC_CAPS, KC_F11, KC_F12, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,\ - _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_BSLS,\ + KC_CAPS, KC_F11, KC_F12, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\ + _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,\ _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ ) diff --git a/keyboards/handwired/jot50/readme.md b/keyboards/handwired/jot50/readme.md index fea08b82dcbd..2dcbc297107a 100644 --- a/keyboards/handwired/jot50/readme.md +++ b/keyboards/handwired/jot50/readme.md @@ -32,6 +32,6 @@ Make example for this keyboard (after setting up your build environment): ### The Defaukt Keymap -![Default Keymap](https://i.imgur.com/4WTmcSN.jpg) +![Default Keymap](https://i.imgur.com/g85V8K6.png) 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/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 77c144890bee..2e9f4a39f2a4 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -15,10 +15,6 @@ extern keymap_config_t keymap_config; #define _RAISE 2 #define _ADJUST 3 -enum planck_keycodes { - BACKLIT = SAFE_RANGE -}; - #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) @@ -32,21 +28,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * |backlit | lctrl | lgui | lalt | lower | space | space | raise | left | down | up | right | + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( 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_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ @@ -55,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -78,12 +74,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), +/* Adjust */ [_ADJUST] = LAYOUT_ortho_4x12 ( - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), }; uint32_t layer_state_set_user(uint32_t state) { @@ -93,23 +90,3 @@ uint32_t layer_state_set_user(uint32_t state) { void matrix_init_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - - default: - return true; - - } -} diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md index e06cce8cf116..28bbab86bdfd 100644 --- a/keyboards/handwired/jotanck/readme.md +++ b/keyboards/handwired/jotanck/readme.md @@ -33,6 +33,6 @@ Make example for this keyboard (after setting up your build environment): ### The Defaukt Keymap -![Default Keymap](https://i.imgur.com/Fh7g1AQ.jpg) +![Default Keymap](https://i.imgur.com/xh7Dmd7.png) 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/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 5bfca58c341c..02fc79ec7fd2 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -69,8 +69,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = 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_DEL, - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO, + KC_CAPS, 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md index 0cff74d1ff7d..11af9ed1ee8b 100644 --- a/layouts/community/ortho_4x12/jotix/readme.md +++ b/layouts/community/ortho_4x12/jotix/readme.md @@ -1,6 +1,6 @@ # Jotix ortho 4x12 keymap -![keymap](https://i.imgur.com/fsyz4E5.jpg) +![keymap](https://i.imgur.com/1NxoqW6.png) Tested on: From 995b31a565e88b29e1f6a4493e7ab8b3d7951f99 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:39:57 -0700 Subject: [PATCH 371/445] [Keyboard] HB85 Refactor/Layout Addition (#5451) * introduce stt layout with K(row)(col) * set bootmagic to lite * Rename the original LAYOUT to LAYOUT_all Introduce the STT layout In additional the whole matrix was changed to support the K(row)(col) notation. * rename LAYOUT to LAYOUT_all * add QMK Configurator support * stt keymap based on mrpetrov's default configuration on the hb85 he lent me * update readme * introduce basic and aop layouts along with QMK Configurator support for them * add a new line * add EEP_RST to layer 1 as it is needed to get rgb underglow to work * add documentation on how to reset the eeprom on the board * put contributors names where appropriate --- keyboards/gray_studio/hb85/hb85.c | 3 +- keyboards/gray_studio/hb85/hb85.h | 100 +++++++++++++----- keyboards/gray_studio/hb85/info.json | 24 +++++ .../gray_studio/hb85/keymaps/default/keymap.c | 6 +- .../gray_studio/hb85/keymaps/stt/keymap.c | 38 +++++++ keyboards/gray_studio/hb85/readme.md | 72 ++++++------- keyboards/gray_studio/hb85/rules.mk | 4 +- 7 files changed, 175 insertions(+), 72 deletions(-) create mode 100644 keyboards/gray_studio/hb85/info.json create mode 100644 keyboards/gray_studio/hb85/keymaps/stt/keymap.c diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c index 1bc0222379a4..620a1817aa40 100644 --- a/keyboards/gray_studio/hb85/hb85.c +++ b/keyboards/gray_studio/hb85/hb85.c @@ -1,5 +1,6 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2017 Luiz Ribeiro , + 2019 fcoury 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/gray_studio/hb85/hb85.h b/keyboards/gray_studio/hb85/hb85.h index a505705b4727..48808105f438 100644 --- a/keyboards/gray_studio/hb85/hb85.h +++ b/keyboards/gray_studio/hb85/hb85.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2019 fcoury , 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 @@ -19,30 +19,82 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT( \ - K12, K11, K10, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K13, \ - K28, K27, K26, K25, K24, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K77, K76, K75, \ - K43, K42, K41, K40, K39, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K74, K73, \ - K57, K56, K55, K54, K53, K44, K45, K46, K47, K48, K49, K50, K51, K52, K88, K87, \ - K72, K71, K70, K69, K68, K58, K59, K60, K61, K62, K63, K66, K64, K65, K67, K90, K89, \ - K86, K85, K78, K79, K80, K81, K82, K83, K84, K91 \ +// Generic layout enabling splits, and all positions available in STT, Basic, and AOP. + +#define LAYOUT_all( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4D, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K48, K46, K47, K49, K78, K77, \ + K6D, K6C, K61, K64, K65, K66, K67, K68, K69, K79 \ ) \ { \ - { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , KC_NO, K13 }, \ - { K14 , K15 , K16 , K17 , K18 , K19 , K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 }, \ - { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , K42 , K43 }, \ - { K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , KC_NO, K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 , K68 , K69 , K70 , K71 , K72 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K73 , K74 , K75 , K76 , K77 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, K78 , KC_NO, KC_NO, K79 , K80 , K81 , K82 , K83 , K84 , KC_NO, KC_NO, K85 , K86 , KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87 , K88 , K89 , K90 , K91 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, 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, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ } -// F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F2 F1 ESC FN -// 5 6 7 8 9 0 - = BS BS 4 3 2 1 ~ -// T Y U I O P [ ] | PAD7 R E W Q Tab -// G H J K L ; ' ENTR PAD4 F D S A CAPS -// V B N M , . RSFT UP / PAD1 C X Z EUR2 LSFT -// PAD9 PAD8 PAD- PAD* PAD/ -// SPC RALT RCTL LEFT DOWN RGHT PAD0 LALT LGUI -// PAD6 PAD5 PAD3 PAD2 PAD. +// Layout with blocker + +#define LAYOUT_stt( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K78, K77, \ + K6D, K6C, K61, K64, K65, K67, K68, K69, K79 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, 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, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, KC_NO, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_basic( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K49, K77, \ + K6D, K6C, K61, K64, K65 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, 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, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_aop( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K78, K77, \ + K6D, K6C, K61, K64, K65, K66, K67, K68, K69, K79 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, 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, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/gray_studio/hb85/info.json b/keyboards/gray_studio/hb85/info.json new file mode 100644 index 000000000000..3c7ac9c43cc1 --- /dev/null +++ b/keyboards/gray_studio/hb85/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "Gray Studio HB85", + "url": "", + "maintainer": "qmk", + "width": 18, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}] + }, + + "LAYOUT_stt": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.25}, {"x":11.25, "y":5.25, "w":1.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}] + }, + + "LAYOUT_basic": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":2.75}, {"x":15, "y":4.25, "w":2}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.25}, {"x":11.25, "y":5.25, "w":1.25}] + }, + + "LAYOUT_aop": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/gray_studio/hb85/keymaps/default/keymap.c b/keyboards/gray_studio/hb85/keymaps/default/keymap.c index f2409ea137e3..be89cbbf6a81 100644 --- a/keyboards/gray_studio/hb85/keymaps/default/keymap.c +++ b/keyboards/gray_studio/hb85/keymaps/default/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2019 Felipe Coury 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 @@ -26,7 +26,7 @@ enum layers { #define KC_TGCT MO(_CTRL) // Toggles CTRL layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( + [_BASE] = 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_TGCT, \ 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_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 , \ @@ -35,7 +35,7 @@ KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M , KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT \ ), - [_CTRL] = LAYOUT( + [_CTRL] = LAYOUT_all( RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/gray_studio/hb85/keymaps/stt/keymap.c b/keyboards/gray_studio/hb85/keymaps/stt/keymap.c new file mode 100644 index 000000000000..5665e2f0e1f4 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/stt/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2019 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_stt( + 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, MO(1), \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 \ + ), + + [1] = LAYOUT_stt( + RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, BL_INC, BL_DEC, BL_BRTG, 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_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), +}; diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md index 4e93607df3b9..90b4e958c59d 100644 --- a/keyboards/gray_studio/hb85/readme.md +++ b/keyboards/gray_studio/hb85/readme.md @@ -2,59 +2,47 @@ ![Gray Studio HB85](https://i.imgur.com/Sk3cupR.jpg) -A HitBit MSX Computer inspired Keyboard. +A Sony HitBit MSX Computer inspired Keyboard. Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) Hardware Supported: Gray Studio HB85 -Hardware Availability: Group buy finished +Hardware Availability: [Group buy](https://en.zfrontier.com/products/gray-hb85) finished Make example for this keyboard (after setting up your build environment): - make hb85:default + make gray_studio/hb85:default -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. +Flashing +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. -ps2avrGB keyboard firmware -========================== +**Reset Key:** To put the HB85 into reset, hold F3 (`K00`) while plugging in. -This keyboard uses the port of the QMK firmware for boards that are based on the -ps2avrGB firmware. +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. -Note that this is a complete replacement for the firmware, so you won't be -using Bootmapper Client to change any keyboard settings, since not all the -USB report options are supported. +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + pip3 install pyusb + brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb -## Installing +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -First, install the requirements. These commands are for OSX, but all you -need is the AVR toolchain and `bootloadHID` for flashing: +**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work. -``` -$ brew cask install crosspack-avr -$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb -$ pip install pyusb -``` - -Then, with the keyboard plugged in, simply run this command from the -`qmk_firmware` directory: - -``` -$ make hb85 -$ bootloadHID -r hb85_default.hex -``` - -## Setting the board to bootloader mode - -Hold the F3 key while plugging the USB cable. - -## 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. +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/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk index f9061057660e..682b9cbac561 100644 --- a/keyboards/gray_studio/hb85/rules.mk +++ b/keyboards/gray_studio/hb85/rules.mk @@ -1,4 +1,4 @@ -# Copyright 2017 Luiz Ribeiro +# Copyright 2019 fcoury # # 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 @@ -31,7 +31,7 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes From 0786f227d8563be3c9a31c0c4153a1b1cebcfc69 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 20 Mar 2019 13:26:50 -0700 Subject: [PATCH 372/445] [Keyboard] Refactor MF68 default keymap to use LAYOUT_68_ansi macro (#5455) --- .../mf68/keymaps/default/keymap.c | 62 ++++++------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/keyboards/40percentclub/mf68/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/default/keymap.c index ae7e7297cb89..c91b9b908aba 100644 --- a/keyboards/40percentclub/mf68/keymaps/default/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/default/keymap.c @@ -3,51 +3,29 @@ #define _QWERTY 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS -#define KC_X0 LT(_FN2, KC_GRV) -#define KC_X1 MO(_FN1) -#define KC_X2 BL_STEP + +#define FN2_GRV LT(_FN2, KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, - /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ - TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, - /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ - X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , - /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ - LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , - /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ - LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT - /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + [_QWERTY] = LAYOUT_68_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, 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_PGDN, + FN2_GRV, 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, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - - [_FN1] = LAYOUT_kc( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , , , , , , X2 , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , , , , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , ,MUTE, , , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN1] = LAYOUT_68_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_BSPC, KC_VOLU, KC_HOME, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT ), - - [_FN2] = LAYOUT_kc( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , 0 , 1 , 2 , 3 , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN2] = LAYOUT_68_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_BSPC, KC_VOLU, KC_HOME, + _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT ) }; From d5fd8c4f1cf79de17528f7f40948640fa8bb8d7a Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Wed, 20 Mar 2019 19:48:44 -0300 Subject: [PATCH 373/445] Uses K(row)(col) standard for TGR Alice matrix (#5457) --- keyboards/alice/alice.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h index 16460ed701cf..1486612f9f17 100644 --- a/keyboards/alice/alice.h +++ b/keyboards/alice/alice.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2019 Felipe Coury 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 @@ -21,30 +21,30 @@ along with this program. If not, see . /* LAYOUT * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐ - * │63 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │10 │11 │12 │13 │14 │ + * │50 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │0A │0B │0C │0D │0E │ * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │64 │ │15 │16 │17 │18 │19 │20 │ │21 │22 │23 │24 │25 │26 │27 │28 │ + * │51 │ │10 │11 │12 │13 │14 │15 │ │16 │17 │18 │19 │1A │1B │1C │1D │ * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │65 │ │29 │30 │31 │32 │33 │34 │ │35 │36 │37 │38 │39 │40 │41 │ + * │52 │ │20 │21 │22 │23 │24 │25 │ │26 │27 │28 │29 │2A │2B │2C │ * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │42 │43 │44 │45 │46 │47 │ │48 │49 │50 │51 │52 │53 │54 │55 │ + * │30 │31 │32 │33 │34 │35 │ │36 │37 │38 │39 │4A │4B │4C │4D │ * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ - * │56 │ │57 │58 │59 │ │60 │61 │ │62 │ + * │40 │ │41 │42 │43 │ │46 │47 │ │48 │ * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ */ #define LAYOUT( \ - K63, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K64, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K65, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \ - K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K62 \ + K50, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K51, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K52, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K4A, K4B, K4C, K4D, \ + K40, K41, K42, K43, K46, K47, K48 \ ) \ { \ - { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , K13 , K14 }, \ - { K15 , K16 , K17 , K18 , K19 , K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 , KC_NO }, \ - { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , KC_NO, KC_NO }, \ - { K42 , K43 , K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , K52 , K53 , K54 , K55 , KC_NO }, \ - { K56 , K57 , K58 , K59 , KC_NO, KC_NO, K60 , K61 , K62 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K63 , K64 , K65 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { 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 , KC_NO }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 , K29 , K2A , K2B , K2C , KC_NO, KC_NO }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K4A , K4B , K4C , K4D , KC_NO }, \ + { K40 , K41 , K42 , K43 , KC_NO, KC_NO, K46 , K47 , K48 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K50 , K51 , K52 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ } From f7fd7f67bd1286a42326a6832627ef328252db0c Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu, 21 Mar 2019 08:55:24 +0900 Subject: [PATCH 374/445] rgblight.c: add remap feature (#5243) * rgblight.c: add RGBLIGHT_LED_MAP support * add code to keyboards/helix/rev2/keymaps/five_rows/config.h to test rgblight.c:RGBLIGHT_LED_MAP * Test end. Revert "add code to keyboards/helix/rev2/keymaps/five_rows/config.h to test rgblight.c:RGBLIGHT_LED_MAP" This reverts commit e7488d6f7338460b533d7d19a09deccb011000bf. * update docs/feature_rgblight.md * led_map[] move to PROGMEM --- docs/feature_rgblight.md | 47 ++++++++++++++++++++++++++++++++++++++++ quantum/rgblight.c | 18 +++++++++++++-- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 23b6f1c941db..800e5973899a 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -188,6 +188,53 @@ If you need to change your RGB lighting in code, for example in a macro to chang Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list! +## Changing the order of the LEDs + +If you want to make the logical order of LEDs different from the electrical connection order, you can do this by defining the `RGBLIGHT_LED_MAP` macro in your `config.h`. + +By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED with addressing in reverse order of the electrical connection order. + +```c +// config.h + +#define RGBLED_NUM 10 +#define RGBLIGHT_LED_MAP { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 } + +``` + +For keyboards that use the RGB LEDs as a backlight for each key, you can also define it as in the example below. + +```c +// config.h + +#define RGBLED_NUM 30 + +/* RGB LED Conversion macro from physical array to electric array */ +#define LED_LAYOUT( \ + 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 ) \ + { \ + L05, L04, L03, L02, L01, L00, \ + L10, L11, L12, L13, L14, L15, \ + L25, L24, L23, L22, L21, L20, \ + L30, L31, L32, L33, L34, L35, \ + L46, L45, L44, L43, L42, L41 \ + } + +/* RGB LED logical order map */ +/* Top->Bottom, Right->Left */ +#define RGBLIGHT_LED_MAP LED_LAYOUT( \ + 25, 20, 15, 10, 5, 0, \ + 26, 21, 16, 11, 6, 1, \ + 27, 22, 17, 12, 7, 2, \ + 28, 23, 18, 13, 8, 3, \ + 29, 24, 19, 14, 9, 4 ) + +``` + ## Hardware Modification If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins. diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 119ca1b9eeeb..3042ff11ea90 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -51,6 +51,10 @@ static inline int is_static_effect(uint8_t mode) { #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) +#ifdef RGBLIGHT_LED_MAP +const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP; +#endif + #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT __attribute__ ((weak)) const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; @@ -665,10 +669,20 @@ void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val) { #ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { if (rgblight_config.enable) { + LED_TYPE *ledp; + #ifdef RGBLIGHT_LED_MAP + LED_TYPE led0[RGBLED_NUM]; + for(uint8_t i = 0; i < RGBLED_NUM; i++) { + led0[i] = led[pgm_read_byte(&led_map[i])]; + } + ledp = led0; + #else + ledp = led; + #endif #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); + ws2812_setleds_rgbw(ledp, RGBLED_NUM); #else - ws2812_setleds(led, RGBLED_NUM); + ws2812_setleds(ledp, RGBLED_NUM); #endif } else { for (uint8_t i = 0; i < RGBLED_NUM; i++) { From 7e37daab6e9074cec7aa711f9dd5cab0a2c4773d Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 20 Mar 2019 17:09:00 -0700 Subject: [PATCH 375/445] Update keyboards/kbdfans/kbd67/readme.md Co-Authored-By: Hackerpilot --- keyboards/kbdfans/kbd67/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index eae4539ecd64..6d5f774e6a76 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -2,7 +2,8 @@ A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts. Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. -The rev1 PCB for the KBD76 is sold under the name "KBD65" + +The rev1 PCB for the KBD67 is sold under the name "KBD65." Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: KBD67 From 6e4edbd15700a54409cb86f3cc2b34e174138b46 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Daisuke Date: Thu, 21 Mar 2019 22:05:50 +0900 Subject: [PATCH 376/445] Keymap: Add Koba's keymap for KBD67. (#5460) --- .../kbdfans/kbd67/rev1/keymaps/koba/config.h | 17 ++++++ .../kbdfans/kbd67/rev1/keymaps/koba/keymap.c | 61 +++++++++++++++++++ .../kbdfans/kbd67/rev1/keymaps/koba/readme.md | 7 +++ 3 files changed, 85 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h new file mode 100644 index 000000000000..f4d7de06e5aa --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c new file mode 100644 index 000000000000..b00805e9e793 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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" + +#define RGB_RMO RGB_RMOD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp| + * |------------------------------------------------------. |----| + * |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig | + * `------------------------------------------------' `------------' + */ +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \ + KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \ + 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_PSCR, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins | + * |----------------------------------------------------------------| + * | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | | + * |------------------------------------------------------. |----| + * |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | | + * |----------------------------------------------------------------| + * | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| | + * |----------------------------------------------------------------| + * | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End | + * `------------------------------------------------' `------------' + */ +[1] = LAYOUT_all( + 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, XXXXXXX,_______,KC_INS, \ + _______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \ + KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \ + _______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \ + _______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END), +}; diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md new file mode 100644 index 000000000000..b432436d405f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md @@ -0,0 +1,7 @@ +# Koba's keymap for KBD67 + +![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png) + +- JIS layout. +- Fn layer is arranged like HHKB. +- 3 splitted space bar. (Space-Fn-Space) From dfe02441bb96c17357a0471b8dde74b51d3081d3 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 21 Mar 2019 06:06:27 -0700 Subject: [PATCH 377/445] handwired/magicforce61 Refactor (#5459) * handwired/magicforce61: refactor Renamed layout macro KEYMAP to LAYOUT. Keymap now uses #include QMK_KEYBOARD_H. Refactored the default keymap to use non-auto-prepended keycodes per QMK standard. Deleted deprecated action_get_macro block (was unused). * handwired/magicforce61: Configurator support * handwired/magicforce61: readme cleanup Restructured the readme to be more similar to current QMK template. * handwired/magicforce61: replace missing image in readme Replaced the missing wiring image (error 404) with a table. * handwired/magicforce61: rename readme to lowercase * Convert config.h to #pragma once include guard --- keyboards/handwired/magicforce61/README.md | 24 ----- keyboards/handwired/magicforce61/config.h | 7 +- keyboards/handwired/magicforce61/info.json | 74 +++++++++++++++ .../magicforce61/keymaps/default/keymap.c | 91 ++++++++----------- .../handwired/magicforce61/magicforce61.h | 17 ++-- keyboards/handwired/magicforce61/readme.md | 31 +++++++ 6 files changed, 152 insertions(+), 92 deletions(-) delete mode 100644 keyboards/handwired/magicforce61/README.md create mode 100644 keyboards/handwired/magicforce61/info.json create mode 100644 keyboards/handwired/magicforce61/readme.md diff --git a/keyboards/handwired/magicforce61/README.md b/keyboards/handwired/magicforce61/README.md deleted file mode 100644 index cc86732627c8..000000000000 --- a/keyboards/handwired/magicforce61/README.md +++ /dev/null @@ -1,24 +0,0 @@ -Magicforce "61" Handwired -======================= - -Basically I cut 7 keys off the magicforce68 and handwired everything to a -teensy++ 2.0 to make it a ~60% board. - -## Wiring Layout - -![Wiring Layout](https://imgur.com/gallery/RxYyA) - -## Pinout - -The following pins are used: - - ``` - #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } - #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } - ``` - -## Compiling and loading the firmware - -To build the firmware, run `make handwired/magicforce61`. - -Flash the firmware using the teensy loader or avrdude. diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h index c6c689ab6c5d..3dc74f83e7dd 100644 --- a/keyboards/handwired/magicforce61/config.h +++ b/keyboards/handwired/magicforce61/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -43,7 +42,7 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } -#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ @@ -152,5 +151,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/magicforce61/info.json b/keyboards/handwired/magicforce61/info.json new file mode 100644 index 000000000000..22ffccd3cedd --- /dev/null +++ b/keyboards/handwired/magicforce61/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "Magicforce \"61\"", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"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, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c index 9183ba72a238..12252c978ab1 100644 --- a/keyboards/handwired/magicforce61/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c @@ -3,67 +3,52 @@ #define _QWERTY 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS + #define KC_X0 LT(_FN2, KC_GRV) #define KC_X1 MO(_FN1) -#define KC_NAV_ESC LT(_FN1, KC_ESC) +#define NAV_ESC LT(_FN1, KC_ESC) #define KC_GUI MAGIC_UNNO_GUI const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , - /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| */ - TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , - /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| */ - NAV_ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , - /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| */ - LSPO , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSPC , - /*|---------`----`----`----`----`----`----`----`----`----`----`-------------. */ - LCTL , RGUI ,LALT , SPACE , X1 ,RALT ,RCTL , X1 - /*`-----+-----+-----+------------------------------+------+-----+-----' ANY */ + [_QWERTY] = LAYOUT( + /*,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. */ + 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, \ + /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */ + 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, \ + /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */ + NAV_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, \ + /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */ + KC_LCTL, KC_RGUI, KC_LALT, KC_SPC, KC_X1, KC_RALT, KC_RCTL, KC_X1 \ + /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */ ), - [_FN1] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */ - , , UP , , , , , ,INS ,PSCR, , , , , - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */ - ,LEFT,DOWN,RGHT, , , , PGDN , PGUP , , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */ - , , , , , ,VOLD,VOLU,MUTE, , , , - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */ - , , , , , , , MPLY - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */ + [_FN1] = 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_F12, KC_BSPC, \ + /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */ + _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, _______, _______, _______, _______, \ + /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, \ + /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, \ + /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */ + _______, _______, _______, _______, _______, _______, _______, KC_MPLY \ + /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */ ), - [_FN2] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */ - , , , , , , , 7 , 8 , 9 , , , , , - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */ - , , , , , , , 4 , 5 , 6 , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */ - , , , , , , 0 , 1 , 2 , 3 , , , - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */ - , , , , , , , - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */ + [_FN2] = 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_F12, KC_BSPC, \ + /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, \ + /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ + /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */ + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, \ + /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */ + _______, _______, _______, _______, _______, _______, _______, _______ \ + /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/magicforce61/magicforce61.h b/keyboards/handwired/magicforce61/magicforce61.h index 784f2b2c8023..37a32ed7839c 100644 --- a/keyboards/handwired/magicforce61/magicforce61.h +++ b/keyboards/handwired/magicforce61/magicforce61.h @@ -1,20 +1,17 @@ -#ifndef MAGICFORCE61_H -#define MAGICFORCE61_H +#pragma once #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \ K40, K41, K42, K45, K49, K4A, K4C, K4D \ ) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_NO, KC_##K3D }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_NO, KC_##K4C, KC_##K4D }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \ } - -#endif diff --git a/keyboards/handwired/magicforce61/readme.md b/keyboards/handwired/magicforce61/readme.md new file mode 100644 index 000000000000..081992aa8412 --- /dev/null +++ b/keyboards/handwired/magicforce61/readme.md @@ -0,0 +1,31 @@ +# Magicforce "61" Handwired + +Basically I cut 7 keys off the magicforce68 and handwired everything to a teensy++ 2.0 to make it a ~60% board. + +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: magicforce61, teensy++ 2.0 + +Make example for this keyboard (after setting up your build environment): + + make handwired/magicforce61:default + +Flash the firmware using the teensy loader or 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). + +## Wiring Layout / Pinout + +| | B5 | B4 | B3 | B2 | B1 | B0 | E7 | E6 | F0 | F1 | F2 | F3 | F4 | F5 | +| -----: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | +| **D0** | Esc | 1! | 2@ | 3# | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | -_ | =+ | Bspc | +| **D1** | Tab | Q | W | E | R | T | Y | U | I | O | P | [{ | ]} | \\\| | +| **D2** | Caps | A | S | D | F | G | H | J | K | L | ;: | '" | | Ent | +| **D3** | LSft | Z | X | C | V | B | N | M | , | . | / | | | RSft | +| **D4** | LCtl | LGUI | LAlt | | | Spc | | | | RAlt | RGUI | | App | RCtl | + +The following pins are used: + +``` +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } +``` From f8d5b9f204f97651314b63df6dd33f75788d7ebe Mon Sep 17 00:00:00 2001 From: moonfall Date: Thu, 21 Mar 2019 20:14:40 -0700 Subject: [PATCH 378/445] [Keymap] iris: moonfall: Initial checking of layout. (#5462) Layout is similar to Kinesis/Ergodox. --- .../keebio/iris/keymaps/moonfall/config.h | 36 ++++++ .../keebio/iris/keymaps/moonfall/keymap.c | 114 ++++++++++++++++++ .../keebio/iris/keymaps/moonfall/rules.mk | 2 + 3 files changed, 152 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/moonfall/config.h create mode 100644 keyboards/keebio/iris/keymaps/moonfall/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/moonfall/rules.mk diff --git a/keyboards/keebio/iris/keymaps/moonfall/config.h b/keyboards/keebio/iris/keymaps/moonfall/config.h new file mode 100644 index 000000000000..7986b504162a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/moonfall/config.h @@ -0,0 +1,36 @@ +/* +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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/moonfall/keymap.c b/keyboards/keebio/iris/keymaps/moonfall/keymap.c new file mode 100644 index 000000000000..0b6cde45e8b3 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/moonfall/keymap.c @@ -0,0 +1,114 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RAISE, 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_DEL, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + LOWER, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_LCTL + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_EQL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, KC_UP, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_TILD, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_UP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, KC_GRV, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_GRV, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_END, KC_PGDN, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_EQL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, KC_UP, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_TILD, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_UP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, KC_GRV, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_GRV, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_END, KC_PGDN, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +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 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/keebio/iris/keymaps/moonfall/rules.mk b/keyboards/keebio/iris/keymaps/moonfall/rules.mk new file mode 100644 index 000000000000..db925dd2b6d2 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/moonfall/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no From 1dda671e4ab44b978cf4fa78fd39c5d647b5ab86 Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Fri, 22 Mar 2019 18:26:21 -0700 Subject: [PATCH 379/445] ISP Flashing Guide - atmega32a info (#4993) * update isp flashing page * update isp flashing page --- docs/isp_flashing_guide.md | 5 + util/bootloader_atmega32a_1_0_0.hex | 154 ++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 util/bootloader_atmega32a_1_0_0.hex diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index 18f2147846b9..0f786c5141bf 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -63,6 +63,7 @@ If you just want to get things back to normal, you can flash only a bootloader f * [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2 * [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1 +* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40 If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board. @@ -113,6 +114,10 @@ Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i +If your board uses an `atmega32a` (e.g. on a jj40), the command is this (the extra code at the end sets the fuses correctly): + + avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m + You should see a couple of progress bars, then you should see: avrdude: verifying ... diff --git a/util/bootloader_atmega32a_1_0_0.hex b/util/bootloader_atmega32a_1_0_0.hex new file mode 100644 index 000000000000..b35a310d55ad --- /dev/null +++ b/util/bootloader_atmega32a_1_0_0.hex @@ -0,0 +1,154 @@ +:107000000C9468380C94A0380C9485380C9485380E +:107010000C9485380C9485380C9485380C948538FC +:107020000C9485380C9485380C9485380C948538EC +:107030000C9485380C9485380C9485380C948538DC +:107040000C9485380C9485380C9485380C948538CC +:107050000C9485380403090412036F006200640075 +:10706000650076002E00610074001003480049009E +:10707000440042006F006F00740012011001000014 +:107080000008C016DF05000101020001090222000C +:107090000101008032090400000103000000092101 +:1070A00001010001222100070581030800C8060034 +:1070B000FF0901A101150026FF007508850195064D +:1070C0000900B20201850295830900B20201C000E5 +:1070D00011241FBECFE5D8E0DEBFCDBF10E0A0E693 +:1070E000B0E0ECE6F9E702C005900D92AA36B107D0 +:1070F000D9F710E0AAE6B0E001C01D92A43AB107AA +:10710000E1F70E94173C0C94B43C0C940038A82F73 +:10711000B92F80E090E041E050EA609530E009C08E +:107120002D9182279795879510F084279527305EBB +:10713000C8F36F5FA8F30895EADF8D939D930895D8 +:10714000CF93CFB7CF93C395839BE9F7839B09C0B8 +:10715000839B07C0839B05C0839B03C0839B01C0A7 +:10716000A3C0DF93C0918700DD27C257DF4F839B09 +:1071700002C0DF91EBCF2F930F931F9300B32FEF3C +:1071800003FB20F94F933F9310B34FEF012703FB0D +:1071900021F93BE031C04E7F012F10B3216028C0A0 +:1071A000102F4D7F2260000000B329C04B7F246068 +:1071B000012F000010B32BC010B3477F28602AC0F6 +:1071C0004F7E00B320612CC04F7D10B320622FC0D2 +:1071D0004F7B00B3206432C0422700B349934FEF86 +:1071E0000000102713FB20F910B31C70C9F1297F90 +:1071F00091F2012703FB21F900B3237F89F231507B +:1072000058F1102713FB22F910B3277E79F20127DA +:1072100003FB23F92F7C81F200B3102713FB24F921 +:107220002F7971F200C010B3012703FB25F92F73EA +:1072300059F200C000B3102713FB26F9223040F2A8 +:1072400000C010B3012703FB27F9243028F64F773D +:10725000206810B30000F9CF10E41ABF002719C04E +:107260003B503195C31BD04010E41ABF0881033C4A +:10727000F9F00B34E9F0209185001981110F1213F8 +:10728000EDCF4A81441F093641F10D3211F0013E24 +:1072900029F700938C003F914F911F910F912F91EF +:1072A000DF91CAB7C6FD4FCFCF91CFBFCF91189511 +:1072B00020918C00222379F310918A00112321F56B +:1072C000343022F130938A00209386001091870099 +:1072D0003BE0311B3093870019C000918A000130D8 +:1072E0009CF40AE54F7081F43091600034FD10C0C9 +:1072F00000936000C9E7D0E00FC02795A8F4515073 +:10730000A9F4220F0000F9CF4AE503C042ED01C005 +:10731000432FC4E1D0E032E011B31C60939A11BB5B +:1073200002B320E41CE05F93012756E002BB2795DF +:1073300020F4515021F4220FF9CF012756E000002C +:107340003B5A02BBD0F2279528F4515029F4220F62 +:107350000000F9CF012756E0279502BB20F45150D9 +:1073600021F4220FF9CF012756E02991332302BBE4 +:1073700021F6037F10918B00110FC651D04002BB44 +:1073800011F01093850010E41ABF086011B3137F49 +:10739000402F437F5F9100C000C002BB11BB42BBC6 +:1073A0007ACF80916D00882309F445C088EB9BE07B +:1073B0000197F1F780916A008F5F80936A00909146 +:1073C00061008917B1F510926A0080916B008230DC +:1073D000C1F0833028F4882341F0813041F50CC09E +:1073E0008330B9F0843019F519C082B38C7A82BB2E +:1073F00081E080936B0017C082B3836582BB82E01B +:1074000004C082B38C7A82BB83E080936B008FE7E9 +:107410000BC082B3836582BB84E0F7CF82B38C7AE2 +:1074200082BB10926B008FEF8093610002C01092BC +:107430006B0081E0089529B3237040916E000DC068 +:1074400089B330E090E0837090702817390711F00D +:1074500040E001C04F5F29B32370463088F320938A +:10746000720040936E00233018F481E080936D0029 +:1074700080916D00089585B7826085BF8BB7806469 +:107480008BBF0895F89481E180935700E8951BBE67 +:1074900015BE81E08BBF1BBE8B9AE0917700F09107 +:1074A0007800099521E020936C00FC0181818930EE +:1074B00069F48281823029F420937500209384003E +:1074C00003C082E0809384008FEF0895813011F033 +:1074D00080E0089582E690E0909389008093880090 +:1074E00087E00895CF93DF93DC01C0917000D091C5 +:1074F0007100413051F410926F001196CC911197A8 +:107500001296DC9112971496645030916F00360FEA +:1075100030936F00AE014F7751F4F89483E0FE0191 +:1075200080935700E895789407B600FCFDCFF89457 +:10753000AE018D919C91119721E0FE010C012093E9 +:107540005700E895112478942296FE01EF7751F4C4 +:10755000F89485E0FA0180935700E895789407B68F +:1075600000FCFDCF625011F01296D4CFD093710081 +:10757000C0937000832F8078DF91CF910895CF93CF +:10758000DF93FC0180918400813071F4809175005B +:10759000813029F410927500CF0141E002C0CF0183 +:1075A00040E00E94723A2FC0823061F581818130C3 +:1075B00011F40E94423A8F3F21F484E090E06FEF93 +:1075C00019C08E3F91F482B3836582BBC0E0D0E0E6 +:1075D000CE016FEF0E94A73C219684E0C030D8070F +:1075E000B9F782B38C7A82BB0BC08D3F31F48281B4 +:1075F000938164810E94A73C03C081E08093760060 +:107600001092840081E0DF91CF9108951F93CF9372 +:10761000DF9360918A00635067FDBAC08091870054 +:10762000CCE0D0E0C81BD109C257DF4F8091860063 +:107630008D3209F09AC0683009F0A8C083EC8093BD +:1076400079008AE5809360001092740088818076CA +:1076500041F0CE010E94523A282F8F3F09F474C0A6 +:107660007AC09A81109282008981882321F4109235 +:10767000830022E062C0853019F490938B005CC0D7 +:10768000863009F04AC08B81813019F48AE790E78F +:107690001BC0823041F48CE890E79093890080937E +:1076A000880022E236C08330F9F48A81882341F4CD +:1076B00084E590E7909389008093880024E029C0B6 +:1076C000813041F488E590E79093890080938800A9 +:1076D00022E11FC08230E1F48AE690E790938900AE +:1076E0008093880020E115C0813241F48EE990E753 +:1076F000909389008093880029E00BC0823241F486 +:107700008EEA90E7909389008093880021E201C07F +:1077100020E080E4809374001EC0883021F421E0D2 +:107720008DE890E00CC0893019F490938D0004C06E +:107730008A3011F421E001C020E082E890E09093CB +:1077400089008093880007C0888187FD2E8180E8AA +:107750008093740006C08F81882319F48E8182176C +:1077600008F0822F8093690011C08091740087FF18 +:107770000DC0CE010E94BF3A8F3F21F48EE180936D +:10778000600004C0882311F01092690010928A00F2 +:107790008091600084FF3DC0809169008F3FC9F1F6 +:1077A000182F893008F018E0811B809369008091C0 +:1077B000790098E88927809379001123E1F0E0911E +:1077C0008800F09189008091740086FF09C0912F94 +:1077D000AAE7B0E084918D9331969150D9F707C014 +:1077E000912FAAE7B0E081918D939150E1F7F0934A +:1077F0008900E09388008AE790E0612F0E949C381E +:10780000612F6C5F6C3019F08FEF8093690060938B +:10781000600094E180B38C7031F49150D9F71092EC +:107820008B0010928500DF91CF911F91089581B355 +:10783000836581BB82B38C7A82BB8D98959A8AB31B +:107840008C7F8ABB8BB383608BBBB89AC09881E076 +:1078500090E00E948E3C80937300882349F481E07D +:1078600080936D0081E090E06FEF0E94A73C08C01C +:10787000E0E0F0E0E491EF3F19F481E080936D00E7 +:107880000E94D139882309F447C081E08BBF82E090 +:107890008BBF0E943B3A88E991E00E948E3C88238E +:1078A00049F48B9A20E0A89588EB9BE00197F1F7CB +:1078B0002150C9F78B9878940FEF10E0C0E0D0E02A +:1078C00080916C008823B9F483E0C93ED80714F492 +:1078D000219611C0F89481E090E060E00E94963C0F +:1078E0008B9A28E088E190E00FB6F894A89581BDC6 +:1078F0000FBE21BDFFCFA8950E94063B8091760068 +:10790000882331F0002319F4115011F405C00150FF +:107910000E94D1398823A1F60E94423AE199FECF14 +:107920009FBB8EBBE09A99278DB30895262FE199CE +:10793000FECF9FBB8EBBE09A01970DB2021631F0CD +:107940002DBB0FB6F894E29AE19A0FBE0895262F48 +:10795000E199FECF9FBB8EBB2DBB0FB6F894E29A88 +:0C796000E19A0FBE01960895F894FFCF45 +:0A796C005A7F01800000800000FF38 +:040000030000700089 +:00000001FF From 3a7816843cb3fc890351cae2182d65b5deaa323e Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Fri, 22 Mar 2019 23:50:56 -0400 Subject: [PATCH 380/445] [Keymap] New tap dance code added to userspace and keymaps (#5468) * Adding new tap dance key * Adding new tap dance code * add code for copy/paste to tap dance * testing tap dance enums * New tap dance keycodes * Fix enums --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 2 +- .../community/60_ansi/stanrc85-ansi/keymap.c | 2 +- users/stanrc85/stanrc85.c | 42 ++++++++++++++++++- users/stanrc85/stanrc85.h | 36 +++++++++++----- 4 files changed, 68 insertions(+), 14 deletions(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index fed21b7deb6f..d0a77d916883 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -22,7 +22,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, KC_LBRC, KC_RBRC, KC_BSLS, KC_CTLE, 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, - KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), [1] = LAYOUT_60_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, diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index 7c095faa3bba..ce41c0d4d934 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -22,7 +22,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, KC_LBRC, KC_RBRC, KC_BSLS, KC_CTLE, 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, - KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), [1] = LAYOUT_60_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, diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index e8fc5c1dfdd8..3838f33efd6c 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -1,13 +1,53 @@ #include "stanrc85.h" +static td_state_t td_state; + __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + else { return SINGLE_HOLD; } + } + if (state->count == 2) { return DOUBLE_TAP; } + else { return 3; } // any number higher than the maximum state value you return above +} + +// handle the possible states for each tapdance keycode you define: +void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + SEND_STRING(SS_LCTRL("c")); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_RCTL)); + break; + case DOUBLE_TAP: + SEND_STRING(SS_LCTRL("v")); + } +} + +void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_RCTL)); + break; + case DOUBLE_TAP: + break; + } +} + qk_tap_dance_action_t tap_dance_actions[] = { [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), + [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index c0a0e87662ed..2f999ff502ed 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -8,17 +8,6 @@ #define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control #define LAYER3 3 //RGB Underglow controls and RESET -enum custom_keycodes { - KC_MAKE = SAFE_RANGE, - NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes -}; - -//Tap Dance Declarations -enum { - TD_WIN = 0, - TD_ESC -}; - //Aliases for longer keycodes #define KC_CAD LALT(LCTL(KC_DEL)) #define KC_LOCK LGUI(KC_L) @@ -28,3 +17,28 @@ enum { #define LT_SPCF LT(2, KC_SPC) #define TD_TESC TD(TD_ESC) #define TD_TWIN TD(TD_WIN) +#define TD_TCTL TD(TD_RCTL) + +enum cust_keys { + KC_MAKE = SAFE_RANGE +}; + +enum tap_dance { + TD_WIN, + TD_ESC, + TD_RCTL +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP +} td_state_t; + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data); +void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data); From 3529384c1202c6feca01039d5dcdb0491381ff4c Mon Sep 17 00:00:00 2001 From: tomholford Date: Fri, 22 Mar 2019 21:26:32 -0700 Subject: [PATCH 381/445] [Keymap] Add custom Planck Light keymap (#5464) * Create custom Planck Light keycap See README for details * Link to WhatPulse in README * More remapping, and add RGB LED effects * Remove dead code, address PR feedback from drashna --- keyboards/planck/keymaps/tom/config.h | 39 ++++ keyboards/planck/keymaps/tom/keymap.c | 297 +++++++++++++++++++++++++ keyboards/planck/keymaps/tom/readme.md | 31 +++ keyboards/planck/keymaps/tom/rules.mk | 1 + 4 files changed, 368 insertions(+) create mode 100644 keyboards/planck/keymaps/tom/config.h create mode 100644 keyboards/planck/keymaps/tom/keymap.c create mode 100644 keyboards/planck/keymaps/tom/readme.md create mode 100644 keyboards/planck/keymaps/tom/rules.mk diff --git a/keyboards/planck/keymaps/tom/config.h b/keyboards/planck/keymaps/tom/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/tom/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/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c new file mode 100644 index 000000000000..abd7c8adaa24 --- /dev/null +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -0,0 +1,297 @@ +/* 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 | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Vol- | Vol+ |Brite-|Brite+| + * `-----------------------------------------------------------------------------------' + */ +[_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_PIPE, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUOT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_BRMD, KC_BRMU +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Vol- | Vol+ |Brite-|Brite+| + * `-----------------------------------------------------------------------------------' + */ +[_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_BSLS, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_BRMD, KC_BRMU +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |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, _______, _______, _______, _______, + _______, 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 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 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 + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_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; + } +} + +void rgb_matrix_indicators_user(void) { + #ifdef RGB_MATRIX_ENABLE + rgb_led led; + switch (biton32(layer_state)) { + case _RAISE: + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + if ( led.modifier ) { + rgb_matrix_set_color(i, 0x6B, 0x00, 0x80); + } else { + rgb_matrix_set_color(i, 0x00, 0xFF, 0x00); + } + } + break; + + case _LOWER: + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + if ( led.modifier ) { + rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00); + } else { + rgb_matrix_set_color(i, 0x00, 0x67, 0xC7); + } + } + break; + + case _ADJUST: + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + rgb_matrix_set_color(i, 0xFF, 0x99, 0x00); + } + rgb_matrix_set_color(1, 0xFF, 0x00, 0x00); + break; + + default: + break; + } + #endif +} diff --git a/keyboards/planck/keymaps/tom/readme.md b/keyboards/planck/keymaps/tom/readme.md new file mode 100644 index 000000000000..7e31e2a0545d --- /dev/null +++ b/keyboards/planck/keymaps/tom/readme.md @@ -0,0 +1,31 @@ +# tomholford's layout + +This layout is data-driven: I installed [WhatPulse](https://whatpulse.org/) a few months ago and generated a heatmap of the most frequently used keys. I also optimized for my most-used programming languages, and muscle memory. + +## Changes from Default + +### QWERTY + +- swap escape and tab +- rearrange arrows in original layout +- swap rshift and Enter +- map / to original location of left arrow key + +### RAISE + +- move backslash to backspace +- map quote to original location from qwerty layer +- map brightness up / down to original location of left and up arrows +- map volume up / down to original location of down and right arrows + +### LOWER + +- move pipe to backspace +- map quote to original location from qwerty layer +- map brightness up / down to original location of left and up arrows +- map volume up / down to original location of down and right arrows + + +## RGB LED + +- Illuminate when pressing RAISE, LOWER, or ADJUST ([source](https://www.reddit.com/r/olkb/comments/8wvk8s/custom_rgb_configuration_by_keycodelayer/)) diff --git a/keyboards/planck/keymaps/tom/rules.mk b/keyboards/planck/keymaps/tom/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/tom/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 23086808a78c9234232e2ddbf0c977d1fb2cb6ae Mon Sep 17 00:00:00 2001 From: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sat, 23 Mar 2019 19:13:59 +0100 Subject: [PATCH 382/445] [Keyboard] added cypher keyboard support (#5466) * added the cypher qmk configuration * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/info.json Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/info.json Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * made modifications as per requests * removed endif from cypher.h --- keyboards/westfoxtrot/cypher/config.h | 66 +++++++++++++++ keyboards/westfoxtrot/cypher/cypher.c | 54 +++++++++++++ keyboards/westfoxtrot/cypher/cypher.h | 68 ++++++++++++++++ keyboards/westfoxtrot/cypher/info.json | 14 ++++ .../cypher/keymaps/default-iso/config.h | 19 +++++ .../cypher/keymaps/default-iso/keymap.c | 49 +++++++++++ .../cypher/keymaps/default-iso/readme.md | 1 + .../cypher/keymaps/default/config.h | 19 +++++ .../cypher/keymaps/default/keymap.c | 49 +++++++++++ .../cypher/keymaps/default/readme.md | 1 + keyboards/westfoxtrot/cypher/readme.md | 15 ++++ keyboards/westfoxtrot/cypher/rules.mk | 81 +++++++++++++++++++ 12 files changed, 436 insertions(+) create mode 100644 keyboards/westfoxtrot/cypher/config.h create mode 100644 keyboards/westfoxtrot/cypher/cypher.c create mode 100644 keyboards/westfoxtrot/cypher/cypher.h create mode 100644 keyboards/westfoxtrot/cypher/info.json create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default/config.h create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default/readme.md create mode 100644 keyboards/westfoxtrot/cypher/readme.md create mode 100644 keyboards/westfoxtrot/cypher/rules.mk diff --git a/keyboards/westfoxtrot/cypher/config.h b/keyboards/westfoxtrot/cypher/config.h new file mode 100644 index 000000000000..48ff816f9bac --- /dev/null +++ b/keyboards/westfoxtrot/cypher/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2019 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x21FF +#define PRODUCT_ID 0xAA97 +#define DEVICE_VER 0x0001 +#define MANUFACTURER westfoxtrot +#define PRODUCT cypher +#define DESCRIPTION Cypher + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, F6, B6, B7, C6, C7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, E6, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +/* 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 diff --git a/keyboards/westfoxtrot/cypher/cypher.c b/keyboards/westfoxtrot/cypher/cypher.c new file mode 100644 index 000000000000..e6cd84328dac --- /dev/null +++ b/keyboards/westfoxtrot/cypher/cypher.c @@ -0,0 +1,54 @@ +/* Copyright 2019 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 "cypher.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_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(F4); + } else { + writePinHigh(F4); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(F1); + } else { + writePinHigh(F1); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(F5); + } else { + writePinHigh(F5); + } +} diff --git a/keyboards/westfoxtrot/cypher/cypher.h b/keyboards/westfoxtrot/cypher/cypher.h new file mode 100644 index 000000000000..fdff12e9b18d --- /dev/null +++ b/keyboards/westfoxtrot/cypher/cypher.h @@ -0,0 +1,68 @@ +/* Copyright 2019 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 . + */ +#pragma once + +#define ___ KC_NO + +#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_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K63, K65, K66, K67, K68, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K73, K75, K76, K77, K78, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \ + K40, K41, K42, K46, K49, K90, K91, K92, K93, K95, K96, K97, K98 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39 }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, ___, K49 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, ___, K65, K66, K67, K68 }, \ + { K70, K71, ___, K73, ___, K75, K76, K77, K78 }, \ + { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \ + { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \ +} + +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K65, K66, K67, K68, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K72, K73, K75, K76, K77, K78, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \ + K40, K41, K42, K46, K49, K90, K91, K92, K93, K95, K96, K97, K98 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39 }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, ___, K49 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, ___, ___, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, ___, K75, K76, K77, K78 }, \ + { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \ + { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \ +} diff --git a/keyboards/westfoxtrot/cypher/info.json b/keyboards/westfoxtrot/cypher/info.json new file mode 100644 index 000000000000..3abf2b607ee8 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/info.json @@ -0,0 +1,14 @@ +{ + "keyboard_name": "Cypher", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.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":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "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":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}] + }, + + "LAYOUT_iso": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.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":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.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":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "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":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}] + } + } +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h b/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h new file mode 100644 index 000000000000..41d70907ebd8 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c new file mode 100644 index 000000000000..2a08ae853b57 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 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 + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_iso( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, 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_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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL,\ + 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_P1, KC_P2, KC_P3, KC_PENT,\ + KC_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_iso( /* Function Layer */ + 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, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______, _______, _______,\ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md b/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md new file mode 100644 index 000000000000..81a4a677fd70 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md @@ -0,0 +1 @@ +# The default iso keymap for cypher diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/config.h b/keyboards/westfoxtrot/cypher/keymaps/default/config.h new file mode 100644 index 000000000000..41d70907ebd8 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c new file mode 100644 index 000000000000..1906f939694e --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 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 + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, 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_PEQL,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,\ + KC_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_ansi( /* Function Layer */ + 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, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/readme.md b/keyboards/westfoxtrot/cypher/keymaps/default/readme.md new file mode 100644 index 000000000000..05c370026669 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for cypher \ No newline at end of file diff --git a/keyboards/westfoxtrot/cypher/readme.md b/keyboards/westfoxtrot/cypher/readme.md new file mode 100644 index 000000000000..6db417fae887 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/readme.md @@ -0,0 +1,15 @@ +# cypher + +![cypher](https://github.com/westfoxtrot/Cypher_PCB) + +PCB for the cypher keyboard + +Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +Hardware Supported: Cypher PCB +Hardware Availability: with group buy + Files released here (https://github.com/westfoxtrot/Cypher_PCB) + +Make example for this keyboard (after setting up your build environment): + + make westfoxtrot/cypher: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/westfoxtrot/cypher/rules.mk b/keyboards/westfoxtrot/cypher/rules.mk new file mode 100644 index 000000000000..ab03dc9f9dee --- /dev/null +++ b/keyboards/westfoxtrot/cypher/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 = 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 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 f077204fae729e66f8dfa16db82263ff2ff84d59 Mon Sep 17 00:00:00 2001 From: Danny Date: Sat, 23 Mar 2019 20:20:14 -0400 Subject: [PATCH 383/445] Add support for RGB LEDs wired directly to each half's controller (#5392) * Add support for wiring RGB LEDs for both halves directly to their respective controllers RGB LEDs for each half don't need to be chained together across the TRRS cable with this * Add split RGB LED support for serial * Update config/rules for bakingpy layout * Un-nest ifdefs for hand detection * Read RGB config state from memory instead of EEPROM for serial updates * Reuse existing LED pointer instead of creating new one --- docs/config_options.md | 11 +++++-- docs/feature_rgblight.md | 9 +++--- keyboards/keebio/iris/rev3/config.h | 1 + keyboards/keebio/nyquist/rev3/config.h | 1 + .../community/ortho_4x12/bakingpy/config.h | 1 + .../community/ortho_4x12/bakingpy/rules.mk | 7 ++-- quantum/rgblight.c | 28 ++++++++++------ quantum/rgblight.h | 1 + quantum/split_common/split_util.c | 32 ++++++++++++------- quantum/split_common/transport.c | 23 ++++++++----- 10 files changed, 76 insertions(+), 38 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index a8a106459134..ad42e9780201 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -171,11 +171,15 @@ If you define these options you will enable the associated feature, which may in ## RGB Light Configuration * `#define RGB_DI_PIN D7` - * pin the DI on the ws2812 is hooked-up to + * pin the DI on the WS2812 is hooked-up to * `#define RGBLIGHT_ANIMATIONS` * run RGB animations -* `#define RGBLED_NUM 15` +* `#define RGBLED_NUM 12` * number of LEDs +* `#define RGBLED_SPLIT { 6, 6 }` + * number of LEDs connected that are directly wired to `RGB_DI_PIN` on each half of a split keyboard + * First value indicates number of LEDs for left half, second value is for the right half + * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half * `#define RGBLIGHT_HUE_STEP 12` * units to step when in/decreasing hue * `#define RGBLIGHT_SAT_STEP 25` @@ -236,6 +240,9 @@ There are a few different ways to set handedness for split keyboards (listed in * `#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 RGBLED_SPLIT { 6, 6 }` + * See [RGB Light Configuration](#rgb-light-configuration) + * `#define SELECT_SOFT_SERIAL_SPEED ` (default speed is 1) * Sets the protocol speed when using serial communication * Speeds: diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 800e5973899a..9ecc0deb5cda 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -23,10 +23,11 @@ RGBLIGHT_ENABLE = yes At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these. -|Define |Description | -|------------|---------------------------------------------| -|`RGB_DI_PIN`|The pin connected to the data pin of the LEDs| -|`RGBLED_NUM`|The number of LEDs connected | +|Define |Description | +|---------------|---------------------------------------------------------------------------------------------------------| +|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs | +|`RGBLED_NUM` |The number of LEDs connected | +|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` | Then you should be able to use the keycodes below to change the RGB lighting to your liking. diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index 70e5d6e2a5df..ff0d28c73ca6 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -71,6 +71,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN F7 #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } #define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/keebio/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h index 18b40ecec7ae..3c7822def033 100644 --- a/keyboards/keebio/nyquist/rev3/config.h +++ b/keyboards/keebio/nyquist/rev3/config.h @@ -56,6 +56,7 @@ along with this program. If not, see . #define RGB_DI_PIN B4 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN B5 diff --git a/layouts/community/ortho_4x12/bakingpy/config.h b/layouts/community/ortho_4x12/bakingpy/config.h index b6b2ac577901..a153adffb6f0 100644 --- a/layouts/community/ortho_4x12/bakingpy/config.h +++ b/layouts/community/ortho_4x12/bakingpy/config.h @@ -10,6 +10,7 @@ #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/layouts/community/ortho_4x12/bakingpy/rules.mk b/layouts/community/ortho_4x12/bakingpy/rules.mk index 9be2f01d4d5d..17a589cd1d62 100644 --- a/layouts/community/ortho_4x12/bakingpy/rules.mk +++ b/layouts/community/ortho_4x12/bakingpy/rules.mk @@ -1,12 +1,13 @@ -# Enable RGB if not a Planck -ifeq ($(LAYOUTS_HAS_RGB),yes) +ifneq ($(LAYOUTS_HAS_RGB), no) RGBLIGHT_ENABLE = yes endif AUDIO_ENABLE = no ifeq ($(strip $(KEYBOARD)), zlant) BACKLIGHT_ENABLE = no else ifeq ($(strip $(KEYBOARD)), 40percentclub/4x4) - BACKLIGHT_ENABLE = no + BACKLIGHT_ENABLE = no +else ifneq (, $(findstring lets_split, $(KEYBOARD))) + BACKLIGHT_ENABLE = no else BACKLIGHT_ENABLE = yes endif diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 3042ff11ea90..08515564bc30 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -66,6 +66,15 @@ bool is_rgblight_initialized = false; LED_TYPE led[RGBLED_NUM]; bool rgblight_timer_enabled = false; +static uint8_t clipping_start_pos = 0; +static uint8_t clipping_num_leds = RGBLED_NUM; + +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { + clipping_start_pos = start_pos; + clipping_num_leds = num_leds; +} + + void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { uint8_t r = 0, g = 0, b = 0, base, color; @@ -621,7 +630,7 @@ void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) static uint8_t get_interval_time(const uint8_t* default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) { - return + return #ifdef VELOCIKEY_ENABLE velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) : #endif @@ -668,21 +677,20 @@ void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val) { #ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { + LED_TYPE *start_led = led + clipping_start_pos; + uint16_t num_leds = clipping_num_leds; if (rgblight_config.enable) { - LED_TYPE *ledp; #ifdef RGBLIGHT_LED_MAP LED_TYPE led0[RGBLED_NUM]; for(uint8_t i = 0; i < RGBLED_NUM; i++) { led0[i] = led[pgm_read_byte(&led_map[i])]; } - ledp = led0; - #else - ledp = led; + start_led = led0 + clipping_start_pos; #endif #ifdef RGBW - ws2812_setleds_rgbw(ledp, RGBLED_NUM); + ws2812_setleds_rgbw(start_led, num_leds); #else - ws2812_setleds(ledp, RGBLED_NUM); + ws2812_setleds(start_led, num_leds); #endif } else { for (uint8_t i = 0; i < RGBLED_NUM; i++) { @@ -691,9 +699,9 @@ void rgblight_set(void) { led[i].b = 0; } #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); + ws2812_setleds_rgbw(start_led, num_leds); #else - ws2812_setleds(led, RGBLED_NUM); + ws2812_setleds(start_led, num_leds); #endif } } @@ -813,7 +821,7 @@ void rgblight_effect_breathing(uint8_t interval) { float val; uint8_t interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[interval], 1, 100); - + if (timer_elapsed(last_timer) < interval_time) { return; } diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 36e436b899b4..1769f719d99f 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -197,6 +197,7 @@ void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val); void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val); +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); uint32_t eeconfig_read_rgblight(void); void eeconfig_update_rgblight(uint32_t val); diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index da870f877535..09a307b8ed73 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -11,25 +11,25 @@ # include "eeconfig.h" #endif +#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) +#include "rgblight.h" +#endif + volatile bool isLeftHand = true; __attribute__((weak)) bool is_keyboard_left(void) { - #ifdef SPLIT_HAND_PIN + #if defined(SPLIT_HAND_PIN) // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand setPinInput(SPLIT_HAND_PIN); return readPin(SPLIT_HAND_PIN); - #else - #ifdef EE_HANDS - return eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - #ifdef MASTER_RIGHT - return !is_keyboard_master(); - #else - return is_keyboard_master(); - #endif - #endif + #elif defined(EE_HANDS) + return eeprom_read_byte(EECONFIG_HANDEDNESS); + #elif defined(MASTER_RIGHT) + return !is_keyboard_master(); #endif + + return is_keyboard_master(); } bool is_keyboard_master(void) @@ -71,6 +71,16 @@ void matrix_setup(void) { isLeftHand = is_keyboard_left(); +#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) + uint8_t num_rgb_leds_split[2] = RGBLED_SPLIT; + if (isLeftHand) { + rgblight_set_clipping_range(0, num_rgb_leds_split[0]); + } + else { + rgblight_set_clipping_range(num_rgb_leds_split[0], num_rgb_leds_split[1]); + } +#endif + if (is_keyboard_master()) { keyboard_master_setup(); diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 631d913f70ef..8d408f6fdc6b 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -92,12 +92,13 @@ typedef struct _Serial_m2s_buffer_t { # ifdef BACKLIGHT_ENABLE uint8_t backlight_level; # endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) +# if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) rgblight_config_t rgblight_config; // not yet use // // When MCUs on both sides drive their respective RGB LED chains, // it is necessary to synchronize, so it is necessary to communicate RGB - // information. In that case, define the RGBLIGHT_SPLIT macro. + // information. In that case, define RGBLED_SPLIT with info on the number + // of LEDs on each half. // // Otherwise, if the master side MCU drives both sides RGB LED chains, // there is no need to communicate. @@ -132,15 +133,20 @@ bool transport_master(matrix_row_t matrix[]) { matrix[i] = serial_s2m_buffer.smatrix[i]; } -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Code to send RGB over serial goes here (not implemented yet) -# endif - # ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; # endif +# if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) + static rgblight_config_t prev_rgb = {~0}; + uint32_t rgb = rgblight_read_dword(); + if (rgb != prev_rgb.raw) { + serial_m2s_buffer.rgblight_config.raw = rgb; + prev_rgb.raw = rgb; + } +# endif + return true; } @@ -152,8 +158,9 @@ void transport_slave(matrix_row_t matrix[]) { # ifdef BACKLIGHT_ENABLE backlight_set(serial_m2s_buffer.backlight_level); # endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) -// Add serial implementation for RGB here +# if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) + // Update RGB config with the new data + rgblight_update_dword(serial_m2s_buffer.rgblight_config.raw); # endif } From 74e05f34515bdab146d0512ac4d3d57bc0116e95 Mon Sep 17 00:00:00 2001 From: Rob Hilgefort Date: Sat, 23 Mar 2019 18:22:40 -0600 Subject: [PATCH 384/445] [Keymap] Planck Keymap :: rjhiglefort (#5059) * copy default over as starting point * Getting rid of dvorak and colemak for now, added a couple changes to the keymap * removed refs to bad layers, formatting comments * First version of my ergodox ported layout! * Symbols layer, media layer, updated comments * Hyper as a single key * Fix stuck hyper key when switching layers * Tweak some annoying things about the layout. - move raise left and promote alt - remove swap keys on the last layer - reorganize media keys so they're easier to reach and more intuitive - fix some comment template things * Add readme for rjhilgefort planck layout * readme tweak * PR feedback changes --- keyboards/planck/keymaps/rjhilgefort/config.h | 35 ++++ keyboards/planck/keymaps/rjhilgefort/keymap.c | 153 ++++++++++++++++++ .../planck/keymaps/rjhilgefort/readme.md | 63 ++++++++ keyboards/planck/keymaps/rjhilgefort/rules.mk | 0 4 files changed, 251 insertions(+) create mode 100644 keyboards/planck/keymaps/rjhilgefort/config.h create mode 100644 keyboards/planck/keymaps/rjhilgefort/keymap.c create mode 100644 keyboards/planck/keymaps/rjhilgefort/readme.md create mode 100644 keyboards/planck/keymaps/rjhilgefort/rules.mk diff --git a/keyboards/planck/keymaps/rjhilgefort/config.h b/keyboards/planck/keymaps/rjhilgefort/config.h new file mode 100644 index 000000000000..672c5d570f08 --- /dev/null +++ b/keyboards/planck/keymaps/rjhilgefort/config.h @@ -0,0 +1,35 @@ +#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 diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c new file mode 100644 index 000000000000..455aa5a36487 --- /dev/null +++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c @@ -0,0 +1,153 @@ +/* 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 + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + // QWERTY = SAFE_RANGE, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CTRL_ESC MT(MOD_LCTL, KC_ESC) +#define HYPER LCTL(LALT(QK_LGUI)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty +* ,-------------------------------------------------------------------------------------------------------. +* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------| +* | Ct/Esc | A | S | D | F | G | H | J | K | L | ; | " | +* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------| +* | Shift | Z | X | C | V | B | N | M | , | . | / | Enter | +* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------| +* | | Ctrl | Raise | Alt | GUI | Space | Lowr | Hyper | | | Raise | +* `-------------------------------------------------------------------------------------------------------' +*/ +[_QWERTY] = LAYOUT_planck_grid( + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTRL_ESC, 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_LCTL, RAISE, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, LOWER, HYPER, _______, _______, RAISE } +), + +/* Lower +* ,-----------------------------------------------------------------------------------------------------------. +* | | \ | / | [ | ] | ~ | | | = | + | - | _ | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------| +* | | { | } | ( | ) | ` | ← | ↓ | ↑ | → | Alt | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------| +* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------| +* | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_planck_grid( + {_______, KC_BSLS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TILD, KC_PIPE, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, _______}, + {_______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LALT, _______}, + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +), + +/* Raise +* ,----------------------------------------------------------------------------------------------------------. +* | | | | | | | | 7 | 8 | 9 | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | VolMte | Vol - | Vol + | Ply/Pse| | | 4 | 5 | 6 | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | Trak ← | Trak → | Scrn - | Scrn + | | | 1 | 2 | 3 | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | 0 | . | | | +* `----------------------------------------------------------------------------------------------------------' +*/ +[_RAISE] = LAYOUT_planck_grid( + {_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, KC_4, KC_5, KC_6, _______, _______}, + {_______, KC_MRWD, KC_MFFD, KC_SLCK, KC_PAUS, _______, _______, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______} +), + +/* Adjust (Lower + Raise) + * ,----------------------------------------------------------------------------------------------------------. + * | | Reset | | | | | | | | | | Del | + * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | MuMod | AudOn | AudOff | | | Qwerty | | | | | + * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Voice- | Voice+ | MusOn | Musoff | MIDIon | MIDIof | TermOn | TermOff| | | | + * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | + * `----------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, _______, _______, _______, _______}, + {_______, 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 music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} + +/* +* Example +* ,----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | | | | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | | | | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | | | | | +* `----------------------------------------------------------------------------------------------------------' +* +[_EXAMPLE] = LAYOUT_planck_grid( + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +), +*/ diff --git a/keyboards/planck/keymaps/rjhilgefort/readme.md b/keyboards/planck/keymaps/rjhilgefort/readme.md new file mode 100644 index 000000000000..f446a76194ea --- /dev/null +++ b/keyboards/planck/keymaps/rjhilgefort/readme.md @@ -0,0 +1,63 @@ +# [🐦 @rjhilgefort](https://twitter.com/rjhilgefort) Planck Layout + +A simple and practical layout featuring: + +- Hyper Key === CTRL + ALT + GUI +- Ctrl/Esc key that is CTRL when held and ESC when tapped +- Symbols layer that focuses on coding +- Numpad + media layer + +![Imgur](https://i.imgur.com/elygxAb.jpg) + + +## Main +``` +,-------------------------------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------| +| Ct/Esc | A | S | D | F | G | H | J | K | L | ; | " | +|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------| +| Shift | Z | X | C | V | B | N | M | , | . | / | Enter | +|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------| +| | Ctrl | Raise | Alt | GUI | Space | Lowr | Hyper | | | Raise | +`-------------------------------------------------------------------------------------------------------' +``` + +## Lower +``` +,-----------------------------------------------------------------------------------------------------------. +| | \ | / | [ | ] | ~ | | | = | + | - | _ | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------| +| | { | } | ( | ) | ` | ← | ↓ | ↑ | → | Alt | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------| +| | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------' +``` + +## Raise +``` +,----------------------------------------------------------------------------------------------------------. +| | | | | | | | 7 | 8 | 9 | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | VolMte | Vol - | Vol + | Ply/Pse| | | 4 | 5 | 6 | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | Trak ← | Trak → | Scrn - | Scrn + | | | 1 | 2 | 3 | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | | | | | | | 0 | . | | | +`----------------------------------------------------------------------------------------------------------' +``` + +## Adjust (Lower + Raise) +``` +,----------------------------------------------------------------------------------------------------------. +| | Reset | | | | | | | | | | Del | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | | MuMod | AudOn | AudOff | | | Qwerty | | | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | Voice- | Voice+ | MusOn | Musoff | MIDIon | MIDIof | TermOn | TermOff| | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | | | | | | | | | | | +`----------------------------------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/rjhilgefort/rules.mk b/keyboards/planck/keymaps/rjhilgefort/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From bfc16765f423dccb9a4b81a3e62b7bb3df48252f Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 24 Mar 2019 14:23:50 +0900 Subject: [PATCH 385/445] add keyboards/mxss/rgblight.h from e661f1559:quantum/rgblight.h (#5461) This PR is cherry-pick from 90b9a1aa7d8a in PR #5020. @MxBlu copied quantum/rgblight.c to keyboards/mxss/rgblight.c on July 8, 2018. At that time, I think it would be better to copy quantum/rgblight.h at the same time. Because if someone makes a change to `quantum/rgblight.[ch]` that is incompatible with the past, it may cause problems with the compilation of keyboards/mxss. (Like when I changed the prototype of the `rgblight_effect_XXX()` functions of rgblight.c in PR #5020.) --- keyboards/mxss/rgblight.h | 166 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 keyboards/mxss/rgblight.h diff --git a/keyboards/mxss/rgblight.h b/keyboards/mxss/rgblight.h new file mode 100644 index 000000000000..5205974f9fa7 --- /dev/null +++ b/keyboards/mxss/rgblight.h @@ -0,0 +1,166 @@ +/* Copyright 2017 Yang Liu + * + * 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 RGBLIGHT_H +#define RGBLIGHT_H + +#ifdef RGBLIGHT_ANIMATIONS + #define RGBLIGHT_MODES 35 +#else + #define RGBLIGHT_MODES 1 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_MAX +#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 +#endif + +#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +#endif + +#ifndef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 10 +#endif +#ifndef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 17 +#endif +#ifndef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 17 +#endif + +#define RGBLED_TIMER_TOP F_CPU/(256*64) +// #define RGBLED_TIMER_TOP 0xFF10 + +#include +#include +#include "eeconfig.h" +#ifndef RGBLIGHT_CUSTOM_DRIVER +#include "ws2812.h" +#endif +#include "rgblight_types.h" +#include "rgblight_list.h" + +extern LED_TYPE led[RGBLED_NUM]; + +extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; +extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; + +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t mode :6; + uint16_t hue :9; + uint8_t sat :8; + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} rgblight_config_t; + +void rgblight_init(void); +void rgblight_increase(void); +void rgblight_decrease(void); +void rgblight_toggle(void); +void rgblight_enable(void); +void rgblight_disable(void); +void rgblight_step(void); +void rgblight_step_reverse(void); +uint8_t rgblight_get_mode(void); +void rgblight_mode(uint8_t mode); +void rgblight_set(void); +void rgblight_update_dword(uint32_t dword); +void rgblight_increase_hue(void); +void rgblight_decrease_hue(void); +void rgblight_increase_sat(void); +void rgblight_decrease_sat(void); +void rgblight_increase_val(void); +void rgblight_decrease_val(void); +void rgblight_increase_speed(void); +void rgblight_decrease_speed(void); +void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); +uint16_t rgblight_get_hue(void); +uint8_t rgblight_get_sat(void); +uint8_t rgblight_get_val(void); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); + +uint32_t eeconfig_read_rgblight(void); +void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_default(void); +void eeconfig_debug_rgblight(void); + +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + +void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + +void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); +void rgblight_mode_noeeprom(uint8_t mode); +void rgblight_toggle_noeeprom(void); +void rgblight_enable_noeeprom(void); +void rgblight_disable_noeeprom(void); + +void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); + + +#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); + +void rgblight_task(void); + +void rgblight_timer_init(void); +void rgblight_timer_enable(void); +void rgblight_timer_disable(void); +void rgblight_timer_toggle(void); +void rgblight_effect_breathing(uint8_t interval); +void rgblight_effect_rainbow_mood(uint8_t interval); +void rgblight_effect_rainbow_swirl(uint8_t interval); +void rgblight_effect_snake(uint8_t interval); +void rgblight_effect_knight(uint8_t interval); +void rgblight_effect_christmas(void); +void rgblight_effect_rgbtest(void); + +#endif From f1d921bee6bc371e1613b71240635a9847e685b3 Mon Sep 17 00:00:00 2001 From: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sun, 24 Mar 2019 22:00:48 +0100 Subject: [PATCH 386/445] Bugfix for recently integrated cypher keyboard (#5481) * fixed issue with LED indicators corrected error in info.json * fixed issue with led indictors --- keyboards/westfoxtrot/cypher/cypher.c | 16 +++++++++------- keyboards/westfoxtrot/cypher/info.json | 6 ++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/westfoxtrot/cypher/cypher.c b/keyboards/westfoxtrot/cypher/cypher.c index e6cd84328dac..d2407525ea5e 100644 --- a/keyboards/westfoxtrot/cypher/cypher.c +++ b/keyboards/westfoxtrot/cypher/cypher.c @@ -35,20 +35,22 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } -void led_set_user(uint8_t usb_led) { + +void led_set_kb(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(F4); - } else { writePinHigh(F4); + } else { + writePinLow(F4); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(F1); - } else { writePinHigh(F1); + } else { + writePinLow(F1); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(F5); - } else { writePinHigh(F5); + } else { + writePinLow(F5); } + led_set_user(usb_led); } diff --git a/keyboards/westfoxtrot/cypher/info.json b/keyboards/westfoxtrot/cypher/info.json index 3abf2b607ee8..ab139aeafb38 100644 --- a/keyboards/westfoxtrot/cypher/info.json +++ b/keyboards/westfoxtrot/cypher/info.json @@ -4,11 +4,9 @@ "height": 5, "layouts": { "LAYOUT_ansi": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.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":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "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":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}] - }, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.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":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "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.25, "y":3.25}, {"label":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}] }, "LAYOUT_iso": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.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":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.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":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "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":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}] - } + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.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":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.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":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}] } } } From 3510d8dc8d055982ef61e83233f79b4c1d4df2d3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 25 Mar 2019 11:11:26 +1100 Subject: [PATCH 387/445] Document an annoyance with Grave Escape and macOS Terminal (#5483) --- docs/feature_grave_esc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index a7261d2dc887..f57c6042ca5a 100644 --- a/docs/feature_grave_esc.md +++ b/docs/feature_grave_esc.md @@ -18,7 +18,7 @@ If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now i ### Caveats - * On macOS CMD/GUI + KC_GRV is actually mapped to a hot key so it will not output a backtick. +On macOS, Command+` is by default mapped to "Move focus to next window" so it will not output a backtick. Additionally, Terminal always recognises this shortcut to cycle between windows, even if the shortcut is changed in the Keyboard preferences. ## Configuration From b90df560f8f5a681eac193b779cb8c5ecb20d681 Mon Sep 17 00:00:00 2001 From: DDRnJn Date: Sat, 23 Mar 2019 20:51:28 -0400 Subject: [PATCH 388/445] Added songs from Nier and Nier Automata Added song of the ancients and kaine salvation fron Nier Added Amusement park, Copied city, Vague Hope cold rain and weight of the world from Nier Automata --- quantum/audio/song_list.h | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index bc886f41a804..369e0b48435e 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -628,4 +628,89 @@ H__NOTE(_A5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), BD_NOTE(_FS5), W__NOTE(_E5), B__NOTE(_D5), \ H__NOTE(_G4), H__NOTE(_FS4), W__NOTE(_E4), BD_NOTE(_D4), +#define SONG_OF_THE_ANCIENTS \ + H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), H__NOTE(_D6), \ + H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_G6), H__NOTE(_G5), \ + H__NOTE(_AF5), B__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), \ + B__NOTE(_EF6), WD_NOTE(_G5), WD_NOTE(_BF5), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), \ + H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), WD_NOTE(_B5), WD_NOTE(_G5), WD_NOTE(_G6), W__NOTE(_G6), H__NOTE(_AF6), \ + W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), \ + WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), \ + H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), BD_NOTE(_G6), WD_NOTE(_B5), WD_NOTE(_G6), \ + W__NOTE(_G6), H__NOTE(_AF6), W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), \ + H__NOTE(_EF6), B__NOTE(_EF6), WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), \ + W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), H__NOTE(_G6), W__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), BD_NOTE(_EF6), \ + WD_NOTE(_F6), WD_NOTE(_G6), BD_NOTE(_C7), + +#define NIER_AMUSEMENT_PARK \ + H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), WD_NOTE(_D6), \ + Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), W__NOTE(_EF7), \ + H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), \ + WD_NOTE(_D6), Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), \ + H__NOTE(_EF7), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), \ + H__NOTE(_EF5), WD_NOTE(_D5), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), WD_NOTE(_D5), W__NOTE(_D5), B__NOTE(_G5), \ + H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), H__NOTE(_EF5), \ + W__NOTE(_D5), W__NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_D5), W__NOTE(_G5), B__NOTE(_D5), B__NOTE(_E5), \ + W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), \ + B__NOTE(_D5), B__NOTE(_BF4), W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), \ + H__NOTE(_EF5), H__NOTE(_F5), W__NOTE(_D5), W__NOTE(_BF5), W__NOTE(_G5), W__NOTE(_D5), W__NOTE(_EF5), QD_NOTE(_C5), \ + QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), B__NOTE(_D5), B__NOTE(_BF4), \ + B__NOTE(_C5), H__NOTE(_C5), H__NOTE(_D5), H__NOTE(_EF5), H__NOTE(_F5), WD_NOTE(_G5), H__NOTE(_C5), W__NOTE(_AF5), \ + WD_NOTE(_G5), + +#define COPIED_CITY \ + Q__NOTE(_F6), Q__NOTE(_BF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G6), Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), \ + Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_D6), Q__NOTE(_C6), \ + Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_EF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_BF4), H__NOTE(_C5), \ + Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_G6), Q__NOTE(_EF6), Q__NOTE(_BF6), \ + Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF6), Q__NOTE(_BF5), \ + Q__NOTE(_B6), Q__NOTE(_DF6), Q__NOTE(_EF6), Q__NOTE(_F6), Q__NOTE(_AF6), Q__NOTE(_EF7), Q__NOTE(_F6), Q__NOTE(_C6), \ + Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), \ + Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_C5), Q__NOTE(_BF4), Q__NOTE(_G4), \ + Q__NOTE(_F4), Q__NOTE(_G4), H__NOTE(_AF4), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), \ + Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), \ + Q__NOTE(_AF4), Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF5), Q__NOTE(_F5), \ + Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_G6), Q__NOTE(_EF6), WD_NOTE(_F7), + +#define VAGUE_HOPE_COLD_RAIN \ + HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_CS6), HD_NOTE(_D6), HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_D6), WD_NOTE(_A6), \ + HD_NOTE(_FS6), HD_NOTE(_G6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), \ + W__NOTE(_FS4), H__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), HD_NOTE(_CS6), HD_NOTE(_E6), HD_NOTE(_D6), Q__NOTE(_CS6), \ + Q__NOTE(_D6), Q__NOTE(_E6), W__NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_D6), HD_NOTE(_D6), Q__NOTE(_D6), H__NOTE(_E6), \ + WD_NOTE(_CS6), HD_NOTE(_AS5), HD_NOTE(_B5), HD_NOTE(_B5), Q__NOTE(_B4), Q__NOTE(_CS5), Q__NOTE(_D5), HD_NOTE(_A5), \ + Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), H__NOTE(_FS4), \ + HD_NOTE(_FS6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_CS5), Q__NOTE(_D5), Q__NOTE(_A5), \ + HD_NOTE(_FS5), Q__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS6), HD_NOTE(_A6), Q__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), \ + H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_CS6), H__NOTE(_FS6), E__NOTE(_FS5), E__NOTE(_CS5), Q__NOTE(_B4), H__NOTE(_AS4), \ + W__NOTE(_FS5), HD_NOTE(_FS6), HD_NOTE(_B5), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_E6), \ + W__NOTE(_D6), Q__NOTE(_CS6), Q__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), WD_NOTE(_B6), HD_NOTE(_E6), HD_NOTE(_FS6), \ + HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), H__NOTE(_D6), H__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ + HD_NOTE(_CS6), H__NOTE(_FS6), H__NOTE(_A6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_FS6), BD_NOTE(_B6), + +#define KAINE_SALVATION \ + BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), BD_NOTE(_BF4), BD_NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), \ + W__NOTE(_D5), BD_NOTE(_C5), BD_NOTE(_F4), BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), \ + BD_NOTE(_BF4), WD_NOTE(_EF5), WD_NOTE(_BF4), W__NOTE(_A4), W__NOTE(_BF4), W__NOTE(_C5), B__NOTE(_C5), H__NOTE(_B4), \ + H__NOTE(_C5), BD_NOTE(_D5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \ + H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), \ + H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \ + H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), \ + BD_NOTE(_E5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \ + H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), H__NOTE(_A5), \ + WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \ + H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_D6), WD_NOTE(_D6), W__NOTE(_F5), H__NOTE(_C6), H__NOTE(_C6), \ + H__NOTE(_BF5), H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_F5), WD_NOTE(_G5), WD_NOTE(_A5), BD_NOTE(_G5), + +#define WEIGHT_OF_THE_WORLD \ + H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), \ + Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), \ + Q__NOTE(_D6), H__NOTE(_E6), Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), \ + H__NOTE(_D6), WD_NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), WD_NOTE(_B5), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), \ + Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), \ + H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), Q__NOTE(_D6), H__NOTE(_E6), \ + Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_D6), BD_NOTE(_D6), \ + Q__NOTE(_E6), Q__NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), Q__NOTE(_C6), H__NOTE(_C6), HD_NOTE(_C6), \ + H__NOTE(_B5), H__NOTE(_C6), H__NOTE(_E6), H__NOTE(_G6), WD_NOTE(_G6), Q__NOTE(_C6), B__NOTE(_C6), H__NOTE(_B6), \ + Q__NOTE(_C7), BD_NOTE(_C7), + #endif From a0270b55e1e5326ff097644ffe617574f2311d61 Mon Sep 17 00:00:00 2001 From: Ryan Caltabiano Date: Tue, 26 Mar 2019 18:13:13 -0500 Subject: [PATCH 389/445] Fixing Ergodox_EZ rgb_led initialization --- keyboards/ergodox_ez/ergodox_ez.c | 115 +++++++++--------- .../community/ergodox/drashna_glow/README.md | 1 - .../community/ergodox/drashna_glow/keymap.c | 68 ----------- 3 files changed, 57 insertions(+), 127 deletions(-) delete mode 100644 layouts/community/ergodox/drashna_glow/README.md diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index b27a6b89daee..6f4ae9fed179 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -269,69 +269,68 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { }; -__attribute__ ((weak)) const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { /*{row | col << 4} | {x=0..224, y=0..64} | | modifier | | | */ - {{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right - {{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2 - {{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3 - {{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4 - {{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5 - - {{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6 - {{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7 - {{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8 - {{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9 - {{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10 - - {{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11 - {{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12 - {{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13 - {{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14 - {{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15 - - {{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16 - {{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17 - {{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18 - {{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19 - {{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20 - - {{4|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 21 - {{4|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 22 - {{4|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 23 - {{4|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 24 - - {{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left - {{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2 - {{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3 - {{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4 - {{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5 - - {{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6 - {{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7 - {{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8 - {{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9 - {{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10 - - {{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11 - {{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12 - {{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13 - {{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14 - {{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15 - - {{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16 - {{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17 - {{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18 - {{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19 - {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20 - - {{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21 - {{4|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 22 - {{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23 - {{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24 + {{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 0}, // LED 1 on right > Key 6 + {{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 0}, // LED 2 > Key 7 + {{10|(0<<4)}, {17.2*10, 12.8*0}, 0}, // LED 3 > Key 8 + {{11|(0<<4)}, {17.2*11, 12.8*0}, 0}, // LED 4 > Key 9 + {{12|(0<<4)}, {17.2*12, 12.8*0}, 0}, // LED 5 > Key 0 + + {{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 0}, // LED 6 + {{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 0}, // LED 7 + {{10|(1<<4)}, {17.2*10, 12.8*1}, 0}, // LED 8 + {{11|(1<<4)}, {17.2*11, 12.8*1}, 0}, // LED 9 + {{12|(1<<4)}, {17.2*12, 12.8*1}, 0}, // LED 10 + + {{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 0}, // LED 11 + {{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 0}, // LED 12 + {{10|(2<<4)}, {17.2*10, 12.8*2}, 0}, // LED 13 + {{11|(2<<4)}, {17.2*11, 12.8*2}, 0}, // LED 14 + {{12|(2<<4)}, {17.2*12, 12.8*2}, 0}, // LED 15 + + {{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 0}, // LED 16 + {{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 0}, // LED 17 + {{10|(3<<4)}, {17.2*10, 12.8*3}, 0}, // LED 18 + {{11|(3<<4)}, {17.2*11, 12.8*3}, 0}, // LED 19 + {{12|(3<<4)}, {17.2*12, 12.8*3}, 0}, // LED 20 + + {{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21 + {{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22 + {{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23 + {{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24 + + {{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 0}, // LED 1 on left > Key 5 + {{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 0}, // LED 2 > Key 4 + {{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 0}, // LED 3 > Key 3 + {{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 0}, // LED 4 > Key 2 + {{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 0}, // LED 5 > Key 1 + + {{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 0}, // LED 6 + {{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 0}, // LED 7 + {{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 0}, // LED 8 + {{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 0}, // LED 9 + {{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 0}, // LED 10 + + {{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 0}, // LED 11 + {{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 0}, // LED 12 + {{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 0}, // LED 13 + {{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 0}, // LED 14 + {{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 0}, // LED 15 + + {{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 0}, // LED 16 + {{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 0}, // LED 17 + {{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 0}, // LED 18 + {{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 0}, // LED 19 + {{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 0}, // LED 20 + + {{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21 + {{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22 + {{ 2|(4<<4)}, {17.2* 2, 12.8*4}, 1}, // LED 23 + {{ 1|(4<<4)}, {17.2* 1, 12.8*4}, 1}, // LED 24 > Key Hack }; #endif diff --git a/layouts/community/ergodox/drashna_glow/README.md b/layouts/community/ergodox/drashna_glow/README.md deleted file mode 100644 index 7d625a258d49..000000000000 --- a/layouts/community/ergodox/drashna_glow/README.md +++ /dev/null @@ -1 +0,0 @@ -Note: This board will not flash if the "g_rgb_leds" const is not set to weak in the ergodox_ez.c file diff --git a/layouts/community/ergodox/drashna_glow/keymap.c b/layouts/community/ergodox/drashna_glow/keymap.c index 85455556791a..7d4bdbec50ea 100644 --- a/layouts/community/ergodox/drashna_glow/keymap.c +++ b/layouts/community/ergodox/drashna_glow/keymap.c @@ -1,70 +1,2 @@ /* placeholder file */ #include QMK_KEYBOARD_H - -#ifdef RGB_MATRIX_ENABLE -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - - /*{row | col << 4} - | {x=0..224, y=0..64} - | | modifier - | | | */ - {{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right - {{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2 - {{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3 - {{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4 - {{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5 - - {{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6 - {{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7 - {{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8 - {{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9 - {{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10 - - {{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11 - {{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12 - {{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13 - {{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14 - {{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15 - - {{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16 - {{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17 - {{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18 - {{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19 - {{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20 - - {{4|(6<<4)}, {24.9*6, 16*2}, 1}, // LED 21 - {{4|(7<<4)}, {24.9*7, 16*2}, 1}, // LED 22 - {{4|(8<<4)}, {24.9*8, 16*2}, 1}, // LED 23 - {{4|(9<<4)}, {24.9*9, 16*2}, 1}, // LED 24 - - {{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left - {{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2 - {{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3 - {{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4 - {{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5 - - {{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6 - {{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7 - {{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8 - {{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9 - {{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10 - - {{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11 - {{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12 - {{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13 - {{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14 - {{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15 - - {{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16 - {{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17 - {{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18 - {{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19 - {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20 - - {{4|(6<<4)}, {24.9*3, 16*2}, 1}, // LED 21 - {{4|(7<<4)}, {24.9*2, 16*2}, 1}, // LED 22 - {{4|(8<<4)}, {24.9*1, 16*2}, 1}, // LED 23 - {{4|(9<<4)}, {24.9*0, 16*2}, 1}, // LED 24 -}; - -#endif From 9ef21d2e1c26b4153368fb3fe887ea7117c5b49b Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 27 Mar 2019 01:39:09 +0000 Subject: [PATCH 390/445] Refactor staryu to current standards and enable support for backlight keycodes (#5487) --- keyboards/staryu/backlight_staryu.c | 52 ---------- keyboards/staryu/backlight_staryu.h | 25 +++-- keyboards/staryu/config.h | 60 +++++------ keyboards/staryu/keymaps/default/keymap.c | 119 +++++++++++++--------- keyboards/staryu/rules.mk | 50 ++++++--- keyboards/staryu/staryu.c | 34 +++++-- keyboards/staryu/staryu.h | 12 ++- 7 files changed, 183 insertions(+), 169 deletions(-) delete mode 100644 keyboards/staryu/backlight_staryu.c diff --git a/keyboards/staryu/backlight_staryu.c b/keyboards/staryu/backlight_staryu.c deleted file mode 100644 index 6fb9713f3a76..000000000000 --- a/keyboards/staryu/backlight_staryu.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "backlight.h" -#include - -/* backlighting */ -void init_backlight_led(void) -{ - DDRC |= (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. -void init_backlight_led(void); +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. -void backlight_led_on(uint8_t index); +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once -void backlight_led_off(uint8_t index); - -#endif +// Add backwards compatibility for existing keymaps +#define backlight_led_off(i) backlight_set_value(i, 0) +#define backlight_led_on(i) backlight_set_value(i, 1) \ No newline at end of file diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h index 268fe991acf1..7f8b39ba7b60 100755 --- a/keyboards/staryu/config.h +++ b/keyboards/staryu/config.h @@ -14,8 +14,7 @@ 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 +#pragma once #include "config_common.h" @@ -32,43 +31,38 @@ along with this program. If not, see . #define MATRIX_COLS 5 /* key matrix pins */ -#define MATRIX_ROW_PINS { } +#define MATRIX_ROW_PINS { NO_PIN } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4 } #define UNUSED_PINS -// from light_ws2812_config @ -// https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/staryu +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + #define RGB_DI_PIN C6 -#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 1 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +// #ifdef RGB_DI_PIN +// #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 -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_LEVELS 1 // either on/off +#define RGBLIGHT_LIMIT_VAL 200 /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 - -// TODO backlighting -#define BACKLIGHT_LEVELS 10 -// #define BACKLIGHT_PIN B7 -/* -Backlight: C2, C7, D5, D6, B0 -switch (index) { - case 0: - PORTC &= ~(1<. */ #include "staryu.h" -#include "backlight_staryu.h" - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - init_backlight_led(); - matrix_init_user(); + +#ifdef BACKLIGHT_ENABLE + +#ifdef BACKLIGHT_PIN + #pragma error "BACKLIGHT_PIN must stay undefined otherwise software pwm is incorrectly used" +#endif + +#define BACKLIGHT_PIN_COUNT 5 +static const pin_t backlight_pins[BACKLIGHT_PIN_COUNT] = { C2, C7, D5, D6, B0 }; + +void backlight_init_ports(void) { + for (uint8_t index = 0; index < BACKLIGHT_PIN_COUNT; index++) { + setPinOutput(backlight_pins[index]); + } } + +void backlight_set_value(uint8_t index, uint8_t level) { + writePin(backlight_pins[index], !!level); +} + +void backlight_set(uint8_t level) { + for (uint8_t index = 0; index < BACKLIGHT_PIN_COUNT; index++) { + backlight_set_value(index, level); + } +} + +#endif //BACKLIGHT_ENABLE diff --git a/keyboards/staryu/staryu.h b/keyboards/staryu/staryu.h index 12b8be92e71f..f404dff284e9 100755 --- a/keyboards/staryu/staryu.h +++ b/keyboards/staryu/staryu.h @@ -14,15 +14,19 @@ 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 KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, \ - K10, K11, K12 \ + K00, K01, \ + K10, K11, K12 \ ) { \ { K00, K01, K12, K11, K10 }, \ } + +#ifdef BACKLIGHT_ENABLE + +void backlight_set_value(uint8_t index, uint8_t level); + #endif From d8371b3380ffb07239d4920d3748f4af92d937f5 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 26 Mar 2019 21:40:01 -0400 Subject: [PATCH 391/445] [Keymap] Update iris default (#5489) * Update Iris default to include KC_GRV on base layer and match Configurator default * Update default config --- keyboards/keebio/iris/keymaps/default/config.h | 10 +--------- keyboards/keebio/iris/keymaps/default/keymap.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/default/config.h index 7986b504162a..01bb31a6e14a 100644 --- a/keyboards/keebio/iris/keymaps/default/config.h +++ b/keyboards/keebio/iris/keymaps/default/config.h @@ -17,16 +17,8 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS +#define EE_HANDS #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c index 4644c3d9b55d..f0e4d6f15b68 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c @@ -5,7 +5,7 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _ADJUST 16 +#define _ADJUST 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -20,25 +20,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, 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_Y, KC_U, KC_I, KC_O, KC_P, 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_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT + KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_RALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - 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_PGUP, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGDN, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, + KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_HOME, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, + BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_END, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, KC_DEL, KC_DEL, _______, KC_P0 // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ RGB_TOG, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_BSLS, + RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_LPRN, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ From 509668ca7ce224a389a2caa3ff4df19302d4efc1 Mon Sep 17 00:00:00 2001 From: Fabien Culpo Date: Wed, 27 Mar 2019 01:41:37 +0000 Subject: [PATCH 392/445] [Keymap] add redox/rev1:fculpo keymap (#5491) --- keyboards/redox/keymaps/fculpo/config.h | 34 ++ keyboards/redox/keymaps/fculpo/keymap.c | 92 +++++ keyboards/redox/keymaps/fculpo/keymap.json | 399 +++++++++++++++++++++ keyboards/redox/keymaps/fculpo/readme.md | 18 + keyboards/redox/keymaps/fculpo/rules.mk | 2 + 5 files changed, 545 insertions(+) create mode 100644 keyboards/redox/keymaps/fculpo/config.h create mode 100644 keyboards/redox/keymaps/fculpo/keymap.c create mode 100644 keyboards/redox/keymaps/fculpo/keymap.json create mode 100644 keyboards/redox/keymaps/fculpo/readme.md create mode 100644 keyboards/redox/keymaps/fculpo/rules.mk diff --git a/keyboards/redox/keymaps/fculpo/config.h b/keyboards/redox/keymaps/fculpo/config.h new file mode 100644 index 000000000000..bff76aef2649 --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 + +/* Select hand configuration */ +#define MASTER_LEFT +//#define MASTER_RIGHT +//#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/fculpo/keymap.c b/keyboards/redox/keymaps/fculpo/keymap.c new file mode 100644 index 000000000000..b5aeca99dd2b --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) +#define KC_CTQU RCTL_T(KC_QUOT) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,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_CTQU , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_F6 , KC_F7 ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + 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 + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/fculpo/keymap.json b/keyboards/redox/keymaps/fculpo/keymap.json new file mode 100644 index 000000000000..ca7905b16952 --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/keymap.json @@ -0,0 +1,399 @@ +[ + { + "name": "Redox/rev1", + "author": "Fabien Culpo", + "switchMount": "cherry", + "plate": false, + "pcb": false + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "x": 6.5 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 5, + "w": 1.25 + }, + "`\nLayer 2\n\n\n\n\n~", + { + "a": 4 + }, + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "a": 5, + "w": 1.25 + }, + "_\nLayer 2\n\n\n\n\n-" + ], + [ + { + "y": -0.625, + "x": 6.5 + }, + "Layer 1", + { + "x": 4.5 + }, + "Layer 1" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "x": 6.5 + }, + "Y" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 7, + "w": 1.25 + }, + "TAB", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "a": 5, + "w": 1.25 + }, + "+\n=" + ], + [ + { + "y": -0.625, + "x": 6.5, + "a": 7, + "h": 1.5 + }, + "[", + { + "x": 4.5, + "h": 1.5 + }, + "]" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1, + "n": true + }, + "F", + { + "x": 8.5, + "n": true + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 5, + "w": 1.25 + }, + "ESC\nCTRL", + { + "a": 4 + }, + "A", + { + "x": 14.5 + }, + ":\n;", + { + "a": 5, + "w": 1.25 + }, + "'\nCTRL" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + "<\n," + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1 + }, + ">\n." + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 5, + "w": 1.25 + }, + "SHIFT", + { + "a": 4 + }, + "Z", + { + "x": 14.5 + }, + "?\n/", + { + "a": 5, + "w": 1.25 + }, + "SHIFT" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "*\nALT", + { + "x": 10.5 + }, + "Left" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "-", + { + "x": 12.5 + }, + "Down" + ], + [ + { + "y": -0.75, + "x": 0.5 + }, + "|\n\n\n\n\n\n\\", + "+", + { + "x": 14.5 + }, + "Up", + { + "sb": "cherry", + "st": "MX1A-21xx" + }, + "Right" + ], + [ + { + "r": 15, + "y": -2.625, + "x": 5.75, + "a": 7, + "w": 1.25 + }, + "SUPER" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "a": 5 + }, + "PgUp\nLay. 3", + { + "a": 7 + }, + "PgDn" + ], + [ + { + "h": 1.5 + }, + "Bksp", + { + "h": 1.5 + }, + "Del" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -2 + }, + "Home", + { + "a": 5 + }, + "End\nLay. 3" + ], + [ + { + "x": -2, + "a": 7, + "h": 1.5 + }, + "Enter", + { + "h": 1.5 + }, + "Space" + ], + [ + { + "r": -15, + "rx": 0, + "ry": 0, + "y": 7.75, + "x": 11.75, + "w": 1.25 + }, + "ALT" + ] +] diff --git a/keyboards/redox/keymaps/fculpo/readme.md b/keyboards/redox/keymaps/fculpo/readme.md new file mode 100644 index 000000000000..1250e47b9c9c --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/readme.md @@ -0,0 +1,18 @@ +# A tweaked keymap for Redox + +This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben. + +Also heavily inspired by nrichers layout. + +![fculpo Layout Image](https://i.imgur.com/OXT8boJ.png) + +## Changes to the default keymap + +These keymap changes are meant to improve the usability of the layout in everyday use: + +- Move `GUI` (`SUPER`) key to where default left `CTRL` is +- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive +- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?` +- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position +- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes +- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)S diff --git a/keyboards/redox/keymaps/fculpo/rules.mk b/keyboards/redox/keymaps/fculpo/rules.mk new file mode 100644 index 000000000000..a81250cdf6d9 --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes + From 346cbd88167e8e9a979517bf51144ff66e904f01 Mon Sep 17 00:00:00 2001 From: Jon Arintok Date: Wed, 27 Mar 2019 04:34:33 +0200 Subject: [PATCH 393/445] Add 3 speed mousekey movement option (#2246) This allows for constant, non-accelerated mouse movement, while retaining the original functionality. Configurable by a define. --- docs/feature_mouse_keys.md | 107 +++++++---- tmk_core/common/mousekey.c | 372 ++++++++++++++++++++++++------------- tmk_core/common/mousekey.h | 56 +++++- 3 files changed, 360 insertions(+), 175 deletions(-) diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md index 673eafaef5e0..e64ddf3d0666 100644 --- a/docs/feature_mouse_keys.md +++ b/docs/feature_mouse_keys.md @@ -1,48 +1,48 @@ # Mousekeys -Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys). +Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. -## Adding Mousekeys to a Keymap +There are 2 ways to define how the mousekeys behave, using "[auto-accelerating](#configuring-the-behavior-of-mousekeys-with-auto-accelerated-movement)" or "[3-speed constant](#configuring-the-behavior-of-mousekeys-with-3-speed-constant-movement)" behavior. -There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard. +In either case, you will need to enable mousekeys in your makefile, +and add the relevant [keycodes](#mapping-mouse-actions-to-keyboard-keys) to your keymap. -### Adding Mousekeys Support in the `rules.mk` +#### Enable Mousekeys -To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`: +To enable the mousekey functionality, add the following line to your keymap's `rules.mk`: ``` MOUSEKEY_ENABLE = yes ``` -You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk - -### Mapping Mouse Actions to Keyboard Keys +#### Mapping Mouse Actions to Keyboard Keys You can use these keycodes within your keymap to map button presses to mouse actions: -|Key |Aliases |Description | -|----------------|---------|---------------------------| -|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up | -|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down | -|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left | -|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right | -|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 | -|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 | -|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 | -|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 | -|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 | -|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up | -|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down | -|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left | -|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right | -|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0| -|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1| -|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2| - -You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46 - -## Configuring the Behavior of Mousekeys +|Key |Aliases |Description | +|----------------|---------|-----------------------------------| +|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up | +|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down | +|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left | +|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right | +|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 | +|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 | +|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 | +|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 | +|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 | +|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up | +|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down | +|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left | +|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right | +|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0(slow) | +|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1(medium)| +|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2(fast) | + + +## Configuring the Behavior of Mousekeys with auto-accelerated movement + +This behavior is intended to emulate the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys). The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms). @@ -55,27 +55,60 @@ The default speed for controlling the mouse with the keyboard is intentionally s #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 ``` - -### `MOUSEKEY_DELAY` +#### `MOUSEKEY_DELAY` When one of the mouse movement buttons is pressed this setting is used to define the delay between that button press and the mouse cursor moving. Some people find that small movements are impossible if this setting is too low, while settings that are too high feel sluggish. -### `MOUSEKEY_INTERVAL` +#### `MOUSEKEY_INTERVAL` When a movement key is held down this specifies how long to wait between each movement report. Lower settings will translate into an effectively higher mouse speed. -### `MOUSEKEY_MAX_SPEED` +#### `MOUSEKEY_MAX_SPEED` As a movement key is held down the speed of the mouse cursor will increase until it reaches `MOUSEKEY_MAX_SPEED`. -### `MOUSEKEY_TIME_TO_MAX` +#### `MOUSEKEY_TIME_TO_MAX` How long you want to hold down a movement key for until `MOUSEKEY_MAX_SPEED` is reached. This controls how quickly your cursor will accelerate. -### `MOUSEKEY_WHEEL_MAX_SPEED` +#### `MOUSEKEY_WHEEL_MAX_SPEED` The top speed for scrolling movements. -### `MOUSEKEY_WHEEL_TIME_TO_MAX` +#### `MOUSEKEY_WHEEL_TIME_TO_MAX` How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate. + + +## Configuring the Behavior of Mousekeys with 3-speed constant movement + +In your keymap's `config.h`, you must add the line: +``` +#define MK_3_SPEED +``` +Then you can precisely define 3 different speeds for both the cursor and the mouse wheel, and also whether speed selection is momentary or tap-to-select. +For each speed, you can specify how many milliseconds you want between reports(interval), and how far you want to it to move per report(offset). + +For example: + +``` +#define MK_3_SPEED +#define MK_MOMENTARY_ACCEL // comment this out for tap-to-select acceleration +// cursor speeds: +#define MK_C_OFFSET_SLOW 1 // pixels +#define MK_C_INTERVAL_SLOW 100 // milliseconds +#define MK_C_OFFSET_MED 4 +#define MK_C_INTERVAL_MED 16 +#define MK_C_OFFSET_FAST 12 +#define MK_C_INTERVAL_FAST 16 +// scroll wheel speeds: +#define MK_W_OFFSET_SLOW 1 // wheel clicks +#define MK_W_INTERVAL_SLOW 400 // milliseconds +#define MK_W_OFFSET_MED 1 +#define MK_W_INTERVAL_MED 200 +#define MK_W_OFFSET_FAST 1 +#define MK_W_INTERVAL_FAST 100 +``` + +Medium values will be used as the default or unmodified speed. +The speed at which both the cursor and scrolling move can be selected with KC_ACL0, KC_ACL1, KC_ACL2 for slow, medium, and fast. However, if you leave MK_MOMENTARY_ACCEL defined then there is no need to ever send KC_ACL1, since that will be the unmodified speed. diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 581e7b8a0725..87239fbb76b5 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -23,13 +23,24 @@ along with this program. If not, see . #include "debug.h" #include "mousekey.h" +inline int8_t times_inv_sqrt2(int8_t x) { + // 181/256 is pretty close to 1/sqrt(2) + // 0.70703125 0.707106781 + // 1 too small for x=99 and x=198 + // This ends up being a mult and discard lower 8 bits + return (x * 181) >> 8; +} - -static report_mouse_t mouse_report = {}; -static uint8_t mousekey_repeat = 0; +static report_mouse_t mouse_report = {0}; +static void mousekey_debug(void); static uint8_t mousekey_accel = 0; +static uint8_t mousekey_repeat = 0; +static uint16_t last_timer = 0; + + + +#ifndef MK_3_SPEED -static void mousekey_debug(void); /* @@ -52,155 +63,256 @@ uint8_t mk_time_to_max = MOUSEKEY_TIME_TO_MAX; uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; +static uint8_t move_unit(void) { + uint16_t unit; + if (mousekey_accel & (1<<0)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4; + } else if (mousekey_accel & (1<<1)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2; + } else if (mousekey_accel & (1<<2)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed); + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_MOVE_DELTA; + } else if (mousekey_repeat >= mk_time_to_max) { + unit = MOUSEKEY_MOVE_DELTA * mk_max_speed; + } else { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max; + } + return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit)); +} -static uint16_t last_timer = 0; +static uint8_t wheel_unit(void) { + uint16_t unit; + if (mousekey_accel & (1<<0)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4; + } else if (mousekey_accel & (1<<1)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2; + } else if (mousekey_accel & (1<<2)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_WHEEL_DELTA; + } else if (mousekey_repeat >= mk_wheel_time_to_max) { + unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; + } else { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; + } + return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); +} -inline int8_t times_inv_sqrt2(int8_t x) -{ - // 181/256 is pretty close to 1/sqrt(2) - // 0.70703125 0.707106781 - // 1 too small for x=99 and x=198 - // This ends up being a mult and discard lower 8 bits - return (x * 181) >> 8; +void mousekey_task(void) { + if (timer_elapsed(last_timer) < (mousekey_repeat ? mk_interval : mk_delay*10)) { + return; + } + if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) { + return; + } + if (mousekey_repeat != UINT8_MAX) mousekey_repeat++; + if (mouse_report.x > 0) mouse_report.x = move_unit(); + if (mouse_report.x < 0) mouse_report.x = move_unit() * -1; + if (mouse_report.y > 0) mouse_report.y = move_unit(); + if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; + /* diagonal move [1/sqrt(2)] */ + if (mouse_report.x && mouse_report.y) { + mouse_report.x = times_inv_sqrt2(mouse_report.x); + mouse_report.y = times_inv_sqrt2(mouse_report.y); + } + if (mouse_report.v > 0) mouse_report.v = wheel_unit(); + if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1; + if (mouse_report.h > 0) mouse_report.h = wheel_unit(); + if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1; + mousekey_send(); } -static uint8_t move_unit(void) -{ - uint16_t unit; - if (mousekey_accel & (1<<0)) { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4; - } else if (mousekey_accel & (1<<1)) { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2; - } else if (mousekey_accel & (1<<2)) { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed); - } else if (mousekey_repeat == 0) { - unit = MOUSEKEY_MOVE_DELTA; - } else if (mousekey_repeat >= mk_time_to_max) { - unit = MOUSEKEY_MOVE_DELTA * mk_max_speed; - } else { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max; - } - return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit)); +void mousekey_on(uint8_t code) { + if (code == KC_MS_UP) mouse_report.y = move_unit() * -1; + else if (code == KC_MS_DOWN) mouse_report.y = move_unit(); + else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1; + else if (code == KC_MS_RIGHT) mouse_report.x = move_unit(); + else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit(); + else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1; + else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1; + else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit(); + else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0); + else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1); + else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2); } -static uint8_t wheel_unit(void) -{ - uint16_t unit; - if (mousekey_accel & (1<<0)) { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4; - } else if (mousekey_accel & (1<<1)) { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2; - } else if (mousekey_accel & (1<<2)) { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); - } else if (mousekey_repeat == 0) { - unit = MOUSEKEY_WHEEL_DELTA; - } else if (mousekey_repeat >= mk_wheel_time_to_max) { - unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; - } else { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; - } - return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); +void mousekey_off(uint8_t code) { + if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0; + else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0; + else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0; + else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0; + else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0; + else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0; + else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0; + else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0; + else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0); + else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1); + else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2); + if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) + mousekey_repeat = 0; } -void mousekey_task(void) -{ - if (timer_elapsed(last_timer) < (mousekey_repeat ? mk_interval : mk_delay*10)) - return; - if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) - return; - if (mousekey_repeat != UINT8_MAX) - mousekey_repeat++; + +#else /* #ifndef MK_3_SPEED */ - if (mouse_report.x > 0) mouse_report.x = move_unit(); - if (mouse_report.x < 0) mouse_report.x = move_unit() * -1; - if (mouse_report.y > 0) mouse_report.y = move_unit(); - if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; - /* diagonal move [1/sqrt(2)] */ - if (mouse_report.x && mouse_report.y) { - mouse_report.x = times_inv_sqrt2(mouse_report.x); - mouse_report.x = mouse_report.x == 0 ? 1 : mouse_report.x; - mouse_report.y = times_inv_sqrt2(mouse_report.y); - mouse_report.y = mouse_report.y == 0 ? 1 : mouse_report.y; - } +enum { + mkspd_slow, + mkspd_med, + mkspd_fast, + mkspd_COUNT +}; +static uint8_t mk_speed = mkspd_med; +#ifdef MK_MOMENTARY_ACCEL +static uint8_t mkspd_DEFAULT = mkspd_med; +#endif +static uint16_t last_timer_c = 0; +static uint16_t last_timer_w = 0; +uint16_t c_offsets[mkspd_COUNT] = { + MK_C_OFFSET_SLOW, MK_C_OFFSET_MED, MK_C_OFFSET_FAST +}; +uint16_t c_intervals[mkspd_COUNT] = { + MK_C_INTERVAL_SLOW, MK_C_INTERVAL_MED, MK_C_INTERVAL_FAST +}; +uint16_t w_offsets[mkspd_COUNT] = { + MK_W_OFFSET_SLOW, MK_W_OFFSET_MED, MK_W_OFFSET_FAST +}; +uint16_t w_intervals[mkspd_COUNT] = { + MK_W_INTERVAL_SLOW, MK_W_INTERVAL_MED, MK_W_INTERVAL_FAST +}; - if (mouse_report.v > 0) mouse_report.v = wheel_unit(); - if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1; - if (mouse_report.h > 0) mouse_report.h = wheel_unit(); - if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1; - mousekey_send(); +void mousekey_task(void) { + // report cursor and scroll movement independently + report_mouse_t const tmpmr = mouse_report; + if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { + mouse_report.h = 0; + mouse_report.v = 0; + mousekey_send(); + last_timer_c = last_timer; + mouse_report = tmpmr; + } + if ((mouse_report.h || mouse_report.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) { + mouse_report.x = 0; + mouse_report.y = 0; + mousekey_send(); + last_timer_w = last_timer; + mouse_report = tmpmr; + } } -void mousekey_on(uint8_t code) -{ - if (code == KC_MS_UP) mouse_report.y = move_unit() * -1; - else if (code == KC_MS_DOWN) mouse_report.y = move_unit(); - else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1; - else if (code == KC_MS_RIGHT) mouse_report.x = move_unit(); - else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit(); - else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1; - else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1; - else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit(); - else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; - else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; - else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; - else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; - else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; - else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0); - else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1); - else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2); +void adjust_speed(void) { + uint16_t const c_offset = c_offsets[mk_speed]; + uint16_t const w_offset = w_offsets[mk_speed]; + if (mouse_report.x > 0) mouse_report.x = c_offset; + if (mouse_report.x < 0) mouse_report.x = c_offset * -1; + if (mouse_report.y > 0) mouse_report.y = c_offset; + if (mouse_report.y < 0) mouse_report.y = c_offset * -1; + if (mouse_report.h > 0) mouse_report.h = w_offset; + if (mouse_report.h < 0) mouse_report.h = w_offset * -1; + if (mouse_report.v > 0) mouse_report.v = w_offset; + if (mouse_report.v < 0) mouse_report.v = w_offset * -1; + // adjust for diagonals + if (mouse_report.x && mouse_report.y) { + mouse_report.x = times_inv_sqrt2(mouse_report.x); + mouse_report.y = times_inv_sqrt2(mouse_report.y); + } + if (mouse_report.h && mouse_report.v) { + mouse_report.h = times_inv_sqrt2(mouse_report.h); + mouse_report.v = times_inv_sqrt2(mouse_report.v); + } } -void mousekey_off(uint8_t code) -{ - if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0; - else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0; - else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0; - else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0; - else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0; - else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0; - else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0; - else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0; - else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1; - else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2; - else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; - else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; - else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; - else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0); - else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1); - else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2); - - if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) - mousekey_repeat = 0; +void mousekey_on(uint8_t code) { + uint16_t const c_offset = c_offsets[mk_speed]; + uint16_t const w_offset = w_offsets[mk_speed]; + uint8_t const old_speed = mk_speed; + if (code == KC_MS_UP) mouse_report.y = c_offset * -1; + else if (code == KC_MS_DOWN) mouse_report.y = c_offset; + else if (code == KC_MS_LEFT) mouse_report.x = c_offset * -1; + else if (code == KC_MS_RIGHT) mouse_report.x = c_offset; + else if (code == KC_MS_WH_UP) mouse_report.v = w_offset; + else if (code == KC_MS_WH_DOWN) mouse_report.v = w_offset * -1; + else if (code == KC_MS_WH_LEFT) mouse_report.h = w_offset * -1; + else if (code == KC_MS_WH_RIGHT) mouse_report.h = w_offset; + else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mk_speed = mkspd_slow; + else if (code == KC_MS_ACCEL1) mk_speed = mkspd_med; + else if (code == KC_MS_ACCEL2) mk_speed = mkspd_fast; + if (mk_speed != old_speed) adjust_speed(); } -void mousekey_send(void) -{ - mousekey_debug(); - host_mouse_send(&mouse_report); - last_timer = timer_read(); +void mousekey_off(uint8_t code) { +#ifdef MK_MOMENTARY_ACCEL + uint8_t const old_speed = mk_speed; +#endif + if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0; + else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0; + else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0; + else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0; + else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0; + else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0; + else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0; + else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0; + else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; +#ifdef MK_MOMENTARY_ACCEL + else if (code == KC_MS_ACCEL0) mk_speed = mkspd_DEFAULT; + else if (code == KC_MS_ACCEL1) mk_speed = mkspd_DEFAULT; + else if (code == KC_MS_ACCEL2) mk_speed = mkspd_DEFAULT; + if (mk_speed != old_speed) adjust_speed(); +#endif } -void mousekey_clear(void) -{ - mouse_report = (report_mouse_t){}; - mousekey_repeat = 0; - mousekey_accel = 0; + + + +#endif /* #ifndef MK_3_SPEED */ + + + + +void mousekey_send(void) { + mousekey_debug(); + host_mouse_send(&mouse_report); + last_timer = timer_read(); +} + +void mousekey_clear(void) { + mouse_report = (report_mouse_t){}; + mousekey_repeat = 0; + mousekey_accel = 0; } -static void mousekey_debug(void) -{ - if (!debug_mouse) return; - print("mousekey [btn|x y v h](rep/acl): ["); - phex(mouse_report.buttons); print("|"); - print_decs(mouse_report.x); print(" "); - print_decs(mouse_report.y); print(" "); - print_decs(mouse_report.v); print(" "); - print_decs(mouse_report.h); print("]("); - print_dec(mousekey_repeat); print("/"); - print_dec(mousekey_accel); print(")\n"); +static void mousekey_debug(void) { + if (!debug_mouse) return; + print("mousekey [btn|x y v h](rep/acl): ["); + phex(mouse_report.buttons); print("|"); + print_decs(mouse_report.x); print(" "); + print_decs(mouse_report.y); print(" "); + print_decs(mouse_report.v); print(" "); + print_decs(mouse_report.h); print("]("); + print_dec(mousekey_repeat); print("/"); + print_dec(mousekey_accel); print(")\n"); } diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h index 9338d0af7799..ce3501b232ab 100644 --- a/tmk_core/common/mousekey.h +++ b/tmk_core/common/mousekey.h @@ -16,23 +16,25 @@ along with this program. If not, see . */ #ifndef MOUSEKEY_H -#define MOUSEKEY_H +#define MOUSEKEY_H +#endif #include #include "host.h" +#ifndef MK_3_SPEED /* max value on report descriptor */ #ifndef MOUSEKEY_MOVE_MAX - #define MOUSEKEY_MOVE_MAX 127 + #define MOUSEKEY_MOVE_MAX 127 #elif MOUSEKEY_MOVE_MAX > 127 - #error MOUSEKEY_MOVE_MAX needs to be smaller than 127 + #error MOUSEKEY_MOVE_MAX needs to be smaller than 127 #endif #ifndef MOUSEKEY_WHEEL_MAX - #define MOUSEKEY_WHEEL_MAX 127 + #define MOUSEKEY_WHEEL_MAX 127 #elif MOUSEKEY_WHEEL_MAX > 127 - #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127 + #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127 #endif #ifndef MOUSEKEY_MOVE_DELTA @@ -60,6 +62,47 @@ along with this program. If not, see . #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 #endif +#else /* #ifndef MK_3_SPEED */ + +#ifndef MK_C_OFFSET_SLOW +#define MK_C_OFFSET_SLOW 1 +#endif +#ifndef MK_C_INTERVAL_SLOW +#define MK_C_INTERVAL_SLOW 100 +#endif +#ifndef MK_C_OFFSET_MED +#define MK_C_OFFSET_MED 4 +#endif +#ifndef MK_C_INTERVAL_MED +#define MK_C_INTERVAL_MED 16 +#endif +#ifndef MK_C_OFFSET_FAST +#define MK_C_OFFSET_FAST 12 +#endif +#ifndef MK_C_INTERVAL_FAST +#define MK_C_INTERVAL_FAST 16 +#endif + +#ifndef MK_W_OFFSET_SLOW +#define MK_W_OFFSET_SLOW 1 +#endif +#ifndef MK_W_INTERVAL_SLOW +#define MK_W_INTERVAL_SLOW 400 +#endif +#ifndef MK_W_OFFSET_MED +#define MK_W_OFFSET_MED 1 +#endif +#ifndef MK_W_INTERVAL_MED +#define MK_W_INTERVAL_MED 200 +#endif +#ifndef MK_W_OFFSET_FAST +#define MK_W_OFFSET_FAST 1 +#endif +#ifndef MK_W_INTERVAL_FAST +#define MK_W_INTERVAL_FAST 100 +#endif + +#endif /* #ifndef MK_3_SPEED */ #ifdef __cplusplus extern "C" { @@ -72,7 +115,6 @@ extern uint8_t mk_time_to_max; extern uint8_t mk_wheel_max_speed; extern uint8_t mk_wheel_time_to_max; - void mousekey_task(void); void mousekey_on(uint8_t code); void mousekey_off(uint8_t code); @@ -82,5 +124,3 @@ void mousekey_send(void); #ifdef __cplusplus } #endif - -#endif From 795c2c27b9cfe8fbda4f30e526dccfc1a5f774c2 Mon Sep 17 00:00:00 2001 From: martinmksiu Date: Wed, 27 Mar 2019 03:22:56 +0000 Subject: [PATCH 394/445] [Keymap] adding keymaps (#3583) * add key map * QWERTY with 40% layers * updated line 21 updated line 21 from "#include "xd75.h" to "#include QMK_KEYBOARD_H" as requested * upload contra folders * Update .directory * Update config.h * Update config.h * Update keymap.c * Update config.h * Update rules.mk * Update keyboards/contra/keymaps/martin_bac/config.h Co-Authored-By: martinmksiu * Update keyboards/xd75/keymaps/martin_cennum/config.h Co-Authored-By: martinmksiu * Delete .directory * upload * Delete rules.mk * Update keyboards/contra/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Delete nano.save * Delete rules.mk * Update keymap.c * Update keymap.c * Update config.h * Update keyboards/lets_split_eh/keymaps/msiu/keymap.c Co-Authored-By: martinmksiu * Update keyboards/lets_split_eh/keymaps/msiu/keymap.c Co-Authored-By: martinmksiu * Update keymap.c * Update keyboards/planck/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Apply suggestions from code review Co-Authored-By: martinmksiu * Update keymap.c * Update readme.md * Update keymap.c --- keyboards/contra/keymaps/msiu/config.h | 37 ++++ keyboards/contra/keymaps/msiu/keymap.c | 175 +++++++++++++++ keyboards/contra/keymaps/msiu/readme.md | 2 + keyboards/katana60/keymaps/msiu/config.h | 21 ++ keyboards/katana60/keymaps/msiu/keymap.c | 70 ++++++ keyboards/katana60/keymaps/msiu/readme.md | 3 + keyboards/lets_split_eh/keymaps/msiu/config.h | 21 ++ keyboards/lets_split_eh/keymaps/msiu/keymap.c | 195 ++++++++++++++++ keyboards/planck/keymaps/msiu/config.h | 40 ++++ keyboards/planck/keymaps/msiu/keymap.c | 208 ++++++++++++++++++ keyboards/planck/keymaps/msiu/readme.md | 2 + keyboards/planck/keymaps/msiu/rules.mk | 1 + keyboards/xd75/keymaps/msiu/config.h | 18 ++ keyboards/xd75/keymaps/msiu/keymap.c | 120 ++++++++++ keyboards/xd75/keymaps/msiu/readme.md | 1 + 15 files changed, 914 insertions(+) create mode 100644 keyboards/contra/keymaps/msiu/config.h create mode 100644 keyboards/contra/keymaps/msiu/keymap.c create mode 100644 keyboards/contra/keymaps/msiu/readme.md create mode 100644 keyboards/katana60/keymaps/msiu/config.h create mode 100644 keyboards/katana60/keymaps/msiu/keymap.c create mode 100644 keyboards/katana60/keymaps/msiu/readme.md create mode 100644 keyboards/lets_split_eh/keymaps/msiu/config.h create mode 100644 keyboards/lets_split_eh/keymaps/msiu/keymap.c create mode 100644 keyboards/planck/keymaps/msiu/config.h create mode 100644 keyboards/planck/keymaps/msiu/keymap.c create mode 100644 keyboards/planck/keymaps/msiu/readme.md create mode 100644 keyboards/planck/keymaps/msiu/rules.mk create mode 100644 keyboards/xd75/keymaps/msiu/config.h create mode 100644 keyboards/xd75/keymaps/msiu/keymap.c create mode 100644 keyboards/xd75/keymaps/msiu/readme.md diff --git a/keyboards/contra/keymaps/msiu/config.h b/keyboards/contra/keymaps/msiu/config.h new file mode 100644 index 000000000000..8757eb70d453 --- /dev/null +++ b/keyboards/contra/keymaps/msiu/config.h @@ -0,0 +1,37 @@ +#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 + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 diff --git a/keyboards/contra/keymaps/msiu/keymap.c b/keyboards/contra/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..c68c2c7bbf66 --- /dev/null +++ b/keyboards/contra/keymaps/msiu/keymap.c @@ -0,0 +1,175 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _DVORAK, + _LOWER, + _RAISE, + _NUMB, + _FUNC, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,------------------------------------------------------------------------------------------. + * | Tab / Numb | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |-------------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc / Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter | + * |-------------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Hyper | Alt | GUI |Lower | Func |Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_4x12( + LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_ESC), 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_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), 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_ortho_4x12( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 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_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_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, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + /* 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_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_BSPC, + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET + ), + + [_FUNC] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NUMB] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ + ) + +}; + +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 DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + 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/contra/keymaps/msiu/readme.md b/keyboards/contra/keymaps/msiu/readme.md new file mode 100644 index 000000000000..80aba1095487 --- /dev/null +++ b/keyboards/contra/keymaps/msiu/readme.md @@ -0,0 +1,2 @@ +# The Default Contra Layout + diff --git a/keyboards/katana60/keymaps/msiu/config.h b/keyboards/katana60/keymaps/msiu/config.h new file mode 100644 index 000000000000..b57cc482ec70 --- /dev/null +++ b/keyboards/katana60/keymaps/msiu/config.h @@ -0,0 +1,21 @@ +/* Copyright 2017 Baris Tosun + * + * 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/katana60/keymaps/msiu/keymap.c b/keyboards/katana60/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..72b795baa599 --- /dev/null +++ b/keyboards/katana60/keymaps/msiu/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +// Mod-Tap keys for cleaner code +#define ESC_CTL LCTL_T(KC_ESC) +#define SPC_LW LT(2, KC_SPC) +#define ENT_FN LT(4, KC_ENT) + +#define _QW 0 +#define _DV 1 +#define _LW 2 +#define _RS 3 +#define _FN 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = LAYOUT( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + 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_BSPC, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, 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_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, SPC_LW, ENT_FN, KC_SPC, MO(3), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), +[_DV] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +[_LW] = 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_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_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +[_RS] = 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_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, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + + + +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/katana60/keymaps/msiu/readme.md b/keyboards/katana60/keymaps/msiu/readme.md new file mode 100644 index 000000000000..e4f0ebdb6ec3 --- /dev/null +++ b/keyboards/katana60/keymaps/msiu/readme.md @@ -0,0 +1,3 @@ +# msiu's keymap for katana: standard QWERTY layout with planck like layers + +This layout take a standard QWERTY default layer, with raise and lower layers similar to planck. It is for me to easily transition between keyboards. I put a few nav keys in the 'tree' middle, but I have come to realise I rarely use them as I am used to the planck layering. Top of the tree is a toggle for Dvorak layer. diff --git a/keyboards/lets_split_eh/keymaps/msiu/config.h b/keyboards/lets_split_eh/keymaps/msiu/config.h new file mode 100644 index 000000000000..526c0837c725 --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/msiu/config.h @@ -0,0 +1,21 @@ +/* +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 . +*/ + +#pragma once diff --git a/keyboards/lets_split_eh/keymaps/msiu/keymap.c b/keyboards/lets_split_eh/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..af5c98241a4f --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/msiu/keymap.c @@ -0,0 +1,195 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// 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 _DVORAK 1 + +#define _LOWER 3 +#define _RAISE 4 + +#define _NUMB 14 +#define _FUNC 15 +#define _ADJUST 16 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + LOWER, + RAISE, + ADJUST +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Hyper | Alt | GUI |Lower | Func |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + LCTL_T(KC_ESC), 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_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +// Dvorak +[_DVORAK] = LAYOUT( \ + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, \ + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______ , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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_BSPC, \ + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |Qwerty|RGBVAD|RGBSAD|RGBHUD|RGBTOG| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | |BLSTEP| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGB_MOD, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, QWERTY, DVORAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ +), + +/* FUNC + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +// Numpad +[_NUMB] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ \ +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // case QWERTY: + // if (record->event.pressed) { + // persistent_default_layer_set(1UL<<_QWERTY); + // } + // return false; + // break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + 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/planck/keymaps/msiu/config.h b/keyboards/planck/keymaps/msiu/config.h new file mode 100644 index 000000000000..40e399a6759d --- /dev/null +++ b/keyboards/planck/keymaps/msiu/config.h @@ -0,0 +1,40 @@ +#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/msiu/keymap.c b/keyboards/planck/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..aea59e8d779a --- /dev/null +++ b/keyboards/planck/keymaps/msiu/keymap.c @@ -0,0 +1,208 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _DVORAK, + _LOWER, + _RAISE, + _NUMB, + _FUNC, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_planck_grid( + LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_ESC), 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_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_DVORAK] = LAYOUT_planck_grid( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_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_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, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +[_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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +[_ADJUST] = LAYOUT_planck_grid( + _______, _______, 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, DVORAK, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +), + +[_FUNC] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_NUMB] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ +) + + +}; + +#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 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; + } + 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) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +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/msiu/readme.md b/keyboards/planck/keymaps/msiu/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/msiu/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/msiu/rules.mk b/keyboards/planck/keymaps/msiu/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/msiu/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/xd75/keymaps/msiu/config.h b/keyboards/xd75/keymaps/msiu/config.h new file mode 100644 index 000000000000..4fbd59becc80 --- /dev/null +++ b/keyboards/xd75/keymaps/msiu/config.h @@ -0,0 +1,18 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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/xd75/keymaps/msiu/keymap.c b/keyboards/xd75/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..c4cc456a9079 --- /dev/null +++ b/keyboards/xd75/keymaps/msiu/keymap.c @@ -0,0 +1,120 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +/* What this layout is: QWERTY layout with the standard 40% layers. For easy + * switching between my xd75 and contra + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _DV 1 +#define _LW 2 +#define _RS 3 +#define _FN 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | \ | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | HYPER | LALT | LGUI | LOWER | FN | 0 | | . | SPACE | RAISE | LEFT | DOWN | UP | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = { /* QWERTY */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PLUS, KC_MINS, KC_ASTR, 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_7, KC_8, KC_9 , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL }, + { LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_6 , 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_1, KC_2, KC_3 , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + { KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, MO(_LW), MO(_FN), KC_0, _______, KC_DOT , KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }, + }, + + /* Dvorak */ + + [_DV] = { /* Dvorak */ + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______ }, + { _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, + { _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + + +/* LOWERED + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ~ | ! | @ | # | $ | % | | VOLU | | ^ | & | * | ( | ) | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | PREV | PLAY | NEXT | F6 | _ | + | { | } | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | VOLD | | F12 | PAGEDW | PAGEUP | HOME | END | MUTE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | MUTE | | PLAY | | PREV | VOLD | VOLU | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = { /* LOWERED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL }, + { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_VOLU, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MPRV, KC_MPLY, KC_MNXT, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_VOLD, _______, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE }, + { _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT }, + }, + +/* RAISED + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | | VOLU | | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | PREV | PLAY | NEXT | F6 | - | = | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | VOLD | | F12 | PAGEUP | PAGEDW | HOME | END | MUTE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | MUTE | | PLAY | | PREV | VOLD | VOLU | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = { /* RAISED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL }, + { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_VOLU, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MPRV, KC_MPLY, KC_MNXT, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_VOLD, _______, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE }, + { _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT }, + }, + +/* FUNCTION */ + + [_FN] = { /* FUNCTION */ + { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, KC_PSCR, _______ }, + { _______, _______, _______, TO(_DV), TO(_QW), _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, +}; + + diff --git a/keyboards/xd75/keymaps/msiu/readme.md b/keyboards/xd75/keymaps/msiu/readme.md new file mode 100644 index 000000000000..d53c0f34a87a --- /dev/null +++ b/keyboards/xd75/keymaps/msiu/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 From 2519de92b50f5df6939d1e404f09650383c2d1a6 Mon Sep 17 00:00:00 2001 From: Rob Rogers Date: Wed, 27 Mar 2019 10:42:03 -0500 Subject: [PATCH 395/445] [Docs] Add udev rule for Input Club bootloaders (#5494) * Add udev rule for Input Club bootloaders * match style with file name above udev rule --- docs/faq_build.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/faq_build.md b/docs/faq_build.md index 45d9439b48a3..0c1bedd7155a 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -36,6 +36,12 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066 # tmk keyboard products https://github.com/tmk/tmk_keyboard SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` ### Serial device is not detected in bootloader mode on Linux Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as From 6f124b790938e2e74431fc85f2cc1ae04d824f6e Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 27 Mar 2019 11:50:28 -0400 Subject: [PATCH 396/445] [Keyboard] Add Collide39 keyboard (#5486) * Add Collide39 keyboard * Remove unneeded lines --- keyboards/c39/c39.c | 1 + keyboards/c39/c39.h | 17 +++++ keyboards/c39/config.h | 89 +++++++++++++++++++++++++ keyboards/c39/info.json | 12 ++++ keyboards/c39/keymaps/default/config.h | 3 + keyboards/c39/keymaps/default/keymap.c | 45 +++++++++++++ keyboards/c39/keymaps/default/readme.md | 1 + keyboards/c39/readme.md | 16 +++++ keyboards/c39/rules.mk | 66 ++++++++++++++++++ 9 files changed, 250 insertions(+) create mode 100755 keyboards/c39/c39.c create mode 100755 keyboards/c39/c39.h create mode 100755 keyboards/c39/config.h create mode 100755 keyboards/c39/info.json create mode 100755 keyboards/c39/keymaps/default/config.h create mode 100755 keyboards/c39/keymaps/default/keymap.c create mode 100755 keyboards/c39/keymaps/default/readme.md create mode 100755 keyboards/c39/readme.md create mode 100755 keyboards/c39/rules.mk diff --git a/keyboards/c39/c39.c b/keyboards/c39/c39.c new file mode 100755 index 000000000000..78ecae5a323f --- /dev/null +++ b/keyboards/c39/c39.c @@ -0,0 +1 @@ +#include "c39.h" diff --git a/keyboards/c39/c39.h b/keyboards/c39/c39.h new file mode 100755 index 000000000000..797dd1ef7740 --- /dev/null +++ b/keyboards/c39/c39.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C \ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C } \ +} + +#define LAYOUT_ortho_3x13 LAYOUT diff --git a/keyboards/c39/config.h b/keyboards/c39/config.h new file mode 100755 index 000000000000..3adc7967018a --- /dev/null +++ b/keyboards/c39/config.h @@ -0,0 +1,89 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA17 +#define PRODUCT_ID 0xCA39 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maple Computing +#define PRODUCT C39 +#define DESCRIPTION A compact 39 key keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 13 + +#define MATRIX_ROW_PINS { D1, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, C6, D2, D3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * 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. + * + */ + +/* + * 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 diff --git a/keyboards/c39/info.json b/keyboards/c39/info.json new file mode 100755 index 000000000000..4ed7f018c8d9 --- /dev/null +++ b/keyboards/c39/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "C39", + "url": "", + "maintainer": "Space Cat", + "width": 13.25, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Back", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"M1", "x":11.25, "y":0}, {"label":"M2", "x":12.25, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"Enter", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"M3", "x":11.25, "y":1}, {"label":"M4", "x":12.25, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"Fn", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":">", "x":9, "y":2}, {"label":"?", "x":10, "y":2}, {"label":"M5", "x":11.25, "y":2}, {"label":"M6", "x":12.25, "y":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/c39/keymaps/default/config.h b/keyboards/c39/keymaps/default/config.h new file mode 100755 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/c39/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/c39/keymaps/default/keymap.c b/keyboards/c39/keymaps/default/keymap.c new file mode 100755 index 000000000000..9de75190d030 --- /dev/null +++ b/keyboards/c39/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +#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 _FN1 1 + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,----------------------------------------------------------------------------. ,-------------. + * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 | + * `----------------------------------------------------------------------------' `-------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2, + KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4, + KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6 +), + +/* FN1 + * ,----------------------------------------------------------------------------. ,-------------. + * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 | + * `----------------------------------------------------------------------------' `-------------' + */ +[_FN1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2, + KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4, + KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6 +), +}; diff --git a/keyboards/c39/keymaps/default/readme.md b/keyboards/c39/keymaps/default/readme.md new file mode 100755 index 000000000000..f5b1b6ac1145 --- /dev/null +++ b/keyboards/c39/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the C39 diff --git a/keyboards/c39/readme.md b/keyboards/c39/readme.md new file mode 100755 index 000000000000..0454f1c12b02 --- /dev/null +++ b/keyboards/c39/readme.md @@ -0,0 +1,16 @@ +# C39 +======= + +![C39](https://i.imgur.com/KuWIIuW.png) + +A compact 39 key keyboard. + +Keyboard Maintainer: [Maple Computing]() +Hardware Supported: C39 PCB +Hardware Availability: [SpaceCat.design](https://spacecat.design) + +Make example for this keyboard (after setting up your build environment): + + make c39: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/c39/rules.mk b/keyboards/c39/rules.mk new file mode 100755 index 000000000000..8fcb089817ce --- /dev/null +++ b/keyboards/c39/rules.mk @@ -0,0 +1,66 @@ +# 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 + + +# Boot Section Size in *bytes* +# 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 +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +RGBLIGHT_ENABLE = no # RGB Enable / Disable From b9f6ff05d09084d624b5736b46b8c8a446fa1892 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu, 28 Mar 2019 00:51:56 +0900 Subject: [PATCH 397/445] build size-check enhancement (#5485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build size-check enhancement Changed to display a warning when the free size of compilation result is less than 512 bytes. * update message.mk * add SIZE_MARGIN variable, change default margin 512 to 1024 for Example. ``` $ make SIZE_MARGIN=2048 crkbd:all $ make crkbd:all ## mergin is 1024 ``` * Update message.mk change message to ‘approaching the maximum’ Co-Authored-By: mtei <2170248+mtei@users.noreply.github.com> --- message.mk | 1 + tmk_core/rules.mk | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/message.mk b/message.mk index 6894dd8cb504..71f37be0b5f8 100644 --- a/message.mk +++ b/message.mk @@ -80,3 +80,4 @@ MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n +MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index c43f14292aaf..3a322cee4f25 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -383,6 +383,8 @@ show_path: @echo OBJ=$(OBJ) ifeq ($(findstring avr-gcc,$(CC)),avr-gcc) +SIZE_MARGIN = 1024 + check-size: $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne '/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) @@ -390,7 +392,15 @@ check-size: $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE))) if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \ $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \ - if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); else $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; fi \ + if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \ + printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); \ + else \ + if [ $(FREE_SIZE) -lt $(SIZE_MARGIN) ]; then \ + $(PRINT_WARNING_PLAIN); printf " * $(MSG_FILE_NEAR_LIMIT)"; \ + else \ + $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; \ + fi \ + fi \ fi else check-size: From c98380e0ddf1f1316daeda8c66d690b4ff16134b Mon Sep 17 00:00:00 2001 From: dsanchezseco Date: Wed, 27 Mar 2019 18:15:40 +0100 Subject: [PATCH 398/445] [Keymap] added user keymap (#5499) --- .../planck/keymaps/dsanchezseco/config.h | 39 ++++++ .../planck/keymaps/dsanchezseco/keymap.c | 116 ++++++++++++++++++ .../planck/keymaps/dsanchezseco/readme.md | 2 + .../planck/keymaps/dsanchezseco/rules.mk | 1 + 4 files changed, 158 insertions(+) create mode 100644 keyboards/planck/keymaps/dsanchezseco/config.h create mode 100644 keyboards/planck/keymaps/dsanchezseco/keymap.c create mode 100644 keyboards/planck/keymaps/dsanchezseco/readme.md create mode 100644 keyboards/planck/keymaps/dsanchezseco/rules.mk diff --git a/keyboards/planck/keymaps/dsanchezseco/config.h b/keyboards/planck/keymaps/dsanchezseco/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/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/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c new file mode 100644 index 000000000000..311cc110bfbd --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c @@ -0,0 +1,116 @@ +/* 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 { + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + DVORAK, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |Lower | Space | Bksp |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_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, KC_BSPC, 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 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | AltGr| | | | Del | | Play | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + * ^-- sticky + */ +[_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_ENT, + _______, OSM(MOD_RALT), _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT +), + +/* 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 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | AltGr| | | | Del | | Play | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + * ^-- sticky + */ +[_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_ENT, + _______, OSM(MOD_RALT), _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT +), + +/* Adjust (Lower + Raise) + * ,----------------------------------------------------------------------------------- + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |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, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/dsanchezseco/readme.md b/keyboards/planck/keymaps/dsanchezseco/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/dsanchezseco/rules.mk b/keyboards/planck/keymaps/dsanchezseco/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/rules.mk @@ -0,0 +1 @@ + From 67ca9e0c85d3f6e95e25ade0899206ed95fe3598 Mon Sep 17 00:00:00 2001 From: kwerdenker Date: Wed, 27 Mar 2019 18:39:23 +0100 Subject: [PATCH 399/445] [Keymap] Add kwer keymap and RGB mod description to cypher (#5479) * Add kwer keymap and RGB mod description to cypher * Add custom led_set_user to keymap * Remove unneccessary include path from keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c Co-Authored-By: kwerdenker --- .../westfoxtrot/cypher/keymaps/kwer/config.h | 33 ++++++++ .../westfoxtrot/cypher/keymaps/kwer/keymap.c | 79 +++++++++++++++++++ .../westfoxtrot/cypher/keymaps/kwer/readme.md | 39 +++++++++ .../westfoxtrot/cypher/keymaps/kwer/rules.mk | 2 + 4 files changed, 153 insertions(+) create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/config.h create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h b/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h new file mode 100644 index 000000000000..947e340c3239 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h @@ -0,0 +1,33 @@ +/* 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 . + */ + +#pragma once + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 15 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 15 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 5 + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #endif + +// place overrides here diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c new file mode 100644 index 000000000000..2d7bf2a5e218 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2018 westfoxtrot + * Copyright 2019 kwerdenker + * + * 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_german.h" + +#define _DL 0 +#define _FN 1 +#define _LE 2 + +#define SPECIAL LT(_FN, DE_CIRC) //capslock layer switch + stargate key on tap + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DL] = LAYOUT_iso ( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, _______, KC_NLCK, KC_PSCR,KC_PSLS,KC_PAST, + 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, KC_P7, KC_P8, KC_P9, KC_PMNS, + SPECIAL, 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, _______, KC_LALT, KC_SPC, _______, KC_RALT, TG(_LE), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO + ), + + [_FN] = LAYOUT_iso ( + DE_RING, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LE] = LAYOUT_iso ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,_______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + // Insert custom handling for CAPS_LOCK, NUM_LOCK, SCROLL_LOCK here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F5); + } else { + writePinLow(F4); + writePinLow(F1); + writePinLow(F5); + } +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md b/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md new file mode 100644 index 000000000000..c1a132e713b4 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md @@ -0,0 +1,39 @@ +# The kwer keymap and RGB MOD for cypher + +![](https://i.imgur.com/b7snIju.jpg) + +## Hardware +To make this mod, all you need a piece of WS2812b RGB strip (I used one with 144 LEDs per meter, so it's rather dense), some wiring (I used 0.6mm solid core wire) and steady hands for soldering to the MCU pin. + +**Installed mod** +![](https://i.imgur.com/IKcFd0k.jpg) + +As you can see, the wiring is relatively simple. VCC and GND can be easily accessed through the ISP header on the right side of the spacebar while the DATA line can be routed relatively easy through one of the stabilizer holes. While it isn't important where exactly you solder the VCC/GND wires to their respective lines on the strip, you have to keep the direction of the data line in mind. Most strip have arrows printed on them to show you in which direction the data is shifted through the LEDs and your should always solder your DATA line on the _from_ side, as seen in the above picture. + +**Close-up for the VCC/GND connections** +![](https://i.imgur.com/K0OibwW.jpg) + +Since there is no pinout availble for the pin we're gonna use to control the strip, the line has to be soldered to the MCU directly. While this is not a very complex process, you should have a fine tipped soldering irong and a steady hand. Make sure you do not bridge any of the neighboring pins when soldering the wire to the MCU pin. As shown in the picture below, you want to connect the DATA line to the third pin from the right on the top of the controller chip. + +**Close-up for the DATA connection** +![](https://i.imgur.com/zkD3RjF.jpg) + +## Software +To enable your RGB strip in QMK, you have to add change/add the following lines + +**rules.​mk** +``` +[...] +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +[...] +``` + +**config.h** +``` +[...] +#define RGB_DI_PIN F7 +#define RGBLED_NUM 15 // Change this number to the amount of LEDs on the strip you soldered +#define RGBLIGHT_ANIMATIONS +[...] +``` +To control the RGB color, animation, etc. you need to add the appropriate keycodes to your keymap. Either see [my keymap](./keymap.c) or the [official QMK documentation](https://docs.qmk.fm/#/feature_rgblight?id=keycodes) for references. diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk b/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk new file mode 100644 index 000000000000..df87c59a233a --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk @@ -0,0 +1,2 @@ +# Build options override +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow From 04684a94efb280f0716ad7429856fd326af65fa0 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 27 Mar 2019 22:12:17 -0700 Subject: [PATCH 400/445] [Keyboard] E6V2 Bootmapper Client QMK port (#5495) * initial commit of e6v2 bmc files * update readme with bmc template and reset key location * fix up the switch matrix * add usbconfig.h file * add i2c files * cleanup config.h * cleanup rules.mk and remove non atmega32a architecture code * add an appropriate keymap for testing * update readme with warning not to flash this hex file onto atmega32u4 e6v2 * get rgb lights working * add QMK Configurator support for 60_ansi layout * add hhkb support layout * add additional layouts such as tsangan and all and included QMK Configurator support for them * add bootmagic lite, and have it be set to Esc or the key located at k50 * update readme * fixup spacing for LAYOUT_all electrical matrix * add some pragma once magic * use i2c_master instead of custom i2c.c * remove the custom i2c.c * restore a more valid default keymap * add eep_rst to keymap --- keyboards/exclusive/e6v2/bmc/bmc.c | 96 +++++ keyboards/exclusive/e6v2/bmc/bmc.h | 101 +++++ keyboards/exclusive/e6v2/bmc/config.h | 57 +++ keyboards/exclusive/e6v2/bmc/info.json | 24 ++ .../e6v2/bmc/keymaps/default/config.h | 19 + .../e6v2/bmc/keymaps/default/keymap.c | 74 ++++ .../e6v2/bmc/keymaps/default/readme.md | 1 + keyboards/exclusive/e6v2/bmc/readme.md | 44 ++ keyboards/exclusive/e6v2/bmc/rules.mk | 90 ++++ keyboards/exclusive/e6v2/bmc/usbconfig.h | 393 ++++++++++++++++++ 10 files changed, 899 insertions(+) create mode 100644 keyboards/exclusive/e6v2/bmc/bmc.c create mode 100644 keyboards/exclusive/e6v2/bmc/bmc.h create mode 100644 keyboards/exclusive/e6v2/bmc/config.h create mode 100644 keyboards/exclusive/e6v2/bmc/info.json create mode 100644 keyboards/exclusive/e6v2/bmc/keymaps/default/config.h create mode 100644 keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md create mode 100644 keyboards/exclusive/e6v2/bmc/readme.md create mode 100644 keyboards/exclusive/e6v2/bmc/rules.mk create mode 100644 keyboards/exclusive/e6v2/bmc/usbconfig.h diff --git a/keyboards/exclusive/e6v2/bmc/bmc.c b/keyboards/exclusive/e6v2/bmc/bmc.c new file mode 100644 index 000000000000..257b68b8b4e8 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/bmc.c @@ -0,0 +1,96 @@ +/* Copyright 2019 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 "bmc.h" +#include "rgblight.h" +#include "i2c_master.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); +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/exclusive/e6v2/bmc/bmc.h b/keyboards/exclusive/e6v2/bmc/bmc.h new file mode 100644 index 000000000000..06d23fbe6900 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/bmc.h @@ -0,0 +1,101 @@ +/* Copyright 2019 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 . + */ +#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. + */ + +// LAYOUT_all ignores the key often coded as ~# to the left of Enter on ISO layouts. +// This is done as it shares the same row AND col as the pipe key. +#define LAYOUT_all( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k53, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k75, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, k53, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_ansi( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, \ + k00, k01, k02, k75, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_hhkb( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k01, k02, k75, k08, k09 \ +) \ +{ \ + { KC_NO, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_tsangan( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k75, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} diff --git a/keyboards/exclusive/e6v2/bmc/config.h b/keyboards/exclusive/e6v2/bmc/config.h new file mode 100644 index 000000000000..aae4d56dd9a9 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/config.h @@ -0,0 +1,57 @@ +/* +Copyright 2019 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER exclusive +#define PRODUCT e6v2 bmc +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +/* + * 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) + * +*/ + +// 0 1 2 3 4 5 6 7 8 9 A +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } +#define DIODE_DIRECTION COL2ROW + + +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 + +// Set bootmagic lite key to the key commonly programmed as Esc. +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/bmc/info.json b/keyboards/exclusive/e6v2/bmc/info.json new file mode 100644 index 000000000000..aa6d171ba871 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.26}, {"x":10.0, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + }, + + "LAYOUT_60_tsangan": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c new file mode 100644 index 000000000000..730041917650 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 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_60_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(1) + ), + +[1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, 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), + +}; + +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/exclusive/e6v2/bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md new file mode 100644 index 000000000000..4a1b6efa62cb --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bmc diff --git a/keyboards/exclusive/e6v2/bmc/readme.md b/keyboards/exclusive/e6v2/bmc/readme.md new file mode 100644 index 000000000000..3e2d19748d22 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/readme.md @@ -0,0 +1,44 @@ +# E6-V2 Bootmapper Client (ps2avrgb) + +These docs are for the BMC version of the E6-V2 PCB which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e6v2/bmc:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. You may also hold down the key located at `K50`, commonly programmed as the escape key. + +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://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + pip3 install pyusb + brew install --HEAD`https://raw.githubusercontent.com/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). diff --git a/keyboards/exclusive/e6v2/bmc/rules.mk b/keyboards/exclusive/e6v2/bmc/rules.mk new file mode 100644 index 000000000000..59f98e6f4ba3 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/rules.mk @@ -0,0 +1,90 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32a +PROTOCOL = VUSB + +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# 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 = 12000000 + + +# +# 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 = -DDEBUG_LEVEL=0 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = bootloadHID + + +# 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 = lite # 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_CUSTOM_DRIVER = yes +RGBLIGHT_ENABLE = yes # 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) + +SRC += i2c_master.c + +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/exclusive/e6v2/bmc/usbconfig.h b/keyboards/exclusive/e6v2/bmc/usbconfig.h new file mode 100644 index 000000000000..c52c90ce8a5a --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/usbconfig.h @@ -0,0 +1,393 @@ +/* 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 $ + */ + +#pragma once + +#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 'G', 'r', 'a', 'y', ' ', 'S', 't', 'u', 'd', 'i', 'o' +#define USB_CFG_VENDOR_NAME_LEN 11 +/* 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 'H', 'B', '8', '5' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* 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 From 2352afb3839431c024113a3dd197251cf8951591 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu, 28 Mar 2019 14:46:34 -0400 Subject: [PATCH 401/445] [Keymap] Add custom macro to launch RDP (#5502) * Add keycodes for new macros to keymaps * add macros for commonly used shortcuts * FIx macro code and add comments * Replaced with build in QMK keycodes * Removed macros that duplicated QMK keycodes --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 2 +- layouts/community/60_ansi/stanrc85-ansi/keymap.c | 2 +- users/stanrc85/stanrc85.c | 11 +++++++++++ users/stanrc85/stanrc85.h | 3 ++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index d0a77d916883..2fa3f445336b 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, 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, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [3] = LAYOUT_60_ansi( diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index ce41c0d4d934..b6e851b153c8 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, 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, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [3] = LAYOUT_60_ansi( diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index 3838f33efd6c..4a46d61daacb 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -79,6 +79,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case KC_RDP: //Opens Windows RDP + if (!record->event.pressed) { + register_code(KC_LGUI); + tap_code(KC_R); + unregister_code(KC_LGUI); + wait_ms(200); + send_string_with_delay_P(PSTR("mstsc"), 10); + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + } + return false; + break; } return process_record_keymap(keycode, record); } diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index 2f999ff502ed..da52df09ba57 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -20,7 +20,8 @@ #define TD_TCTL TD(TD_RCTL) enum cust_keys { - KC_MAKE = SAFE_RANGE + KC_MAKE = SAFE_RANGE, + KC_RDP }; enum tap_dance { From 6f6ab261e6bf44c49efedee7ebb769746ca70df7 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 28 Mar 2019 12:52:57 -0700 Subject: [PATCH 402/445] [Keyboard] revert back to the old custom i2c code for bmc (#5501) --- keyboards/exclusive/e6v2/bmc/bmc.c | 4 +- keyboards/exclusive/e6v2/bmc/i2c.c | 106 ++++++++++++++++++++++++++ keyboards/exclusive/e6v2/bmc/i2c.h | 24 ++++++ keyboards/exclusive/e6v2/bmc/rules.mk | 2 +- 4 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 keyboards/exclusive/e6v2/bmc/i2c.c create mode 100644 keyboards/exclusive/e6v2/bmc/i2c.h diff --git a/keyboards/exclusive/e6v2/bmc/bmc.c b/keyboards/exclusive/e6v2/bmc/bmc.c index 257b68b8b4e8..e3dd244c516a 100644 --- a/keyboards/exclusive/e6v2/bmc/bmc.c +++ b/keyboards/exclusive/e6v2/bmc/bmc.c @@ -15,7 +15,7 @@ */ #include "bmc.h" #include "rgblight.h" -#include "i2c_master.h" +#include "i2c.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -57,7 +57,7 @@ void rgblight_set(void) { } i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); } #endif diff --git a/keyboards/exclusive/e6v2/bmc/i2c.c b/keyboards/exclusive/e6v2/bmc/i2c.c new file mode 100644 index 000000000000..801242e0d082 --- /dev/null +++ b/keyboards/exclusive/e6v2/bmc/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); \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/bmc/rules.mk b/keyboards/exclusive/e6v2/bmc/rules.mk index 59f98e6f4ba3..7c3e16b15449 100644 --- a/keyboards/exclusive/e6v2/bmc/rules.mk +++ b/keyboards/exclusive/e6v2/bmc/rules.mk @@ -85,6 +85,6 @@ 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) -SRC += i2c_master.c +SRC += i2c.c PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex From 4fa7c9f1d0a51465991b926522472e969107e80c Mon Sep 17 00:00:00 2001 From: tomholford Date: Thu, 28 Mar 2019 15:31:39 -0700 Subject: [PATCH 403/445] [Keymap] addition: macro for "screenshot region to clipboard" in macOS (#5505) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create custom Planck Light keycap See README for details * Link to WhatPulse in README * More remapping, and add RGB LED effects * Remove dead code, address PR feedback from @drashna * Add macro for “screenshot region to clipboard” hotkey for macOS Also remove unused layer / key logic * Remove extraneous comment * Incorporate PR feedback from @drashna. Update README with new mapping. --- keyboards/planck/keymaps/tom/keymap.c | 37 ++------------------------ keyboards/planck/keymaps/tom/readme.md | 4 +++ 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index abd7c8adaa24..6e3b08938faa 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -21,21 +21,14 @@ 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 + BACKLIT }; #define LOWER MO(_LOWER) @@ -110,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + C(G(S(KC_4))), 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, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -136,32 +129,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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 EXT_PLV: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_gb_song); - #endif - layer_off(_PLOVER); - } - return false; - break; } return true; } diff --git a/keyboards/planck/keymaps/tom/readme.md b/keyboards/planck/keymaps/tom/readme.md index 7e31e2a0545d..8326cc13d85b 100644 --- a/keyboards/planck/keymaps/tom/readme.md +++ b/keyboards/planck/keymaps/tom/readme.md @@ -25,6 +25,10 @@ This layout is data-driven: I installed [WhatPulse](https://whatpulse.org/) a fe - map brightness up / down to original location of left and up arrows - map volume up / down to original location of down and right arrows +### ADJUST + +- map to esc key: screenshot region to clipboard - an alias for ctrl + cmd + shift + 4 + ## RGB LED From 3f4d706c98fc3a7f5fcec6ed0b62291b4159f097 Mon Sep 17 00:00:00 2001 From: Brian Choromanski Date: Fri, 29 Mar 2019 09:20:25 -0400 Subject: [PATCH 404/445] Fixing dead links (#5503) * Fixed typo of 'confid.h' to 'config.h' * Fixed broken links in docs * Fixed a lot of dead links * Removed all dead links that I could not find a replacement for * Placed knops links back in * Fixed plank keymaps so that they will compile for planck light * Https doesn't work on knops.io * tv44:budi now compiles * s60_x:amnesia0287 now compiles * Fixed allocation of key_combos so that narze keymap for planck can compile correctly * Disabled rgb on ergodone and infinity * Enabled tap dance so it compiles * Added return statement so it compiles * If compiling on light disable extra functionality * Properly redefined variable so it compiles * Remove remaining dead links --- docs/feature_rgblight.md | 2 ++ keyboards/atomic/readme.md | 2 +- keyboards/fc980c/README.md | 2 +- keyboards/handwired/frenchdev/readme.md | 1 - keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h | 0 keyboards/kc60/keymaps/stanleylai/readme.md | 4 +--- keyboards/kc60/readme.md | 1 - keyboards/kmac/readme.md | 2 +- keyboards/knops/readme.md | 2 +- keyboards/lets_split/keymaps/piemod/README.md | 3 --- keyboards/planck/keymaps/piemod/README.md | 4 ---- keyboards/readme.md | 4 ++-- layouts/community/ergodox/dvorak_spanish/readme.md | 1 - layouts/community/ergodox/osx_de/readme.md | 3 +-- layouts/community/ergodox/osx_de_experimental/readme.md | 1 - layouts/community/ergodox/teckinesis/readme.md | 2 +- layouts/community/ergodox/tm2030/readme.md | 2 +- quantum/visualizer/readme.md | 2 +- 18 files changed, 13 insertions(+), 25 deletions(-) mode change 100755 => 100644 keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 9ecc0deb5cda..c9323deb5eb6 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -125,6 +125,8 @@ The following options can be used to tweak the various animations: You can also modify the speeds that the different modes animate at: +Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). + ```c // How long (in milliseconds) to wait between animation steps for each of the "Solid color breathing" animations const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; diff --git a/keyboards/atomic/readme.md b/keyboards/atomic/readme.md index ab2fa4a23975..0561c4fea5ec 100644 --- a/keyboards/atomic/readme.md +++ b/keyboards/atomic/readme.md @@ -3,7 +3,7 @@ Atomic ![Atomic](http://i.imgur.com/3gNDJAh.jpg) -A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. [More info on qmk.fm](http://qmk.fm/atomic/) +A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) Hardware Supported: Atomic PCB rev1, Teensy 2.0 diff --git a/keyboards/fc980c/README.md b/keyboards/fc980c/README.md index 768d7d3a3cb9..61dcf6ee9643 100644 --- a/keyboards/fc980c/README.md +++ b/keyboards/fc980c/README.md @@ -155,7 +155,7 @@ Datasheets - AD5258: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf - JST S5B-PH-SM4: http://www.jst-mfg.com/product/pdf/eng/ePH.pdf - Hirose UX60SC-MB-5S8: https://www.hirose.com/product/en/products/UX/UX60SC-MB-5S8%2880%29/ -- Tr(E42) for LED?: http://cj-elec.com/txUpfile/2013614923661845.pdf +- Tr(E42) for LED?: http://www.bklighting.com/cimages/specs-758.pdf - TYU TU1252WNR-05S: http://php2.twinner.com.tw/files/goodjob/TY1252series.pdf diff --git a/keyboards/handwired/frenchdev/readme.md b/keyboards/handwired/frenchdev/readme.md index 9d7c59e71fd4..96825bb799d6 100644 --- a/keyboards/handwired/frenchdev/readme.md +++ b/keyboards/handwired/frenchdev/readme.md @@ -19,7 +19,6 @@ with the added possibility to connect up to 6 external switches like pedals, ## Laser-cuttable file There is intentionnaly no hole for the TRRS connector, you are supposed to use a drill for it. This way if you don't want to use the pedals you don't have a useless hole. Plus it's cleaner. -http://qmk.fm/frenchdev/frenchdev_v1_lasercut_template.svg ## Side stickers You can find my original file here : http://qmk.fm/frenchdev/example_printable_stickers.svg diff --git a/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h old mode 100755 new mode 100644 diff --git a/keyboards/kc60/keymaps/stanleylai/readme.md b/keyboards/kc60/keymaps/stanleylai/readme.md index 815649d987a7..6f5953ded74a 100644 --- a/keyboards/kc60/keymaps/stanleylai/readme.md +++ b/keyboards/kc60/keymaps/stanleylai/readme.md @@ -1,8 +1,6 @@ Stanley Lai's Split Right Shift with Dedicated Arrow Keys ====================== -![Image of KC60 with RGB Underglow](../ws2812/ws2812_example.jpg) - ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). @@ -20,7 +18,7 @@ For the full Quantum feature list, see [the parent readme.md](/readme.md). ![RGB Layer](http://imgur.com/ZWIfuPM) ## WS2812 Support -By default, it is now setup for 16 LEDs on the PF5 breakout pin. See [included image](../ws2812/ws2812_wiring.jpg) for wiring reference. +By default, it is now setup for 16 LEDs on the PF5 breakout pin. ### Build To build this keymap, simply run `make KEYMAP=stanleylai`. diff --git a/keyboards/kc60/readme.md b/keyboards/kc60/readme.md index da84f6159afe..e152824ccfc0 100644 --- a/keyboards/kc60/readme.md +++ b/keyboards/kc60/readme.md @@ -24,7 +24,6 @@ $ make [default|jack|] Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. ## WS2812 Support -![Image of KC60 with RGB Underglow](keymaps/ws2812/ws2812_example.jpg) Build with WS2812 Support by running `make ws2812`. diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md index ec36c0a5c9bf..cd181a5f68a3 100644 --- a/keyboards/kmac/readme.md +++ b/keyboards/kmac/readme.md @@ -20,7 +20,7 @@ For the full Quantum feature list, see the [documentation](https://docs.qmk.fm). The KMAC are available with two different PCB layouts, a winkey version and a winkeyless version. A default keymap are provided for each versions of the PCB. -Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/kmac](/keyboards/kmac) folder. +Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [qmk root](https://github.com/qmk/qmk_firmware/) folder. ### Winkey keymap diff --git a/keyboards/knops/readme.md b/keyboards/knops/readme.md index 563099b6d3e1..115e4d7c642e 100644 --- a/keyboards/knops/readme.md +++ b/keyboards/knops/readme.md @@ -7,4 +7,4 @@ * Maintainer: [Pawnerd](https://github.com/pawnerd) * Hardware Supported: * [`Mini`](mini/): Knops Mini -* Hardware Availability: [knops.io](https://www.knops.io/) \ No newline at end of file +* Hardware Availability: [knops.io](http://www.knops.io/) \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/piemod/README.md b/keyboards/lets_split/keymaps/piemod/README.md index f2a051da14ec..6bae7e76d940 100644 --- a/keyboards/lets_split/keymaps/piemod/README.md +++ b/keyboards/lets_split/keymaps/piemod/README.md @@ -17,9 +17,6 @@ A keymap for users that need: Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. -### Keymap - -![PieMod Keymap](./keymap.png) ### TODO diff --git a/keyboards/planck/keymaps/piemod/README.md b/keyboards/planck/keymaps/piemod/README.md index f2a051da14ec..9c29e75db34c 100644 --- a/keyboards/planck/keymaps/piemod/README.md +++ b/keyboards/planck/keymaps/piemod/README.md @@ -17,10 +17,6 @@ A keymap for users that need: Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. -### Keymap - -![PieMod Keymap](./keymap.png) - ### TODO - [ ] Add Emacs layer. diff --git a/keyboards/readme.md b/keyboards/readme.md index 8b0c10ab4826..81284755f49a 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -35,7 +35,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [9key](/keyboards/9key) — A 9-key minipad sold by Bishop Keyboards. * [Alps64](/keyboards/alps64) — A 60% keyboard for Alps keyswitches. * [AMJ60](/keyboards/amj60) — DIY/Assembled compact 60% keyboard. -* [Arrow Pad](/keyboards/arrow_pad) — A custom creation by IBNobody. +* [Arrow Pad](/keyboards/handwired/arrow_pad) — A custom creation by IBNobody. * [Atreus](/keyboards/atreus) — Made by Technomancy. * [Bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard. * [DataHand](/keyboards/handwired/datahand) — DataHand keyboard converted to use a Teensy board. @@ -53,7 +53,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [The Kitten Paw](/keyboards/kitten_paw) — A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies). * [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard. * [Phantom](/keyboards/phantom) — A tenkeyless kit by Teel, also from Geekhack. -* [Retro Refit](/keyboards/retro_refit) — Another creation by IBNobody. +* [Retro Refit](/keyboards/handwired/retro_refit) — Another creation by IBNobody. * [S60-x](/keyboards/s60_x) — DIY compact keyboard designed by VinnyCordeiro for Sentraq. * [Satan](/keyboards/satan) — A GH60 variant. * [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. diff --git a/layouts/community/ergodox/dvorak_spanish/readme.md b/layouts/community/ergodox/dvorak_spanish/readme.md index e075e3cd7d6c..1256c6887d97 100644 --- a/layouts/community/ergodox/dvorak_spanish/readme.md +++ b/layouts/community/ergodox/dvorak_spanish/readme.md @@ -1,5 +1,4 @@ # Ergodox Spanish Dvorak Layout - * See spanish dvorak layout [here](http://djelibeibi.unex.es/dvorak/) * Software layout must be set to SPANISH QWERTY to work properly ## Keymap Layers diff --git a/layouts/community/ergodox/osx_de/readme.md b/layouts/community/ergodox/osx_de/readme.md index 5011a9dd62ed..e4ccee3aa6b9 100644 --- a/layouts/community/ergodox/osx_de/readme.md +++ b/layouts/community/ergodox/osx_de/readme.md @@ -1,4 +1,4 @@ -#Ergodox EZ für OSX +# Ergodox EZ für OSX Dies ist nur ein kleiner Tweak der bestehenden firmware für das ErgoDox-EZ-Keyboard. Leider passte das layout nicht wirklich für OSX, deswegen habe ich einige Anpassungen gemacht. Dabei wurden folgende features umgesetzt: @@ -14,7 +14,6 @@ Dies ist nur ein kleiner Tweak der bestehenden firmware für das ErgoDox-EZ-Keyb # Erstellt Mit Dem ErgodoxLayoutGenerator Der ErgodoxLayoutGenerator ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein. -Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar). diff --git a/layouts/community/ergodox/osx_de_experimental/readme.md b/layouts/community/ergodox/osx_de_experimental/readme.md index e6a10184167f..dde28eee415e 100644 --- a/layouts/community/ergodox/osx_de_experimental/readme.md +++ b/layouts/community/ergodox/osx_de_experimental/readme.md @@ -8,7 +8,6 @@ dieses layout ist experimentell und wird im Lufe der Zeit viele Änderungen und # Erstellt Mit Dem ErgodoxLayoutGenerator Der ErgodoxLayoutGenerator (ELG) ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein. -Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar). --------------------------------------------------------------------------------------------------------------------- # Ergodox and Ergodox-EZ experimental layout diff --git a/layouts/community/ergodox/teckinesis/readme.md b/layouts/community/ergodox/teckinesis/readme.md index 6804bb06f6df..d9b22742c9b2 100644 --- a/layouts/community/ergodox/teckinesis/readme.md +++ b/layouts/community/ergodox/teckinesis/readme.md @@ -1,6 +1,6 @@ # teckinesis Layout -*A blend of TECK and Kinesis layouts, based on ["The Ordinary Layout" by Nicholas Keene](http://qmk.fm/keyboards/ergodox_ez/keymaps/ordinary/#the-ordinary-layout-a-familiar-and-powerful-layout)* +*A blend of TECK and Kinesis layouts, based on ["The Ordinary Layout" by Nicholas Keene](/layouts/community/ergodox/ordinary)* I love "The Ordinary Layout", but I still use a [TECK](https://www.trulyergonomic.com/store/index.php) at the office, and I found the transition back and forth to be a bit more difficult than I expected. diff --git a/layouts/community/ergodox/tm2030/readme.md b/layouts/community/ergodox/tm2030/readme.md index 23746ddb76ee..fce0c46e7d43 100644 --- a/layouts/community/ergodox/tm2030/readme.md +++ b/layouts/community/ergodox/tm2030/readme.md @@ -55,7 +55,7 @@ As on the original TM 2030, when `num` layer is activated, holding `fn` disables ## Dvorak Layer Same as Layer 0 but with _Dvorak_ layout, to use with QWERTY OS layout. -Enable Dvorak layout with [`Magic`](/TMK_readme.md#magic-commands)+`1` (`LShift`+`RShift`+`1`), disable with `Magic`-`0`. +Enable Dvorak layout with [`Magic`](/docs/feature_bootmagic.md)+`1` (`LShift`+`RShift`+`1`), disable with `Magic`-`0`. The middle (green) led indicates when the Dvorak layer is activated. diff --git a/quantum/visualizer/readme.md b/quantum/visualizer/readme.md index 545ba227078b..298efb742f2b 100644 --- a/quantum/visualizer/readme.md +++ b/quantum/visualizer/readme.md @@ -1,7 +1,7 @@ # A visualization library for the TMK keyboard firmware This library is designed to work together with the [TMK keyboard firmware](https://github.com/tmk/tmk_keyboard). Currently it only works for [Chibios](http://www.chibios.org/) - flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](http://www.ugfx.org/). + flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](https://ugfx.io/). ## To use this library as a user You can and should modify the visualizer\_user.c file. Check the comments in the file for more information. From 8fa9f67256772984110a6e21f19d6fb8594b804d Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Fri, 29 Mar 2019 11:39:28 -0600 Subject: [PATCH 405/445] [Keyboard] ErgoTaco Support (#5504) * ErgoTaco support * Update keyboards/ergotaco/ergotaco.h Co-Authored-By: germ * Update keyboards/ergotaco/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/ergotaco/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/ergotaco/readme.md Co-Authored-By: germ * Update keyboards/ergotaco/readme.md Co-Authored-By: germ * Update keyboards/ergotaco/rules.mk Co-Authored-By: germ * juggling rules.mk * Update keyboards/ergotaco/rules.mk Co-Authored-By: germ * updating IS_COMMAND * learning2english Meme-tastic --Drashna --- keyboards/ergotaco/config.h | 61 ++++ keyboards/ergotaco/ergotaco.c | 72 ++++ keyboards/ergotaco/ergotaco.h | 50 +++ keyboards/ergotaco/info.json | 61 ++++ keyboards/ergotaco/keymaps/default/keymap.c | 42 +++ keyboards/ergotaco/keymaps/default/readme.md | 6 + keyboards/ergotaco/keymaps/default/rules.mk | 10 + keyboards/ergotaco/matrix.c | 366 +++++++++++++++++++ keyboards/ergotaco/readme.md | 24 ++ keyboards/ergotaco/rules.mk | 26 ++ 10 files changed, 718 insertions(+) create mode 100644 keyboards/ergotaco/config.h create mode 100644 keyboards/ergotaco/ergotaco.c create mode 100644 keyboards/ergotaco/ergotaco.h create mode 100644 keyboards/ergotaco/info.json create mode 100644 keyboards/ergotaco/keymaps/default/keymap.c create mode 100644 keyboards/ergotaco/keymaps/default/readme.md create mode 100644 keyboards/ergotaco/keymaps/default/rules.mk create mode 100644 keyboards/ergotaco/matrix.c create mode 100644 keyboards/ergotaco/readme.md create mode 100644 keyboards/ergotaco/rules.mk diff --git a/keyboards/ergotaco/config.h b/keyboards/ergotaco/config.h new file mode 100644 index 000000000000..4dbe0573b3d5 --- /dev/null +++ b/keyboards/ergotaco/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +// Copy and worked on with love from the EZ team + +#pragma once +#include "config_common.h" + +#define VERBOSE + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER g Heavy Industries +#define PRODUCT ErgoTaco +#define DESCRIPTION QMK keyboard firmware for ErgoTaco + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 1 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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() (get_mods() == MOD_MASK_CTRL || get_mods() == MOD_MASK_SHIFT) + +#define DEBOUNCE 5 +#define USB_MAX_POWER_CONSUMPTION 500 diff --git a/keyboards/ergotaco/ergotaco.c b/keyboards/ergotaco/ergotaco.c new file mode 100644 index 000000000000..ecab74b3a26a --- /dev/null +++ b/keyboards/ergotaco/ergotaco.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +bool i2c_initialized = 0; +i2c_status_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + // (tied to Vcc for hardware convenience) + //DDRB &= ~(1<<4); // set B(4) as input + //PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins + // set as input with internal pull-up enabled + DDRB &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7); + PORTB |= (1<<4 | 1<<5 | 1<<6 | 1<<7); + + DDRC &= ~(1<<7 | 1<<6); + PORTC |= (1<<7 | 1<<6); + + DDRD &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7); + PORTD |= (1<<4 | 1<<5 | 1<<6 | 1<<7); + + DDRE &= ~(1<<6); + PORTE |= (1<<6); + + DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7); + PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7); + + matrix_init_user(); +} + + +uint8_t init_mcp23018(void) { + print("starting init"); + mcp23018_status = 0x20; + + // I2C subsystem + + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); + + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + +out: + i2c_stop(); + // SREG=sreg_prev; + //uprintf("Init %x\n", mcp23018_status); + return mcp23018_status; +} diff --git a/keyboards/ergotaco/ergotaco.h b/keyboards/ergotaco/ergotaco.h new file mode 100644 index 000000000000..6bc5ce36f896 --- /dev/null +++ b/keyboards/ergotaco/ergotaco.h @@ -0,0 +1,50 @@ +#pragma once +#include +#include +#include +#include "quantum.h" +#include "i2c_master.h" +#include "matrix.h" + + +extern i2c_status_t mcp23018_status; +#define ERGODOX_EZ_I2C_TIMEOUT 1000 +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +//#define I2C_ADDR 0b0100000 +#define I2C_ADDR 0x20 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +void init_ergodox(void); +uint8_t init_mcp23018(void); + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT( \ + L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05) \ + \ + /* matrix positions */ \ + { \ + {R00}, \ + {R01}, \ + {R02}, \ + {R03}, \ + {R04}, \ + {R05}, \ + {L05}, \ + {L04}, \ + {L03}, \ + {L02}, \ + {L01}, \ + {L00}, \ +} diff --git a/keyboards/ergotaco/info.json b/keyboards/ergotaco/info.json new file mode 100644 index 000000000000..cf6b810fecd2 --- /dev/null +++ b/keyboards/ergotaco/info.json @@ -0,0 +1,61 @@ +{ + "keyboard_name": "ErgoTaco", + "url": "http://gboards.ca", + "maintainer": "germ", + "width": 13, + "height": 2.75, + "layouts": { + "LAYOUT": { + "layout": [ + { + "x": 0, + "y": 1.25 + }, + { + "x": 1, + "y": 0.75 + }, + { + "x": 2, + "y": 0.5 + }, + { + "x": 3, + "y": 0.25 + }, + { + "x": 4, + "y": 1 + }, + { + "x": 5, + "y": 1.75 + }, + { + "x": 7, + "y": 1.75 + }, + { + "x": 8, + "y": 1 + }, + { + "x": 9, + "y": 0.25 + }, + { + "x": 10, + "y": 0.5 + }, + { + "x": 11, + "y": 0.75 + }, + { + "x": 12, + "y": 1.25 + } + ] + } + } +} diff --git a/keyboards/ergotaco/keymaps/default/keymap.c b/keyboards/ergotaco/keymaps/default/keymap.c new file mode 100644 index 000000000000..be1267ef06c4 --- /dev/null +++ b/keyboards/ergotaco/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H + +#define FIESTA 0 // default layer +#define TACOTIME 1 // symbols + +// Blank template at the bottom +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap template + * + * ,-------------------------------------------------. ,--------------------------------------------. + * | | | | | | | | | | | | | | | + * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------' */ +[FIESTA] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H +), +}; + +/* Keymap template + * + * ,-------------------------------------------------. ,--------------------------------------------. + * | | | | | | | | | | | | | | | + * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------' +[FIESTA] = 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 +), + */ + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; diff --git a/keyboards/ergotaco/keymaps/default/readme.md b/keyboards/ergotaco/keymaps/default/readme.md new file mode 100644 index 000000000000..653f3774eaa9 --- /dev/null +++ b/keyboards/ergotaco/keymaps/default/readme.md @@ -0,0 +1,6 @@ +This is the default keymap for the ErgoTaco, Make it your own! + +## Settings +To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/ergotaco/keymaps/default/rules.mk + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! diff --git a/keyboards/ergotaco/keymaps/default/rules.mk b/keyboards/ergotaco/keymaps/default/rules.mk new file mode 100644 index 000000000000..e394fbf1e647 --- /dev/null +++ b/keyboards/ergotaco/keymaps/default/rules.mk @@ -0,0 +1,10 @@ +#---------------------------------------------------------------------------- +# make ergotaco:default:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options + +#Debug options +VERBOSE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = yes diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c new file mode 100644 index 000000000000..e4fd6902f99c --- /dev/null +++ b/keyboards/ergotaco/matrix.c @@ -0,0 +1,366 @@ +/* +Note for ErgoDox EZ customizers: Here be dragons! +This is not a file you want to be messing with. +All of the interesting stuff for you is under keymaps/ :) +Love, Erez + +Copyright 2013 Oleg Kostyuk + +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 "matrix.h" +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include QMK_KEYBOARD_H +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +// ATmega pin defs +#define ROW1 (1<<5) +#define COL6 (1<<0) +#define COL7 (1<<1) +#define COL8 (1<<2) +#define COL9 (1<<3) +#define COL10 (1<<2) +#define COL11 (1<<3) + + +// bit masks +#define BMASK (COL7 | COL8 | COL9 | COL6) +#define DMASK (COL10 | COL11) +#define FMASK (ROW1) + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +/* + * matrix state(1:on, 0:off) + * contains the raw values without debounce filtering of the last read cycle. + */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; +// static uint16_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + + +void matrix_init(void) +{ + // initialize row and col + mcp23018_status = init_mcp23018(); + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + for (uint8_t j=0; j < MATRIX_COLS; ++j) { + debounce_matrix[i * MATRIX_COLS + j] = 0; + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + matrix_init_quantum(); +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + +} + +// Returns a matrix_row_t whose bits are set if the corresponding key should be +// eligible to change in this scan. +matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { + matrix_row_t result = 0; + matrix_row_t change = rawcols ^ raw_matrix[row]; + raw_matrix[row] = rawcols; + for (uint8_t i = 0; i < MATRIX_COLS; ++i) { + if (debounce_matrix[row * MATRIX_COLS + i]) { + --debounce_matrix[row * MATRIX_COLS + i]; + } else { + result |= (1 << i); + } + if (change & (1 << i)) { + debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; + } + } + return result; +} + +matrix_row_t debounce_read_cols(uint8_t row) { + // Read the row without debouncing filtering and store it for later usage. + matrix_row_t cols = read_cols(row); + // Get the Debounce mask. + matrix_row_t mask = debounce_mask(cols, row); + // debounce the row and return the result. + return (cols & mask) | (matrix[row] & ~mask);; +} + +uint8_t matrix_scan(void) +{ + // Then the keyboard + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + select_row(i); + // and select on left hand + select_row(i + MATRIX_ROWS_PER_SIDE); + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + // grab cols from left hand + matrix[i] = debounce_read_cols(i); + // grab cols from right hand + matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); + + unselect_rows(); + } + + matrix_scan_quantum(); + +#ifdef DEBUG_MATRIX + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); +#endif + + return 1; +} + +bool matrix_is_modified(void) // deprecated and evidently not called. +{ + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 2) & 0x01 ; + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + +#ifdef DEBUG_MATRIX + if (data != 0x00) xprintf("I2C: %d\n", data); +#endif + return data; + } + } else { + // Read using bitmask + return ~((((PINF & ROW1) >> 5)) & 0x1); + } +} + +// Row pin configuration +static void unselect_rows(void) +{ + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~BMASK; + PORTB &= ~BMASK; + DDRD &= ~DMASK; + PORTD &= ~DMASK; +} + +static void select_row(uint8_t row) +{ + if (row < 6) { + // select on mcp23018 + if (mcp23018_status) { // do nothing on error + // Read using bitmask + } else { // set active row low : 0 // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(~(1< Date: Fri, 29 Mar 2019 15:21:19 -0300 Subject: [PATCH 406/445] [Keyboard] Update jot50 readme.md (#5510) --- keyboards/handwired/jot50/readme.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/handwired/jot50/readme.md b/keyboards/handwired/jot50/readme.md index 2dcbc297107a..4c22b953d7ef 100644 --- a/keyboards/handwired/jot50/readme.md +++ b/keyboards/handwired/jot50/readme.md @@ -1,6 +1,4 @@ -# Jotanck - -![Jotanck] +# Jot50 A compact 50% (12x5) ortholinear keyboard kit inspired in the Preonic made by jotix. From b846c25a56f1c949094fd2f4f587cb358b7cd8c5 Mon Sep 17 00:00:00 2001 From: Wilba Date: Sat, 30 Mar 2019 16:13:28 +1100 Subject: [PATCH 407/445] [Keyboard] Added RAMA KOYU (#5512) * Initial commit of RAMA KOYU * Changed default layout * removed IS_COMMAND() --- keyboards/rama/koyu/config.h | 127 +++++++++++++++++++ keyboards/rama/koyu/info.json | 13 ++ keyboards/rama/koyu/keymaps/default/keymap.c | 36 ++++++ keyboards/rama/koyu/koyu.c | 18 +++ keyboards/rama/koyu/koyu.h | 42 ++++++ keyboards/rama/koyu/readme.md | 23 ++++ keyboards/rama/koyu/rules.mk | 80 ++++++++++++ 7 files changed, 339 insertions(+) create mode 100644 keyboards/rama/koyu/config.h create mode 100644 keyboards/rama/koyu/info.json create mode 100644 keyboards/rama/koyu/keymaps/default/keymap.c create mode 100644 keyboards/rama/koyu/koyu.c create mode 100644 keyboards/rama/koyu/koyu.h create mode 100644 keyboards/rama/koyu/readme.md create mode 100644 keyboards/rama/koyu/rules.mk diff --git a/keyboards/rama/koyu/config.h b/keyboards/rama/koyu/config.h new file mode 100644 index 000000000000..12dc3d02b591 --- /dev/null +++ b/keyboards/rama/koyu/config.h @@ -0,0 +1,127 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 0x5241 // "RW" +#define PRODUCT_ID 0x4B59 // "KY" +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA.WORKS +#define PRODUCT RAMA KOYU +#define DESCRIPTION RAMA KOYU Keyboard + + + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// KOYU PCB pin-out +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// 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 + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +// disable debug print +//#define NO_DEBUG + +// disable print +//#define NO_PRINT + +// disable action features +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for KOYU specifics +#define RGB_BACKLIGHT_KOYU + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_M60_A defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// 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 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// 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 +// Dynamic macro starts after dynamic keymaps (66+(4*5*15*2)) = (66+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/koyu/info.json b/keyboards/rama/koyu/info.json new file mode 100644 index 000000000000..4b6edc7bfa82 --- /dev/null +++ b/keyboards/rama/koyu/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "KOYU", + "url": "", + "maintainer": "Wilba", + "bootloader": "DFU", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "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":"Insert", "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":"Home", "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":"/", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/rama/koyu/keymaps/default/keymap.c b/keyboards/rama/koyu/keymaps/default/keymap.c new file mode 100644 index 000000000000..f6bc94fbd60e --- /dev/null +++ b/keyboards/rama/koyu/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, 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_BSPC, KC_PGUP, + 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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_INS, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/rama/koyu/koyu.c b/keyboards/rama/koyu/koyu.c new file mode 100644 index 000000000000..03d1e1215976 --- /dev/null +++ b/keyboards/rama/koyu/koyu.c @@ -0,0 +1,18 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 RGB_BACKLIGHT_KOYU +#error RGB_BACKLIGHT_KOYU not defined, you done goofed somehao, brah +#endif diff --git a/keyboards/rama/koyu/koyu.h b/keyboards/rama/koyu/koyu.h new file mode 100644 index 000000000000..c2aaa0273a61 --- /dev/null +++ b/keyboards/rama/koyu/koyu.h @@ -0,0 +1,42 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 "../../zeal60/rgb_backlight_keycodes.h" +#include "../../zeal60/zeal60_keycodes.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K407, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \ +} diff --git a/keyboards/rama/koyu/readme.md b/keyboards/rama/koyu/readme.md new file mode 100644 index 000000000000..0372747f580a --- /dev/null +++ b/keyboards/rama/koyu/readme.md @@ -0,0 +1,23 @@ +# RAMA KOYU + +![RAMA KOYU](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5b8bd6e6b8a045c95eac2003/1535891375794/RW-KOYU-A-RENDER-04-TOP.1335.jpg?format=1500w) + +The �wait� for something isn�t the most conscious desire, but that anticipation creates nostalgia. + +At Rama Works, you�ve embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesn�t just start when you receive it. If you�ve ever received a Rama Works product, you know that no detail is overlooked. + +Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works �X� element personifies the understanding that taking something away doesn�t necessarily make it less. + +This is the sound of Rama Works. Never too busy�a feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity. + +[More info at RAMA WORKS](https://rama.works/koyu/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA KOYU PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make rama/koyu: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/rama/koyu/rules.mk b/keyboards/rama/koyu/rules.mk new file mode 100644 index 000000000000..5e470769d603 --- /dev/null +++ b/keyboards/rama/koyu/rules.mk @@ -0,0 +1,80 @@ + + +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c + +# 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 + +# Boot Section +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# 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 = yes # 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 SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +#LAYOUTS = ??? From 93210547bd1bfbbb1ffd56801bb81af46af350a5 Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov Date: Tue, 10 Apr 2018 18:47:56 +0100 Subject: [PATCH 408/445] Update build instructions and Dockerfile to download submodules --- Dockerfile | 2 +- docs/getting_started_build_tools.md | 2 ++ util/docker_build.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6bd5acb33573..c4acfec71aa5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ VOLUME /qmk_firmware WORKDIR /qmk_firmware COPY . . -CMD make $KEYBOARD:$KEYMAP +CMD make clean ; make git-submodule ; make $KEYBOARD:$KEYMAP diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 1f771b1a04bf..b72f52e189e7 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -2,6 +2,8 @@ This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4). +After cloning the repo of QMK run `make git-submodule` once to download 3rd party libraries like ChibiOS. + Note: If it is your first time here, Check out the "Complete Newbs guide" instead diff --git a/util/docker_build.sh b/util/docker_build.sh index e7aeac8f3e5f..35839ac41eb2 100755 --- a/util/docker_build.sh +++ b/util/docker_build.sh @@ -47,4 +47,4 @@ dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows # Run container and build firmware docker run --rm -it $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \ - make "$keyboard${keymap:+:$keymap}${target:+:$target}" + /bin/bash -c "make git-submodule; make \"$keyboard${keymap:+:$keymap}${target:+:$target}\"" From 4f7dd9edf8cf9b546d7c21fcefb7de09f92474db Mon Sep 17 00:00:00 2001 From: David Rambo Date: Sat, 30 Mar 2019 14:05:31 -0400 Subject: [PATCH 409/445] [Keymap] Updated my iris, planck, and xd75 keymaps (#5515) * Updated iris, planck, and xd75 keymaps * Added brightness down and up to commented layout of Symbol layer. * updated config files for planck and iris * removed unnecessary include lines from iris and planck config files --- .../keebio/iris/keymaps/davidrambo/config.h | 8 +- .../keebio/iris/keymaps/davidrambo/keymap.c | 10 +- .../keebio/iris/keymaps/davidrambo/readme.md | 8 +- keyboards/planck/keymaps/davidrambo/config.h | 6 +- keyboards/planck/keymaps/davidrambo/keymap.c | 46 ++++--- keyboards/planck/keymaps/davidrambo/rules.mk | 2 +- keyboards/xd75/keymaps/davidrambo/keymap.c | 112 ++++++++++-------- keyboards/xd75/keymaps/davidrambo/readme.md | 11 +- 8 files changed, 104 insertions(+), 99 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/davidrambo/config.h b/keyboards/keebio/iris/keymaps/davidrambo/config.h index 2cdff4213bab..0c4bf8c8f4c5 100644 --- a/keyboards/keebio/iris/keymaps/davidrambo/config.h +++ b/keyboards/keebio/iris/keymaps/davidrambo/config.h @@ -15,10 +15,7 @@ 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_common.h" +#pragma once /* Use I2C or Serial, not both */ @@ -39,6 +36,5 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 */ #define TAPPING_TERM 200 -#include "../../config.h" -#endif + diff --git a/keyboards/keebio/iris/keymaps/davidrambo/keymap.c b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c index 40f0d0145402..4d76d745d8d7 100644 --- a/keyboards/keebio/iris/keymaps/davidrambo/keymap.c +++ b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c @@ -1,6 +1,4 @@ -#include "iris.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -85,13 +83,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_GAME] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - ___ , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ , + B , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ , TAB , LSFT, A , S , D , F , ___ , ___ , ___ , ___ , ___ , ___ , - I , LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ , + LALT, LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ , - LALT , LALT , SPC, BSPC, MAC, ___ + G , I , SPC, BSPC, MAC, ___ ), [_SYMBOL] = LAYOUT_kc( diff --git a/keyboards/keebio/iris/keymaps/davidrambo/readme.md b/keyboards/keebio/iris/keymaps/davidrambo/readme.md index 4d21f37c0914..181ff97f3646 100644 --- a/keyboards/keebio/iris/keymaps/davidrambo/readme.md +++ b/keyboards/keebio/iris/keymaps/davidrambo/readme.md @@ -1,3 +1,5 @@ -# Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer. -# Symbol layer is based on my Planck layout, so it provides numbers, symbols, and volume controls. -# Two Navigation layers, for Mac and Windows Colemak layers respectively. \ No newline at end of file +# Iris + +This is a simple Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer. +The Symbol layer is based on my Planck layout. It provides numbers, symbols, and volume controls. +There are two Navigation layers, for the Mac and Windows Colemak layers respectively. \ No newline at end of file diff --git a/keyboards/planck/keymaps/davidrambo/config.h b/keyboards/planck/keymaps/davidrambo/config.h index 2decb3dc8de7..ccb18de3dd8b 100644 --- a/keyboards/planck/keymaps/davidrambo/config.h +++ b/keyboards/planck/keymaps/davidrambo/config.h @@ -1,8 +1,6 @@ -#ifndef CONFIG_USER_H +#pragma once -#define CONFIG_USER_H #define TAPPING_TERM 200 -#include "../../config.h" #define PERMISSIVE_HOLD -#endif + diff --git a/keyboards/planck/keymaps/davidrambo/keymap.c b/keyboards/planck/keymaps/davidrambo/keymap.c index 2bf13f24ab9d..b82791194421 100644 --- a/keyboards/planck/keymaps/davidrambo/keymap.c +++ b/keyboards/planck/keymaps/davidrambo/keymap.c @@ -1,5 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H #define A_BSPC LALT(KC_BSPC) #define A_LEFT LALT(KC_LEFT) @@ -8,7 +7,7 @@ #define GSL LGUI(S(KC_LEFT)) #define GSR LGUI(S(KC_RGHT)) #define G_TAB LGUI(KC_TAB) -#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application +#define G_GRV LGUI(KC_GRV) #define SftEnt SFT_T(KC_ENT) #define NAV LT(2, KC_TAB) @@ -21,8 +20,7 @@ enum { SFT_LCK }; -//alias for tapdance -#define SftLck TD(SFT_LCK) +#define SftLck TD(SFT_LCK) /* alias for tapdance */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -38,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, - {KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, +[_COLEMAK] = LAYOUT_planck_grid( + KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt , + KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Symbol * ,-----------------------------------------------------------------------------------. @@ -51,26 +49,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Home | End | ScUp | ScDn | F1 | F2 | -_ |Pg Up | | / | | + * | | Home | End | ScUp | ScDn | BRMD | BRMU | -_ |Pg Up | | / | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | `~ | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | | * `-----------------------------------------------------------------------------------' */ -[_SYMBOL] = { - {KC_LBRC, KC_1, KC_2, KC_3, KC_4 , KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC}, - {KC_BSLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - {_______, KC_HOME, KC_END, KC_WH_U, KC_WH_D,KC_F1 , KC_F2 , KC_MINS, KC_PGUP, _______, _______, _______}, - {KC_GRV, _______, _______, _______, A_BSPC, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE} - }, +[_SYMBOL] = LAYOUT_planck_grid( + KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC, + KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL , + _______, KC_HOME, KC_END , _______, _______, KC_BRMD, KC_BRMU, KC_MINS, KC_PGUP, _______, _______, _______, + KC_GRV, _______, _______, _______, A_BSPC , _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE + ), /* Navigation*/ -[_NAVIGATION] = { - {_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, - {_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - {_______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______}, - {RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_NAVIGATION] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______, + _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______, + _______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; // Shift vs capslock function. From bbaserdem's Planck keymap. diff --git a/keyboards/planck/keymaps/davidrambo/rules.mk b/keyboards/planck/keymaps/davidrambo/rules.mk index 5e5ab3845816..4272493950e8 100644 --- a/keyboards/planck/keymaps/davidrambo/rules.mk +++ b/keyboards/planck/keymaps/davidrambo/rules.mk @@ -1,3 +1,3 @@ TAP_DANCE_ENABLE = yes -MOUSEKEY_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c index 442a00afda9c..a630affe070f 100644 --- a/keyboards/xd75/keymaps/davidrambo/keymap.c +++ b/keyboards/xd75/keymaps/davidrambo/keymap.c @@ -1,7 +1,8 @@ #include QMK_KEYBOARD_H +//aliases for clarity in layering #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac -// #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use +#define C_BSPS LCTL(KC_BSPC) // delete whole word in PC #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) #define C_RGHT LCTL(KC_RGHT) @@ -10,42 +11,43 @@ #define GBSPC LGUI_T(KC_BSPC) #define CBSPC LCTL_T(KC_BSPC) -//internet browser tab shortcuts and window swapping for Mac and Win +// internet browser tab shortcuts and window/application swapping for Mac and Win #define GSL LGUI(S(KC_LEFT)) // back one tab in Safari #define GSR LGUI(S(KC_RGHT)) // forward one tab in Safari #define CTLPGDN LCTL(KC_PGDN) // back one tab on Windows #define CTLPGUP LCTL(KC_PGUP) // forward one tab on Windows -#define G_TAB LGUI(KC_TAB) // MAC: switch applications -#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application +#define G_TAB LGUI(KC_TAB) // Mac: switch applications +#define G_GRV LGUI(KC_GRV) // Mac: switch between windows within an application #define A_TAB LALT(KC_TAB) #define C_TAB LCTL(KC_TAB) -// -#define NAV LT(3, KC_TAB) -#define NAVPC LT(4, KC_TAB) +// navigation layers for both Mac OS X and Windows +#define NAV LT(4, KC_TAB) +#define NAVPC LT(5, KC_TAB) // Layer shorthand #define _COLEMAK 0 #define _PC 1 -#define _SYMBOL 2 //Function keys, numbers, symbols, Backlighting -#define _NAV 3 //Navigation Layer on Mac -#define _NAVPC 4 //Navigation Layer on Win +#define _GAME 2 // Gaming layer +#define _SYMBOL 3 // Function keys, numbers, symbols, Backlighting +#define _NAV 4 // Navigation Layer on Mac +#define _NAVPC 5 // Navigation Layer on Win -//tapdance declarations +// tapdance declarations enum { SFT_LCK }; -//alias for tapdance +// alias for tapdance #define SftLck TD(SFT_LCK) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* COLEMAK * .--------------------------------------------------------------------------------------------------------------------------------------. - * | `~ | 1 | 2 | 3 | 4 | 5 | - | SWITCH | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * | `~ | 1 | 2 | 3 | 4 | 5 | -_ | PC | =+ | 6 | 7 | 8 | 9 | 0 | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | ESC/`~ | Q | W | F | P | G | [ | \ | ] | J | L | U | Y | ; | BACKSP | + * | ESC/`~ | Q | W | F | P | G | [ | \| | ] | J | L | U | Y | ; | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| * | NAVTAB | A | S | D | F | G | PgUp |PlayPaus| ENTER | H | N | E | I | O | ' | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| @@ -55,24 +57,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_COLEMAK] = { /* COLEMAK */ - { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, - { NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, - { SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, - { KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(2) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP }, - }, + [_COLEMAK] = LAYOUT_ortho_5x15( /* COLEMAK */ + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt , + KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP + ), // Windows Layer: essentially swaps Control and GUI - [_PC] = { /* WINDOWS */ - { _______, _______, _______, _______, _______, _______, _______, TG(0) , _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ }, - }, - + [_PC] = LAYOUT_ortho_5x15( /* WINDOWS */ + _______, _______, _______, _______, _______, _______, _______, TG(2) , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ + ), + + [_GAME] = LAYOUT_ortho_5x15( /* Gaming Layer */ + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, TO(0) , + KC_ESC , KC_T , KC_Q , KC_W , KC_E , KC_R , KC_F7 , KC_F8 , KC_F9 , KC_Y , KC_U , KC_I , KC_O , KC_P , _______, + KC_TAB , KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_F4 , KC_F5 , KC_F6 , KC_H , KC_J , KC_K , KC_L , KC_SCLN, _______, + KC_LALT, KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_F1 , KC_F2 , KC_F3 , KC_N , KC_M , _______, _______, _______, KC_ENT , + _______, _______, _______, KC_G , KC_B , KC_SPC , KC_I , KC_M , _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______ + ), + /* SYMBOL * .--------------------------------------------------------------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | @@ -87,30 +97,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_SYMBOL] = { /* SYMBOL */ - { _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______}, - { KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC}, - { _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - { _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_SYMBOL] = LAYOUT_ortho_5x15( /* SYMBOL */ + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC, + _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL , + _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), - [_NAV] = { /* NAVIGATION for Mac */ - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , ABSPC , KC_HOME, KC_END , G_GRV , _______}, - { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, - - [_NAVPC] = { /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/ - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______}, - { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - } + [_NAV] = LAYOUT_ortho_5x15( /* NAVIGATION for Mac */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , A_BSPC , KC_HOME, KC_END , G_GRV , _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAVPC] = LAYOUT_ortho_5x15( /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; // Shift vs capslock function. From bbaserdem's Planck keymap. diff --git a/keyboards/xd75/keymaps/davidrambo/readme.md b/keyboards/xd75/keymaps/davidrambo/readme.md index 17b928c501f1..a53abc8afc87 100644 --- a/keyboards/xd75/keymaps/davidrambo/readme.md +++ b/keyboards/xd75/keymaps/davidrambo/readme.md @@ -1,4 +1,7 @@ -# A Colemak layout for XD75 with both Mac and Windows layers. -# These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout. -# Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing. -# The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file +# XD75 + +This is a Colemak layout for XD75 with both Mac and Windows layers. +These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout (see planck/keymaps/davidrambo). +Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing. + +The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file From 3654d0f080c85da3b2ae33cc035777a445cca769 Mon Sep 17 00:00:00 2001 From: yfuku <30647434+yfuku@users.noreply.github.com> Date: Sun, 31 Mar 2019 04:16:18 +0900 Subject: [PATCH 410/445] [Keyboard] add claw44 keyboard (#5511) * add claw44 keyboard * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/readme.md Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Remove unnecessary code because of default value * Move layer definition * Update keyboards/claw44/keymaps/default/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/keymaps/yfuku/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/readme.md Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * default keymap. LAYOUT_kc -> LAYOUT macro * Move rules.mk from keymaps to keyboard level. * add Hardware Supported, Hardware Availability * Update keyboards/claw44/keymaps/default/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/keymaps/yfuku/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Remove depreciated function --- keyboards/claw44/claw44.c | 10 + keyboards/claw44/claw44.h | 5 + keyboards/claw44/config.h | 28 + keyboards/claw44/i2c.c | 162 +++++ keyboards/claw44/i2c.h | 46 ++ keyboards/claw44/keymaps/default/config.h | 35 ++ keyboards/claw44/keymaps/default/keymap.c | 169 ++++++ keyboards/claw44/keymaps/yfuku/config.h | 36 ++ keyboards/claw44/keymaps/yfuku/keymap.c | 221 +++++++ keyboards/claw44/lib/glcdfont.c | 243 ++++++++ keyboards/claw44/lib/host_led_state_reader.c | 15 + keyboards/claw44/lib/keylogger.c | 45 ++ keyboards/claw44/lib/layer_state_reader.c | 35 ++ keyboards/claw44/lib/logo_reader.c | 11 + keyboards/claw44/lib/mode_icon_reader.c | 15 + keyboards/claw44/lib/rgb_state_reader.c | 15 + keyboards/claw44/lib/timelogger.c | 16 + keyboards/claw44/readme.md | 15 + keyboards/claw44/rev1/config.h | 76 +++ keyboards/claw44/rev1/matrix.c | 357 +++++++++++ keyboards/claw44/rev1/rev1.c | 8 + keyboards/claw44/rev1/rev1.h | 57 ++ keyboards/claw44/rev1/rules.mk | 31 + keyboards/claw44/rev1/serial_config.h | 4 + keyboards/claw44/rev1/split_scomm.c | 91 +++ keyboards/claw44/rev1/split_scomm.h | 24 + keyboards/claw44/rev1/split_util.c | 70 +++ keyboards/claw44/rev1/split_util.h | 19 + keyboards/claw44/rules.mk | 74 +++ keyboards/claw44/serial.c | 590 +++++++++++++++++++ keyboards/claw44/serial.h | 84 +++ keyboards/claw44/ssd1306.c | 346 +++++++++++ keyboards/claw44/ssd1306.h | 91 +++ 33 files changed, 3044 insertions(+) create mode 100644 keyboards/claw44/claw44.c create mode 100644 keyboards/claw44/claw44.h create mode 100644 keyboards/claw44/config.h create mode 100644 keyboards/claw44/i2c.c create mode 100644 keyboards/claw44/i2c.h create mode 100644 keyboards/claw44/keymaps/default/config.h create mode 100644 keyboards/claw44/keymaps/default/keymap.c create mode 100644 keyboards/claw44/keymaps/yfuku/config.h create mode 100644 keyboards/claw44/keymaps/yfuku/keymap.c create mode 100644 keyboards/claw44/lib/glcdfont.c create mode 100644 keyboards/claw44/lib/host_led_state_reader.c create mode 100644 keyboards/claw44/lib/keylogger.c create mode 100644 keyboards/claw44/lib/layer_state_reader.c create mode 100644 keyboards/claw44/lib/logo_reader.c create mode 100644 keyboards/claw44/lib/mode_icon_reader.c create mode 100644 keyboards/claw44/lib/rgb_state_reader.c create mode 100644 keyboards/claw44/lib/timelogger.c create mode 100644 keyboards/claw44/readme.md create mode 100644 keyboards/claw44/rev1/config.h create mode 100644 keyboards/claw44/rev1/matrix.c create mode 100644 keyboards/claw44/rev1/rev1.c create mode 100644 keyboards/claw44/rev1/rev1.h create mode 100644 keyboards/claw44/rev1/rules.mk create mode 100644 keyboards/claw44/rev1/serial_config.h create mode 100644 keyboards/claw44/rev1/split_scomm.c create mode 100644 keyboards/claw44/rev1/split_scomm.h create mode 100644 keyboards/claw44/rev1/split_util.c create mode 100644 keyboards/claw44/rev1/split_util.h create mode 100644 keyboards/claw44/rules.mk create mode 100644 keyboards/claw44/serial.c create mode 100644 keyboards/claw44/serial.h create mode 100644 keyboards/claw44/ssd1306.c create mode 100644 keyboards/claw44/ssd1306.h diff --git a/keyboards/claw44/claw44.c b/keyboards/claw44/claw44.c new file mode 100644 index 000000000000..f564fb623b8a --- /dev/null +++ b/keyboards/claw44/claw44.c @@ -0,0 +1,10 @@ +#include "claw44.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 +} diff --git a/keyboards/claw44/claw44.h b/keyboards/claw44/claw44.h new file mode 100644 index 000000000000..4ca25fcb2b1e --- /dev/null +++ b/keyboards/claw44/claw44.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef KEYBOARD_claw44_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/claw44/config.h b/keyboards/claw44/config.h new file mode 100644 index 000000000000..fb1cdf3962a1 --- /dev/null +++ b/keyboards/claw44/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" +#include + +#define USE_I2C +#define USE_SERIAL + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/claw44/i2c.c b/keyboards/claw44/i2c.c new file mode 100644 index 000000000000..4bee5c639829 --- /dev/null +++ b/keyboards/claw44/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(); diff --git a/keyboards/claw44/keymaps/default/config.h b/keyboards/claw44/keymaps/default/config.h new file mode 100644 index 000000000000..eff6ad3c7bac --- /dev/null +++ b/keyboards/claw44/keymaps/default/config.h @@ -0,0 +1,35 @@ +/* +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_TERM 200 diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c new file mode 100644 index 000000000000..c346571255f1 --- /dev/null +++ b/keyboards/claw44/keymaps/default/keymap.c @@ -0,0 +1,169 @@ +#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; + +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 custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + //,--------+--------+---------+--------+---------+--------. ,--------+---------+--------+---------+--------+--------. + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_RSFT, + //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' + KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), + + // \ ^ ! & | @ = + * % - + // ( # $ " ' ~ ← ↓ ↑ → ` ) + // { [ ] } + + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), +}; + +void matrix_init_user(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 +} + +//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) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} diff --git a/keyboards/claw44/keymaps/yfuku/config.h b/keyboards/claw44/keymaps/yfuku/config.h new file mode 100644 index 000000000000..244ffa7096d1 --- /dev/null +++ b/keyboards/claw44/keymaps/yfuku/config.h @@ -0,0 +1,36 @@ +/* +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_TERM 180 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/claw44/keymaps/yfuku/keymap.c b/keyboards/claw44/keymaps/yfuku/keymap.c new file mode 100644 index 000000000000..77d459b928d3 --- /dev/null +++ b/keyboards/claw44/keymaps/yfuku/keymap.c @@ -0,0 +1,221 @@ +#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; + +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 custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +// common +#define KC_ KC_TRNS +#define KC_XXXX KC_NO +#define KC_RST RESET +#define KC_VD KC__VOLDOWN +#define KC_VU KC__VOLUP + +// layer +#define KC_L_SPC LT(_LOWER, KC_SPC) +#define KC_R_ENT LT(_RAISE, KC_ENT) + +// shift_t +#define KC_S_TAB LSFT_T(KC_TAB) +#define KC_S_ESC LSFT_T(KC_ESC) +#define KC_S_JA LSFT_T(KC_LANG1) +#define KC_S_EN LSFT_T(KC_LANG2) + +// cmd_t +#define KC_M_F LCMD_T(KC_F) +#define KC_M_D LCMD_T(KC_D) +#define KC_M_J LCMD_T(KC_J) +#define KC_M_K LCMD_T(KC_K) + +// ctl_t +#define KC_C_S LCTL_T(KC_S) +#define KC_C_L LCTL_T(KC_L) +#define KC_C_BS LCTL_T(KC_BSPC) + +// alt_t +#define KC_A_D ALT_T(KC_D) +#define KC_A_K ALT_T(KC_K) +#define KC_A_Z ALT_T(KC_Z) +#define KC_A_SL ALT_T(KC_SLSH) +#define KC_A_DEL ALT_T(KC_DEL) + +// cmd+shift_t +#define KC_MS_Q SCMD_T(KC_Q) +#define KC_MS_A SCMD_T(KC_A) +#define KC_MS_S SCMD_T(KC_S) +#define KC_MS_SC SCMD_T(KC_SCLN) +#define KC_MS_ESC SCMD_T(KC_ESC) + +// +#define KC_MR RCMD(KC_R) +#define KC_MF RCMD(KC_F) +#define KC_MW RCMD(KC_W) +#define KC_MX RCMD(KC_X) +#define KC_MC RCMD(KC_C) +#define KC_MV RCMD(KC_V) +#define KC_MTAB RCMD(KC_TAB) +#define KC_MSF RCMD(RSFT(KC_F)) +#define KC_MSR RCMD(RSFT(KC_R)) +#define KC_MST RCMD(RSFT(KC_T)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // M_ = LCMD_T( + // A_ = ALT_T( + // C_ = LCTL_T( + // MS_ = SMD_T( + // R_ = LT(_RAISE + // L_ = LT(_LOWER + + [_QWERTY] = LAYOUT_kc( \ + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , Q , W , E , R , T , Y , U , I , O , P ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + S_TAB, A ,C_S , D ,M_F , G , H ,M_J , K ,C_L ,SCLN,S_ESC, + //|----+----+----+----+----+----+ |----+----+----+----+----+----| + , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, , + //`----+----+----+----+----+----/ \----+----+----+----+----+----' + A_DEL,S_EN,L_SPC,C_BS, C_BS,R_ENT,S_JA,A_DEL + // `----+----+----+----' `----+----+----+----' + ), + + // \ ^ ! & | @ = + * % - + // ( # $ " ' ~ ← ↓ ↑ → ` ) + // { [ ] } + + [_RAISE] = LAYOUT_kc( \ + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,BSLS,CIRC,EXLM,AMPR,PIPE, AT ,EQL ,PLUS,ASTR,PERC,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LPRN,HASH,DLR ,DQT ,QUOT,TILD, LEFT,DOWN, UP ,RGHT,GRV ,RPRN, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , ,LCBR,LBRC, RBRC,RCBR, , , , , + //`----+----+----+----+----+----/ \----+----+----+----+----+----' + , ,BSPC, , , , ,RST + // `----+----+----+----' `----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( \ + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , ,MSF ,MSR ,MST , ,EQL ,PLUS,ASTR,PERC,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , ,COMM,DOT ,SLSH, , + //`----+----+----+--+-+----+----/ \----+----+----+----+----+----' + RST , , , , ,DEL , , + // `----+----+----+----' `----+----+----+----' + ), +}; + +void matrix_init_user(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 +} + +//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) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c new file mode 100644 index 000000000000..91f53d9c24ea --- /dev/null +++ b/keyboards/claw44/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, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xC0, 0xF0, 0xF8, 0xF8, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +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, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, + 0xFF, 0x1F, 0x07, 0x07, 0x07, 0x07, + 0x1F, 0x1F, 0x1F, 0x1E, 0x18, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0x9E, 0xDF, 0xDF, + 0xCF, 0xC7, 0xE7, 0xE7, 0xE7, 0xFF, + 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x03, + 0x3F, 0xFF, 0xFF, 0xFE, 0xC0, 0x00, + 0xF0, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, + 0xF0, 0x00, 0xC0, 0xFC, 0xFF, 0xFF, + 0x3F, 0x03, 0x00, 0xC0, 0xF0, 0xF8, + 0xFE, 0x9F, 0x87, 0x83, 0x80, 0xFF, + 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x00, + 0x00, 0xE0, 0xF8, 0xFC, 0xBF, 0x8F, + 0x83, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +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, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x1F, 0x3F, + 0x7F, 0x7C, 0x78, 0x70, 0x70, 0x78, + 0x7E, 0x3E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x00, 0x1F, 0x3F, 0x7F, 0x7F, + 0x79, 0x71, 0x70, 0x30, 0x38, 0x3F, + 0x7F, 0x7F, 0x7F, 0x60, 0x00, 0x00, + 0x00, 0x01, 0x1F, 0x7F, 0x7F, 0x7E, + 0x7F, 0x1F, 0x01, 0x00, 0x01, 0x3F, + 0x7F, 0x7E, 0x7F, 0x7F, 0x0F, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x7F, + 0x7F, 0x7F, 0x7F, 0x03, 0x03, 0x00, + 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x7F, 0x7F, 0x7F, 0x7F, + 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/claw44/lib/host_led_state_reader.c b/keyboards/claw44/lib/host_led_state_reader.c new file mode 100644 index 000000000000..980823b318c3 --- /dev/null +++ b/keyboards/claw44/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "claw44.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/claw44/lib/keylogger.c b/keyboards/claw44/lib/keylogger.c new file mode 100644 index 000000000000..092b6929bc2e --- /dev/null +++ b/keyboards/claw44/lib/keylogger.c @@ -0,0 +1,45 @@ +#include +#include "claw44.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/claw44/lib/layer_state_reader.c b/keyboards/claw44/lib/layer_state_reader.c new file mode 100644 index 000000000000..d92b6df5827f --- /dev/null +++ b/keyboards/claw44/lib/layer_state_reader.c @@ -0,0 +1,35 @@ + +#include QMK_KEYBOARD_H +#include +#include "claw44.h" + +#define L_BASE 0 +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +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/claw44/lib/logo_reader.c b/keyboards/claw44/lib/logo_reader.c new file mode 100644 index 000000000000..b5b437b2b892 --- /dev/null +++ b/keyboards/claw44/lib/logo_reader.c @@ -0,0 +1,11 @@ +#include "claw44.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/claw44/lib/mode_icon_reader.c b/keyboards/claw44/lib/mode_icon_reader.c new file mode 100644 index 000000000000..a9272bb9a780 --- /dev/null +++ b/keyboards/claw44/lib/mode_icon_reader.c @@ -0,0 +1,15 @@ +#include +#include "claw44.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/claw44/lib/rgb_state_reader.c b/keyboards/claw44/lib/rgb_state_reader.c new file mode 100644 index 000000000000..e0efe2e5288f --- /dev/null +++ b/keyboards/claw44/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/claw44/lib/timelogger.c b/keyboards/claw44/lib/timelogger.c new file mode 100644 index 000000000000..ecd4ed3ea8c0 --- /dev/null +++ b/keyboards/claw44/lib/timelogger.c @@ -0,0 +1,16 @@ +#include +#include "claw44.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/claw44/readme.md b/keyboards/claw44/readme.md new file mode 100644 index 000000000000..7e72e0897134 --- /dev/null +++ b/keyboards/claw44/readme.md @@ -0,0 +1,15 @@ +# Claw44 + +![Claw44](https://i.imgur.com/5a8iogl.jpg) + +A split keyboard with 3x6 vertically staggered keys and 4 thumb keys. + +Keyboard Maintainer: [@yfuku_](https://twitter.com/yfuku_) +Hardware Supported: Claw44 PCB, ProMicro +Hardware Availability: https://yfuku.booth.pm/ + +Make example for this keyboard (after setting up your build environment): + + make claw44: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/claw44/rev1/config.h b/keyboards/claw44/rev1/config.h new file mode 100644 index 000000000000..ba2ed4559e8d --- /dev/null +++ b/keyboards/claw44/rev1/config.h @@ -0,0 +1,76 @@ +/* +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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yfuku +#define PRODUCT claw44 +#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define 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 + +/* ws2812 RGB LED */ +/* +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 12 // Number of LEDs +*/ + +/* + * 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 diff --git a/keyboards/claw44/rev1/matrix.c b/keyboards/claw44/rev1/matrix.c new file mode 100644 index 000000000000..718cc574481a --- /dev/null +++ b/keyboards/claw44/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/claw44/rev1/rev1.c b/keyboards/claw44/rev1/rev1.c new file mode 100644 index 000000000000..9529636f5636 --- /dev/null +++ b/keyboards/claw44/rev1/rev1.c @@ -0,0 +1,8 @@ +#include "claw44.h" + +#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 diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h new file mode 100644 index 000000000000..f7ec2cbfe657 --- /dev/null +++ b/keyboards/claw44/rev1/rev1.h @@ -0,0 +1,57 @@ +#pragma once + +#include "../claw44.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); +#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, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, R33, R32, R31, R30 } \ + } + +#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, R30, R31, R32, R33 \ + ) \ + 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_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk new file mode 100644 index 000000000000..ae95ec401454 --- /dev/null +++ b/keyboards/claw44/rev1/rules.mk @@ -0,0 +1,31 @@ +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c + +# Build Options +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 + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/rgb_state_reader.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/claw44/rev1/serial_config.h b/keyboards/claw44/rev1/serial_config.h new file mode 100644 index 000000000000..4fab8e8ddfcf --- /dev/null +++ b/keyboards/claw44/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/claw44/rev1/split_scomm.c b/keyboards/claw44/rev1/split_scomm.c new file mode 100644 index 000000000000..a1fe6ba5b823 --- /dev/null +++ b/keyboards/claw44/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/claw44/rev1/split_scomm.h b/keyboards/claw44/rev1/split_scomm.h new file mode 100644 index 000000000000..873d8939d81f --- /dev/null +++ b/keyboards/claw44/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/claw44/rev1/split_util.c b/keyboards/claw44/rev1/split_util.c new file mode 100644 index 000000000000..e1ff8b4379dc --- /dev/null +++ b/keyboards/claw44/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/claw44/rules.mk b/keyboards/claw44/rules.mk new file mode 100644 index 000000000000..907a5c832532 --- /dev/null +++ b/keyboards/claw44/rules.mk @@ -0,0 +1,74 @@ +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 + +# 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) + +# 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 +# +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. +# 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 = yes + +DEFAULT_FOLDER = claw44/rev1 diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c new file mode 100644 index 000000000000..325c29a3f704 --- /dev/null +++ b/keyboards/claw44/serial.c @@ -0,0 +1,590 @@ +/* + * 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 +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#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 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +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 result; + result = soft_serial_transaction(); + return result; +} + +#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) + +// 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 + +#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 + #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 + #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 + #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 + #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 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 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#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) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#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); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + 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); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +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, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +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 = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +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 = 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(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + 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) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + 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 + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + 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; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +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(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#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(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // 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; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // 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; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#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/claw44/serial.h b/keyboards/claw44/serial.h new file mode 100644 index 000000000000..7e0c0847a431 --- /dev/null +++ b/keyboards/claw44/serial.h @@ -0,0 +1,84 @@ +#ifndef SOFT_SERIAL_H +#define SOFT_SERIAL_H + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #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. +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ +#if SERIAL_SLAVE_BUFFER_LENGTH > 0 +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +#endif +#if SERIAL_MASTER_BUFFER_LENGTH > 0 +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +#endif + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); + +#endif // USE Simple API + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + 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, int sstd_table_size); +// target is interrupt accept side +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 +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif + +#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c new file mode 100644 index 000000000000..781c7226388a --- /dev/null +++ b/keyboards/claw44/ssd1306.c @@ -0,0 +1,346 @@ +#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/claw44/ssd1306.h b/keyboards/claw44/ssd1306.h new file mode 100644 index 000000000000..ea8c9232805d --- /dev/null +++ b/keyboards/claw44/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 58b065cfdaca29144fa7fd18d482223bc1ea7308 Mon Sep 17 00:00:00 2001 From: Alex Mayer Date: Mon, 1 Apr 2019 12:02:30 -0400 Subject: [PATCH 411/445] 1UP Keyboards: Use Right Variant Of Keys On Right Side Of Board (#5529) --- keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c | 2 +- keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c | 6 +++--- keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c index 48350a53e0c7..39473f606732 100644 --- a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c @@ -22,7 +22,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, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LCTL + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL ), [1] = LAYOUT_60_ansi( diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index 7fefebd0b19a..359ac7540637 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -21,9 +21,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_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_LSFT, MO(1), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_LGUI, KC_LALT, KC_LCTL), - + 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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + [1] = LAYOUT_tsangan( 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_INS, KC_DEL, KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c index 7658087d1fd7..5312e3b6752a 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c @@ -21,9 +21,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_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_LSFT, MO(1), - KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_LGUI, KC_LALT, KC_NO), - + 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_NO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_NO), + [1] = LAYOUT_tsangan( 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_INS, KC_DEL, KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, From 40c6269f9fdd279b16ee49e49c8fbd256b79ccae Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 1 Apr 2019 19:32:39 +0100 Subject: [PATCH 412/445] Fix typo in keyboard_post_init_user example, remove EPRM from Persistent Configuration (EEPROM) (#5528) --- docs/custom_quantum_functions.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 655fa1578e57..418faf349464 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -235,7 +235,7 @@ This example, running after everything else has initialized, sets up the rgb und void keyboard_post_init_user(void) { // Call the post init code. rgblight_enable_noeeprom(); // enables Rgb, without saving settings - rgblight_sethsv_noeeprom(180, 255, 255): // sets the color to teal/cyan without saving + rgblight_sethsv_noeeprom(180, 255, 255); // sets the color to teal/cyan without saving rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving } ``` @@ -342,7 +342,7 @@ This is an example of how to add settings, and read and write it. We're using th In your keymap.c file, add this to the top: -``` +```c typedef union { uint32_t raw; struct { @@ -358,7 +358,7 @@ This sets up a 32 bit structure that we can store settings with in memory, and w We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `keyboard_post_init_user` and `process_record_user` to configure everything. Now, using the `keyboard_post_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like: -``` +```c void keyboard_post_init_user(void) { // Call the keymap level matrix init. @@ -375,7 +375,7 @@ void keyboard_post_init_user(void) { ``` The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above. -``` +```c uint32_t layer_state_set_user(uint32_t state) { switch (biton32(state)) { case _RAISE: @@ -397,8 +397,8 @@ uint32_t layer_state_set_user(uint32_t state) { return state; } ``` -This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR` and `EPRM`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this: -``` +This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this: +```c bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -415,11 +415,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { PLAY_NOTE_ARRAY(tone_qwerty); } return true; // Let QMK send the enter press/release events - case EPRM: - if (record->event.pressed) { - eeconfig_init(); // resets the EEPROM to default - } - return false; case RGB_LYR: // This allows me to use underglow as layer indication, or as normal if (record->event.pressed) { user_config.rgb_layer_change ^= 1; // Toggles the status @@ -442,9 +437,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } ``` -And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. For example, if you want to set rgb layer indication by default, and save the default valued. +And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. -``` +```c void eeconfig_init_user(void) { // EEPROM is getting reset! user_config.raw = 0; user_config.rgb_layer_change = true; // We want this enabled by default From fbee737ff3b767f0ce95da61a154ef6334312887 Mon Sep 17 00:00:00 2001 From: Garret G <45295190+TheRoyalSweatshirt@users.noreply.github.com> Date: Mon, 1 Apr 2019 22:31:38 -0500 Subject: [PATCH 413/445] [Keyboard] add support for romac macropad (#5530) * add support for romac macropad * Update info.json fixed total key_count * Update keymap.c * Update keymap.c * Update README.md * Update config.h * Update romac.h * Update romac.h * Update romac.h * Update rules.mk * Update config.h * Update README.md * Update romac.h * Update README.md * Update README.md * Update README.md * Update config.h * Update config.h * Update config.h * Update info.json * Update info.json * Update info.json * Update keymap.c * Update keymap.c * Update keymap.c * Update README.md * Update README.md * Update README.md * Update config.h * Rename README.md to readme.md * Update rules.mk * Update config.h * Delete .gitattributes * Update romac.h * Update config.h * Update config.h * Update keymap.c * Update keymap.c * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update info.json * Update config.h * Update config.h * Update config.h * Update readme.md --- keyboards/romac/config.h | 40 +++++++++++++++++ keyboards/romac/info.json | 13 ++++++ keyboards/romac/keymaps/default/keymap.c | 37 +++++++++++++++ keyboards/romac/readme.md | 16 +++++++ keyboards/romac/romac.c | 1 + keyboards/romac/romac.h | 16 +++++++ keyboards/romac/rules.mk | 57 ++++++++++++++++++++++++ 7 files changed, 180 insertions(+) create mode 100644 keyboards/romac/config.h create mode 100644 keyboards/romac/info.json create mode 100644 keyboards/romac/keymaps/default/keymap.c create mode 100644 keyboards/romac/readme.md create mode 100644 keyboards/romac/romac.c create mode 100644 keyboards/romac/romac.h create mode 100644 keyboards/romac/rules.mk diff --git a/keyboards/romac/config.h b/keyboards/romac/config.h new file mode 100644 index 000000000000..b92785fd5256 --- /dev/null +++ b/keyboards/romac/config.h @@ -0,0 +1,40 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheRoyalSweatshirt +#define PRODUCT romac +#define DESCRIPTION A *Plaid inspired twelve-key macropad +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F7, B1, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#define BACKLIGHT_LEVELS 0 + +/* 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 + +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/romac/info.json b/keyboards/romac/info.json new file mode 100644 index 000000000000..305785991e09 --- /dev/null +++ b/keyboards/romac/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RoMac", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 12, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "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":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}] + } + } +} diff --git a/keyboards/romac/keymaps/default/keymap.c b/keyboards/romac/keymaps/default/keymap.c new file mode 100644 index 000000000000..35636f36b3f7 --- /dev/null +++ b/keyboards/romac/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 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 + +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_7, KC_8, KC_9, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + MO(_FN1), KC_0, KC_ENT \ + ), + + [_FN1] = LAYOUT( + KC_TRNS, KC_HOME, KC_PGUP, \ + KC_TRNS, KC_END, KC_PGDN, \ + KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_DOT \ + ) +}; diff --git a/keyboards/romac/readme.md b/keyboards/romac/readme.md new file mode 100644 index 000000000000..98ed21502af7 --- /dev/null +++ b/keyboards/romac/readme.md @@ -0,0 +1,16 @@ + +# RoMac + +![RoMac](https://i.imgur.com/hAOyoqj.jpg) + +A “Plaid” Inspired 12-Key (3x4) Macropad. + +- Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) +- Hardware Supported: RoMac rev.1, rev.2, Pro Micro, Elite-C, Proton C, BlueMicro. +- Hardware Availability: Through GB or Direct Message (If extra stock is available). + +Make example for this keyboard (after setting up your build environment): + + make romac: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/romac/romac.c b/keyboards/romac/romac.c new file mode 100644 index 000000000000..24f4c16333ab --- /dev/null +++ b/keyboards/romac/romac.c @@ -0,0 +1 @@ +#include "romac.h" diff --git a/keyboards/romac/romac.h b/keyboards/romac/romac.h new file mode 100644 index 000000000000..e6fb9694d2e8 --- /dev/null +++ b/keyboards/romac/romac.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 } \ +} diff --git a/keyboards/romac/rules.mk b/keyboards/romac/rules.mk new file mode 100644 index 000000000000..b500f1b885a1 --- /dev/null +++ b/keyboards/romac/rules.mk @@ -0,0 +1,57 @@ +# 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 + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # 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 + From 8b8d69f0dfea22936f4b8b9da2917cdf9f838839 Mon Sep 17 00:00:00 2001 From: AbstractKB <49011872+AbstractKB@users.noreply.github.com> Date: Mon, 1 Apr 2019 23:58:47 -0400 Subject: [PATCH 414/445] [Keymap] Updated my personal keymaps for the bfo9000 and jj50 (#5508) * Updated my personal keymaps for the bfo9000 and jj50 * fixed best practices mistakes --- keyboards/jj50/keymaps/abstractkb/keymap.c | 135 ++++++++++++++++++ keyboards/jj50/keymaps/abstractkb/readme.md | 6 + .../bfo9000/keymaps/abstractkb/config.h | 37 +++++ .../bfo9000/keymaps/abstractkb/keymap.c | 92 ++++++++++++ .../bfo9000/keymaps/abstractkb/readme.md | 5 + .../bfo9000/keymaps/abstractkb/rules.mk | 1 + 6 files changed, 276 insertions(+) create mode 100644 keyboards/jj50/keymaps/abstractkb/keymap.c create mode 100644 keyboards/jj50/keymaps/abstractkb/readme.md create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/config.h create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000000..456adeee4b29 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb/keymap.c @@ -0,0 +1,135 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 AbstractKB + +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 + +enum layers { + _DEFLT, + _RAISE, + _LOWER, + _FN +}; + +enum custom_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _RAISE: + rgblight_sethsv_noeeprom(240,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _LOWER: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _FN: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_DEFLT + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DEFLT] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_ENT, \ + KC_BSPC, 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_RSFT, \ + MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + [_RAISE] = 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, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + [_LOWER] = 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_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \ + _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + [_FN] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ + ) +}; diff --git a/keyboards/jj50/keymaps/abstractkb/readme.md b/keyboards/jj50/keymaps/abstractkb/readme.md new file mode 100644 index 000000000000..7ff7e0268a15 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb/readme.md @@ -0,0 +1,6 @@ +# My personal layout for the JJ50 + +It is an approximation of a 60% layout with the alternate layers set up for programming, +with brackets and parenthesis on the homerow +Other things I changed were swapping around delete, backspace, and capslock around +It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h new file mode 100644 index 000000000000..67c64fd8e879 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +(Modified) Copyright 2019 AbstractKB + +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 + +//my block------------ +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000000..a8348ecfb56b --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _LIST +}; + +enum my_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT( \ + KC_MPLY, KC_PSLS, KC_PAST, 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, MYRGB_TG, KC_PGUP, \ + KC_MUTE, KC_PPLS, KC_PMNS, 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_DEL, KC_PGDN, \ + KC_P7, KC_P8, KC_P9, 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_HOME, \ + KC_P4, KC_P5, KC_P6, KC_BSPACE, 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_CAPS, KC_PSCR, \ + KC_P1, KC_P2, KC_P3, 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, XXXXXXX, KC_INS, \ + KC_P0, KC_PDOT, KC_PENT, TO(_LIST), KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \ +), + +[_LIST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void matrix_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _LIST: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_BASE + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + + + diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md new file mode 100644 index 000000000000..3ba56571fea2 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md @@ -0,0 +1,5 @@ +# My personal layout for the BFO-9000 + +It is an approximation of a 96% layout with a left-hand number pad +Other things I changed were swapping around delete, backspace, and capslock +It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk new file mode 100644 index 000000000000..7ad666d1a383 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file From 448d3ad8dea82a5a71d29fb26d04f44e2a07123e Mon Sep 17 00:00:00 2001 From: Nicolas CARPi <3043706+NicolasCARPi@users.noreply.github.com> Date: Tue, 2 Apr 2019 06:18:06 +0200 Subject: [PATCH 415/445] =?UTF-8?q?[Keymap]=20Add=20alternate=20b=C3=A9po?= =?UTF-8?q?=20layout=20for=20Ergodox=20EZ=20(#5524)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The other bépo layouts were a bit too complex/weird or without LED code and hard to transition to for new users. This config is a good base for bépo users. --- layouts/community/ergodox/bepo_alt/keymap.c | 127 +++++++++++++++++++ layouts/community/ergodox/bepo_alt/readme.md | 66 ++++++++++ layouts/community/ergodox/bepo_alt/rules.mk | 5 + 3 files changed, 198 insertions(+) create mode 100644 layouts/community/ergodox/bepo_alt/keymap.c create mode 100644 layouts/community/ergodox/bepo_alt/readme.md create mode 100644 layouts/community/ergodox/bepo_alt/rules.mk diff --git a/layouts/community/ergodox/bepo_alt/keymap.c b/layouts/community/ergodox/bepo_alt/keymap.c new file mode 100644 index 000000000000..fc40afd8712f --- /dev/null +++ b/layouts/community/ergodox/bepo_alt/keymap.c @@ -0,0 +1,127 @@ +/* Bepo layout for ergodox EZ by Nicolas CARPi (deltablot.com) */ +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" +#include "keymap_french.h" + +#define BEPO 0 // default layer, for bepo compatible systems +#define FNAV 1 // function / navigation / mouse layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: default layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | $ | " | < | > | ( | ) | @ | | + | - | - | / | * | = | % | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | B |E_ACUT| P | O |E_GRAV|Backsp| |CapsLo| ^ | V | D | L | J | Z | + * |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------| + * | W | A | U | I | E | , |------| |------| C | T | S | R | N | M | + * |--------+------+------+------+------+------| | | ESCAP------+------+------+------+------+--------| + * | SHIFT |E_CIRC | A_GRAV | Y | X | . | K | | | ' | Q | G | H | F | C_CEDIL| + * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------' + * |Ctrl|LSuper|LSuper| LSuper| LAlt| | PgUp | PgDwn| |BEPO| Delete | | AltGr| RSuper|RSuper|RCtrl| Enter| + * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------' + * | | |Insert| |L_Fnav| | | + * | Space|Shift |------| |------|RShift|Enter | + * | | |Mouse | | Fn | | | + * `--------------------' `--------------------' + * df is for temporary stuff and mo is for toggle (momentary) + * so mouse is to toggle the mouse mode + */ +[BEPO] = LAYOUT_ergodox( + +/* Left hand */ +BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, +KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC, +BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA, +KC_LSHIFT, BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, +KC_LCTL, KC_LGUI, KC_LGUI, KC_LGUI, KC_LALT, + KC_PGUP, KC_PGDOWN, + KC_INS, + KC_SPC, KC_LSHIFT, DF(FNAV), + +/* Right hand */ + BP_PLUS, BP_MINUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, BP_PERCENT, + 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_ESC, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, + KC_ALGR, KC_RGUI, KC_RGUI, KC_RCTL, KC_ENTER, +DF(BEPO), KC_DEL, +DF(FNAV), +MO(FNAV), KC_RSHIFT, KC_ENTER), + +/* Keymap 1: function / navigation / mouse layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | F12 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Next |LClick| Up |RClick| WhUp |Backspace| | | PgUp | Home | Up | End | F11 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Prev | Left | Down | Right|WhDown|------| |------| Left | Down | Up | Right | F12 | | + * |--------+------+------+------+------+------| VolUp| | |------+------+------+------+------+--------| + * | Shift | Undo | Cut | Copy | Paste| | | | | | | | | | | + * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------' + * | ctrl | super | super | alt | | Home | End | | | | | | Alt | | |Ctrl | | + * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------' + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[FNAV] = LAYOUT_ergodox( + +/* Left hand */ +KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, +KC_NO, KC_MS_BTN5, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_BSPC, +KC_NO, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, +KC_LSHIFT, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_NO, KC_VOLD, +KC_LCTL, KC_INS, KC_LGUI, KC_LGUI, KC_LALT, + KC_HOME, KC_END, + KC_TRNS, + KC_NO, KC_TRNS, KC_TRNS, + +/* Right hand */ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F12, + KC_NO, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_F11, KC_NO, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_F12, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_RALT, KC_TRNS, KC_TRNS, KC_RCTL, KC_NO, +KC_TRNS, KC_TRNS, +KC_TRNS, +KC_TRNS, KC_TRNS, KC_NO), +}; + +/* helper function to switch on of the right LED ON/OFF */ +static void indicate_using_led(const uint8_t led, const bool enabled) { + if (enabled) { + ergodox_right_led_on(led); + } else { + ergodox_right_led_off(led); + } +} + +/* Runs constantly in the background, in a loop */ +void matrix_scan_user(void) { + + /* red led for shift */ + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + indicate_using_led(1, true); + } else { + indicate_using_led(1, false); + } + + /* green led for alt */ + if (keyboard_report->mods & MOD_BIT(KC_LALT) || + ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { + indicate_using_led(2, true); + } else { + indicate_using_led(2, false); + } + + /* blue led for function mode */ + if (IS_LAYER_ON(FNAV)) { + indicate_using_led(3, true); + } else { + indicate_using_led(3, false); + } +}; diff --git a/layouts/community/ergodox/bepo_alt/readme.md b/layouts/community/ergodox/bepo_alt/readme.md new file mode 100644 index 000000000000..c8cc1225cc97 --- /dev/null +++ b/layouts/community/ergodox/bepo_alt/readme.md @@ -0,0 +1,66 @@ +![layer0](https://i.imgur.com/vd4QLBf.png) + +![layer1](https://i.imgur.com/eo101eD.png) + +# BEPO keymap for the ErgoDox (alternate version) + +This keymap has been made for the BEPO layout (https://bepo.fr), which is an ergonomic french keyboard layout based on Dvorak rules. As it's made for french people, the following of this readme will be in french. + +Keyboard Maintainer: [Nicolas CARPi](https://github.com/NicolasCARPi) + +Hardware Supported: Ergodox EZ + +## Disposition BÉPO pour l'ErgoDox + +Cette keymap a été adaptée de la keymap "bepo_csa" présente dans le dossier parent. + +Certaines modifications ont été apportées pour ressembler un peu plus à une clavier traditionel: + +* entrée sur la touche tout en bas à droite (comme la touche entrée du pavé numérique sur un clavier traditionnel) +* plusieurs touches "Super" pour faciliter son accès + +Il y a deux layers, celui de base, et celui avec les flèches, les touches fonction et la souris (main gauche). + +## Particularités + +* Touches de repos des pouces : "espace" à gauche et "entrée" à droite. +* Touche Ctrl gauche accessible avec la paume de la main. +* Touche "w" placée sur la main gauche (j'ai toujours trouvé le "w" difficle d'accès sur un clavier bépo classique. +* Plusieurs touches F12. +* Les flèches sont disposées avec un déplacement à la VIM. +* Un mode souris permet d'utiliser la souris avec le clavier. +* Possibilité de changer de mode de manière temporaire ou permanente. +* Les leds s'allument avec SHIFT, ALT ou la touche function. + +J'ai fait cette disposition pour mes besoins, à vous de la modifier pour les vôtres ;) + +## Utilisation + +### Pré-requis + +Pour Archlinux, il est nécessaire d'installer ces paquets au préalable: + +~~~bash +sudo pacman -S avr-gcc avr-libc teensy-loader-cli +~~~ + +Les paquets "avr" permettent de compiler le firmware, et teensy-loader permet de le charger sur le clavier. + +### Compilation + +~~~bash +# clone the repo +git clone https://github.com/qmk/qmk_firmware +# install submodules +make git-submodule +# compile this layout +make ergodox_ez:bepo_alt +~~~ + +### Chargement + +~~~bash +teensy-loader-cli -w -mmcu=atmega32u4 -v ergodox_ez_bepo_alt.hex && sleep 6 && setxkbmap fr bepo +~~~ + +J'ai ajouté un sleep avant la commande pour remettre en bépo afin de laisser au clavier le temps de rebooter. diff --git a/layouts/community/ergodox/bepo_alt/rules.mk b/layouts/community/ergodox/bepo_alt/rules.mk new file mode 100644 index 000000000000..faca18b5431a --- /dev/null +++ b/layouts/community/ergodox/bepo_alt/rules.mk @@ -0,0 +1,5 @@ +# Having a file like this allows you to override Makefile definitions +# for your own particular keymap + +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +COMMAND_ENABLE = no # Commands for debug and configuration From e6b3bef077d9810c39bc7e7fd70eb52a4600abf5 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 2 Apr 2019 12:25:36 -0400 Subject: [PATCH 416/445] Adjusting tapping term --- users/stanrc85/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index 14284435bef7..a041db2266d5 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h @@ -1,6 +1,6 @@ #pragma once -#define TAPPING_TERM 200 +#define TAPPING_TERM 300 #define RETRO_TAPPING #ifdef RGBLIGHT_ENABLE From b23752c840e4bcd4a6476d6956f2909514d0ecf0 Mon Sep 17 00:00:00 2001 From: David Rambo Date: Tue, 2 Apr 2019 14:50:22 -0400 Subject: [PATCH 417/445] [Keymap] Minor update to my XD75 keymap (#5531) * Updated iris, planck, and xd75 keymaps * Added brightness down and up to commented layout of Symbol layer. * updated config files for planck and iris * removed unnecessary include lines from iris and planck config files * updated XD75's PC layer and its NAVPC toggle layer * fixed typo in alias declaration for C_BSPS * changed alias names for BSPC toggle keys --- keyboards/xd75/keymaps/davidrambo/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c index a630affe070f..7be197a81c71 100644 --- a/keyboards/xd75/keymaps/davidrambo/keymap.c +++ b/keyboards/xd75/keymaps/davidrambo/keymap.c @@ -2,14 +2,14 @@ //aliases for clarity in layering #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac -#define C_BSPS LCTL(KC_BSPC) // delete whole word in PC +#define C_BSPC LCTL(KC_BSPC) // delete whole word in PC #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) #define C_RGHT LCTL(KC_RGHT) #define C_LEFT LCTL(KC_LEFT) #define SftEnt SFT_T(KC_ENT) -#define GBSPC LGUI_T(KC_BSPC) -#define CBSPC LCTL_T(KC_BSPC) +#define BS_GUI LGUI_T(KC_BSPC) +#define BS_CTL LCTL_T(KC_BSPC) // internet browser tab shortcuts and window/application swapping for Mac and Win #define GSL LGUI(S(KC_LEFT)) // back one tab in Safari @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt , - KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP + KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, BS_GUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP ), // Windows Layer: essentially swaps Control and GUI @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ + _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, BS_CTL , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ ), [_GAME] = LAYOUT_ortho_5x15( /* Gaming Layer */ @@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , C_BSPC , KC_HOME, KC_END , _______, _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; From 61b2f2b16e92cf63efa1534a1046bed5aab222a0 Mon Sep 17 00:00:00 2001 From: DDRnJn Date: Tue, 2 Apr 2019 14:51:28 -0400 Subject: [PATCH 418/445] Added some new songs (#5525) Added Fantasie Impromptu and Nocturne Op. 9 No. 1 in B flat minor by Chopin Added Isabella's Lullaby from The Promised Neverland Added Renai Circulation and Platinum Disco from Monogatari Added Terra's theme from Final Fantasy 6 --- quantum/audio/song_list.h | 79 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 369e0b48435e..1d4eec711681 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -713,4 +713,83 @@ H__NOTE(_B5), H__NOTE(_C6), H__NOTE(_E6), H__NOTE(_G6), WD_NOTE(_G6), Q__NOTE(_C6), B__NOTE(_C6), H__NOTE(_B6), \ Q__NOTE(_C7), BD_NOTE(_C7), +#define ISABELLAS_LULLABY \ + W__NOTE(_BF4), B__NOTE(_D5), W__NOTE(_EF5), B__NOTE(_F5), W__NOTE(_BF5), B__NOTE(_AF5), W__NOTE(_GF5), BD_NOTE(_F5), B__NOTE(_CS5), \ + W__NOTE(_F5), B__NOTE(_C5), W__NOTE(_EF5), BD_NOTE(_BF4), W__NOTE(_AF4), W__NOTE(_BF4), W__NOTE(_F5), W__NOTE(_GF5), \ + WD_NOTE(_AF5), H__NOTE(_FS5), W__NOTE(_F5), B__NOTE(_EF5), W__NOTE(_C6), B__NOTE(_AF5), W__NOTE(_F5), WD_NOTE(_AF5), \ + H__NOTE(_BF5), W__NOTE(_F5), WD_NOTE(_AF5), H__NOTE(_BF5), W__NOTE(_F5), W__NOTE(_EF5), W__NOTE(_BF4), W__NOTE(_AF5), \ + WD_NOTE(_F5), H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_BF5), W__NOTE(_AF5), \ + W__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_EF5), H__NOTE(_DF5), W__NOTE(_AF5), BD_NOTE(_F5), WD_NOTE(_BF4), H__NOTE(_C5), \ + W__NOTE(_CS5), W__NOTE(_EF5), W__NOTE(_AF4), W__NOTE(_EF5), WD_NOTE(_GF5), H__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_F5), \ + H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_CS6), W__NOTE(_EF6), W__NOTE(_AF5), \ + W__NOTE(_EF6), WD_NOTE(_GF6), H__NOTE(_F6), W__NOTE(_EF6), B__NOTE(_DF6), H__NOTE(_GF6), H__NOTE(_AF6), BD_NOTE(_DF6), \ + B__NOTE(_BF5), W__NOTE(_F6), BD_NOTE(_C6), W__NOTE(_AF5), WD_NOTE(_EF6), H__NOTE(_DF6), W__NOTE(_C6), B__NOTE(_BF5), + +#define FANTASIE_IMPROMPTU \ + E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), \ + E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_A4), \ + E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), \ + E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_A4), E__NOTE(_CS5), E__NOTE(_DS5), \ + E__NOTE(_FS5), E__NOTE(_A5), E__NOTE(_CS6), E__NOTE(_DS6), E__NOTE(_B6), E__NOTE(_A6), E__NOTE(_GS6), E__NOTE(_FS6), \ + E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_FS6), E__NOTE(_CS6), E__NOTE(_C5), E__NOTE(_DS6), E__NOTE(_A5), E__NOTE(_GS5), \ + E__NOTE(_FS5), E__NOTE(_A5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_FS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_DS5), \ + E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_B4), E__NOTE(_A4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), \ + E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), \ + E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_AS4), E__NOTE(_GS4), E__NOTE(_REST), \ + E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), \ + E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_DS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_REST), E__NOTE(_DS5), \ + E__NOTE(_B5), E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_CS6), E__NOTE(_B5), \ + E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_AS5), WD_NOTE(_GS5), + +#define TERRAS_THEME \ + Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_B5), Q__NOTE(_EF6), BD_NOTE(_B5), Q__NOTE(_AS5), Q__NOTE(_GS5), W__NOTE(_AS5), \ + BD_NOTE(_DS5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_B5), Q__NOTE(_DS6), BD_NOTE(_B5), \ + Q__NOTE(_BF5), Q__NOTE(_AF5), W__NOTE(_AS5), BD_NOTE(_DS6), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_DS6), \ + Q__NOTE(_FS6), BD_NOTE(_DS6), Q__NOTE(_CS6), Q__NOTE(_B5), W__NOTE(_CS6), BD_NOTE(_FS5), \ + Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), + +#define RENAI_CIRCULATION \ + Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_B5), \ + HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_GS6), Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), \ + H__NOTE(_CS6), Q__NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ + H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), WD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \ + HD_NOTE(_GS6), HD_NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \ + HD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), \ + Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_A6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), \ + H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), \ + H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), Q__NOTE(_GS6), H__NOTE(_E6), \ + H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), Q__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), \ + Q__NOTE(_E6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), W__NOTE(_B6), W__NOTE(_GS6), \ + W__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_FS6), B__NOTE(_GS6), H__NOTE(_GS6), \ + W__NOTE(_CS7), W__NOTE(_GS6), W__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), \ + H__NOTE(_FS6), WD_NOTE(_E6), + +#define PLATINUM_DISCO \ + H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), H__NOTE(_FS6), \ + H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS6), H__NOTE(_FS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), H__NOTE(_FS6), \ + H__NOTE(_AS6), W__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), Q__NOTE(_GS6), Q__NOTE(_AS6), \ + Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_DS6), Q__NOTE(_FS6), Q__NOTE(_CS6), Q__NOTE(_DS6), Q__NOTE(_AS5), Q__NOTE(_CS6), \ + H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), \ + H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_GS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), \ + H__NOTE(_FS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_CS6), \ + Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), WD_NOTE(_FS7), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), \ + WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), \ + WD_NOTE(_GS6), H__NOTE(_FS6), WD_NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), \ + WD_NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), \ + H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_AS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_DS6), W__NOTE(_FS6), \ + H__NOTE(_CS6), H__NOTE(_DS6), W__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), \ + B__NOTE(_FS6), + +#define NOCTURNE_OP_9_NO_1 \ + H__NOTE(_BF5), H__NOTE(_C6), H__NOTE(_DF6), H__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_GF5), W__NOTE(_F5), W__NOTE(_F5), W__NOTE(_F5), \ + W__NOTE(_F5), H__NOTE(_GF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_C5), B__NOTE(_DF5), W__NOTE(_BF4), Q__NOTE(_BF5), \ + Q__NOTE(_C6), Q__NOTE(_DF6), Q__NOTE(_A5), Q__NOTE(_BF5), Q__NOTE(_A5), Q__NOTE(_GS5), Q__NOTE(_A5), Q__NOTE(_C6), \ + Q__NOTE(_BF5), Q__NOTE(_GF5), Q__NOTE(_F5), Q__NOTE(_GF5), Q__NOTE(_E5), Q__NOTE(_F5), Q__NOTE(_BF5), Q__NOTE(_A5), \ + Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_GF5), Q__NOTE(_F5), Q__NOTE(_E5), Q__NOTE(_EF5), Q__NOTE(_D5), Q__NOTE(_DF5), \ + Q__NOTE(_C5), Q__NOTE(_DF5), Q__NOTE(_C5), Q__NOTE(_B4), Q__NOTE(_C5), Q__NOTE(_F5), Q__NOTE(_E5), Q__NOTE(_EF5), \ + B__NOTE(_DF5), W__NOTE(_BF4), W__NOTE(_BF5), W__NOTE(_BF5), W__NOTE(_BF5), BD_NOTE(_AF5), W__NOTE(_DF5), H__NOTE(_BF4), \ + H__NOTE(_C5), H__NOTE(_DF5), H__NOTE(_GF5), H__NOTE(_GF5), BD_NOTE(_F5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), \ + H__NOTE(_DF5), H__NOTE(_A4), B__NOTE(_AF4), W__NOTE(_DF5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_DF5), \ + H__NOTE(_EF5), BD_NOTE(_F5), + #endif From 68d8bb2b3fb8a35fda164539d27754b3f74e0819 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 2 Apr 2019 18:13:08 -0500 Subject: [PATCH 419/445] [Keyboard] Add handwired keyboard "Tennie" (#5507) * Add tennie * Jacobs Functions * Switch back to normal layout * Remove define from old template * Fix broken keymaps * Correct style errors, add bootlite * Update readmes. Rename test keymap * Missed comma * Switch rgb from init to post init --- keyboards/handwired/tennie/config.h | 240 ++++++++++++++++++ keyboards/handwired/tennie/info.json | 12 + .../handwired/tennie/keymaps/default/config.h | 19 ++ .../handwired/tennie/keymaps/default/keymap.c | 95 +++++++ .../tennie/keymaps/default/readme.md | 68 +++++ .../tennie/keymaps/simple-numbpad/config.h | 19 ++ .../tennie/keymaps/simple-numbpad/keymap.c | 37 +++ .../tennie/keymaps/simple-numbpad/readme.md | 18 ++ .../tennie/keymaps/soundboard/config.h | 19 ++ .../tennie/keymaps/soundboard/keymap.c | 37 +++ .../tennie/keymaps/soundboard/readme.md | 19 ++ keyboards/handwired/tennie/readme.md | 15 ++ keyboards/handwired/tennie/rules.mk | 80 ++++++ keyboards/handwired/tennie/tennie.c | 45 ++++ keyboards/handwired/tennie/tennie.h | 37 +++ 15 files changed, 760 insertions(+) create mode 100644 keyboards/handwired/tennie/config.h create mode 100644 keyboards/handwired/tennie/info.json create mode 100644 keyboards/handwired/tennie/keymaps/default/config.h create mode 100644 keyboards/handwired/tennie/keymaps/default/keymap.c create mode 100644 keyboards/handwired/tennie/keymaps/default/readme.md create mode 100644 keyboards/handwired/tennie/keymaps/simple-numbpad/config.h create mode 100644 keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c create mode 100644 keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md create mode 100644 keyboards/handwired/tennie/keymaps/soundboard/config.h create mode 100644 keyboards/handwired/tennie/keymaps/soundboard/keymap.c create mode 100644 keyboards/handwired/tennie/keymaps/soundboard/readme.md create mode 100644 keyboards/handwired/tennie/readme.md create mode 100644 keyboards/handwired/tennie/rules.mk create mode 100644 keyboards/handwired/tennie/tennie.c create mode 100644 keyboards/handwired/tennie/tennie.h diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h new file mode 100644 index 000000000000..b50886cdc807 --- /dev/null +++ b/keyboards/handwired/tennie/config.h @@ -0,0 +1,240 @@ +/* +Copyright 2018 Jack Hildebrandt + +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 0x1EEE +#define PRODUCT_ID 0x1313 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jsck +#define PRODUCT Tennie +#define DESCRIPTION Ten key macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6, D4, D0} +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7 D1} + +/* 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 RGBW +#define RGB_DI_PIN D1 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 1 + #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. + * + */ + +/* 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/tennie/info.json b/keyboards/handwired/tennie/info.json new file mode 100644 index 000000000000..c0369979291f --- /dev/null +++ b/keyboards/handwired/tennie/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Tennie", + "url": "https://github.com/StoutIEEE/macropad-workshop", + "maintainer": "UW Stout IEEE, Jack Hildebrandt (onemorebyte)", + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}] + } + } +} diff --git a/keyboards/handwired/tennie/keymaps/default/config.h b/keyboards/handwired/tennie/keymaps/default/config.h new file mode 100644 index 000000000000..4496c5910061 --- /dev/null +++ b/keyboards/handwired/tennie/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/tennie/keymaps/default/keymap.c b/keyboards/handwired/tennie/keymaps/default/keymap.c new file mode 100644 index 000000000000..3736841cbb9a --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/default/keymap.c @@ -0,0 +1,95 @@ +/* Copyright 2018 Jack H. + * + * 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 TAPPING_TOGGLE 2 + + +// Layer names +#define base 0 +#define shrek 1 +#define ogre 2 +#define tcp 3 + +// Layer Switches +#define KC_SHRK TT(shrek) +#define KC_OGRE TT(ogre) +#define KC_TCP TT(tcp) + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [base] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_DEL, KC_SPC, KC_ENT, + + // ├────────┼────────┼────────┼────────┼ + + KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, + + // ├────────┼────────┼────────┼────────┼ + + KC_SHRK, KC_OGRE, KC_TCP + + // └────────┴────────┴────────┘ + ), + [shrek] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_MPRV, KC_MPLY, KC_MNXT, + + // ├────────┼────────┼────────┼────────┼ + + KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, + + // ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + + // └────────┴────────┴────────┘ + ), + [ogre] = LAYOUT( + // ┌────────┬────────┬────────┐ + + RGB_MOD, RGB_TOG, RGB_RMOD, + + // ├────────┼────────┼────────┼────────┼ + + KC_F13, KC_F14, KC_F15, KC_F16, + + // ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + + // └────────┴────────┴────────┘ + ), + [tcp] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_WBAK, KC_WREF, KC_WFWD, + + // ├────────┼────────┼────────┼────────┼ + + XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, + + // ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + + // └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/handwired/tennie/keymaps/default/readme.md b/keyboards/handwired/tennie/keymaps/default/readme.md new file mode 100644 index 000000000000..1fbaa7f46354 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/default/readme.md @@ -0,0 +1,68 @@ +# Default keymap + +This keymap is to serve as an example of how you could make a multi-layer keymap. + +#### keymap + +``` +[base] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + DEL , SPC , ENT , + +// ├────────┼────────┼────────┼────────┼ + + LEFT , DOWN , UP , RGHT , + +// ├────────┼────────┼────────┼────────┼ + + SHRK , OGRE , TCP + +// └────────┴────────┴────────┘ +), +[shrek] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + MPRV , MPLY , MNXT , + +// ├────────┼────────┼────────┼────────┼ + + BRID , VOLD , VOLU , BRIU , + +// ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + +// └────────┴────────┴────────┘ +), +[ogre] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + RGB_MOD, RGB_TOG, RGB_RMOD + +// ├────────┼────────┼────────┼────────┼ + + F13 , F14 , F15 , F16 , + +// ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + +// └────────┴────────┴────────┘ +), +[tcp] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + WBAK , WREF , WFWD , + +// ├────────┼────────┼────────┼────────┼ + + XXXXXXX , PGDN , PGUP , XXXXXXX , + +// ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + +// └────────┴────────┴────────┘ +), +``` diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h new file mode 100644 index 000000000000..a3c309bb290e --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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/tennie/keymaps/simple-numbpad/keymap.c b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c new file mode 100644 index 000000000000..7cf29b118894 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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 + +// Layer names +#define base 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [base] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_1 , KC_2 , KC_3 , + + // ├────────┼────────┼────────┼────────┼ + + KC_4 , KC_5 , KC_6 , KC_7 , + + // ├────────┼────────┼────────┼────────┼ + + KC_8 , KC_9 , KC_0 + + // └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md new file mode 100644 index 000000000000..0b3f30750164 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md @@ -0,0 +1,18 @@ +# Simple numberpad keymap + +This keymap is to test the soldering work of workshop participants. It can also be used as a simple base for a macropad keymap. +``` +// ┌────────┬────────┬────────┐ + + 1 , 2 , 3 , + +// ├────────┼────────┼────────┼────────┼ + + 4 , 5 , 6 , 7 , + +// ├────────┼────────┼────────┼────────┼ + + 8 , 9 , 0 + +// └────────┴────────┴────────┘ +``` diff --git a/keyboards/handwired/tennie/keymaps/soundboard/config.h b/keyboards/handwired/tennie/keymaps/soundboard/config.h new file mode 100644 index 000000000000..5a1cba7b4044 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/soundboard/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jacob Hillebrand + * + * 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/tennie/keymaps/soundboard/keymap.c b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c new file mode 100644 index 000000000000..3bceb1feac98 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 Jacob Hillebrand + * + * 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 + +// Layer names +#define base 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [base] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_F13 , KC_F14 , KC_F15 , + + // ├────────┼────────┼────────┼────────┼ + + KC_F16 , KC_F17 , KC_F18 , KC_F19 , + + // ├────────┼────────┼────────┼────────┼ + + KC_F20, KC_F21 , KC_F22 + + // └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/handwired/tennie/keymaps/soundboard/readme.md b/keyboards/handwired/tennie/keymaps/soundboard/readme.md new file mode 100644 index 000000000000..d05b7117c161 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/soundboard/readme.md @@ -0,0 +1,19 @@ +# Soundboard keymap + +This keymap binds all keys to function keys 13-22 for something like a +soundboard (ie:[Resanance](https://www.reddit.com/r/discordapp/comments/44ldc1/soundboard_for_discord/)) +``` +// ┌────────┬────────┬────────┐ + + F13 , F14 , F15 , + +// ├────────┼────────┼────────┼────────┼ + + F16 , F17 , F18 , F19 , + +// ├────────┼────────┼────────┼────────┼ + + F20 , F21 , F22 + +// └────────┴────────┴────────┘ +``` diff --git a/keyboards/handwired/tennie/readme.md b/keyboards/handwired/tennie/readme.md new file mode 100644 index 000000000000..bbdbc2b6011e --- /dev/null +++ b/keyboards/handwired/tennie/readme.md @@ -0,0 +1,15 @@ +# Tennie + +![tennie](https://raw.githubusercontent.com/StoutIEEE/macropad-workshop/master/images/macropad.jpg) + +A ten key macropad for a club workshop! More information, and build instructions can be found [here](https://github.com/StoutIEEE/macropad-workshop) + +Keyboard Maintainer: [Jack Hildebrandt](https://github.com/onemorebyte), [UW Stout IEEE](https://github.com/StoutIEEE) + +Hardware Supported: ProMicro + +Make example for this keyboard (after setting up your build environment): + + make handwired/tennie: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/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk new file mode 100644 index 000000000000..0119dc6fb2fd --- /dev/null +++ b/keyboards/handwired/tennie/rules.mk @@ -0,0 +1,80 @@ +# 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 + + +# 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 = lite # 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 = 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 = yes # 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) diff --git a/keyboards/handwired/tennie/tennie.c b/keyboards/handwired/tennie/tennie.c new file mode 100644 index 000000000000..e1ceaf153d77 --- /dev/null +++ b/keyboards/handwired/tennie/tennie.c @@ -0,0 +1,45 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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 "tennie.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_post_init(void) { + rgblight_enable_noeeprom(); + keyboard_post_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/handwired/tennie/tennie.h b/keyboards/handwired/tennie/tennie.h new file mode 100644 index 000000000000..8ab0d04c5287 --- /dev/null +++ b/keyboards/handwired/tennie/tennie.h @@ -0,0 +1,37 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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( \ + K00, K01, K02, \ + K10, K11, K12, K13, \ + K20, K21, K22 \ +) \ +{ \ + { K00, K01, K02, KC_NO }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO }, \ +} From 813d79bac6ff168ea13bf073a28744542a08a59e Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 2 Apr 2019 19:56:11 -0400 Subject: [PATCH 420/445] Use modified rgb_backlight.c file --- keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 1 - users/stanrc85/rules.mk | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index a2850a83057d..e0c9ead8dd4c 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -1,6 +1,5 @@ # 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 diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 4b66f9692db0..83e9cb6e42a6 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -14,3 +14,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) # Include my fancy rgb functions source here SRC += layer_rgb.c endif + +ifeq ($(strip $(KEYBOARD)), hs60/v2) + SRC += rgb_backlight.c +endif From 387ede9e6b3a9309a0329e6108443fa4a27a48bc Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 2 Apr 2019 19:56:28 -0400 Subject: [PATCH 421/445] Tweaking tapping_term value --- users/stanrc85/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index a041db2266d5..42306727ceba 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h @@ -1,6 +1,6 @@ #pragma once -#define TAPPING_TERM 300 +#define TAPPING_TERM 250 #define RETRO_TAPPING #ifdef RGBLIGHT_ENABLE From 3cfa24c6848980965996f76a0dba552f4d9c906d Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 2 Apr 2019 19:57:22 -0400 Subject: [PATCH 422/445] Adding zeal60 rgb files with modifications --- users/stanrc85/rgb_backlight.c | 1964 +++++++++++++++++++++++ users/stanrc85/rgb_backlight.h | 110 ++ users/stanrc85/rgb_backlight_api.h | 43 + users/stanrc85/rgb_backlight_keycodes.h | 34 + 4 files changed, 2151 insertions(+) create mode 100644 users/stanrc85/rgb_backlight.c create mode 100644 users/stanrc85/rgb_backlight.h create mode 100644 users/stanrc85/rgb_backlight_api.h create mode 100644 users/stanrc85/rgb_backlight_keycodes.h diff --git a/users/stanrc85/rgb_backlight.c b/users/stanrc85/rgb_backlight.c new file mode 100644 index 000000000000..dc5d7834b702 --- /dev/null +++ b/users/stanrc85/rgb_backlight.c @@ -0,0 +1,1964 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#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) || 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" + +#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 +#endif + +#define BACKLIGHT_EFFECT_MAX 10 + +backlight_config g_config = { + .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, + .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, + .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, + .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, + .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, + .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, + .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, + .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, + .brightness = 125, + .effect = RGB_BACKLIGHT_EFFECT, + .effect_speed = 0, + .color_1 = { .h = 0, .s = 255 }, + .color_2 = { .h = 150, .s = 255 }, + .caps_lock_indicator = { .color = { .h = 200, .s = 255 }, .index = 3-1 }, //purple + .layer_1_indicator = { .color = { .h = 100, .s = 255 }, .index = 60-1 }, //green + .layer_2_indicator = { .color = { .h = 150, .s = 255 }, .index = 60-1 }, //blue + .layer_3_indicator = { .color = { .h = 0, .s = 0 }, .index = 60-1 }, //white + .alphas_mods = { + RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, +#if defined(RGB_BACKLIGHT_M6_B) + .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } +#endif +}; + +bool g_suspend_state = false; +uint8_t g_indicator_state = 0; + +// Global tick at 20 Hz +uint32_t g_tick = 0; + +// Ticks since this key was last hit. +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_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 +#define ISSI_ADDR_2 0x76 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_8, C2_8, C3_8}, // LA8 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 + + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {0, C1_15, C2_15, C3_15}, // LB7 + {0, C1_16, C2_16, C3_16}, // LB8 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15}, // LB16 + {0, C8_16, C7_16, C6_16}, // LB17 + + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_6, C2_6, C3_6}, // LC6 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_7, C8_7, C6_6}, // LC15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C8_8, C7_8, C6_8}, // LC17 + + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C9_13, C8_13, C7_13}, // LD13 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 +}; +#endif // !defined(RGB_BACKLIGHT_M6_B) + + +typedef struct Point { + uint8_t x; + uint8_t y; +} Point; + + +// index in range 0..71 (LA0..LA17, LB0..LB17, LC0..LC17, LD0..LD17) +// point values in range x=0..224 y=0..64 +// origin is center of top-left key (i.e Esc) +#if defined (RGB_BACKLIGHT_ZEAL65) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} +}; +#elif defined (RGB_BACKLIGHT_KOYU) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} +}; +#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, + {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, + // LB0..LB17 + {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, + {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, + {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, + // LD0..LD17 + {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 +// 1 2 4 +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} +}; +#endif + +// This may seem counter-intuitive, but it's quite flexible. +// For each LED, get it's position to decide what color to make it. +// This solves the issue of LEDs (and switches) not aligning to a grid, +// or having a large "bitmap" and sampling them. +void map_led_to_point( uint8_t index, Point *point ) +{ + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); + +#if defined (RGB_BACKLIGHT_M6_B) + return; +#endif + + switch (index) + { + case 18+4: // LB4A + if ( g_config.use_split_backspace ) + point->x -= 8; + break; +#if defined (RGB_BACKLIGHT_ZEAL60) + case 18+14: // LB14A + if ( g_config.use_iso_enter ) + point->y += 8; // extremely pedantic + break; + case 54+5: // LD5A + if ( !g_config.use_iso_enter ) + point->x -= 10; + break; + case 36+16: // LC16A + if ( !g_config.use_split_left_shift ) + point->x += 8; + break; +#endif +#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) + case 36+0: // LC0A + if ( g_config.use_7u_spacebar ) + point->x += 10; + break; + case 36+6: // LC6A + if ( g_config.use_7u_spacebar ) + point->x += 4; + break; + case 54+7: // LD7A + if ( !g_config.use_split_right_shift ) + point->x -= 8; + break; +#endif + } +} + +void map_led_to_point_polar( uint8_t index, Point *point ) +{ + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); +} + +// +// Maps switch matrix coordinate (row,col) to LED index +// + + +#if defined (RGB_BACKLIGHT_ZEAL65) +// Note: Left spacebar stab is at 4,2 (LC7) +// Right spacebar stab is at 4,9 (D14) +// +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 +// C17, C8, C7, ---, ---, ---, ---, C0, ---, D14, D15, D16, D17, B17, B16 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 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, 18+15 }, + { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } +}; +#elif defined(RGB_BACKLIGHT_KOYU) +// Note: Left spacebar stab is at 4,4 (LC6) +// Right spacebar stab is at 4,10 (D14) +// +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 +// C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, B17, B16 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 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, 18+15 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } +}; +#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) +// Note: Left spacebar stab is at 4,3 (LC6) +// Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) +// +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, +// C17, C8, C7, C6, ---, ---, ---, C0, ---, D13, D14, D15, D16, D17, +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, + { 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 +// 1 2 4 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0, 3, 5, 1, 2, 4 } +}; +#endif + +void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) +{ + *led = 255; + if ( row < MATRIX_ROWS && column < MATRIX_COLS ) + { + *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); + } +} + +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 ); +#endif +} + +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 +} + +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 +} + +void backlight_set_key_hit(uint8_t row, uint8_t column) +{ + uint8_t led; + map_row_column_to_led(row,column,&led); + g_key_hit[led] = 0; + + g_any_key_hit = 0; +} + +#if !defined(RGB_BACKLIGHT_HS60) +// This is (F_CPU/1024) / 20 Hz +// = 15625 Hz / 20 Hz +// = 781 +#define TIMER3_TOP 781 + +void backlight_timer_init(void) +{ + static uint8_t backlight_timer_is_init = 0; + if ( backlight_timer_is_init ) + { + return; + } + backlight_timer_is_init = 1; + + // Timer 3 setup + TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP + _BV(CS32) | _BV(CS30); // prescale by /1024 + // Set TOP value + uint8_t sreg = SREG; + cli(); + + OCR3AH = (TIMER3_TOP >> 8) & 0xff; + OCR3AL = TIMER3_TOP & 0xff; + SREG = sreg; +} + +void backlight_timer_enable(void) +{ + TIMSK3 |= _BV(OCIE3A); +} + +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) +{ + g_suspend_state = state; +} + +void backlight_set_indicator_state(uint8_t state) +{ + g_indicator_state = state; +} + +void backlight_effect_rgb_test(void) +{ + // Mask out bits 4 and 5 + // This 2-bit value will stay the same for 16 ticks. + switch ( (g_tick & 0x30) >> 4 ) + { + case 0: + { + backlight_set_color_all( 255, 0, 0 ); + break; + } + case 1: + { + backlight_set_color_all( 0, 255, 0 ); + break; + } + case 2: + { + backlight_set_color_all( 0, 0, 255 ); + break; + } + case 3: + { + backlight_set_color_all( 255, 255, 255 ); + break; + } + } +} + +#if defined(RGB_DEBUGGING_ONLY) +// This tests the LEDs +// Note that it will change the LED control registers +// in the LED drivers, and leave them in an invalid +// state for other backlight effects. +// ONLY USE THIS FOR TESTING LEDS! +void backlight_effect_single_LED_test(void) +{ + static uint8_t color = 0; // 0,1,2 for R,G,B + static uint8_t row = 0; + static uint8_t column = 0; + + static uint8_t tick = 0; + tick++; + + if ( tick > 2 ) + { + tick = 0; + column++; + } + if ( column > 14 ) + { + column = 0; + row++; + } + if ( row > 4 ) + { + row = 0; + color++; + } + if ( color > 2 ) + { + color = 0; + } + + uint8_t led; + map_row_column_to_led( row, column, &led ); + backlight_set_color_all( 255, 255, 255 ); + backlight_test_led( led, color==0, color==1, color==2 ); +} +#endif // defined(RGB_DEBUGGING_ONLY) + +// All LEDs off +void backlight_effect_all_off(void) +{ + backlight_set_color_all( 0, 0, 0 ); +} + +// Solid color +void backlight_effect_solid_color(void) +{ + HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); +} + +// alphas = color1, mods = color2 +void backlight_effect_alphas_mods(void) +{ + RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); + RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); + + for ( int row = 0; row < MATRIX_ROWS; row++ ) + { + for ( int column = 0; column < MATRIX_COLS; column++ ) + { + uint8_t index; + map_row_column_to_led( row, column, &index ); + if ( index < BACKLIGHT_LED_COUNT ) + { + if ( ( g_config.alphas_mods[row] & (1< 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + // Divide delta by 4, this gives the delta per row + deltaH /= 4; + + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; + RGB rgb; + Point point; + for ( int i=0; i>4); + // Relies on hue being 8-bit and wrapping + hsv.h = g_config.color_1.h + ( deltaH * y ); + hsv.s = g_config.color_1.s + ( deltaS * y ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } +} + +void backlight_effect_raindrops(bool initialize) +{ + int16_t h1 = g_config.color_1.h; + int16_t h2 = g_config.color_2.h; + int16_t deltaH = h2 - h1; + deltaH /= 4; + + // Take the shortest path between hues + if ( deltaH > 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv; + RGB rgb; + + // Change one LED every tick + uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; + + for ( int i=0; i> 2; + hsv.h = g_config.color_1.h + offset2; + hsv.s = 127 + ( point.y >> 1 ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } +} + +#if defined(RGB_BACKLIGHT_M6_B) +void backlight_effect_custom_colors(void) +{ + RGB rgb; + for ( uint8_t i = 0; i < 6; i++ ) + { + HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; + rgb = hsv_to_rgb( hsv ); + uint8_t led; + map_row_column_to_led( 0, i, &led ); + backlight_set_color( led, rgb.r, rgb.g, rgb.b ); + } +} +#endif + +void backlight_effect_indicators_set_colors( uint8_t index, HS color ) +{ + HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + if ( index == 254 ) + { + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); + } + else + { + backlight_set_color( index, rgb.r, rgb.g, rgb.b ); + + // If the spacebar LED is the indicator, + // do the same for the spacebar stabilizers + if ( index == 36+0 ) // LC0 + { +#if defined (RGB_BACKLIGHT_ZEAL65) + backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined (RGB_BACKLIGHT_KOYU) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 + if ( g_config.use_7u_spacebar ) + { + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 + } +#endif + } + } +} + +// This runs after another backlight effect and replaces +// colors already set +void backlight_effect_indicators(void) +{ + if ( g_config.caps_lock_indicator.index != 255 && + ( g_indicator_state & (1< 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : g_config.effect; + + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = effect != effect_last; + effect_last = effect; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) + { + case 0: + backlight_effect_all_off(); + break; + case 1: + backlight_effect_solid_color(); + break; + case 2: +#if defined(RGB_BACKLIGHT_M6_B) + backlight_effect_custom_colors(); +#else + backlight_effect_alphas_mods(); +#endif + break; + case 3: + backlight_effect_gradient_up_down(); + break; + case 4: + backlight_effect_raindrops( initialize ); + break; + case 5: + backlight_effect_cycle_all(); + break; + case 6: + backlight_effect_cycle_left_right(); + break; + case 7: + backlight_effect_cycle_up_down(); + break; + case 8: + backlight_effect_jellybean_raindrops( initialize ); + break; + case 9: + backlight_effect_cycle_radial1(); + break; + case 10: + backlight_effect_cycle_radial2(); + break; + default: + backlight_effect_all_off(); + break; + } + + if ( ! suspend_backlight ) + { +#if !defined(RGB_BACKLIGHT_M6_B) + backlight_effect_indicators(); +#endif + } +} + +void backlight_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) +{ + if ( row >= MATRIX_ROWS ) + { + // Special value, 255=none, 254=all + *index = row; + } + else + { + map_row_column_to_led( row, column, index ); + } +} + +void backlight_get_indicator_row_col( uint8_t index, uint8_t *row, uint8_t *column ) +{ + if ( index == 255 || index == 254 ) + { + // Special value, 255=none, 254=all + *row = index; + *column = 0; + return; + } + for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) + { + for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) + { + uint8_t i = 255; + map_row_column_to_led( r, c, &i ); + if ( i == index ) + { + *row = r; + *column = c; + return; + } + } + } +} + +// Some helpers for setting/getting HSV +void _set_color( HS *color, uint8_t *data ) +{ + color->h = data[0]; + color->s = data[1]; +} + +void _get_color( HS *color, uint8_t *data ) +{ + data[0] = color->h; + data[1] = color->s; +} + +void backlight_config_set_value( uint8_t *data ) +{ + bool reinitialize = false; + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { +#if defined (RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) + case id_use_split_backspace: + { + g_config.use_split_backspace = (bool)*value_data; + reinitialize = true; + break; + } +#endif +#if defined (RGB_BACKLIGHT_ZEAL60) + case id_use_split_left_shift: + { + g_config.use_split_left_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_split_right_shift: + { + g_config.use_split_right_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_7u_spacebar: + { + g_config.use_7u_spacebar = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_iso_enter: + { + g_config.use_iso_enter = (bool)*value_data; + reinitialize = true; + break; + } + case id_disable_hhkb_blocker_leds: + { + g_config.disable_hhkb_blocker_leds = (bool)*value_data; + reinitialize = true; + break; + } +#endif + case id_disable_when_usb_suspended: + { + g_config.disable_when_usb_suspended = (bool)*value_data; + break; + } + case id_disable_after_timeout: + { + g_config.disable_after_timeout = *value_data; + break; + } + case id_brightness: + { + g_config.brightness = *value_data; + break; + } + case id_effect: + { + g_config.effect = *value_data; + break; + } + case id_effect_speed: + { + g_config.effect_speed = *value_data; + break; + } + case id_color_1: + { + _set_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _set_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _set_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_1_indicator_color: + { + _set_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_2_indicator_color: + { + _set_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_3_indicator_color: + { + _set_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); + } + } +#if defined(RGB_BACKLIGHT_M6_B) + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } +#endif + } + + if ( reinitialize ) + { + backlight_init_drivers(); + } +} + +void backlight_config_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_use_split_backspace: + { + *value_data = ( g_config.use_split_backspace ? 1 : 0 ); + break; + } + case id_use_split_left_shift: + { + *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); + break; + } + case id_use_split_right_shift: + { + *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); + break; + } + case id_use_7u_spacebar: + { + *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); + break; + } + case id_use_iso_enter: + { + *value_data = ( g_config.use_iso_enter ? 1 : 0 ); + break; + } + case id_disable_when_usb_suspended: + { + *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); + break; + } + case id_disable_hhkb_blocker_leds: + { + *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); + break; + } + case id_disable_after_timeout: + { + *value_data = g_config.disable_after_timeout; + break; + } + case id_brightness: + { + *value_data = g_config.brightness; + break; + } + case id_effect: + { + *value_data = g_config.effect; + break; + } + case id_effect_speed: + { + *value_data = g_config.effect_speed; + break; + } + case id_color_1: + { + _get_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _get_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _get_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_1_indicator_color: + { + _get_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_2_indicator_color: + { + _get_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_3_indicator_color: + { + _get_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + *(value_data+i*2) = g_config.alphas_mods[i] >> 8; + *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; + } + } +#if defined(RGB_BACKLIGHT_M6_B) + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } +#endif + } +} + +void backlight_config_set_alphas_mods( uint16_t *alphas_mods ) +{ + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = alphas_mods[i]; + } + + backlight_config_save(); +} + +void backlight_config_load(void) +{ + eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); +} + +void backlight_config_save(void) +{ + eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); +} + +void backlight_init_drivers(void) +{ + // Initialize I2C + i2c_init(); + +#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 ); + + for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) + { + // OR the possible "disabled" cases together, then NOT the result to get the enabled state + // LC6 LD13 not present on Zeal65 +#if defined (RGB_BACKLIGHT_ZEAL65) + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+6 ) || // LC6 + ( index == 54+13 ) ); // LD13 +#elif defined (RGB_BACKLIGHT_KOYU) + bool enabled = !( ( index == 36+15 ) || // LC15 + ( index == 54+13 ) || // LD13 + ( index == 54+17 ) ); // LD17 +#elif defined (RGB_BACKLIGHT_M60_A) + bool enabled = !( + // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) || // LB17 + // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A + ( index == 36+17 ) || // LC17 + ( index == 54+17 ) || // LD17 + ( index == 36+15 ) || // LC15 + ( index == 54+13 ) ); // LD13 +#elif defined (RGB_BACKLIGHT_ZEAL60) + // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 + ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 + ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 + ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 + ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) ); // LB17 +#endif + // This only caches it for later + IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); +#endif // !defined(RGB_BACKLIGHT_M6_B) + + // TODO: put the 1 second startup delay here? + + // clear the key hits + for ( int led=0; ledevent.pressed ) + { + backlight_set_key_hit( record->event.key.row, record->event.key.col ); + } + + switch(keycode) + { + case BR_INC: + if (record->event.pressed) + { + backlight_brightness_increase(); + } + return false; + break; + case BR_DEC: + if (record->event.pressed) + { + backlight_brightness_decrease(); + } + return false; + break; + case EF_INC: + if (record->event.pressed) + { + backlight_effect_increase(); + } + return false; + break; + case EF_DEC: + if (record->event.pressed) + { + backlight_effect_decrease(); + } + return false; + break; + case ES_INC: + if (record->event.pressed) + { + backlight_effect_speed_increase(); + } + return false; + break; + case ES_DEC: + if (record->event.pressed) + { + backlight_effect_speed_decrease(); + } + return false; + break; + case H1_INC: + if (record->event.pressed) + { + backlight_color_1_hue_increase(); + } + return false; + break; + case H1_DEC: + if (record->event.pressed) + { + backlight_color_1_hue_decrease(); + } + return false; + break; + case S1_INC: + if (record->event.pressed) + { + backlight_color_1_sat_increase(); + } + return false; + break; + case S1_DEC: + if (record->event.pressed) + { + backlight_color_1_sat_decrease(); + break; + } + return false; + break; + case H2_INC: + if (record->event.pressed) + { + backlight_color_2_hue_increase(); + } + return false; + break; + case H2_DEC: + if (record->event.pressed) + { + backlight_color_2_hue_decrease(); + } + return false; + break; + case S2_INC: + if (record->event.pressed) + { + backlight_color_2_sat_increase(); + } + return false; + break; + case S2_DEC: + if (record->event.pressed) + { + backlight_color_2_sat_decrease(); + break; + } + return false; + break; + } + + return true; +} + +// Deals with the messy details of incrementing an integer +uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); +} + +uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) +{ + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); +} + +void backlight_effect_increase(void) +{ + g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_decrease(void) +{ + g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); +} + +void backlight_effect_speed_increase(void) +{ + g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_effect_speed_decrease(void) +{ + g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); +} + +void backlight_brightness_increase(void) +{ + g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_brightness_decrease(void) +{ + g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_hue_increase(void) +{ + g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_hue_decrease(void) +{ + g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_sat_increase(void) +{ + g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_1_sat_decrease(void) +{ + g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_hue_increase(void) +{ + g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_hue_decrease(void) +{ + g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_sat_increase(void) +{ + g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); +} + +void backlight_color_2_sat_decrease(void) +{ + g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); +} + +#if defined(RGB_DEBUGGING_ONLY) +void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) +{ + for ( int i=0; i. + */ +#pragma once + +#if RGB_BACKLIGHT_ENABLED +#else +#error rgb_backlight.h included when RGB_BACKLIGHT_ENABLED == 0 +#endif // RGB_BACKLIGHT_ENABLED + +#include +#include + +#include "quantum/color.h" + +typedef struct PACKED +{ + uint8_t h; + uint8_t s; +} HS; + +typedef struct +{ + HS color; + uint8_t index; +} backlight_config_indicator; + +typedef struct +{ + bool use_split_backspace:1; // | + bool use_split_left_shift:1; // | + bool use_split_right_shift:1; // | + bool use_7u_spacebar:1; // | + bool use_iso_enter:1; // | + bool disable_when_usb_suspended:1; // | + bool disable_hhkb_blocker_leds:1; // | + bool __pad7:1; // 1 byte + uint8_t disable_after_timeout; // 1 byte + uint8_t brightness; // 1 byte + uint8_t effect; // 1 byte + uint8_t effect_speed; // 1 byte + HS color_1; // 2 bytes + HS color_2; // 2 bytes + backlight_config_indicator caps_lock_indicator; // 3 bytes + backlight_config_indicator layer_1_indicator; // 3 bytes + backlight_config_indicator layer_2_indicator; // 3 bytes + backlight_config_indicator layer_3_indicator; // 3 bytes + uint16_t alphas_mods[5]; // 10 bytes +#if defined(RGB_BACKLIGHT_M6_B) + HS custom_color[6]; // 12 bytes +#endif +} backlight_config; // = 31 bytes (M6-B = 43 bytes) + +void backlight_config_load(void); +void backlight_config_save(void); +void backlight_config_set_value( uint8_t *data ); +void backlight_config_get_value( uint8_t *data ); + +void backlight_init_drivers(void); + +void backlight_timer_init(void); +void backlight_timer_enable(void); +void backlight_timer_disable(void); + +void backlight_set_suspend_state(bool state); +void backlight_set_indicator_state(uint8_t state); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void backlight_update_pwm_buffers(void); + +// Handle backlight specific keycodes +bool process_record_backlight(uint16_t keycode, keyrecord_t *record); + +void backlight_set_key_hit(uint8_t row, uint8_t col); + +void backlight_effect_increase(void); +void backlight_effect_decrease(void); +void backlight_effect_speed_increase(void); +void backlight_effect_speed_decrease(void); + +void backlight_brightness_increase(void); +void backlight_brightness_decrease(void); + +void backlight_color_1_hue_increase(void); +void backlight_color_1_hue_decrease(void); +void backlight_color_1_sat_increase(void); +void backlight_color_1_sat_decrease(void); +void backlight_color_2_hue_increase(void); +void backlight_color_2_hue_decrease(void); +void backlight_color_2_sat_increase(void); +void backlight_color_2_sat_decrease(void); + +void backlight_test_led( uint8_t index, bool red, bool green, bool blue ); +void backlight_debug_led(bool state); + diff --git a/users/stanrc85/rgb_backlight_api.h b/users/stanrc85/rgb_backlight_api.h new file mode 100644 index 000000000000..680ba4d99c26 --- /dev/null +++ b/users/stanrc85/rgb_backlight_api.h @@ -0,0 +1,43 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 + +enum backlight_config_value +{ + id_use_split_backspace = 0x01, + id_use_split_left_shift = 0x02, + id_use_split_right_shift = 0x03, + id_use_7u_spacebar = 0x04, + id_use_iso_enter = 0x05, + id_disable_hhkb_blocker_leds = 0x06, + id_disable_when_usb_suspended = 0x07, + id_disable_after_timeout = 0x08, + id_brightness = 0x09, + id_effect = 0x0A, + id_effect_speed = 0x0B, + id_color_1 = 0x0C, + id_color_2 = 0x0D, + id_caps_lock_indicator_color = 0x0E, + id_caps_lock_indicator_row_col = 0x0F, + id_layer_1_indicator_color = 0x10, + id_layer_1_indicator_row_col = 0x11, + id_layer_2_indicator_color = 0x12, + id_layer_2_indicator_row_col = 0x13, + id_layer_3_indicator_color = 0x14, + id_layer_3_indicator_row_col = 0x15, + id_alphas_mods = 0x16, + id_custom_color = 0x17 +}; diff --git a/users/stanrc85/rgb_backlight_keycodes.h b/users/stanrc85/rgb_backlight_keycodes.h new file mode 100644 index 000000000000..ba7f03f89d4e --- /dev/null +++ b/users/stanrc85/rgb_backlight_keycodes.h @@ -0,0 +1,34 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 + +// This is hardcoded at 0x5F00 so it's well after keycode value SAFE_RANGE +enum backlight_keycodes { + BR_INC = 0x5F00, // backlight brightness increase + BR_DEC, // backlight brightness decrease + EF_INC, // backlight effect increase + EF_DEC, // backlight effect decrease + ES_INC, + ES_DEC, + H1_INC, + H1_DEC, + S1_INC, + S1_DEC, + H2_INC, + H2_DEC, + S2_INC, + S2_DEC +}; From c98247e3dd2958bd2d8969dc75170e7e2757b895 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 2 Apr 2019 19:24:14 -0500 Subject: [PATCH 423/445] RGB Matrix Overhaul (#5372) * RGB Matrix overhaul Breakout of animations to separate files Integration of optimized int based math lib Overhaul of rgb_matrix.c and animations for performance * Updating effect function api for future extensions * Combined the keypresses || keyreleases define checks into a single define so I stop forgetting it where necessary * Moving define RGB_MATRIX_KEYREACTIVE_ENABLED earlier in the include chain --- docs/feature_rgb_matrix.md | 278 ++-- keyboards/dztech/dz40rgb/config.h | 1 - keyboards/dztech/dz60rgb/config.h | 1 - keyboards/ergodox_ez/config.h | 1 - keyboards/hs60/v1/config.h | 1 - .../community/ergodox/drashna_glow/config.h | 1 - layouts/community/ortho_4x12/drashna/config.h | 1 - lib/lib8tion/LICENSE | 20 + lib/lib8tion/lib8tion.c | 242 ++++ lib/lib8tion/lib8tion.h | 934 +++++++++++++ lib/lib8tion/math8.h | 552 ++++++++ lib/lib8tion/random8.h | 94 ++ lib/lib8tion/scale8.h | 542 ++++++++ lib/lib8tion/trig8.h | 259 ++++ quantum/color.c | 2 + quantum/quantum.c | 14 +- quantum/rgb_matrix.c | 1185 ++++++----------- quantum/rgb_matrix.h | 152 +-- .../rgb_matrix_animations/alpha_mods_anim.h | 26 + .../rgb_matrix_animations/breathing_anim.h | 19 + .../rgb_matrix_animations/cycle_all_anim.h | 21 + .../cycle_left_right_anim.h | 22 + .../cycle_up_down_anim.h | 22 + .../rgb_matrix_animations/digital_rain_anim.h | 74 + .../rgb_matrix_animations/dual_beacon_anim.h | 24 + .../gradient_up_down_anim.h | 22 + .../jellybean_raindrops_anim.h | 30 + .../rainbow_beacon_anim.h | 24 + .../rainbow_moving_chevron_anim.h | 22 + .../rainbow_pinwheels_anim.h | 24 + .../rgb_matrix_animations/raindrops_anim.h | 40 + .../rgb_matrix_animations/solid_color_anim.h | 14 + .../solid_reactive_anim.h | 33 + .../solid_reactive_simple_anim.h | 32 + .../rgb_matrix_animations/solid_splash_anim.h | 42 + quantum/rgb_matrix_animations/splash_anim.h | 44 + quantum/rgb_matrix_types.h | 90 ++ 37 files changed, 3887 insertions(+), 1018 deletions(-) create mode 100644 lib/lib8tion/LICENSE create mode 100644 lib/lib8tion/lib8tion.c create mode 100644 lib/lib8tion/lib8tion.h create mode 100644 lib/lib8tion/math8.h create mode 100644 lib/lib8tion/random8.h create mode 100644 lib/lib8tion/scale8.h create mode 100644 lib/lib8tion/trig8.h create mode 100644 quantum/rgb_matrix_animations/alpha_mods_anim.h create mode 100644 quantum/rgb_matrix_animations/breathing_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_all_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_left_right_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_up_down_anim.h create mode 100644 quantum/rgb_matrix_animations/digital_rain_anim.h create mode 100644 quantum/rgb_matrix_animations/dual_beacon_anim.h create mode 100644 quantum/rgb_matrix_animations/gradient_up_down_anim.h create mode 100644 quantum/rgb_matrix_animations/jellybean_raindrops_anim.h create mode 100644 quantum/rgb_matrix_animations/rainbow_beacon_anim.h create mode 100644 quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h create mode 100644 quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h create mode 100644 quantum/rgb_matrix_animations/raindrops_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_color_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_simple_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_splash_anim.h create mode 100644 quantum/rgb_matrix_animations/splash_anim.h create mode 100644 quantum/rgb_matrix_types.h diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 8d1efb12a275..ec121895459f 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -10,39 +10,45 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: - RGB_MATRIX_ENABLE = IS31FL3731 +```C +RGB_MATRIX_ENABLE = IS31FL3731 +``` Configure the hardware via your `config.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) - // The address will vary depending on your wiring: - // 0b1110100 AD <-> GND - // 0b1110111 AD <-> VCC - // 0b1110101 AD <-> SCL - // 0b1110110 AD <-> SDA - #define DRIVER_ADDR_1 0b1110100 - #define DRIVER_ADDR_2 0b1110110 - - #define DRIVER_COUNT 2 - #define DRIVER_1_LED_TOTAL 25 - #define DRIVER_2_LED_TOTAL 24 - #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +```C +// 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) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 25 +#define DRIVER_2_LED_TOTAL 24 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +``` Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Define these arrays listing all the LEDs in your `.c`: - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - /* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C1_3, C2_3, C3_3}, - .... - } +```C +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_3, C2_3, C3_3}, + .... +} +``` Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). @@ -50,60 +56,70 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: - RGB_MATRIX_ENABLE = IS31FL3733 +```C +RGB_MATRIX_ENABLE = IS31FL3733 +``` Configure the hardware via your `config.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) - // The address will vary depending on your wiring: - // 00 <-> GND - // 01 <-> SCL - // 10 <-> SDA - // 11 <-> VCC - // ADDR1 represents A1:A0 of the 7-bit address. - // ADDR2 represents A3:A2 of the 7-bit address. - // The result is: 0b101(ADDR2)(ADDR1) - #define DRIVER_ADDR_1 0b1010000 - #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - - #define DRIVER_COUNT 2 - #define DRIVER_1_LED_TOTAL 64 - #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +```C +// 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) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 64 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +``` Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` Define these arrays listing all the LEDs in your `.c`: - 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}, - .... - } +```C +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}, + .... +} +``` Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). From this point forward the configuration is the same for all the drivers. - const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - /* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, - {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, - .... - } +```C +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, + {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, + .... +} +``` The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: - x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION - y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION +```C +x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION +y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION +``` Where all variables are decimels/floats. @@ -113,48 +129,50 @@ Where all variables are decimels/floats. All RGB keycodes are currently shared with the RGBLIGHT system: - * `RGB_TOG` - toggle - * `RGB_MOD` - cycle through modes - * `RGB_HUI` - increase hue - * `RGB_HUD` - decrease hue - * `RGB_SAI` - increase saturation - * `RGB_SAD` - decrease saturation - * `RGB_VAI` - increase value - * `RGB_VAD` - decrease value - * `RGB_SPI` - increase speed effect (no EEPROM support) - * `RGB_SPD` - decrease speed effect (no EEPROM support) - - - * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system +* `RGB_TOG` - toggle +* `RGB_MOD` - cycle through modes +* `RGB_HUI` - increase hue +* `RGB_HUD` - decrease hue +* `RGB_SAI` - increase saturation +* `RGB_SAD` - decrease saturation +* `RGB_VAI` - increase value +* `RGB_VAD` - decrease value +* `RGB_SPI` - increase speed effect (no EEPROM support) +* `RGB_SPD` - decrease speed effect (no EEPROM support) +* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system ## RGB Matrix Effects -These are the effects that are currently available: - - enum rgb_matrix_effects { - RGB_MATRIX_SOLID_COLOR = 1, - RGB_MATRIX_ALPHAS_MODS, - RGB_MATRIX_DUAL_BEACON, - RGB_MATRIX_GRADIENT_UP_DOWN, - RGB_MATRIX_RAINDROPS, - RGB_MATRIX_CYCLE_ALL, - RGB_MATRIX_CYCLE_LEFT_RIGHT, - RGB_MATRIX_CYCLE_UP_DOWN, - RGB_MATRIX_RAINBOW_BEACON, - RGB_MATRIX_RAINBOW_PINWHEELS, - RGB_MATRIX_RAINBOW_MOVING_CHEVRON, - RGB_MATRIX_JELLYBEAN_RAINDROPS, - RGB_MATRIX_DIGITAL_RAIN, - #ifdef RGB_MATRIX_KEYPRESSES - RGB_MATRIX_SOLID_REACTIVE, - RGB_MATRIX_REACTIVE_SIMPLE, - RGB_MATRIX_SPLASH, - RGB_MATRIX_MULTISPLASH, - RGB_MATRIX_SOLID_SPLASH, - RGB_MATRIX_SOLID_MULTISPLASH, - #endif - RGB_MATRIX_EFFECT_MAX - }; +All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available: + +```C +enum rgb_matrix_effects { + RGB_MATRIX_NONE = 0, + RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support + RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue + RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes + RGB_MATRIX_BREATHING, // Single hue brightness cycling animation + RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient + RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right + RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right + RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard + RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard + RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard + RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue + RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation + RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation +#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) + RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out + RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue + RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out + RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out + RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out + RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out +#endif + RGB_MATRIX_EFFECT_MAX +}; +``` You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: @@ -162,19 +180,20 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |Define |Description | |---------------------------------------------------|--------------------------------------------| |`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | |`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | +|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| +|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| +|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | |`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | |`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | -|`#define DISABLE_RGB_MATRIX_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_REACTIVE_SIMPLE` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLEE`| |`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | |`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | |`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | @@ -185,26 +204,33 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con Custom layer effects can be done by defining this in your `.c`: - void rgb_matrix_indicators_kb(void) { - rgb_matrix_set_color(index, red, green, blue); - } +```C +void rgb_matrix_indicators_kb(void) { + rgb_matrix_set_color(index, red, green, blue); +} +``` A similar function works in the keymap as `rgb_matrix_indicators_user`. ## Additional `config.h` Options - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) - #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) - #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 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +```C +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#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_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +``` ## EEPROM storage The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: - #define EECONFIG_RGB_MATRIX (uint32_t *)16 +```C +#define EECONFIG_RGB_MATRIX (uint32_t *)16 +``` Where `16` is an unused index from `eeconfig.h`. @@ -212,12 +238,14 @@ Where `16` is an unused index from `eeconfig.h`. To use the suspend feature, add this to your `.c`: - void suspend_power_down_kb(void) - { - rgb_matrix_set_suspend_state(true); - } - - void suspend_wakeup_init_kb(void) - { - rgb_matrix_set_suspend_state(false); - } +```C +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} +``` diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h index 5b9f6dc08992..0d6c4ae39a74 100644 --- a/keyboards/dztech/dz40rgb/config.h +++ b/keyboards/dztech/dz40rgb/config.h @@ -22,7 +22,6 @@ #define DEBOUNCE 3 #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 10 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index 19f32440eaac..3a6f4bcc07ee 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -23,7 +23,6 @@ #define DEBOUNCE 3 #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 10 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index 096368f7abce..a75edd415440 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -109,7 +109,6 @@ along with this program. If not, see . #define DRIVER_1_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL -#define RGB_MATRIX_SKIP_FRAMES 10 // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 7581e54b6195..528f08bb9948 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -120,7 +120,6 @@ along with this program. If not, see . #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 0 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215 #define DRIVER_ADDR_1 0b1110100 diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h index cdca5ba4b528..a10c4bb297c7 100644 --- a/layouts/community/ergodox/drashna_glow/config.h +++ b/layouts/community/ergodox/drashna_glow/config.h @@ -13,7 +13,6 @@ // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended -// #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 // #define EECONFIG_RGB_MATRIX (uint32_t *)16 #endif diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index f648d1127906..1858ee3a4f5d 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -18,7 +18,6 @@ // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended -// #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define EECONFIG_RGB_MATRIX (uint32_t *)15 #endif diff --git a/lib/lib8tion/LICENSE b/lib/lib8tion/LICENSE new file mode 100644 index 000000000000..ebe476330b11 --- /dev/null +++ b/lib/lib8tion/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 FastLED + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/lib8tion/lib8tion.c b/lib/lib8tion/lib8tion.c new file mode 100644 index 000000000000..84b3e9c61c98 --- /dev/null +++ b/lib/lib8tion/lib8tion.c @@ -0,0 +1,242 @@ +#define FASTLED_INTERNAL +#include + +#define RAND16_SEED 1337 +uint16_t rand16seed = RAND16_SEED; + + +// memset8, memcpy8, memmove8: +// optimized avr replacements for the standard "C" library +// routines memset, memcpy, and memmove. +// +// There are two techniques that make these routines +// faster than the standard avr-libc routines. +// First, the loops are unrolled 2X, meaning that +// the average loop overhead is cut in half. +// And second, the compare-and-branch at the bottom +// of each loop decrements the low byte of the +// counter, and if the carry is clear, it branches +// back up immediately. Only if the low byte math +// causes carry do we bother to decrement the high +// byte and check that result for carry as well. +// Results for a 100-byte buffer are 20-40% faster +// than standard avr-libc, at a cost of a few extra +// bytes of code. + +#if defined(__AVR__) +//__attribute__ ((noinline)) +void * memset8 ( void * ptr, uint8_t val, uint16_t num ) +{ + asm volatile( + " movw r26, %[ptr] \n\t" + " sbrs %A[num], 0 \n\t" + " rjmp Lseteven_%= \n\t" + " rjmp Lsetodd_%= \n\t" + "Lsetloop_%=: \n\t" + " st X+, %[val] \n\t" + "Lsetodd_%=: \n\t" + " st X+, %[val] \n\t" + "Lseteven_%=: \n\t" + " subi %A[num], 2 \n\t" + " brcc Lsetloop_%= \n\t" + " sbci %B[num], 0 \n\t" + " brcc Lsetloop_%= \n\t" + : [num] "+r" (num) + : [ptr] "r" (ptr), + [val] "r" (val) + : "memory" + ); + return ptr; +} + + + +//__attribute__ ((noinline)) +void * memcpy8 ( void * dst, const void* src, uint16_t num ) +{ + asm volatile( + " movw r30, %[src] \n\t" + " movw r26, %[dst] \n\t" + " sbrs %A[num], 0 \n\t" + " rjmp Lcpyeven_%= \n\t" + " rjmp Lcpyodd_%= \n\t" + "Lcpyloop_%=: \n\t" + " ld __tmp_reg__, Z+ \n\t" + " st X+, __tmp_reg__ \n\t" + "Lcpyodd_%=: \n\t" + " ld __tmp_reg__, Z+ \n\t" + " st X+, __tmp_reg__ \n\t" + "Lcpyeven_%=: \n\t" + " subi %A[num], 2 \n\t" + " brcc Lcpyloop_%= \n\t" + " sbci %B[num], 0 \n\t" + " brcc Lcpyloop_%= \n\t" + : [num] "+r" (num) + : [src] "r" (src), + [dst] "r" (dst) + : "memory" + ); + return dst; +} + +//__attribute__ ((noinline)) +void * memmove8 ( void * dst, const void* src, uint16_t num ) +{ + if( src > dst) { + // if src > dst then we can use the forward-stepping memcpy8 + return memcpy8( dst, src, num); + } else { + // if src < dst then we have to step backward: + dst = (char*)dst + num; + src = (char*)src + num; + asm volatile( + " movw r30, %[src] \n\t" + " movw r26, %[dst] \n\t" + " sbrs %A[num], 0 \n\t" + " rjmp Lmoveven_%= \n\t" + " rjmp Lmovodd_%= \n\t" + "Lmovloop_%=: \n\t" + " ld __tmp_reg__, -Z \n\t" + " st -X, __tmp_reg__ \n\t" + "Lmovodd_%=: \n\t" + " ld __tmp_reg__, -Z \n\t" + " st -X, __tmp_reg__ \n\t" + "Lmoveven_%=: \n\t" + " subi %A[num], 2 \n\t" + " brcc Lmovloop_%= \n\t" + " sbci %B[num], 0 \n\t" + " brcc Lmovloop_%= \n\t" + : [num] "+r" (num) + : [src] "r" (src), + [dst] "r" (dst) + : "memory" + ); + return dst; + } +} + +#endif /* AVR */ + + + + +#if 0 +// TEST / VERIFICATION CODE ONLY BELOW THIS POINT +#include +#include "lib8tion.h" + +void test1abs( int8_t i) +{ + Serial.print("abs("); Serial.print(i); Serial.print(") = "); + int8_t j = abs8(i); + Serial.print(j); Serial.println(" "); +} + +void testabs() +{ + delay(5000); + for( int8_t q = -128; q != 127; q++) { + test1abs(q); + } + for(;;){}; +} + + +void testmul8() +{ + delay(5000); + byte r, c; + + Serial.println("mul8:"); + for( r = 0; r <= 20; r += 1) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 20; c += 1) { + byte t; + t = mul8( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + Serial.println("done."); + for(;;){}; +} + + +void testscale8() +{ + delay(5000); + byte r, c; + + Serial.println("scale8:"); + for( r = 0; r <= 240; r += 10) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 240; c += 10) { + byte t; + t = scale8( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + + Serial.println(' '); + Serial.println("scale8_video:"); + + for( r = 0; r <= 100; r += 4) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 100; c += 4) { + byte t; + t = scale8_video( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + + Serial.println("done."); + for(;;){}; +} + + + +void testqadd8() +{ + delay(5000); + byte r, c; + for( r = 0; r <= 240; r += 10) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 240; c += 10) { + byte t; + t = qadd8( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + Serial.println("done."); + for(;;){}; +} + +void testnscale8x3() +{ + delay(5000); + byte r, g, b, sc; + for( byte z = 0; z < 10; z++) { + r = random8(); g = random8(); b = random8(); sc = random8(); + + Serial.print("nscale8x3_video( "); + Serial.print(r); Serial.print(", "); + Serial.print(g); Serial.print(", "); + Serial.print(b); Serial.print(", "); + Serial.print(sc); Serial.print(") = [ "); + + nscale8x3_video( r, g, b, sc); + + Serial.print(r); Serial.print(", "); + Serial.print(g); Serial.print(", "); + Serial.print(b); Serial.print("]"); + + Serial.println(' '); + } + Serial.println("done."); + for(;;){}; +} + +#endif diff --git a/lib/lib8tion/lib8tion.h b/lib/lib8tion/lib8tion.h new file mode 100644 index 000000000000..d93c748e6a4b --- /dev/null +++ b/lib/lib8tion/lib8tion.h @@ -0,0 +1,934 @@ +#ifndef __INC_LIB8TION_H +#define __INC_LIB8TION_H + +/* + + Fast, efficient 8-bit math functions specifically + designed for high-performance LED programming. + + Because of the AVR(Arduino) and ARM assembly language + implementations provided, using these functions often + results in smaller and faster code than the equivalent + program using plain "C" arithmetic and logic. + + + Included are: + + + - Saturating unsigned 8-bit add and subtract. + Instead of wrapping around if an overflow occurs, + these routines just 'clamp' the output at a maxumum + of 255, or a minimum of 0. Useful for adding pixel + values. E.g., qadd8( 200, 100) = 255. + + qadd8( i, j) == MIN( (i + j), 0xFF ) + qsub8( i, j) == MAX( (i - j), 0 ) + + - Saturating signed 8-bit ("7-bit") add. + qadd7( i, j) == MIN( (i + j), 0x7F) + + + - Scaling (down) of unsigned 8- and 16- bit values. + Scaledown value is specified in 1/256ths. + scale8( i, sc) == (i * sc) / 256 + scale16by8( i, sc) == (i * sc) / 256 + + Example: scaling a 0-255 value down into a + range from 0-99: + downscaled = scale8( originalnumber, 100); + + A special version of scale8 is provided for scaling + LED brightness values, to make sure that they don't + accidentally scale down to total black at low + dimming levels, since that would look wrong: + scale8_video( i, sc) = ((i * sc) / 256) +? 1 + + Example: reducing an LED brightness by a + dimming factor: + new_bright = scale8_video( orig_bright, dimming); + + + - Fast 8- and 16- bit unsigned random numbers. + Significantly faster than Arduino random(), but + also somewhat less random. You can add entropy. + random8() == random from 0..255 + random8( n) == random from 0..(N-1) + random8( n, m) == random from N..(M-1) + + random16() == random from 0..65535 + random16( n) == random from 0..(N-1) + random16( n, m) == random from N..(M-1) + + random16_set_seed( k) == seed = k + random16_add_entropy( k) == seed += k + + + - Absolute value of a signed 8-bit value. + abs8( i) == abs( i) + + + - 8-bit math operations which return 8-bit values. + These are provided mostly for completeness, + not particularly for performance. + mul8( i, j) == (i * j) & 0xFF + add8( i, j) == (i + j) & 0xFF + sub8( i, j) == (i - j) & 0xFF + + + - Fast 16-bit approximations of sin and cos. + Input angle is a uint16_t from 0-65535. + Output is a signed int16_t from -32767 to 32767. + sin16( x) == sin( (x/32768.0) * pi) * 32767 + cos16( x) == cos( (x/32768.0) * pi) * 32767 + Accurate to more than 99% in all cases. + + - Fast 8-bit approximations of sin and cos. + Input angle is a uint8_t from 0-255. + Output is an UNsigned uint8_t from 0 to 255. + sin8( x) == (sin( (x/128.0) * pi) * 128) + 128 + cos8( x) == (cos( (x/128.0) * pi) * 128) + 128 + Accurate to within about 2%. + + + - Fast 8-bit "easing in/out" function. + ease8InOutCubic(x) == 3(x^i) - 2(x^3) + ease8InOutApprox(x) == + faster, rougher, approximation of cubic easing + ease8InOutQuad(x) == quadratic (vs cubic) easing + + - Cubic, Quadratic, and Triangle wave functions. + Input is a uint8_t representing phase withing the wave, + similar to how sin8 takes an angle 'theta'. + Output is a uint8_t representing the amplitude of + the wave at that point. + cubicwave8( x) + quadwave8( x) + triwave8( x) + + - Square root for 16-bit integers. About three times + faster and five times smaller than Arduino's built-in + generic 32-bit sqrt routine. + sqrt16( uint16_t x ) == sqrt( x) + + - Dimming and brightening functions for 8-bit + light values. + dim8_video( x) == scale8_video( x, x) + dim8_raw( x) == scale8( x, x) + dim8_lin( x) == (x<128) ? ((x+1)/2) : scale8(x,x) + brighten8_video( x) == 255 - dim8_video( 255 - x) + brighten8_raw( x) == 255 - dim8_raw( 255 - x) + brighten8_lin( x) == 255 - dim8_lin( 255 - x) + The dimming functions in particular are suitable + for making LED light output appear more 'linear'. + + + - Linear interpolation between two values, with the + fraction between them expressed as an 8- or 16-bit + fixed point fraction (fract8 or fract16). + lerp8by8( fromU8, toU8, fract8 ) + lerp16by8( fromU16, toU16, fract8 ) + lerp15by8( fromS16, toS16, fract8 ) + == from + (( to - from ) * fract8) / 256) + lerp16by16( fromU16, toU16, fract16 ) + == from + (( to - from ) * fract16) / 65536) + map8( in, rangeStart, rangeEnd) + == map( in, 0, 255, rangeStart, rangeEnd); + + - Optimized memmove, memcpy, and memset, that are + faster than standard avr-libc 1.8. + memmove8( dest, src, bytecount) + memcpy8( dest, src, bytecount) + memset8( buf, value, bytecount) + + - Beat generators which return sine or sawtooth + waves in a specified number of Beats Per Minute. + Sine wave beat generators can specify a low and + high range for the output. Sawtooth wave beat + generators always range 0-255 or 0-65535. + beatsin8( BPM, low8, high8) + = (sine(beatphase) * (high8-low8)) + low8 + beatsin16( BPM, low16, high16) + = (sine(beatphase) * (high16-low16)) + low16 + beatsin88( BPM88, low16, high16) + = (sine(beatphase) * (high16-low16)) + low16 + beat8( BPM) = 8-bit repeating sawtooth wave + beat16( BPM) = 16-bit repeating sawtooth wave + beat88( BPM88) = 16-bit repeating sawtooth wave + BPM is beats per minute in either simple form + e.g. 120, or Q8.8 fixed-point form. + BPM88 is beats per minute in ONLY Q8.8 fixed-point + form. + +Lib8tion is pronounced like 'libation': lie-BAY-shun + +*/ + + + +#include + +#define LIB8STATIC __attribute__ ((unused)) static inline +#define LIB8STATIC_ALWAYS_INLINE __attribute__ ((always_inline)) static inline + +#if !defined(__AVR__) +#include +// for memmove, memcpy, and memset if not defined here +#endif + +#if defined(__arm__) + +#if defined(FASTLED_TEENSY3) +// Can use Cortex M4 DSP instructions +#define QADD8_C 0 +#define QADD7_C 0 +#define QADD8_ARM_DSP_ASM 1 +#define QADD7_ARM_DSP_ASM 1 +#else +// Generic ARM +#define QADD8_C 1 +#define QADD7_C 1 +#endif + +#define QSUB8_C 1 +#define SCALE8_C 1 +#define SCALE16BY8_C 1 +#define SCALE16_C 1 +#define ABS8_C 1 +#define MUL8_C 1 +#define QMUL8_C 1 +#define ADD8_C 1 +#define SUB8_C 1 +#define EASE8_C 1 +#define AVG8_C 1 +#define AVG7_C 1 +#define AVG16_C 1 +#define AVG15_C 1 +#define BLEND8_C 1 + + +#elif defined(__AVR__) + +// AVR ATmega and friends Arduino + +#define QADD8_C 0 +#define QADD7_C 0 +#define QSUB8_C 0 +#define ABS8_C 0 +#define ADD8_C 0 +#define SUB8_C 0 +#define AVG8_C 0 +#define AVG7_C 0 +#define AVG16_C 0 +#define AVG15_C 0 + +#define QADD8_AVRASM 1 +#define QADD7_AVRASM 1 +#define QSUB8_AVRASM 1 +#define ABS8_AVRASM 1 +#define ADD8_AVRASM 1 +#define SUB8_AVRASM 1 +#define AVG8_AVRASM 1 +#define AVG7_AVRASM 1 +#define AVG16_AVRASM 1 +#define AVG15_AVRASM 1 + +// Note: these require hardware MUL instruction +// -- sorry, ATtiny! +#if !defined(LIB8_ATTINY) +#define SCALE8_C 0 +#define SCALE16BY8_C 0 +#define SCALE16_C 0 +#define MUL8_C 0 +#define QMUL8_C 0 +#define EASE8_C 0 +#define BLEND8_C 0 +#define SCALE8_AVRASM 1 +#define SCALE16BY8_AVRASM 1 +#define SCALE16_AVRASM 1 +#define MUL8_AVRASM 1 +#define QMUL8_AVRASM 1 +#define EASE8_AVRASM 1 +#define CLEANUP_R1_AVRASM 1 +#define BLEND8_AVRASM 1 +#else +// On ATtiny, we just use C implementations +#define SCALE8_C 1 +#define SCALE16BY8_C 1 +#define SCALE16_C 1 +#define MUL8_C 1 +#define QMUL8_C 1 +#define EASE8_C 1 +#define BLEND8_C 1 +#define SCALE8_AVRASM 0 +#define SCALE16BY8_AVRASM 0 +#define SCALE16_AVRASM 0 +#define MUL8_AVRASM 0 +#define QMUL8_AVRASM 0 +#define EASE8_AVRASM 0 +#define BLEND8_AVRASM 0 +#endif + +#else + +// unspecified architecture, so +// no ASM, everything in C +#define QADD8_C 1 +#define QADD7_C 1 +#define QSUB8_C 1 +#define SCALE8_C 1 +#define SCALE16BY8_C 1 +#define SCALE16_C 1 +#define ABS8_C 1 +#define MUL8_C 1 +#define QMUL8_C 1 +#define ADD8_C 1 +#define SUB8_C 1 +#define EASE8_C 1 +#define AVG8_C 1 +#define AVG7_C 1 +#define AVG16_C 1 +#define AVG15_C 1 +#define BLEND8_C 1 + +#endif + +///@defgroup lib8tion Fast math functions +///A variety of functions for working with numbers. +///@{ + + +/////////////////////////////////////////////////////////////////////// +// +// typdefs for fixed-point fractional types. +// +// sfract7 should be interpreted as signed 128ths. +// fract8 should be interpreted as unsigned 256ths. +// sfract15 should be interpreted as signed 32768ths. +// fract16 should be interpreted as unsigned 65536ths. +// +// Example: if a fract8 has the value "64", that should be interpreted +// as 64/256ths, or one-quarter. +// +// +// fract8 range is 0 to 0.99609375 +// in steps of 0.00390625 +// +// sfract7 range is -0.9921875 to 0.9921875 +// in steps of 0.0078125 +// +// fract16 range is 0 to 0.99998474121 +// in steps of 0.00001525878 +// +// sfract15 range is -0.99996948242 to 0.99996948242 +// in steps of 0.00003051757 +// + +/// ANSI unsigned short _Fract. range is 0 to 0.99609375 +/// in steps of 0.00390625 +typedef uint8_t fract8; ///< ANSI: unsigned short _Fract + +/// ANSI: signed short _Fract. range is -0.9921875 to 0.9921875 +/// in steps of 0.0078125 +typedef int8_t sfract7; ///< ANSI: signed short _Fract + +/// ANSI: unsigned _Fract. range is 0 to 0.99998474121 +/// in steps of 0.00001525878 +typedef uint16_t fract16; ///< ANSI: unsigned _Fract + +/// ANSI: signed _Fract. range is -0.99996948242 to 0.99996948242 +/// in steps of 0.00003051757 +typedef int16_t sfract15; ///< ANSI: signed _Fract + + +// accumXY types should be interpreted as X bits of integer, +// and Y bits of fraction. +// E.g., accum88 has 8 bits of int, 8 bits of fraction + +typedef uint16_t accum88; ///< ANSI: unsigned short _Accum. 8 bits int, 8 bits fraction +typedef int16_t saccum78; ///< ANSI: signed short _Accum. 7 bits int, 8 bits fraction +typedef uint32_t accum1616;///< ANSI: signed _Accum. 16 bits int, 16 bits fraction +typedef int32_t saccum1516;///< ANSI: signed _Accum. 15 bits int, 16 bits fraction +typedef uint16_t accum124; ///< no direct ANSI counterpart. 12 bits int, 4 bits fraction +typedef int32_t saccum114;///< no direct ANSI counterpart. 1 bit int, 14 bits fraction + + + +#include "math8.h" +#include "scale8.h" +#include "random8.h" +#include "trig8.h" + +/////////////////////////////////////////////////////////////////////// + + + + + + + +/////////////////////////////////////////////////////////////////////// +// +// float-to-fixed and fixed-to-float conversions +// +// Note that anything involving a 'float' on AVR will be slower. + +/// sfract15ToFloat: conversion from sfract15 fixed point to +/// IEEE754 32-bit float. +LIB8STATIC float sfract15ToFloat( sfract15 y) +{ + return y / 32768.0; +} + +/// conversion from IEEE754 float in the range (-1,1) +/// to 16-bit fixed point. Note that the extremes of +/// one and negative one are NOT representable. The +/// representable range is basically +LIB8STATIC sfract15 floatToSfract15( float f) +{ + return f * 32768.0; +} + + + +/////////////////////////////////////////////////////////////////////// +// +// memmove8, memcpy8, and memset8: +// alternatives to memmove, memcpy, and memset that are +// faster on AVR than standard avr-libc 1.8 + +#if defined(__AVR__) +void * memmove8( void * dst, const void * src, uint16_t num ); +void * memcpy8 ( void * dst, const void * src, uint16_t num ) __attribute__ ((noinline)); +void * memset8 ( void * ptr, uint8_t value, uint16_t num ) __attribute__ ((noinline)) ; +#else +// on non-AVR platforms, these names just call standard libc. +#define memmove8 memmove +#define memcpy8 memcpy +#define memset8 memset +#endif + + +/////////////////////////////////////////////////////////////////////// +// +// linear interpolation, such as could be used for Perlin noise, etc. +// + +// A note on the structure of the lerp functions: +// The cases for b>a and b<=a are handled separately for +// speed: without knowing the relative order of a and b, +// the value (a-b) might be overflow the width of a or b, +// and have to be promoted to a wider, slower type. +// To avoid that, we separate the two cases, and are able +// to do all the math in the same width as the arguments, +// which is much faster and smaller on AVR. + +/// linear interpolation between two unsigned 8-bit values, +/// with 8-bit fraction +LIB8STATIC uint8_t lerp8by8( uint8_t a, uint8_t b, fract8 frac) +{ + uint8_t result; + if( b > a) { + uint8_t delta = b - a; + uint8_t scaled = scale8( delta, frac); + result = a + scaled; + } else { + uint8_t delta = a - b; + uint8_t scaled = scale8( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two unsigned 16-bit values, +/// with 16-bit fraction +LIB8STATIC uint16_t lerp16by16( uint16_t a, uint16_t b, fract16 frac) +{ + uint16_t result; + if( b > a ) { + uint16_t delta = b - a; + uint16_t scaled = scale16(delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two unsigned 16-bit values, +/// with 8-bit fraction +LIB8STATIC uint16_t lerp16by8( uint16_t a, uint16_t b, fract8 frac) +{ + uint16_t result; + if( b > a) { + uint16_t delta = b - a; + uint16_t scaled = scale16by8( delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16by8( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two signed 15-bit values, +/// with 8-bit fraction +LIB8STATIC int16_t lerp15by8( int16_t a, int16_t b, fract8 frac) +{ + int16_t result; + if( b > a) { + uint16_t delta = b - a; + uint16_t scaled = scale16by8( delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16by8( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two signed 15-bit values, +/// with 8-bit fraction +LIB8STATIC int16_t lerp15by16( int16_t a, int16_t b, fract16 frac) +{ + int16_t result; + if( b > a) { + uint16_t delta = b - a; + uint16_t scaled = scale16( delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16( delta, frac); + result = a - scaled; + } + return result; +} + +/// map8: map from one full-range 8-bit value into a narrower +/// range of 8-bit values, possibly a range of hues. +/// +/// E.g. map myValue into a hue in the range blue..purple..pink..red +/// hue = map8( myValue, HUE_BLUE, HUE_RED); +/// +/// Combines nicely with the waveform functions (like sin8, etc) +/// to produce continuous hue gradients back and forth: +/// +/// hue = map8( sin8( myValue), HUE_BLUE, HUE_RED); +/// +/// Mathematically simiar to lerp8by8, but arguments are more +/// like Arduino's "map"; this function is similar to +/// +/// map( in, 0, 255, rangeStart, rangeEnd) +/// +/// but faster and specifically designed for 8-bit values. +LIB8STATIC uint8_t map8( uint8_t in, uint8_t rangeStart, uint8_t rangeEnd) +{ + uint8_t rangeWidth = rangeEnd - rangeStart; + uint8_t out = scale8( in, rangeWidth); + out += rangeStart; + return out; +} + + +/////////////////////////////////////////////////////////////////////// +// +// easing functions; see http://easings.net +// + +/// ease8InOutQuad: 8-bit quadratic ease-in / ease-out function +/// Takes around 13 cycles on AVR +#if EASE8_C == 1 +LIB8STATIC uint8_t ease8InOutQuad( uint8_t i) +{ + uint8_t j = i; + if( j & 0x80 ) { + j = 255 - j; + } + uint8_t jj = scale8( j, j); + uint8_t jj2 = jj << 1; + if( i & 0x80 ) { + jj2 = 255 - jj2; + } + return jj2; +} + +#elif EASE8_AVRASM == 1 +// This AVR asm version of ease8InOutQuad preserves one more +// low-bit of precision than the C version, and is also slightly +// smaller and faster. +LIB8STATIC uint8_t ease8InOutQuad(uint8_t val) { + uint8_t j=val; + asm volatile ( + "sbrc %[val], 7 \n" + "com %[j] \n" + "mul %[j], %[j] \n" + "add r0, %[j] \n" + "ldi %[j], 0 \n" + "adc %[j], r1 \n" + "lsl r0 \n" // carry = high bit of low byte of mul product + "rol %[j] \n" // j = (j * 2) + carry // preserve add'l bit of precision + "sbrc %[val], 7 \n" + "com %[j] \n" + "clr __zero_reg__ \n" + : [j] "+&a" (j) + : [val] "a" (val) + : "r0", "r1" + ); + return j; +} + +#else +#error "No implementation for ease8InOutQuad available." +#endif + +/// ease16InOutQuad: 16-bit quadratic ease-in / ease-out function +// C implementation at this point +LIB8STATIC uint16_t ease16InOutQuad( uint16_t i) +{ + uint16_t j = i; + if( j & 0x8000 ) { + j = 65535 - j; + } + uint16_t jj = scale16( j, j); + uint16_t jj2 = jj << 1; + if( i & 0x8000 ) { + jj2 = 65535 - jj2; + } + return jj2; +} + + +/// ease8InOutCubic: 8-bit cubic ease-in / ease-out function +/// Takes around 18 cycles on AVR +LIB8STATIC fract8 ease8InOutCubic( fract8 i) +{ + uint8_t ii = scale8_LEAVING_R1_DIRTY( i, i); + uint8_t iii = scale8_LEAVING_R1_DIRTY( ii, i); + + uint16_t r1 = (3 * (uint16_t)(ii)) - ( 2 * (uint16_t)(iii)); + + /* the code generated for the above *'s automatically + cleans up R1, so there's no need to explicitily call + cleanup_R1(); */ + + uint8_t result = r1; + + // if we got "256", return 255: + if( r1 & 0x100 ) { + result = 255; + } + return result; +} + +/// ease8InOutApprox: fast, rough 8-bit ease-in/ease-out function +/// shaped approximately like 'ease8InOutCubic', +/// it's never off by more than a couple of percent +/// from the actual cubic S-curve, and it executes +/// more than twice as fast. Use when the cycles +/// are more important than visual smoothness. +/// Asm version takes around 7 cycles on AVR. + +#if EASE8_C == 1 +LIB8STATIC fract8 ease8InOutApprox( fract8 i) +{ + if( i < 64) { + // start with slope 0.5 + i /= 2; + } else if( i > (255 - 64)) { + // end with slope 0.5 + i = 255 - i; + i /= 2; + i = 255 - i; + } else { + // in the middle, use slope 192/128 = 1.5 + i -= 64; + i += (i / 2); + i += 32; + } + + return i; +} + +#elif EASE8_AVRASM == 1 +LIB8STATIC uint8_t ease8InOutApprox( fract8 i) +{ + // takes around 7 cycles on AVR + asm volatile ( + " subi %[i], 64 \n\t" + " cpi %[i], 128 \n\t" + " brcc Lshift_%= \n\t" + + // middle case + " mov __tmp_reg__, %[i] \n\t" + " lsr __tmp_reg__ \n\t" + " add %[i], __tmp_reg__ \n\t" + " subi %[i], 224 \n\t" + " rjmp Ldone_%= \n\t" + + // start or end case + "Lshift_%=: \n\t" + " lsr %[i] \n\t" + " subi %[i], 96 \n\t" + + "Ldone_%=: \n\t" + + : [i] "+&a" (i) + : + : "r0", "r1" + ); + return i; +} +#else +#error "No implementation for ease8 available." +#endif + + + +/// triwave8: triangle (sawtooth) wave generator. Useful for +/// turning a one-byte ever-increasing value into a +/// one-byte value that oscillates up and down. +/// +/// input output +/// 0..127 0..254 (positive slope) +/// 128..255 254..0 (negative slope) +/// +/// On AVR this function takes just three cycles. +/// +LIB8STATIC uint8_t triwave8(uint8_t in) +{ + if( in & 0x80) { + in = 255 - in; + } + uint8_t out = in << 1; + return out; +} + + +// quadwave8 and cubicwave8: S-shaped wave generators (like 'sine'). +// Useful for turning a one-byte 'counter' value into a +// one-byte oscillating value that moves smoothly up and down, +// with an 'acceleration' and 'deceleration' curve. +// +// These are even faster than 'sin8', and have +// slightly different curve shapes. +// + +/// quadwave8: quadratic waveform generator. Spends just a little more +/// time at the limits than 'sine' does. +LIB8STATIC uint8_t quadwave8(uint8_t in) +{ + return ease8InOutQuad( triwave8( in)); +} + +/// cubicwave8: cubic waveform generator. Spends visibly more time +/// at the limits than 'sine' does. +LIB8STATIC uint8_t cubicwave8(uint8_t in) +{ + return ease8InOutCubic( triwave8( in)); +} + +/// squarewave8: square wave generator. Useful for +/// turning a one-byte ever-increasing value +/// into a one-byte value that is either 0 or 255. +/// The width of the output 'pulse' is +/// determined by the pulsewidth argument: +/// +///~~~ +/// If pulsewidth is 255, output is always 255. +/// If pulsewidth < 255, then +/// if input < pulsewidth then output is 255 +/// if input >= pulsewidth then output is 0 +///~~~ +/// +/// the output looking like: +/// +///~~~ +/// 255 +--pulsewidth--+ +/// . | | +/// 0 0 +--------(256-pulsewidth)-------- +///~~~ +/// +/// @param in +/// @param pulsewidth +/// @returns square wave output +LIB8STATIC uint8_t squarewave8( uint8_t in, uint8_t pulsewidth) +{ + if( in < pulsewidth || (pulsewidth == 255)) { + return 255; + } else { + return 0; + } +} + + +// Beat generators - These functions produce waves at a given +// number of 'beats per minute'. Internally, they use +// the Arduino function 'millis' to track elapsed time. +// Accuracy is a bit better than one part in a thousand. +// +// beat8( BPM ) returns an 8-bit value that cycles 'BPM' times +// per minute, rising from 0 to 255, resetting to zero, +// rising up again, etc.. The output of this function +// is suitable for feeding directly into sin8, and cos8, +// triwave8, quadwave8, and cubicwave8. +// beat16( BPM ) returns a 16-bit value that cycles 'BPM' times +// per minute, rising from 0 to 65535, resetting to zero, +// rising up again, etc. The output of this function is +// suitable for feeding directly into sin16 and cos16. +// beat88( BPM88) is the same as beat16, except that the BPM88 argument +// MUST be in Q8.8 fixed point format, e.g. 120BPM must +// be specified as 120*256 = 30720. +// beatsin8( BPM, uint8_t low, uint8_t high) returns an 8-bit value that +// rises and falls in a sine wave, 'BPM' times per minute, +// between the values of 'low' and 'high'. +// beatsin16( BPM, uint16_t low, uint16_t high) returns a 16-bit value +// that rises and falls in a sine wave, 'BPM' times per +// minute, between the values of 'low' and 'high'. +// beatsin88( BPM88, ...) is the same as beatsin16, except that the +// BPM88 argument MUST be in Q8.8 fixed point format, +// e.g. 120BPM must be specified as 120*256 = 30720. +// +// BPM can be supplied two ways. The simpler way of specifying BPM is as +// a simple 8-bit integer from 1-255, (e.g., "120"). +// The more sophisticated way of specifying BPM allows for fractional +// "Q8.8" fixed point number (an 'accum88') with an 8-bit integer part and +// an 8-bit fractional part. The easiest way to construct this is to multiply +// a floating point BPM value (e.g. 120.3) by 256, (e.g. resulting in 30796 +// in this case), and pass that as the 16-bit BPM argument. +// "BPM88" MUST always be specified in Q8.8 format. +// +// Originally designed to make an entire animation project pulse with brightness. +// For that effect, add this line just above your existing call to "FastLED.show()": +// +// uint8_t bright = beatsin8( 60 /*BPM*/, 192 /*dimmest*/, 255 /*brightest*/ )); +// FastLED.setBrightness( bright ); +// FastLED.show(); +// +// The entire animation will now pulse between brightness 192 and 255 once per second. + + +// The beat generators need access to a millisecond counter. +// On Arduino, this is "millis()". On other platforms, you'll +// need to provide a function with this signature: +// uint32_t get_millisecond_timer(); +// that provides similar functionality. +// You can also force use of the get_millisecond_timer function +// by #defining USE_GET_MILLISECOND_TIMER. +#if (defined(ARDUINO) || defined(SPARK) || defined(FASTLED_HAS_MILLIS)) && !defined(USE_GET_MILLISECOND_TIMER) +// Forward declaration of Arduino function 'millis'. +//uint32_t millis(); +#define GET_MILLIS millis +#else +uint32_t get_millisecond_timer(void); +#define GET_MILLIS get_millisecond_timer +#endif + +// beat16 generates a 16-bit 'sawtooth' wave at a given BPM, +/// with BPM specified in Q8.8 fixed-point format; e.g. +/// for this function, 120 BPM MUST BE specified as +/// 120*256 = 30720. +/// If you just want to specify "120", use beat16 or beat8. +LIB8STATIC uint16_t beat88( accum88 beats_per_minute_88, uint32_t timebase) +{ + // BPM is 'beats per minute', or 'beats per 60000ms'. + // To avoid using the (slower) division operator, we + // want to convert 'beats per 60000ms' to 'beats per 65536ms', + // and then use a simple, fast bit-shift to divide by 65536. + // + // The ratio 65536:60000 is 279.620266667:256; we'll call it 280:256. + // The conversion is accurate to about 0.05%, more or less, + // e.g. if you ask for "120 BPM", you'll get about "119.93". + return (((GET_MILLIS()) - timebase) * beats_per_minute_88 * 280) >> 16; +} + +/// beat16 generates a 16-bit 'sawtooth' wave at a given BPM +LIB8STATIC uint16_t beat16( accum88 beats_per_minute, uint32_t timebase) +{ + // Convert simple 8-bit BPM's to full Q8.8 accum88's if needed + if( beats_per_minute < 256) beats_per_minute <<= 8; + return beat88(beats_per_minute, timebase); +} + +/// beat8 generates an 8-bit 'sawtooth' wave at a given BPM +LIB8STATIC uint8_t beat8( accum88 beats_per_minute, uint32_t timebase) +{ + return beat16( beats_per_minute, timebase) >> 8; +} + +/// beatsin88 generates a 16-bit sine wave at a given BPM, +/// that oscillates within a given range. +/// For this function, BPM MUST BE SPECIFIED as +/// a Q8.8 fixed-point value; e.g. 120BPM must be +/// specified as 120*256 = 30720. +/// If you just want to specify "120", use beatsin16 or beatsin8. +LIB8STATIC uint16_t beatsin88( accum88 beats_per_minute_88, uint16_t lowest, uint16_t highest, uint32_t timebase, uint16_t phase_offset) +{ + uint16_t beat = beat88( beats_per_minute_88, timebase); + uint16_t beatsin = (sin16( beat + phase_offset) + 32768); + uint16_t rangewidth = highest - lowest; + uint16_t scaledbeat = scale16( beatsin, rangewidth); + uint16_t result = lowest + scaledbeat; + return result; +} + +/// beatsin16 generates a 16-bit sine wave at a given BPM, +/// that oscillates within a given range. +LIB8STATIC uint16_t beatsin16(accum88 beats_per_minute, uint16_t lowest, uint16_t highest, uint32_t timebase, uint16_t phase_offset) +{ + uint16_t beat = beat16( beats_per_minute, timebase); + uint16_t beatsin = (sin16( beat + phase_offset) + 32768); + uint16_t rangewidth = highest - lowest; + uint16_t scaledbeat = scale16( beatsin, rangewidth); + uint16_t result = lowest + scaledbeat; + return result; +} + +/// beatsin8 generates an 8-bit sine wave at a given BPM, +/// that oscillates within a given range. +LIB8STATIC uint8_t beatsin8( accum88 beats_per_minute, uint8_t lowest, uint8_t highest, uint32_t timebase, uint8_t phase_offset) +{ + uint8_t beat = beat8( beats_per_minute, timebase); + uint8_t beatsin = sin8( beat + phase_offset); + uint8_t rangewidth = highest - lowest; + uint8_t scaledbeat = scale8( beatsin, rangewidth); + uint8_t result = lowest + scaledbeat; + return result; +} + + +/// Return the current seconds since boot in a 16-bit value. Used as part of the +/// "every N time-periods" mechanism +LIB8STATIC uint16_t seconds16(void) +{ + uint32_t ms = GET_MILLIS(); + uint16_t s16; + s16 = ms / 1000; + return s16; +} + +/// Return the current minutes since boot in a 16-bit value. Used as part of the +/// "every N time-periods" mechanism +LIB8STATIC uint16_t minutes16(void) +{ + uint32_t ms = GET_MILLIS(); + uint16_t m16; + m16 = (ms / (60000L)) & 0xFFFF; + return m16; +} + +/// Return the current hours since boot in an 8-bit value. Used as part of the +/// "every N time-periods" mechanism +LIB8STATIC uint8_t hours8(void) +{ + uint32_t ms = GET_MILLIS(); + uint8_t h8; + h8 = (ms / (3600000L)) & 0xFF; + return h8; +} + +///@} + +#endif diff --git a/lib/lib8tion/math8.h b/lib/lib8tion/math8.h new file mode 100644 index 000000000000..8c6b6c227e34 --- /dev/null +++ b/lib/lib8tion/math8.h @@ -0,0 +1,552 @@ +#ifndef __INC_LIB8TION_MATH_H +#define __INC_LIB8TION_MATH_H + +#include "scale8.h" + +///@ingroup lib8tion + +///@defgroup Math Basic math operations +/// Fast, efficient 8-bit math functions specifically +/// designed for high-performance LED programming. +/// +/// Because of the AVR(Arduino) and ARM assembly language +/// implementations provided, using these functions often +/// results in smaller and faster code than the equivalent +/// program using plain "C" arithmetic and logic. +///@{ + + +/// add one byte to another, saturating at 0xFF +/// @param i - first byte to add +/// @param j - second byte to add +/// @returns the sum of i & j, capped at 0xFF +LIB8STATIC_ALWAYS_INLINE uint8_t qadd8( uint8_t i, uint8_t j) +{ +#if QADD8_C == 1 + uint16_t t = i + j; + if (t > 255) t = 255; + return t; +#elif QADD8_AVRASM == 1 + asm volatile( + /* First, add j to i, conditioning the C flag */ + "add %0, %1 \n\t" + + /* Now test the C flag. + If C is clear, we branch around a load of 0xFF into i. + If C is set, we go ahead and load 0xFF into i. + */ + "brcc L_%= \n\t" + "ldi %0, 0xFF \n\t" + "L_%=: " + : "+a" (i) + : "a" (j) ); + return i; +#elif QADD8_ARM_DSP_ASM == 1 + asm volatile( "uqadd8 %0, %0, %1" : "+r" (i) : "r" (j)); + return i; +#else +#error "No implementation for qadd8 available." +#endif +} + +/// Add one byte to another, saturating at 0x7F +/// @param i - first byte to add +/// @param j - second byte to add +/// @returns the sum of i & j, capped at 0xFF +LIB8STATIC_ALWAYS_INLINE int8_t qadd7( int8_t i, int8_t j) +{ +#if QADD7_C == 1 + int16_t t = i + j; + if (t > 127) t = 127; + return t; +#elif QADD7_AVRASM == 1 + asm volatile( + /* First, add j to i, conditioning the V flag */ + "add %0, %1 \n\t" + + /* Now test the V flag. + If V is clear, we branch around a load of 0x7F into i. + If V is set, we go ahead and load 0x7F into i. + */ + "brvc L_%= \n\t" + "ldi %0, 0x7F \n\t" + "L_%=: " + : "+a" (i) + : "a" (j) ); + + return i; +#elif QADD7_ARM_DSP_ASM == 1 + asm volatile( "qadd8 %0, %0, %1" : "+r" (i) : "r" (j)); + return i; +#else +#error "No implementation for qadd7 available." +#endif +} + +/// subtract one byte from another, saturating at 0x00 +/// @returns i - j with a floor of 0 +LIB8STATIC_ALWAYS_INLINE uint8_t qsub8( uint8_t i, uint8_t j) +{ +#if QSUB8_C == 1 + int16_t t = i - j; + if (t < 0) t = 0; + return t; +#elif QSUB8_AVRASM == 1 + + asm volatile( + /* First, subtract j from i, conditioning the C flag */ + "sub %0, %1 \n\t" + + /* Now test the C flag. + If C is clear, we branch around a load of 0x00 into i. + If C is set, we go ahead and load 0x00 into i. + */ + "brcc L_%= \n\t" + "ldi %0, 0x00 \n\t" + "L_%=: " + : "+a" (i) + : "a" (j) ); + + return i; +#else +#error "No implementation for qsub8 available." +#endif +} + +/// add one byte to another, with one byte result +LIB8STATIC_ALWAYS_INLINE uint8_t add8( uint8_t i, uint8_t j) +{ +#if ADD8_C == 1 + uint16_t t = i + j; + return t; +#elif ADD8_AVRASM == 1 + // Add j to i, period. + asm volatile( "add %0, %1" : "+a" (i) : "a" (j)); + return i; +#else +#error "No implementation for add8 available." +#endif +} + +/// add one byte to another, with one byte result +LIB8STATIC_ALWAYS_INLINE uint16_t add8to16( uint8_t i, uint16_t j) +{ +#if ADD8_C == 1 + uint16_t t = i + j; + return t; +#elif ADD8_AVRASM == 1 + // Add i(one byte) to j(two bytes) + asm volatile( "add %A[j], %[i] \n\t" + "adc %B[j], __zero_reg__ \n\t" + : [j] "+a" (j) + : [i] "a" (i) + ); + return i; +#else +#error "No implementation for add8to16 available." +#endif +} + + +/// subtract one byte from another, 8-bit result +LIB8STATIC_ALWAYS_INLINE uint8_t sub8( uint8_t i, uint8_t j) +{ +#if SUB8_C == 1 + int16_t t = i - j; + return t; +#elif SUB8_AVRASM == 1 + // Subtract j from i, period. + asm volatile( "sub %0, %1" : "+a" (i) : "a" (j)); + return i; +#else +#error "No implementation for sub8 available." +#endif +} + +/// Calculate an integer average of two unsigned +/// 8-bit integer values (uint8_t). +/// Fractional results are rounded down, e.g. avg8(20,41) = 30 +LIB8STATIC_ALWAYS_INLINE uint8_t avg8( uint8_t i, uint8_t j) +{ +#if AVG8_C == 1 + return (i + j) >> 1; +#elif AVG8_AVRASM == 1 + asm volatile( + /* First, add j to i, 9th bit overflows into C flag */ + "add %0, %1 \n\t" + /* Divide by two, moving C flag into high 8th bit */ + "ror %0 \n\t" + : "+a" (i) + : "a" (j) ); + return i; +#else +#error "No implementation for avg8 available." +#endif +} + +/// Calculate an integer average of two unsigned +/// 16-bit integer values (uint16_t). +/// Fractional results are rounded down, e.g. avg16(20,41) = 30 +LIB8STATIC_ALWAYS_INLINE uint16_t avg16( uint16_t i, uint16_t j) +{ +#if AVG16_C == 1 + return (uint32_t)((uint32_t)(i) + (uint32_t)(j)) >> 1; +#elif AVG16_AVRASM == 1 + asm volatile( + /* First, add jLo (heh) to iLo, 9th bit overflows into C flag */ + "add %A[i], %A[j] \n\t" + /* Now, add C + jHi to iHi, 17th bit overflows into C flag */ + "adc %B[i], %B[j] \n\t" + /* Divide iHi by two, moving C flag into high 16th bit, old 9th bit now in C */ + "ror %B[i] \n\t" + /* Divide iLo by two, moving C flag into high 8th bit */ + "ror %A[i] \n\t" + : [i] "+a" (i) + : [j] "a" (j) ); + return i; +#else +#error "No implementation for avg16 available." +#endif +} + + +/// Calculate an integer average of two signed 7-bit +/// integers (int8_t) +/// If the first argument is even, result is rounded down. +/// If the first argument is odd, result is result up. +LIB8STATIC_ALWAYS_INLINE int8_t avg7( int8_t i, int8_t j) +{ +#if AVG7_C == 1 + return ((i + j) >> 1) + (i & 0x1); +#elif AVG7_AVRASM == 1 + asm volatile( + "asr %1 \n\t" + "asr %0 \n\t" + "adc %0, %1 \n\t" + : "+a" (i) + : "a" (j) ); + return i; +#else +#error "No implementation for avg7 available." +#endif +} + +/// Calculate an integer average of two signed 15-bit +/// integers (int16_t) +/// If the first argument is even, result is rounded down. +/// If the first argument is odd, result is result up. +LIB8STATIC_ALWAYS_INLINE int16_t avg15( int16_t i, int16_t j) +{ +#if AVG15_C == 1 + return ((int32_t)((int32_t)(i) + (int32_t)(j)) >> 1) + (i & 0x1); +#elif AVG15_AVRASM == 1 + asm volatile( + /* first divide j by 2, throwing away lowest bit */ + "asr %B[j] \n\t" + "ror %A[j] \n\t" + /* now divide i by 2, with lowest bit going into C */ + "asr %B[i] \n\t" + "ror %A[i] \n\t" + /* add j + C to i */ + "adc %A[i], %A[j] \n\t" + "adc %B[i], %B[j] \n\t" + : [i] "+a" (i) + : [j] "a" (j) ); + return i; +#else +#error "No implementation for avg15 available." +#endif +} + + +/// Calculate the remainder of one unsigned 8-bit +/// value divided by anoter, aka A % M. +/// Implemented by repeated subtraction, which is +/// very compact, and very fast if A is 'probably' +/// less than M. If A is a large multiple of M, +/// the loop has to execute multiple times. However, +/// even in that case, the loop is only two +/// instructions long on AVR, i.e., quick. +LIB8STATIC_ALWAYS_INLINE uint8_t mod8( uint8_t a, uint8_t m) +{ +#if defined(__AVR__) + asm volatile ( + "L_%=: sub %[a],%[m] \n\t" + " brcc L_%= \n\t" + " add %[a],%[m] \n\t" + : [a] "+r" (a) + : [m] "r" (m) + ); +#else + while( a >= m) a -= m; +#endif + return a; +} + +/// Add two numbers, and calculate the modulo +/// of the sum and a third number, M. +/// In other words, it returns (A+B) % M. +/// It is designed as a compact mechanism for +/// incrementing a 'mode' switch and wrapping +/// around back to 'mode 0' when the switch +/// goes past the end of the available range. +/// e.g. if you have seven modes, this switches +/// to the next one and wraps around if needed: +/// mode = addmod8( mode, 1, 7); +///LIB8STATIC_ALWAYS_INLINESee 'mod8' for notes on performance. +LIB8STATIC uint8_t addmod8( uint8_t a, uint8_t b, uint8_t m) +{ +#if defined(__AVR__) + asm volatile ( + " add %[a],%[b] \n\t" + "L_%=: sub %[a],%[m] \n\t" + " brcc L_%= \n\t" + " add %[a],%[m] \n\t" + : [a] "+r" (a) + : [b] "r" (b), [m] "r" (m) + ); +#else + a += b; + while( a >= m) a -= m; +#endif + return a; +} + +/// Subtract two numbers, and calculate the modulo +/// of the difference and a third number, M. +/// In other words, it returns (A-B) % M. +/// It is designed as a compact mechanism for +/// incrementing a 'mode' switch and wrapping +/// around back to 'mode 0' when the switch +/// goes past the end of the available range. +/// e.g. if you have seven modes, this switches +/// to the next one and wraps around if needed: +/// mode = addmod8( mode, 1, 7); +///LIB8STATIC_ALWAYS_INLINESee 'mod8' for notes on performance. +LIB8STATIC uint8_t submod8( uint8_t a, uint8_t b, uint8_t m) +{ +#if defined(__AVR__) + asm volatile ( + " sub %[a],%[b] \n\t" + "L_%=: sub %[a],%[m] \n\t" + " brcc L_%= \n\t" + " add %[a],%[m] \n\t" + : [a] "+r" (a) + : [b] "r" (b), [m] "r" (m) + ); +#else + a -= b; + while( a >= m) a -= m; +#endif + return a; +} + +/// 8x8 bit multiplication, with 8 bit result +LIB8STATIC_ALWAYS_INLINE uint8_t mul8( uint8_t i, uint8_t j) +{ +#if MUL8_C == 1 + return ((uint16_t)i * (uint16_t)(j) ) & 0xFF; +#elif MUL8_AVRASM == 1 + asm volatile( + /* Multiply 8-bit i * 8-bit j, giving 16-bit r1,r0 */ + "mul %0, %1 \n\t" + /* Extract the LOW 8-bits (r0) */ + "mov %0, r0 \n\t" + /* Restore r1 to "0"; it's expected to always be that */ + "clr __zero_reg__ \n\t" + : "+a" (i) + : "a" (j) + : "r0", "r1"); + + return i; +#else +#error "No implementation for mul8 available." +#endif +} + + +/// saturating 8x8 bit multiplication, with 8 bit result +/// @returns the product of i * j, capping at 0xFF +LIB8STATIC_ALWAYS_INLINE uint8_t qmul8( uint8_t i, uint8_t j) +{ +#if QMUL8_C == 1 + int p = ((uint16_t)i * (uint16_t)(j) ); + if( p > 255) p = 255; + return p; +#elif QMUL8_AVRASM == 1 + asm volatile( + /* Multiply 8-bit i * 8-bit j, giving 16-bit r1,r0 */ + " mul %0, %1 \n\t" + /* If high byte of result is zero, all is well. */ + " tst r1 \n\t" + " breq Lnospill_%= \n\t" + /* If high byte of result > 0, saturate low byte to 0xFF */ + " ldi %0,0xFF \n\t" + " rjmp Ldone_%= \n\t" + "Lnospill_%=: \n\t" + /* Extract the LOW 8-bits (r0) */ + " mov %0, r0 \n\t" + "Ldone_%=: \n\t" + /* Restore r1 to "0"; it's expected to always be that */ + " clr __zero_reg__ \n\t" + : "+a" (i) + : "a" (j) + : "r0", "r1"); + + return i; +#else +#error "No implementation for qmul8 available." +#endif +} + + +/// take abs() of a signed 8-bit uint8_t +LIB8STATIC_ALWAYS_INLINE int8_t abs8( int8_t i) +{ +#if ABS8_C == 1 + if( i < 0) i = -i; + return i; +#elif ABS8_AVRASM == 1 + + + asm volatile( + /* First, check the high bit, and prepare to skip if it's clear */ + "sbrc %0, 7 \n" + + /* Negate the value */ + "neg %0 \n" + + : "+r" (i) : "r" (i) ); + return i; +#else +#error "No implementation for abs8 available." +#endif +} + +/// square root for 16-bit integers +/// About three times faster and five times smaller +/// than Arduino's general sqrt on AVR. +LIB8STATIC uint8_t sqrt16(uint16_t x) +{ + if( x <= 1) { + return x; + } + + uint8_t low = 1; // lower bound + uint8_t hi, mid; + + if( x > 7904) { + hi = 255; + } else { + hi = (x >> 5) + 8; // initial estimate for upper bound + } + + do { + mid = (low + hi) >> 1; + if ((uint16_t)(mid * mid) > x) { + hi = mid - 1; + } else { + if( mid == 255) { + return 255; + } + low = mid + 1; + } + } while (hi >= low); + + return low - 1; +} + +/// blend a variable proproportion(0-255) of one byte to another +/// @param a - the starting byte value +/// @param b - the byte value to blend toward +/// @param amountOfB - the proportion (0-255) of b to blend +/// @returns a byte value between a and b, inclusive +#if (FASTLED_BLEND_FIXED == 1) +LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB) +{ +#if BLEND8_C == 1 + uint16_t partial; + uint8_t result; + + uint8_t amountOfA = 255 - amountOfB; + + partial = (a * amountOfA); +#if (FASTLED_SCALE8_FIXED == 1) + partial += a; + //partial = add8to16( a, partial); +#endif + + partial += (b * amountOfB); +#if (FASTLED_SCALE8_FIXED == 1) + partial += b; + //partial = add8to16( b, partial); +#endif + + result = partial >> 8; + + return result; + +#elif BLEND8_AVRASM == 1 + uint16_t partial; + uint8_t result; + + asm volatile ( + /* partial = b * amountOfB */ + " mul %[b], %[amountOfB] \n\t" + " movw %A[partial], r0 \n\t" + + /* amountOfB (aka amountOfA) = 255 - amountOfB */ + " com %[amountOfB] \n\t" + + /* partial += a * amountOfB (aka amountOfA) */ + " mul %[a], %[amountOfB] \n\t" + + " add %A[partial], r0 \n\t" + " adc %B[partial], r1 \n\t" + + " clr __zero_reg__ \n\t" + +#if (FASTLED_SCALE8_FIXED == 1) + /* partial += a */ + " add %A[partial], %[a] \n\t" + " adc %B[partial], __zero_reg__ \n\t" + + // partial += b + " add %A[partial], %[b] \n\t" + " adc %B[partial], __zero_reg__ \n\t" +#endif + + : [partial] "=r" (partial), + [amountOfB] "+a" (amountOfB) + : [a] "a" (a), + [b] "a" (b) + : "r0", "r1" + ); + + result = partial >> 8; + + return result; + +#else +#error "No implementation for blend8 available." +#endif +} + +#else +LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB) +{ + // This version loses precision in the integer math + // and can actually return results outside of the range + // from a to b. Its use is not recommended. + uint8_t result; + uint8_t amountOfA = 255 - amountOfB; + result = scale8_LEAVING_R1_DIRTY( a, amountOfA) + + scale8_LEAVING_R1_DIRTY( b, amountOfB); + cleanup_R1(); + return result; +} +#endif + + +///@} +#endif diff --git a/lib/lib8tion/random8.h b/lib/lib8tion/random8.h new file mode 100644 index 000000000000..7ee67cbb3647 --- /dev/null +++ b/lib/lib8tion/random8.h @@ -0,0 +1,94 @@ +#ifndef __INC_LIB8TION_RANDOM_H +#define __INC_LIB8TION_RANDOM_H +///@ingroup lib8tion + +///@defgroup Random Fast random number generators +/// Fast 8- and 16- bit unsigned random numbers. +/// Significantly faster than Arduino random(), but +/// also somewhat less random. You can add entropy. +///@{ + +// X(n+1) = (2053 * X(n)) + 13849) +#define FASTLED_RAND16_2053 ((uint16_t)(2053)) +#define FASTLED_RAND16_13849 ((uint16_t)(13849)) + +/// random number seed +extern uint16_t rand16seed;// = RAND16_SEED; + +/// Generate an 8-bit random number +LIB8STATIC uint8_t random8(void) +{ + rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849; + // return the sum of the high and low bytes, for better + // mixing and non-sequential correlation + return (uint8_t)(((uint8_t)(rand16seed & 0xFF)) + + ((uint8_t)(rand16seed >> 8))); +} + +/// Generate a 16 bit random number +LIB8STATIC uint16_t random16(void) +{ + rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849; + return rand16seed; +} + +/// Generate an 8-bit random number between 0 and lim +/// @param lim the upper bound for the result +LIB8STATIC uint8_t random8_max(uint8_t lim) +{ + uint8_t r = random8(); + r = (r*lim) >> 8; + return r; +} + +/// Generate an 8-bit random number in the given range +/// @param min the lower bound for the random number +/// @param lim the upper bound for the random number +LIB8STATIC uint8_t random8_min_max(uint8_t min, uint8_t lim) +{ + uint8_t delta = lim - min; + uint8_t r = random8_max(delta) + min; + return r; +} + +/// Generate an 16-bit random number between 0 and lim +/// @param lim the upper bound for the result +LIB8STATIC uint16_t random16_max(uint16_t lim) +{ + uint16_t r = random16(); + uint32_t p = (uint32_t)lim * (uint32_t)r; + r = p >> 16; + return r; +} + +/// Generate an 16-bit random number in the given range +/// @param min the lower bound for the random number +/// @param lim the upper bound for the random number +LIB8STATIC uint16_t random16_min_max( uint16_t min, uint16_t lim) +{ + uint16_t delta = lim - min; + uint16_t r = random16_max(delta) + min; + return r; +} + +/// Set the 16-bit seed used for the random number generator +LIB8STATIC void random16_set_seed(uint16_t seed) +{ + rand16seed = seed; +} + +/// Get the current seed value for the random number generator +LIB8STATIC uint16_t random16_get_seed(void) +{ + return rand16seed; +} + +/// Add entropy into the random number generator +LIB8STATIC void random16_add_entropy(uint16_t entropy) +{ + rand16seed += entropy; +} + +///@} + +#endif diff --git a/lib/lib8tion/scale8.h b/lib/lib8tion/scale8.h new file mode 100644 index 000000000000..9895fd4d7919 --- /dev/null +++ b/lib/lib8tion/scale8.h @@ -0,0 +1,542 @@ +#ifndef __INC_LIB8TION_SCALE_H +#define __INC_LIB8TION_SCALE_H + +///@ingroup lib8tion + +///@defgroup Scaling Scaling functions +/// Fast, efficient 8-bit scaling functions specifically +/// designed for high-performance LED programming. +/// +/// Because of the AVR(Arduino) and ARM assembly language +/// implementations provided, using these functions often +/// results in smaller and faster code than the equivalent +/// program using plain "C" arithmetic and logic. +///@{ + +/// scale one byte by a second one, which is treated as +/// the numerator of a fraction whose denominator is 256 +/// In other words, it computes i * (scale / 256) +/// 4 clocks AVR with MUL, 2 clocks ARM +LIB8STATIC_ALWAYS_INLINE uint8_t scale8( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 +#if (FASTLED_SCALE8_FIXED == 1) + return (((uint16_t)i) * (1+(uint16_t)(scale))) >> 8; +#else + return ((uint16_t)i * (uint16_t)(scale) ) >> 8; +#endif +#elif SCALE8_AVRASM == 1 +#if defined(LIB8_ATTINY) +#if (FASTLED_SCALE8_FIXED == 1) + uint8_t work=i; +#else + uint8_t work=0; +#endif + uint8_t cnt=0x80; + asm volatile( +#if (FASTLED_SCALE8_FIXED == 1) + " inc %[scale] \n\t" + " breq DONE_%= \n\t" + " clr %[work] \n\t" +#endif + "LOOP_%=: \n\t" + /*" sbrc %[scale], 0 \n\t" + " add %[work], %[i] \n\t" + " ror %[work] \n\t" + " lsr %[scale] \n\t" + " clc \n\t"*/ + " sbrc %[scale], 0 \n\t" + " add %[work], %[i] \n\t" + " ror %[work] \n\t" + " lsr %[scale] \n\t" + " lsr %[cnt] \n\t" + "brcc LOOP_%= \n\t" + "DONE_%=: \n\t" + : [work] "+r" (work), [cnt] "+r" (cnt) + : [scale] "r" (scale), [i] "r" (i) + : + ); + return work; +#else + asm volatile( +#if (FASTLED_SCALE8_FIXED==1) + // Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 + "mul %0, %1 \n\t" + // Add i to r0, possibly setting the carry flag + "add r0, %0 \n\t" + // load the immediate 0 into i (note, this does _not_ touch any flags) + "ldi %0, 0x00 \n\t" + // walk and chew gum at the same time + "adc %0, r1 \n\t" +#else + /* Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 */ + "mul %0, %1 \n\t" + /* Move the high 8-bits of the product (r1) back to i */ + "mov %0, r1 \n\t" + /* Restore r1 to "0"; it's expected to always be that */ +#endif + "clr __zero_reg__ \n\t" + + : "+a" (i) /* writes to i */ + : "a" (scale) /* uses scale */ + : "r0", "r1" /* clobbers r0, r1 */ ); + + /* Return the result */ + return i; +#endif +#else +#error "No implementation for scale8 available." +#endif +} + + +/// The "video" version of scale8 guarantees that the output will +/// be only be zero if one or both of the inputs are zero. If both +/// inputs are non-zero, the output is guaranteed to be non-zero. +/// This makes for better 'video'/LED dimming, at the cost of +/// several additional cycles. +LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 || defined(LIB8_ATTINY) + uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0); + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale; + return j; +#elif SCALE8_AVRASM == 1 + uint8_t j=0; + asm volatile( + " tst %[i]\n\t" + " breq L_%=\n\t" + " mul %[i], %[scale]\n\t" + " mov %[j], r1\n\t" + " clr __zero_reg__\n\t" + " cpse %[scale], r1\n\t" + " subi %[j], 0xFF\n\t" + "L_%=: \n\t" + : [j] "+a" (j) + : [i] "a" (i), [scale] "a" (scale) + : "r0", "r1"); + + return j; + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // asm volatile( + // " tst %0 \n" + // " breq L_%= \n" + // " mul %0, %1 \n" + // " mov %0, r1 \n" + // " add %0, %2 \n" + // " clr __zero_reg__ \n" + // "L_%=: \n" + + // : "+a" (i) + // : "a" (scale), "a" (nonzeroscale) + // : "r0", "r1"); + + // // Return the result + // return i; +#else +#error "No implementation for scale8_video available." +#endif +} + + +/// This version of scale8 does not clean up the R1 register on AVR +/// If you are doing several 'scale8's in a row, use this, and +/// then explicitly call cleanup_R1. +LIB8STATIC_ALWAYS_INLINE uint8_t scale8_LEAVING_R1_DIRTY( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 +#if (FASTLED_SCALE8_FIXED == 1) + return (((uint16_t)i) * ((uint16_t)(scale)+1)) >> 8; +#else + return ((int)i * (int)(scale) ) >> 8; +#endif +#elif SCALE8_AVRASM == 1 + asm volatile( + #if (FASTLED_SCALE8_FIXED==1) + // Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 + "mul %0, %1 \n\t" + // Add i to r0, possibly setting the carry flag + "add r0, %0 \n\t" + // load the immediate 0 into i (note, this does _not_ touch any flags) + "ldi %0, 0x00 \n\t" + // walk and chew gum at the same time + "adc %0, r1 \n\t" + #else + /* Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 */ + "mul %0, %1 \n\t" + /* Move the high 8-bits of the product (r1) back to i */ + "mov %0, r1 \n\t" + #endif + /* R1 IS LEFT DIRTY HERE; YOU MUST ZERO IT OUT YOURSELF */ + /* "clr __zero_reg__ \n\t" */ + + : "+a" (i) /* writes to i */ + : "a" (scale) /* uses scale */ + : "r0", "r1" /* clobbers r0, r1 */ ); + + // Return the result + return i; +#else +#error "No implementation for scale8_LEAVING_R1_DIRTY available." +#endif +} + + +/// This version of scale8_video does not clean up the R1 register on AVR +/// If you are doing several 'scale8_video's in a row, use this, and +/// then explicitly call cleanup_R1. +LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video_LEAVING_R1_DIRTY( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 || defined(LIB8_ATTINY) + uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0); + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale; + return j; +#elif SCALE8_AVRASM == 1 + uint8_t j=0; + asm volatile( + " tst %[i]\n\t" + " breq L_%=\n\t" + " mul %[i], %[scale]\n\t" + " mov %[j], r1\n\t" + " breq L_%=\n\t" + " subi %[j], 0xFF\n\t" + "L_%=: \n\t" + : [j] "+a" (j) + : [i] "a" (i), [scale] "a" (scale) + : "r0", "r1"); + + return j; + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // asm volatile( + // " tst %0 \n" + // " breq L_%= \n" + // " mul %0, %1 \n" + // " mov %0, r1 \n" + // " add %0, %2 \n" + // " clr __zero_reg__ \n" + // "L_%=: \n" + + // : "+a" (i) + // : "a" (scale), "a" (nonzeroscale) + // : "r0", "r1"); + + // // Return the result + // return i; +#else +#error "No implementation for scale8_video_LEAVING_R1_DIRTY available." +#endif +} + +/// Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls +LIB8STATIC_ALWAYS_INLINE void cleanup_R1(void) +{ +#if CLEANUP_R1_AVRASM == 1 + // Restore r1 to "0"; it's expected to always be that + asm volatile( "clr __zero_reg__ \n\t" : : : "r1" ); +#endif +} + + +/// scale a 16-bit unsigned value by an 8-bit value, +/// considered as numerator of a fraction whose denominator +/// is 256. In other words, it computes i * (scale / 256) + +LIB8STATIC_ALWAYS_INLINE uint16_t scale16by8( uint16_t i, fract8 scale ) +{ +#if SCALE16BY8_C == 1 + uint16_t result; +#if FASTLED_SCALE8_FIXED == 1 + result = (i * (1+((uint16_t)scale))) >> 8; +#else + result = (i * scale) / 256; +#endif + return result; +#elif SCALE16BY8_AVRASM == 1 +#if FASTLED_SCALE8_FIXED == 1 + uint16_t result = 0; + asm volatile( + // result.A = HighByte( (i.A x scale) + i.A ) + " mul %A[i], %[scale] \n\t" + " add r0, %A[i] \n\t" + // " adc r1, [zero] \n\t" + // " mov %A[result], r1 \n\t" + " adc %A[result], r1 \n\t" + + // result.A-B += i.B x scale + " mul %B[i], %[scale] \n\t" + " add %A[result], r0 \n\t" + " adc %B[result], r1 \n\t" + + // cleanup r1 + " clr __zero_reg__ \n\t" + + // result.A-B += i.B + " add %A[result], %B[i] \n\t" + " adc %B[result], __zero_reg__ \n\t" + + : [result] "+r" (result) + : [i] "r" (i), [scale] "r" (scale) + : "r0", "r1" + ); + return result; +#else + uint16_t result = 0; + asm volatile( + // result.A = HighByte(i.A x j ) + " mul %A[i], %[scale] \n\t" + " mov %A[result], r1 \n\t" + //" clr %B[result] \n\t" + + // result.A-B += i.B x j + " mul %B[i], %[scale] \n\t" + " add %A[result], r0 \n\t" + " adc %B[result], r1 \n\t" + + // cleanup r1 + " clr __zero_reg__ \n\t" + + : [result] "+r" (result) + : [i] "r" (i), [scale] "r" (scale) + : "r0", "r1" + ); + return result; +#endif +#else + #error "No implementation for scale16by8 available." +#endif +} + +/// scale a 16-bit unsigned value by a 16-bit value, +/// considered as numerator of a fraction whose denominator +/// is 65536. In other words, it computes i * (scale / 65536) + +LIB8STATIC uint16_t scale16( uint16_t i, fract16 scale ) +{ + #if SCALE16_C == 1 + uint16_t result; +#if FASTLED_SCALE8_FIXED == 1 + result = ((uint32_t)(i) * (1+(uint32_t)(scale))) / 65536; +#else + result = ((uint32_t)(i) * (uint32_t)(scale)) / 65536; +#endif + return result; +#elif SCALE16_AVRASM == 1 +#if FASTLED_SCALE8_FIXED == 1 + // implemented sort of like + // result = ((i * scale) + i ) / 65536 + // + // why not like this, you may ask? + // result = (i * (scale+1)) / 65536 + // the answer is that if scale is 65535, then scale+1 + // will be zero, which is not what we want. + uint32_t result; + asm volatile( + // result.A-B = i.A x scale.A + " mul %A[i], %A[scale] \n\t" + // save results... + // basic idea: + //" mov %A[result], r0 \n\t" + //" mov %B[result], r1 \n\t" + // which can be written as... + " movw %A[result], r0 \n\t" + // Because we're going to add i.A-B to + // result.A-D, we DO need to keep both + // the r0 and r1 portions of the product + // UNlike in the 'unfixed scale8' version. + // So the movw here is needed. + : [result] "=r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + asm volatile( + // result.C-D = i.B x scale.B + " mul %B[i], %B[scale] \n\t" + //" mov %C[result], r0 \n\t" + //" mov %D[result], r1 \n\t" + " movw %C[result], r0 \n\t" + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + const uint8_t zero = 0; + asm volatile( + // result.B-D += i.B x scale.A + " mul %B[i], %A[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // result.B-D += i.A x scale.B + " mul %A[i], %B[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // cleanup r1 + " clr r1 \n\t" + + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale), + [zero] "r" (zero) + : "r0", "r1" + ); + + asm volatile( + // result.A-D += i.A-B + " add %A[result], %A[i] \n\t" + " adc %B[result], %B[i] \n\t" + " adc %C[result], %[zero] \n\t" + " adc %D[result], %[zero] \n\t" + : [result] "+r" (result) + : [i] "r" (i), + [zero] "r" (zero) + ); + + result = result >> 16; + return result; +#else + uint32_t result; + asm volatile( + // result.A-B = i.A x scale.A + " mul %A[i], %A[scale] \n\t" + // save results... + // basic idea: + //" mov %A[result], r0 \n\t" + //" mov %B[result], r1 \n\t" + // which can be written as... + " movw %A[result], r0 \n\t" + // We actually don't need to do anything with r0, + // as result.A is never used again here, so we + // could just move the high byte, but movw is + // one clock cycle, just like mov, so might as + // well, in case we want to use this code for + // a generic 16x16 multiply somewhere. + + : [result] "=r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + asm volatile( + // result.C-D = i.B x scale.B + " mul %B[i], %B[scale] \n\t" + //" mov %C[result], r0 \n\t" + //" mov %D[result], r1 \n\t" + " movw %C[result], r0 \n\t" + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + const uint8_t zero = 0; + asm volatile( + // result.B-D += i.B x scale.A + " mul %B[i], %A[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // result.B-D += i.A x scale.B + " mul %A[i], %B[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // cleanup r1 + " clr r1 \n\t" + + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale), + [zero] "r" (zero) + : "r0", "r1" + ); + + result = result >> 16; + return result; +#endif +#else + #error "No implementation for scale16 available." +#endif +} +///@} + +///@defgroup Dimming Dimming and brightening functions +/// +/// Dimming and brightening functions +/// +/// The eye does not respond in a linear way to light. +/// High speed PWM'd LEDs at 50% duty cycle appear far +/// brighter then the 'half as bright' you might expect. +/// +/// If you want your midpoint brightness leve (128) to +/// appear half as bright as 'full' brightness (255), you +/// have to apply a 'dimming function'. +///@{ + +/// Adjust a scaling value for dimming +LIB8STATIC uint8_t dim8_raw( uint8_t x) +{ + return scale8( x, x); +} + +/// Adjust a scaling value for dimming for video (value will never go below 1) +LIB8STATIC uint8_t dim8_video( uint8_t x) +{ + return scale8_video( x, x); +} + +/// Linear version of the dimming function that halves for values < 128 +LIB8STATIC uint8_t dim8_lin( uint8_t x ) +{ + if( x & 0x80 ) { + x = scale8( x, x); + } else { + x += 1; + x /= 2; + } + return x; +} + +/// inverse of the dimming function, brighten a value +LIB8STATIC uint8_t brighten8_raw( uint8_t x) +{ + uint8_t ix = 255 - x; + return 255 - scale8( ix, ix); +} + +/// inverse of the dimming function, brighten a value +LIB8STATIC uint8_t brighten8_video( uint8_t x) +{ + uint8_t ix = 255 - x; + return 255 - scale8_video( ix, ix); +} + +/// inverse of the dimming function, brighten a value +LIB8STATIC uint8_t brighten8_lin( uint8_t x ) +{ + uint8_t ix = 255 - x; + if( ix & 0x80 ) { + ix = scale8( ix, ix); + } else { + ix += 1; + ix /= 2; + } + return 255 - ix; +} + +///@} +#endif diff --git a/lib/lib8tion/trig8.h b/lib/lib8tion/trig8.h new file mode 100644 index 000000000000..4907c6ff30a7 --- /dev/null +++ b/lib/lib8tion/trig8.h @@ -0,0 +1,259 @@ +#ifndef __INC_LIB8TION_TRIG_H +#define __INC_LIB8TION_TRIG_H + +///@ingroup lib8tion + +///@defgroup Trig Fast trig functions +/// Fast 8 and 16-bit approximations of sin(x) and cos(x). +/// Don't use these approximations for calculating the +/// trajectory of a rocket to Mars, but they're great +/// for art projects and LED displays. +/// +/// On Arduino/AVR, the 16-bit approximation is more than +/// 10X faster than floating point sin(x) and cos(x), while +/// the 8-bit approximation is more than 20X faster. +///@{ + +#if defined(__AVR__) +#define sin16 sin16_avr +#else +#define sin16 sin16_C +#endif + +/// Fast 16-bit approximation of sin(x). This approximation never varies more than +/// 0.69% from the floating point value you'd get by doing +/// +/// float s = sin(x) * 32767.0; +/// +/// @param theta input angle from 0-65535 +/// @returns sin of theta, value between -32767 to 32767. +LIB8STATIC int16_t sin16_avr( uint16_t theta ) +{ + static const uint8_t data[] = + { 0, 0, 49, 0, 6393%256, 6393/256, 48, 0, + 12539%256, 12539/256, 44, 0, 18204%256, 18204/256, 38, 0, + 23170%256, 23170/256, 31, 0, 27245%256, 27245/256, 23, 0, + 30273%256, 30273/256, 14, 0, 32137%256, 32137/256, 4 /*,0*/ }; + + uint16_t offset = (theta & 0x3FFF); + + // AVR doesn't have a multi-bit shift instruction, + // so if we say "offset >>= 3", gcc makes a tiny loop. + // Inserting empty volatile statements between each + // bit shift forces gcc to unroll the loop. + offset >>= 1; // 0..8191 + asm volatile(""); + offset >>= 1; // 0..4095 + asm volatile(""); + offset >>= 1; // 0..2047 + + if( theta & 0x4000 ) offset = 2047 - offset; + + uint8_t sectionX4; + sectionX4 = offset / 256; + sectionX4 *= 4; + + uint8_t m; + + union { + uint16_t b; + struct { + uint8_t blo; + uint8_t bhi; + }; + } u; + + //in effect u.b = blo + (256 * bhi); + u.blo = data[ sectionX4 ]; + u.bhi = data[ sectionX4 + 1]; + m = data[ sectionX4 + 2]; + + uint8_t secoffset8 = (uint8_t)(offset) / 2; + + uint16_t mx = m * secoffset8; + + int16_t y = mx + u.b; + if( theta & 0x8000 ) y = -y; + + return y; +} + +/// Fast 16-bit approximation of sin(x). This approximation never varies more than +/// 0.69% from the floating point value you'd get by doing +/// +/// float s = sin(x) * 32767.0; +/// +/// @param theta input angle from 0-65535 +/// @returns sin of theta, value between -32767 to 32767. +LIB8STATIC int16_t sin16_C( uint16_t theta ) +{ + static const uint16_t base[] = + { 0, 6393, 12539, 18204, 23170, 27245, 30273, 32137 }; + static const uint8_t slope[] = + { 49, 48, 44, 38, 31, 23, 14, 4 }; + + uint16_t offset = (theta & 0x3FFF) >> 3; // 0..2047 + if( theta & 0x4000 ) offset = 2047 - offset; + + uint8_t section = offset / 256; // 0..7 + uint16_t b = base[section]; + uint8_t m = slope[section]; + + uint8_t secoffset8 = (uint8_t)(offset) / 2; + + uint16_t mx = m * secoffset8; + int16_t y = mx + b; + + if( theta & 0x8000 ) y = -y; + + return y; +} + + +/// Fast 16-bit approximation of cos(x). This approximation never varies more than +/// 0.69% from the floating point value you'd get by doing +/// +/// float s = cos(x) * 32767.0; +/// +/// @param theta input angle from 0-65535 +/// @returns sin of theta, value between -32767 to 32767. +LIB8STATIC int16_t cos16( uint16_t theta) +{ + return sin16( theta + 16384); +} + +/////////////////////////////////////////////////////////////////////// + +// sin8 & cos8 +// Fast 8-bit approximations of sin(x) & cos(x). +// Input angle is an unsigned int from 0-255. +// Output is an unsigned int from 0 to 255. +// +// This approximation can vary to to 2% +// from the floating point value you'd get by doing +// float s = (sin( x ) * 128.0) + 128; +// +// Don't use this approximation for calculating the +// "real" trigonometric calculations, but it's great +// for art projects and LED displays. +// +// On Arduino/AVR, this approximation is more than +// 20X faster than floating point sin(x) and cos(x) + +#if defined(__AVR__) && !defined(LIB8_ATTINY) +#define sin8 sin8_avr +#else +#define sin8 sin8_C +#endif + + +const uint8_t b_m16_interleave[] = { 0, 49, 49, 41, 90, 27, 117, 10 }; + +/// Fast 8-bit approximation of sin(x). This approximation never varies more than +/// 2% from the floating point value you'd get by doing +/// +/// float s = (sin(x) * 128.0) + 128; +/// +/// @param theta input angle from 0-255 +/// @returns sin of theta, value between 0 and 255 +LIB8STATIC uint8_t sin8_avr( uint8_t theta) +{ + uint8_t offset = theta; + + asm volatile( + "sbrc %[theta],6 \n\t" + "com %[offset] \n\t" + : [theta] "+r" (theta), [offset] "+r" (offset) + ); + + offset &= 0x3F; // 0..63 + + uint8_t secoffset = offset & 0x0F; // 0..15 + if( theta & 0x40) secoffset++; + + uint8_t m16; uint8_t b; + + uint8_t section = offset >> 4; // 0..3 + uint8_t s2 = section * 2; + + const uint8_t* p = b_m16_interleave; + p += s2; + b = *p; + p++; + m16 = *p; + + uint8_t mx; + uint8_t xr1; + asm volatile( + "mul %[m16],%[secoffset] \n\t" + "mov %[mx],r0 \n\t" + "mov %[xr1],r1 \n\t" + "eor r1, r1 \n\t" + "swap %[mx] \n\t" + "andi %[mx],0x0F \n\t" + "swap %[xr1] \n\t" + "andi %[xr1], 0xF0 \n\t" + "or %[mx], %[xr1] \n\t" + : [mx] "=d" (mx), [xr1] "=d" (xr1) + : [m16] "d" (m16), [secoffset] "d" (secoffset) + ); + + int8_t y = mx + b; + if( theta & 0x80 ) y = -y; + + y += 128; + + return y; +} + + +/// Fast 8-bit approximation of sin(x). This approximation never varies more than +/// 2% from the floating point value you'd get by doing +/// +/// float s = (sin(x) * 128.0) + 128; +/// +/// @param theta input angle from 0-255 +/// @returns sin of theta, value between 0 and 255 +LIB8STATIC uint8_t sin8_C( uint8_t theta) +{ + uint8_t offset = theta; + if( theta & 0x40 ) { + offset = (uint8_t)255 - offset; + } + offset &= 0x3F; // 0..63 + + uint8_t secoffset = offset & 0x0F; // 0..15 + if( theta & 0x40) secoffset++; + + uint8_t section = offset >> 4; // 0..3 + uint8_t s2 = section * 2; + const uint8_t* p = b_m16_interleave; + p += s2; + uint8_t b = *p; + p++; + uint8_t m16 = *p; + + uint8_t mx = (m16 * secoffset) >> 4; + + int8_t y = mx + b; + if( theta & 0x80 ) y = -y; + + y += 128; + + return y; +} + +/// Fast 8-bit approximation of cos(x). This approximation never varies more than +/// 2% from the floating point value you'd get by doing +/// +/// float s = (cos(x) * 128.0) + 128; +/// +/// @param theta input angle from 0-255 +/// @returns sin of theta, value between 0 and 255 +LIB8STATIC uint8_t cos8( uint8_t theta) +{ + return sin8( theta + 64); +} + +///@} +#endif diff --git a/quantum/color.c b/quantum/color.c index 8ede053e7119..c49877592ece 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -78,9 +78,11 @@ RGB hsv_to_rgb( HSV hsv ) break; } +#ifdef USE_CIE1931_CURVE rgb.r = pgm_read_byte( &CIE1931_CURVE[rgb.r] ); rgb.g = pgm_read_byte( &CIE1931_CURVE[rgb.g] ); rgb.b = pgm_read_byte( &CIE1931_CURVE[rgb.b] ); +#endif return rgb; } diff --git a/quantum/quantum.c b/quantum/quantum.c index 8316d1f06a3a..8c928441c5ae 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -274,10 +274,10 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef HAPTIC_ENABLE process_haptic(keycode, record) && #endif //HAPTIC_ENABLE - process_record_kb(keycode, record) && - #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES) + #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYREACTIVE_ENABLED) process_rgb_matrix(keycode, record) && #endif + process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif @@ -1049,12 +1049,6 @@ void matrix_init_quantum() { matrix_init_kb(); } -uint8_t rgb_matrix_task_counter = 0; - -#ifndef RGB_MATRIX_SKIP_FRAMES - #define RGB_MATRIX_SKIP_FRAMES 1 -#endif - void matrix_scan_quantum() { #if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE) matrix_scan_music(); @@ -1078,10 +1072,6 @@ void matrix_scan_quantum() { #ifdef RGB_MATRIX_ENABLE rgb_matrix_task(); - if (rgb_matrix_task_counter == 0) { - rgb_matrix_update_pwm_buffers(); - } - rgb_matrix_task_counter = ((rgb_matrix_task_counter + 1) % (RGB_MATRIX_SKIP_FRAMES + 1)); #endif #ifdef ENCODER_ENABLE diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 56a97e3c7d5b..0728e2431fe6 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -24,62 +24,80 @@ #include #include -rgb_config_t rgb_matrix_config; +#include "lib/lib8tion/lib8tion.h" + +#include "rgb_matrix_animations/solid_color_anim.h" +#include "rgb_matrix_animations/alpha_mods_anim.h" +#include "rgb_matrix_animations/dual_beacon_anim.h" +#include "rgb_matrix_animations/gradient_up_down_anim.h" +#include "rgb_matrix_animations/raindrops_anim.h" +#include "rgb_matrix_animations/cycle_all_anim.h" +#include "rgb_matrix_animations/cycle_left_right_anim.h" +#include "rgb_matrix_animations/cycle_up_down_anim.h" +#include "rgb_matrix_animations/rainbow_beacon_anim.h" +#include "rgb_matrix_animations/rainbow_pinwheels_anim.h" +#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" +#include "rgb_matrix_animations/jellybean_raindrops_anim.h" +#include "rgb_matrix_animations/digital_rain_anim.h" +#include "rgb_matrix_animations/solid_reactive_simple_anim.h" +#include "rgb_matrix_animations/solid_reactive_anim.h" +#include "rgb_matrix_animations/splash_anim.h" +#include "rgb_matrix_animations/solid_splash_anim.h" +#include "rgb_matrix_animations/breathing_anim.h" -#ifndef MAX - #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#ifndef RGB_DISABLE_AFTER_TIMEOUT + #define RGB_DISABLE_AFTER_TIMEOUT 0 #endif -#ifndef MIN - #define MIN(a,b) ((a) < (b)? (a): (b)) +#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED + #define RGB_DISABLE_WHEN_USB_SUSPENDED false #endif -#ifndef RGB_DISABLE_AFTER_TIMEOUT - #define RGB_DISABLE_AFTER_TIMEOUT 0 +#ifndef EECONFIG_RGB_MATRIX + #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT #endif -#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED - #define RGB_DISABLE_WHEN_USB_SUSPENDED false +#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX + #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX #endif -#ifndef EECONFIG_RGB_MATRIX - #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT +#if !defined(RGB_MATRIX_HUE_STEP) + #define RGB_MATRIX_HUE_STEP 8 #endif -#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > 255 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#if !defined(RGB_MATRIX_SAT_STEP) + #define RGB_MATRIX_SAT_STEP 16 #endif -#ifndef RGB_DIGITAL_RAIN_DROPS - // lower the number for denser effect/wider keyboard - #define RGB_DIGITAL_RAIN_DROPS 24 +#if !defined(RGB_MATRIX_VAL_STEP) + #define RGB_MATRIX_VAL_STEP 16 #endif -#if !defined(DISABLE_RGB_MATRIX_RAINDROPS) || !defined(DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS) || !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) - #define TRACK_PREVIOUS_EFFECT +#if !defined(RGB_MATRIX_SPD_STEP) + #define RGB_MATRIX_SPD_STEP 16 #endif bool g_suspend_state = false; -// Global tick at 20 Hz -uint32_t g_tick = 0; - -// Ticks since this key was last hit. -uint8_t g_key_hit[DRIVER_LED_TOTAL]; +rgb_config_t rgb_matrix_config; -// Ticks since any key was last hit. -uint32_t g_any_key_hit = 0; +rgb_counters_t g_rgb_counters; +static uint32_t rgb_counters_buffer; -#ifndef PI -#define PI 3.14159265 -#endif +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + last_hit_t g_last_hit_tracker; + static last_hit_t last_hit_buffer; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED uint32_t eeconfig_read_rgb_matrix(void) { return eeprom_read_dword(EECONFIG_RGB_MATRIX); } + void eeconfig_update_rgb_matrix(uint32_t val) { eeprom_update_dword(EECONFIG_RGB_MATRIX, val); } + void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); rgb_matrix_config.enable = 1; @@ -90,11 +108,12 @@ void eeconfig_update_rgb_matrix_default(void) { rgb_matrix_config.mode = RGB_MATRIX_SOLID_COLOR; #endif rgb_matrix_config.hue = 0; - rgb_matrix_config.sat = 255; + rgb_matrix_config.sat = UINT8_MAX; rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; - rgb_matrix_config.speed = 0; + rgb_matrix_config.speed = UINT8_MAX / 2; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } + void eeconfig_debug_rgb_matrix(void) { dprintf("rgb_matrix_config eprom\n"); dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); @@ -105,710 +124,330 @@ void eeconfig_debug_rgb_matrix(void) { dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); } -// Last led hit -#define LED_HITS_TO_REMEMBER 8 -uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; -uint8_t g_last_led_count = 0; - -void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) { - rgb_led led; - *led_count = 0; - - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - // map_index_to_led(i, &led); - led = g_rgb_leds[i]; - if (row == led.matrix_co.row && column == led.matrix_co.col) { - led_i[*led_count] = i; - (*led_count)++; - } +uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { + // TODO: This is kinda expensive, fix this soonish + uint8_t led_count = 0; + for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) { + matrix_co_t matrix_co = g_rgb_leds[i].matrix_co; + if (row == matrix_co.row && column == matrix_co.col) { + led_i[led_count] = i; + led_count++; } + } + return led_count; } void rgb_matrix_update_pwm_buffers(void) { - rgb_matrix_driver.flush(); + rgb_matrix_driver.flush(); } void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { - rgb_matrix_driver.set_color(index, red, green, blue); + rgb_matrix_driver.set_color(index, red, green, blue); } void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { - rgb_matrix_driver.set_color_all(red, green, blue); + rgb_matrix_driver.set_color_all(red, green, blue); } bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { - if ( record->event.pressed ) { - uint8_t led[8], led_count; - map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); - if (led_count > 0) { - for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) { - g_last_led_hit[i - 1] = g_last_led_hit[i - 2]; - } - g_last_led_hit[0] = led[0]; - g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1); - } - for(uint8_t i = 0; i < led_count; i++) - g_key_hit[led[i]] = 0; - g_any_key_hit = 0; - } else { - #ifdef RGB_MATRIX_KEYRELEASES - uint8_t led[8], led_count; - map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); - for(uint8_t i = 0; i < led_count; i++) - g_key_hit[led[i]] = 255; - - g_any_key_hit = 255; - #endif - } - return true; -} +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = 0; + +#if defined(RGB_MATRIX_KEYRELEASES) + if (!record->event.pressed) { + led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); + g_rgb_counters.any_key_hit = 0; + } +#elif defined(RGB_MATRIX_KEYPRESSES) + if (record->event.pressed) { + led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); + g_rgb_counters.any_key_hit = 0; + } +#endif // defined(RGB_MATRIX_KEYRELEASES) + + if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { + memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit + memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); + last_hit_buffer.count--; + } -void rgb_matrix_set_suspend_state(bool state) { - g_suspend_state = state; + for(uint8_t i = 0; i < led_count; i++) { + uint8_t index = last_hit_buffer.count; + last_hit_buffer.x[index] = g_rgb_leds[led[i]].point.x; + last_hit_buffer.y[index] = g_rgb_leds[led[i]].point.y; + last_hit_buffer.index[index] = led[i]; + last_hit_buffer.tick[index] = 0; + last_hit_buffer.count++; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + return true; } void rgb_matrix_test(void) { - // Mask out bits 4 and 5 - // Increase the factor to make the test animation slower (and reduce to make it faster) - uint8_t factor = 10; - switch ( (g_tick & (0b11 << factor)) >> factor ) - { - case 0: - { - rgb_matrix_set_color_all( 20, 0, 0 ); - break; - } - case 1: - { - rgb_matrix_set_color_all( 0, 20, 0 ); - break; - } - case 2: - { - rgb_matrix_set_color_all( 0, 0, 20 ); - break; - } - case 3: - { - rgb_matrix_set_color_all( 20, 20, 20 ); - break; - } + // Mask out bits 4 and 5 + // Increase the factor to make the test animation slower (and reduce to make it faster) + uint8_t factor = 10; + switch ( (g_rgb_counters.tick & (0b11 << factor)) >> factor ) + { + case 0: { + rgb_matrix_set_color_all( 20, 0, 0 ); + break; } -} - -// All LEDs off -void rgb_matrix_all_off(void) { - rgb_matrix_set_color_all( 0, 0, 0 ); -} - -// Solid color -void rgb_matrix_solid_color(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color_all( rgb.r, rgb.g, rgb.b ); -} - -void rgb_matrix_solid_reactive(void) { - // Relies on hue being 8-bit and wrapping - for ( int i=0; i 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - // Divide delta by 4, this gives the delta per row - deltaH /= 4; - - int16_t s1 = rgb_matrix_config.sat; - int16_t s2 = rgb_matrix_config.hue; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv = { .h = 0, .s = 255, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - for ( int i=0; i>4); - // Relies on hue being 8-bit and wrapping - hsv.h = rgb_matrix_config.hue + ( deltaH * y ); - hsv.s = rgb_matrix_config.sat + ( deltaS * y ); - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} - -void rgb_matrix_raindrops(bool initialize) { - int16_t h1 = rgb_matrix_config.hue; - int16_t h2 = (rgb_matrix_config.hue + 180) % 360; - int16_t deltaH = h2 - h1; - deltaH /= 4; - - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; + case 1: { + rgb_matrix_set_color_all( 0, 20, 0 ); + break; } - else if ( deltaH < -127 ) - { - deltaH += 256; + case 2: { + rgb_matrix_set_color_all( 0, 0, 20 ); + break; } - - int16_t s1 = rgb_matrix_config.sat; - int16_t s2 = rgb_matrix_config.sat; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv; - RGB rgb; - - // Change one LED every tick, make sure speed is not 0 - uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255; - - for ( int i=0; iinit) { + return false; + } -void rgb_matrix_dual_beacon(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - double cos_value = cos(g_tick * PI / 128) / 32; - double sin_value = sin(g_tick * PI / 128) / 112; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = ((point.y - 32.0)* cos_value + (point.x - 112.0) * sin_value) * (180) + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, 0, 0, 0); + } + return led_max < DRIVER_LED_TOTAL; } -void rgb_matrix_rainbow_beacon(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - double cos_value = cos(g_tick * PI / 128); - double sin_value = sin(g_tick * PI / 128); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.y - 32.0)* cos_value + (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.x - 112.0) * sin_value + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} +static uint8_t rgb_last_enable = UINT8_MAX; +static uint8_t rgb_last_effect = UINT8_MAX; +static effect_params_t rgb_effect_params = { 0, 0 }; +static rgb_task_states rgb_task_state = SYNCING; -void rgb_matrix_rainbow_pinwheels(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - double cos_value = cos(g_tick * PI / 128); - double sin_value = sin(g_tick * PI / 128); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = (2 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.y - 32.0)* cos_value + (2 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (66 - abs(point.x - 112.0)) * sin_value + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); +static void rgb_task_timers(void) { + // Update double buffer timers + uint16_t deltaTime = timer_elapsed32(rgb_counters_buffer); + rgb_counters_buffer = timer_read32(); + if (g_rgb_counters.any_key_hit < UINT32_MAX) { + if (UINT32_MAX - deltaTime < g_rgb_counters.any_key_hit) { + g_rgb_counters.any_key_hit = UINT32_MAX; + } else { + g_rgb_counters.any_key_hit += deltaTime; } -} + } -void rgb_matrix_rainbow_moving_chevron(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - uint8_t r = 128; - double cos_value = cos(r * PI / 128); - double sin_value = sin(r * PI / 128); - double multiplier = (g_tick / 256.0 * 224); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * abs(point.y - 32.0)* sin_value + (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.x - multiplier) * cos_value + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); + // Update double buffer last hit timers +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + uint8_t count = last_hit_buffer.count; + for (uint8_t i = 0; i < count; ++i) { + if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) { + last_hit_buffer.count--; + continue; } -} - - -void rgb_matrix_jellybean_raindrops( bool initialize ) { - HSV hsv; - RGB rgb; + last_hit_buffer.tick[i] += deltaTime; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +} + +static void rgb_task_sync(void) { + // next task + if (timer_elapsed32(g_rgb_counters.tick) >= RGB_MATRIX_LED_FLUSH_LIMIT) + rgb_task_state = STARTING; +} + +static void rgb_task_start(void) { + // reset iter + rgb_effect_params.iter = 0; + + // update double buffers + g_rgb_counters.tick = rgb_counters_buffer; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + g_last_hit_tracker = last_hit_buffer; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + + // next task + rgb_task_state = RENDERING; +} + +static void rgb_task_render(uint8_t effect) { + bool rendering = false; + rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable); + + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch (effect) { + case RGB_MATRIX_NONE: + rendering = rgb_matrix_none(&rgb_effect_params); + break; + + case RGB_MATRIX_SOLID_COLOR: + rendering = rgb_matrix_solid_color(&rgb_effect_params); // Max 1ms Avg 0ms + break; +#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS + case RGB_MATRIX_ALPHAS_MODS: + rendering = rgb_matrix_alphas_mods(&rgb_effect_params); // Max 2ms Avg 1ms + break; +#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS +#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + case RGB_MATRIX_GRADIENT_UP_DOWN: + rendering = rgb_matrix_gradient_up_down(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#ifndef DISABLE_RGB_MATRIX_BREATHING + case RGB_MATRIX_BREATHING: + rendering = rgb_matrix_breathing(&rgb_effect_params); // Max 1ms Avg 0ms + break; +#endif // DISABLE_RGB_MATRIX_BREATHING +#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL + case RGB_MATRIX_CYCLE_ALL: + rendering = rgb_matrix_cycle_all(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_CYCLE_ALL +#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + case RGB_MATRIX_CYCLE_LEFT_RIGHT: + rendering = rgb_matrix_cycle_left_right(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + case RGB_MATRIX_CYCLE_UP_DOWN: + rendering = rgb_matrix_cycle_up_down(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + case RGB_MATRIX_RAINBOW_MOVING_CHEVRON: + rendering = rgb_matrix_rainbow_moving_chevron(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON + case RGB_MATRIX_DUAL_BEACON: + rendering = rgb_matrix_dual_beacon(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_DUAL_BEACON +#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON + case RGB_MATRIX_RAINBOW_BEACON: + rendering = rgb_matrix_rainbow_beacon(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON +#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + case RGB_MATRIX_RAINBOW_PINWHEELS: + rendering = rgb_matrix_rainbow_pinwheels(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#ifndef DISABLE_RGB_MATRIX_RAINDROPS + case RGB_MATRIX_RAINDROPS: + rendering = rgb_matrix_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms + break; +#endif // DISABLE_RGB_MATRIX_RAINDROPS +#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + case RGB_MATRIX_JELLYBEAN_RAINDROPS: + rendering = rgb_matrix_jellybean_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms + break; +#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN + case RGB_MATRIX_DIGITAL_RAIN: + rendering = rgb_matrix_digital_rain(&rgb_effect_params); // Max 9ms Avg 8ms | this is expensive, fix it + break; +#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + case RGB_MATRIX_SOLID_REACTIVE_SIMPLE: + rendering = rgb_matrix_solid_reactive_simple(&rgb_effect_params);// Max 4ms Avg 3ms + break; +#endif +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE + case RGB_MATRIX_SOLID_REACTIVE: + rendering = rgb_matrix_solid_reactive(&rgb_effect_params); // Max 4ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE +#ifndef DISABLE_RGB_MATRIX_SPLASH + case RGB_MATRIX_SPLASH: + rendering = rgb_matrix_splash(&rgb_effect_params); // Max 5ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_SPLASH +#ifndef DISABLE_RGB_MATRIX_MULTISPLASH + case RGB_MATRIX_MULTISPLASH: + rendering = rgb_matrix_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms + break; +#endif // DISABLE_RGB_MATRIX_MULTISPLASH +#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH + case RGB_MATRIX_SOLID_SPLASH: + rendering = rgb_matrix_solid_splash(&rgb_effect_params); // Max 5ms Avg 3ms + break; +#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH +#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + case RGB_MATRIX_SOLID_MULTISPLASH: + rendering = rgb_matrix_solid_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms + break; +#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - // Change one LED every tick, make sure speed is not 0 - uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255; + // Factory default magic value + case UINT8_MAX: { + rgb_matrix_test(); + rgb_task_state = FLUSHING; + } + return; + } - for ( int i=0; i 0 && map[col][row] < max_intensity) { - // neither fully bright nor dark, decay it - map[col][row]--; - } - // set the pixel colour - uint8_t led, led_count; - map_row_column_to_led(row, col, &led, &led_count); - - if (map[col][row] > pure_green_intensity) { - const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost - * (map[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity)); - rgb_matrix_set_color(led, boost, max_intensity, boost); - } - else { - const uint8_t green = (uint8_t) ((uint16_t) max_intensity * map[col][row] / pure_green_intensity); - rgb_matrix_set_color(led, 0, green, 0); - } - } - } - if (++drop > drop_ticks) { - // reset drop timer - drop = 0; - for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - // if ths is on the bottom row and bright allow decay - if (row == MATRIX_ROWS - 1 && map[col][row] == max_intensity) { - map[col][row]--; - } - // check if the pixel above is bright - if (map[col][row - 1] == max_intensity) { - // allow old bright pixel to decay - map[col][row - 1]--; - // make this pixel bright - map[col][row] = max_intensity; - } - } - } - } -} + // update pwm buffers + rgb_matrix_update_pwm_buffers(); -void rgb_matrix_multisplash(void) { - // if (g_any_key_hit < 0xFF) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - rgb_led led; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - uint16_t c = 0, d = 0; - rgb_led last_led; - // if (g_last_led_count) { - for (uint8_t last_i = 0; last_i < g_last_led_count; last_i++) { - last_led = g_rgb_leds[g_last_led_hit[last_i]]; - uint16_t dist = (uint16_t)sqrt(pow(led.point.x - last_led.point.x, 2) + pow(led.point.y - last_led.point.y, 2)); - uint16_t effect = (g_key_hit[g_last_led_hit[last_i]] << 2) - dist; - c += MIN(MAX(effect, 0), 255); - d += 255 - MIN(MAX(effect, 0), 255); - } - // } else { - // d = 255; - // } - hsv.h = (rgb_matrix_config.hue + c) % 256; - hsv.v = MAX(MIN(d, 255), 0); - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } - // } else { - // rgb_matrix_set_color_all( 0, 0, 0 ); - // } -} - - -void rgb_matrix_splash(void) { - g_last_led_count = MIN(g_last_led_count, 1); - rgb_matrix_multisplash(); -} - - -void rgb_matrix_solid_multisplash(void) { - // if (g_any_key_hit < 0xFF) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - rgb_led led; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - uint16_t d = 0; - rgb_led last_led; - // if (g_last_led_count) { - for (uint8_t last_i = 0; last_i < g_last_led_count; last_i++) { - last_led = g_rgb_leds[g_last_led_hit[last_i]]; - uint16_t dist = (uint16_t)sqrt(pow(led.point.x - last_led.point.x, 2) + pow(led.point.y - last_led.point.y, 2)); - uint16_t effect = (g_key_hit[g_last_led_hit[last_i]] << 2) - dist; - d += 255 - MIN(MAX(effect, 0), 255); - } - // } else { - // d = 255; - // } - hsv.v = MAX(MIN(d, 255), 0); - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } - // } else { - // rgb_matrix_set_color_all( 0, 0, 0 ); - // } -} - - -void rgb_matrix_solid_splash(void) { - g_last_led_count = MIN(g_last_led_count, 1); - rgb_matrix_solid_multisplash(); -} - - -// Needs eeprom access that we don't have setup currently - -void rgb_matrix_custom(void) { -// HSV hsv; -// RGB rgb; -// for ( int i=0; i 0 && g_any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20)); - uint8_t effect = suspend_backlight ? 0 : rgb_matrix_config.mode; - - #ifdef TRACK_PREVIOUS_EFFECT - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - - static uint8_t effect_last = 255; - bool initialize = (effect != effect_last) || (rgb_matrix_config.enable != toggle_enable_last); - effect_last = effect; - toggle_enable_last = rgb_matrix_config.enable; - #endif - - // this gets ticked at 20 Hz. - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch ( effect ) { - case RGB_MATRIX_SOLID_COLOR: - rgb_matrix_solid_color(); - break; - #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - case RGB_MATRIX_ALPHAS_MODS: - rgb_matrix_alphas_mods(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON - case RGB_MATRIX_DUAL_BEACON: - rgb_matrix_dual_beacon(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - case RGB_MATRIX_GRADIENT_UP_DOWN: - rgb_matrix_gradient_up_down(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINDROPS - case RGB_MATRIX_RAINDROPS: - rgb_matrix_raindrops( initialize ); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - case RGB_MATRIX_CYCLE_ALL: - rgb_matrix_cycle_all(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - case RGB_MATRIX_CYCLE_LEFT_RIGHT: - rgb_matrix_cycle_left_right(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - case RGB_MATRIX_CYCLE_UP_DOWN: - rgb_matrix_cycle_up_down(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON - case RGB_MATRIX_RAINBOW_BEACON: - rgb_matrix_rainbow_beacon(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - case RGB_MATRIX_RAINBOW_PINWHEELS: - rgb_matrix_rainbow_pinwheels(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - case RGB_MATRIX_RAINBOW_MOVING_CHEVRON: - rgb_matrix_rainbow_moving_chevron(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - case RGB_MATRIX_JELLYBEAN_RAINDROPS: - rgb_matrix_jellybean_raindrops( initialize ); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN - case RGB_MATRIX_DIGITAL_RAIN: - rgb_matrix_digital_rain( initialize ); - break; - #endif - #ifdef RGB_MATRIX_KEYPRESSES - #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE - case RGB_MATRIX_SOLID_REACTIVE: - rgb_matrix_solid_reactive(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - case RGB_MATRIX_SOLID_REACTIVE_SIMPLE: - rgb_matrix_solid_reactive_simple(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SPLASH - case RGB_MATRIX_SPLASH: - rgb_matrix_splash(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_MULTISPLASH - case RGB_MATRIX_MULTISPLASH: - rgb_matrix_multisplash(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH - case RGB_MATRIX_SOLID_SPLASH: - rgb_matrix_solid_splash(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - case RGB_MATRIX_SOLID_MULTISPLASH: - rgb_matrix_solid_multisplash(); - break; - #endif - #endif - default: - rgb_matrix_custom(); - break; - } - - if ( ! suspend_backlight ) { - rgb_matrix_indicators(); - } + rgb_task_timers(); + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && RGB_DISABLE_WHEN_USB_SUSPENDED) || (RGB_DISABLE_AFTER_TIMEOUT > 0 && g_rgb_counters.any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20)); + uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; + + switch (rgb_task_state) { + case STARTING: + rgb_task_start(); + break; + case RENDERING: + rgb_task_render(effect); + break; + case FLUSHING: + rgb_task_flush(effect); + break; + case SYNCING: + rgb_task_sync(); + break; + } + if (!suspend_backlight) { + rgb_matrix_indicators(); + } } void rgb_matrix_indicators(void) { - rgb_matrix_indicators_kb(); - rgb_matrix_indicators_user(); + rgb_matrix_indicators_kb(); + rgb_matrix_indicators_user(); } __attribute__((weak)) @@ -817,103 +456,54 @@ void rgb_matrix_indicators_kb(void) {} __attribute__((weak)) void rgb_matrix_indicators_user(void) {} - -// void rgb_matrix_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) -// { -// if ( row >= MATRIX_ROWS ) -// { -// // Special value, 255=none, 254=all -// *index = row; -// } -// else -// { -// // This needs updated to something like -// // uint8_t led[8], led_count; -// // map_row_column_to_led(row,column,led,&led_count); -// // for(uint8_t i = 0; i < led_count; i++) -// map_row_column_to_led( row, column, index ); -// } -// } - void rgb_matrix_init(void) { rgb_matrix_driver.init(); // TODO: put the 1 second startup delay here? - // clear the key hits - for ( int led=0; ledh = eeprom_read_byte(address); -// hsv->s = eeprom_read_byte(address+1); -// hsv->v = eeprom_read_byte(address+2); -// } - -// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ) -// { -// uint8_t led[8], led_count; -// map_row_column_to_led(row,column,led,&led_count); -// for(uint8_t i = 0; i < led_count; i++) { -// if ( led[i] < DRIVER_LED_TOTAL ) -// { -// void *address = backlight_get_custom_key_color_eeprom_address(led[i]); -// eeprom_update_byte(address, hsv.h); -// eeprom_update_byte(address+1, hsv.s); -// eeprom_update_byte(address+2, hsv.v); -// } -// } -// } - -uint32_t rgb_matrix_get_tick(void) { - return g_tick; +void rgb_matrix_set_suspend_state(bool state) { + g_suspend_state = state; } void rgb_matrix_toggle(void) { - rgb_matrix_config.enable ^= 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.enable ^= 1; + if (!rgb_matrix_config.enable) { + rgb_task_state = STARTING; + } + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_enable(void) { rgb_matrix_config.enable = 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_enable_noeeprom(void) { @@ -922,7 +512,7 @@ void rgb_matrix_enable_noeeprom(void) { void rgb_matrix_disable(void) { rgb_matrix_config.enable = 0; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_disable_noeeprom(void) { @@ -930,76 +520,79 @@ void rgb_matrix_disable_noeeprom(void) { } void rgb_matrix_step(void) { - rgb_matrix_config.mode++; - if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) - rgb_matrix_config.mode = 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.mode++; + if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) + rgb_matrix_config.mode = 1; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_step_reverse(void) { - rgb_matrix_config.mode--; - if (rgb_matrix_config.mode < 1) - rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.mode--; + if (rgb_matrix_config.mode < 1) + rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_hue(void) { - rgb_matrix_config.hue = increment( rgb_matrix_config.hue, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.hue += RGB_MATRIX_HUE_STEP; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_hue(void) { - rgb_matrix_config.hue = decrement( rgb_matrix_config.hue, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.hue -= RGB_MATRIX_HUE_STEP; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_sat(void) { - rgb_matrix_config.sat = increment( rgb_matrix_config.sat, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.sat = qadd8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_sat(void) { - rgb_matrix_config.sat = decrement( rgb_matrix_config.sat, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.sat = qsub8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_val(void) { - rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.val = qadd8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); + if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) + rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_val(void) { - rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.val = qsub8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_speed(void) { - rgb_matrix_config.speed = increment( rgb_matrix_config.speed, 1, 0, 3 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this + rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this } void rgb_matrix_decrease_speed(void) { - rgb_matrix_config.speed = decrement( rgb_matrix_config.speed, 1, 0, 3 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this + rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this } void rgb_matrix_mode(uint8_t mode) { - rgb_matrix_config.mode = mode; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.mode = mode; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_mode_noeeprom(uint8_t mode) { - rgb_matrix_config.mode = mode; + rgb_matrix_config.mode = mode; } uint8_t rgb_matrix_get_mode(void) { - return rgb_matrix_config.mode; + return rgb_matrix_config.mode; } void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { - rgb_matrix_config.hue = hue; - rgb_matrix_config.sat = sat; - rgb_matrix_config.val = val; + rgb_matrix_sethsv_noeeprom(hue, sat, val); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } @@ -1007,4 +600,6 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_config.hue = hue; rgb_matrix_config.sat = sat; rgb_matrix_config.val = val; + if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) + rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index e6acd2d4b512..855ea03230f2 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -21,32 +21,33 @@ #include #include +#include "rgb_matrix_types.h" #include "color.h" #include "quantum.h" #ifdef IS31FL3731 - #include "is31fl3731.h" + #include "is31fl3731.h" #elif defined (IS31FL3733) - #include "is31fl3733.h" + #include "is31fl3733.h" #endif -typedef struct Point { - uint8_t x; - uint8_t y; -} __attribute__((packed)) Point; +#ifndef RGB_MATRIX_LED_FLUSH_LIMIT + #define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#endif -typedef struct rgb_led { - union { - uint8_t raw; - struct { - uint8_t row:4; // 16 max - uint8_t col:4; // 16 max - }; - } matrix_co; - Point point; - uint8_t modifier:1; -} __attribute__((packed)) rgb_led; +#ifndef RGB_MATRIX_LED_PROCESS_LIMIT + #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 +#endif +#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL +#define RGB_MATRIX_USE_LIMITS(min, max) uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) \ + max = DRIVER_LED_TOTAL; +#else +#define RGB_MATRIX_USE_LIMITS(min, max) uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; +#endif extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; @@ -56,79 +57,73 @@ typedef struct uint8_t index; } rgb_indicator; -typedef union { - uint32_t raw; - struct { - bool enable :1; - uint8_t mode :6; - uint16_t hue :9; - uint8_t sat :8; - uint8_t val :8; - uint8_t speed :8;//EECONFIG needs to be increased to support this - }; -} rgb_config_t; - enum rgb_matrix_effects { + RGB_MATRIX_NONE = 0, RGB_MATRIX_SOLID_COLOR = 1, #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - RGB_MATRIX_ALPHAS_MODS, -#endif -#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON - RGB_MATRIX_DUAL_BEACON, -#endif + RGB_MATRIX_ALPHAS_MODS, +#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - RGB_MATRIX_GRADIENT_UP_DOWN, -#endif -#ifndef DISABLE_RGB_MATRIX_RAINDROPS - RGB_MATRIX_RAINDROPS, -#endif + RGB_MATRIX_GRADIENT_UP_DOWN, +#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#ifndef DISABLE_RGB_MATRIX_BREATHING + RGB_MATRIX_BREATHING, +#endif // DISABLE_RGB_MATRIX_BREATHING #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - RGB_MATRIX_CYCLE_ALL, -#endif + RGB_MATRIX_CYCLE_ALL, +#endif // DISABLE_RGB_MATRIX_CYCLE_ALL #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - RGB_MATRIX_CYCLE_LEFT_RIGHT, -#endif + RGB_MATRIX_CYCLE_LEFT_RIGHT, +#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - RGB_MATRIX_CYCLE_UP_DOWN, -#endif + RGB_MATRIX_CYCLE_UP_DOWN, +#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, +#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON + RGB_MATRIX_DUAL_BEACON, +#endif // DISABLE_RGB_MATRIX_DUAL_BEACON #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON - RGB_MATRIX_RAINBOW_BEACON, -#endif + RGB_MATRIX_RAINBOW_BEACON, +#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - RGB_MATRIX_RAINBOW_PINWHEELS, -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - RGB_MATRIX_RAINBOW_MOVING_CHEVRON, -#endif + RGB_MATRIX_RAINBOW_PINWHEELS, +#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#ifndef DISABLE_RGB_MATRIX_RAINDROPS + RGB_MATRIX_RAINDROPS, +#endif // DISABLE_RGB_MATRIX_RAINDROPS #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - RGB_MATRIX_JELLYBEAN_RAINDROPS, -#endif + RGB_MATRIX_JELLYBEAN_RAINDROPS, +#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN - RGB_MATRIX_DIGITAL_RAIN, -#endif -#ifdef RGB_MATRIX_KEYPRESSES - #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE - RGB_MATRIX_SOLID_REACTIVE, - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - RGB_MATRIX_SOLID_REACTIVE_SIMPLE, - #endif - #ifndef DISABLE_RGB_MATRIX_SPLASH - RGB_MATRIX_SPLASH, - #endif - #ifndef DISABLE_RGB_MATRIX_MULTISPLASH - RGB_MATRIX_MULTISPLASH, - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH - RGB_MATRIX_SOLID_SPLASH, - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - RGB_MATRIX_SOLID_MULTISPLASH, - #endif -#endif - RGB_MATRIX_EFFECT_MAX + RGB_MATRIX_DIGITAL_RAIN, +#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + RGB_MATRIX_SOLID_REACTIVE_SIMPLE, +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE + RGB_MATRIX_SOLID_REACTIVE, +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE +#ifndef DISABLE_RGB_MATRIX_SPLASH + RGB_MATRIX_SPLASH, +#endif // DISABLE_RGB_MATRIX_SPLASH +#ifndef DISABLE_RGB_MATRIX_MULTISPLASH + RGB_MATRIX_MULTISPLASH, +#endif // DISABLE_RGB_MATRIX_MULTISPLASH +#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH + RGB_MATRIX_SOLID_SPLASH, +#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH +#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + RGB_MATRIX_SOLID_MULTISPLASH, +#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + RGB_MATRIX_EFFECT_MAX }; +uint8_t rgb_matrix_map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i); + void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); @@ -162,8 +157,6 @@ void rgb_matrix_decrease(void); // void backlight_get_key_color( uint8_t led, HSV *hsv ); // void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ); -uint32_t rgb_matrix_get_tick(void); - void rgb_matrix_toggle(void); void rgb_matrix_enable(void); void rgb_matrix_enable_noeeprom(void); @@ -212,7 +205,6 @@ uint8_t rgb_matrix_get_mode(void); typedef struct { /* Perform any initialisation required for the other driver functions to work. */ void (*init)(void); - /* Set the colour of a single LED in the buffer. */ void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); /* Set the colour of all LEDS on the keyboard in the buffer. */ diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h new file mode 100644 index 000000000000..cc1914d7f4f6 --- /dev/null +++ b/quantum/rgb_matrix_animations/alpha_mods_anim.h @@ -0,0 +1,26 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS + +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +// alphas = color1, mods = color2 +bool rgb_matrix_alphas_mods(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + RGB rgb1 = hsv_to_rgb(hsv); + hsv.h += rgb_matrix_config.speed; + RGB rgb2 = hsv_to_rgb(hsv); + + for (uint8_t i = led_min; i < led_max; i++) { + if (g_rgb_leds[i].modifier) { + rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); + } else { + rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h new file mode 100644 index 000000000000..fb90b66bdf06 --- /dev/null +++ b/quantum/rgb_matrix_animations/breathing_anim.h @@ -0,0 +1,19 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_BREATHING + +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_breathing(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8); + uint8_t val = scale8(abs8(sin8(time) - 128) * 2, rgb_matrix_config.val); + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val }; + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_BREATHING diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h new file mode 100644 index 000000000000..5c18cfa0c912 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h @@ -0,0 +1,21 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_cycle_all(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + hsv.h = time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_CYCLE_ALL diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h new file mode 100644 index 000000000000..f519aeb476fa --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h @@ -0,0 +1,22 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_cycle_left_right(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + hsv.h = point.x - time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h new file mode 100644 index 000000000000..8b91d890de3f --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h @@ -0,0 +1,22 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_cycle_up_down(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + hsv.h = point.y - time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h new file mode 100644 index 000000000000..4ba3c1c87d62 --- /dev/null +++ b/quantum/rgb_matrix_animations/digital_rain_anim.h @@ -0,0 +1,74 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN + +#ifndef RGB_DIGITAL_RAIN_DROPS + // lower the number for denser effect/wider keyboard + #define RGB_DIGITAL_RAIN_DROPS 24 +#endif + +bool rgb_matrix_digital_rain(effect_params_t* params) { + // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain + const uint8_t drop_ticks = 28; + const uint8_t pure_green_intensity = 0xd0; + const uint8_t max_brightness_boost = 0xc0; + const uint8_t max_intensity = 0xff; + + static uint8_t map[MATRIX_COLS][MATRIX_ROWS] = {{0}}; + static uint8_t drop = 0; + + if (params->init) { + rgb_matrix_set_color_all(0, 0, 0); + memset(map, 0, sizeof map); + drop = 0; + } + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) { + // top row, pixels have just fallen and we're + // making a new rain drop in this column + map[col][row] = max_intensity; + } + else if (map[col][row] > 0 && map[col][row] < max_intensity) { + // neither fully bright nor dark, decay it + map[col][row]--; + } + // set the pixel colour + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led); + + // TODO: multiple leds are supported mapped to the same row/column + if (led_count > 0) { + if (map[col][row] > pure_green_intensity) { + const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (map[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity)); + rgb_matrix_set_color(led[0], boost, max_intensity, boost); + } + else { + const uint8_t green = (uint8_t) ((uint16_t) max_intensity * map[col][row] / pure_green_intensity); + rgb_matrix_set_color(led[0], 0, green, 0); + } + } + } + } + if (++drop > drop_ticks) { + // reset drop timer + drop = 0; + for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + // if ths is on the bottom row and bright allow decay + if (row == MATRIX_ROWS - 1 && map[col][row] == max_intensity) { + map[col][row]--; + } + // check if the pixel above is bright + if (map[col][row - 1] == max_intensity) { + // allow old bright pixel to decay + map[col][row - 1]--; + // make this pixel bright + map[col][row] = max_intensity; + } + } + } + } + return false; +} + +#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h new file mode 100644 index 000000000000..dda315780940 --- /dev/null +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -0,0 +1,24 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_dual_beacon(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + int8_t cos_value = cos8(time) - 128; + int8_t sin_value = sin8(time) - 128; + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_DUAL_BEACON diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h new file mode 100644 index 000000000000..11498e22f5c3 --- /dev/null +++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h @@ -0,0 +1,22 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_gradient_up_down(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t scale = scale8(64, rgb_matrix_config.speed); + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + // The y range will be 0..64, map this to 0..4 + // Relies on hue being 8-bit and wrapping + hsv.h = rgb_matrix_config.hue + scale * (point.y >> 4); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} +#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h new file mode 100644 index 000000000000..01ff5c230605 --- /dev/null +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h @@ -0,0 +1,30 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +static void jellybean_raindrops_set_color(int i) { + HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val }; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); +} + +bool rgb_matrix_jellybean_raindrops(effect_params_t* params) { + if (!params->init) { + // Change one LED every tick, make sure speed is not 0 + if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { + jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL); + } + return false; + } + + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (int i = led_min; i < led_max; i++) { + jellybean_raindrops_set_color(i); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h new file mode 100644 index 000000000000..3c15e64ab661 --- /dev/null +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -0,0 +1,24 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_rainbow_beacon(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + int16_t cos_value = 2 * (cos8(time) - 128); + int16_t sin_value = 2 * (sin8(time) - 128); + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h new file mode 100644 index 000000000000..0d11d52802be --- /dev/null +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h @@ -0,0 +1,22 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h new file mode 100644 index 000000000000..d7cd42cbe849 --- /dev/null +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -0,0 +1,24 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + +extern rgb_counters_t g_rgb_counters; +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + int16_t cos_value = 3 * (cos8(time) - 128); + int16_t sin_value = 3 * (sin8(time) - 128); + for (uint8_t i = led_min; i < led_max; i++) { + point_t point = g_rgb_leds[i].point; + hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h new file mode 100644 index 000000000000..fc721375b05f --- /dev/null +++ b/quantum/rgb_matrix_animations/raindrops_anim.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef DISABLE_RGB_MATRIX_RAINDROPS +#include "rgb_matrix_types.h" + +extern rgb_counters_t g_rgb_counters; +extern rgb_config_t rgb_matrix_config; + +static void raindrops_set_color(int i) { + HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val }; + + // Take the shortest path between hues + int16_t deltaH = ((rgb_matrix_config.hue + 180) % 360 - rgb_matrix_config.hue) / 4; + if (deltaH > 127) { + deltaH -= 256; + } else if (deltaH < -127) { + deltaH += 256; + } + + hsv.h = rgb_matrix_config.hue + (deltaH * (rand() & 0x03)); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); +} + +bool rgb_matrix_raindrops(effect_params_t* params) { + if (!params->init) { + // Change one LED every tick, make sure speed is not 0 + if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { + raindrops_set_color(rand() % DRIVER_LED_TOTAL); + } + return false; + } + + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (int i = led_min; i < led_max; i++) { + raindrops_set_color(i); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_RAINDROPS diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h new file mode 100644 index 000000000000..24a197beb34d --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_color_anim.h @@ -0,0 +1,14 @@ +#pragma once + +extern rgb_config_t rgb_matrix_config; + +bool rgb_matrix_solid_color(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h new file mode 100644 index 000000000000..220e542331a5 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h @@ -0,0 +1,33 @@ +#pragma once +#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE + +extern rgb_config_t rgb_matrix_config; +extern last_hit_t g_last_hit_tracker; + +bool rgb_matrix_solid_reactive(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 255, rgb_matrix_config.val }; + // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 + uint16_t max_tick = 65535 / rgb_matrix_config.speed; + // Relies on hue being 8-bit and wrapping + for (uint8_t i = led_min; i < led_max; i++) { + uint16_t tick = max_tick; + for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { + if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { + tick = g_last_hit_tracker.tick[j]; + break; + } + } + + uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); + hsv.h = rgb_matrix_config.hue + qsub8(130, offset); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h new file mode 100644 index 000000000000..e84cd6939245 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -0,0 +1,32 @@ +#pragma once +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + +extern rgb_config_t rgb_matrix_config; +extern last_hit_t g_last_hit_tracker; + +bool rgb_matrix_solid_reactive_simple(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 + uint16_t max_tick = 65535 / rgb_matrix_config.speed; + for (uint8_t i = led_min; i < led_max; i++) { + uint16_t tick = max_tick; + for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { + if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { + tick = g_last_hit_tracker.tick[j]; + break; + } + } + + uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); + hsv.v = scale8(255 - offset, rgb_matrix_config.val); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h new file mode 100644 index 000000000000..82ac055b88d9 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h @@ -0,0 +1,42 @@ +#pragma once +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) + +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; +extern last_hit_t g_last_hit_tracker; + +static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t count = g_last_hit_tracker.count; + for (uint8_t i = led_min; i < led_max; i++) { + hsv.v = 0; + point_t point = g_rgb_leds[i].point; + for (uint8_t j = start; j < count; j++) { + int16_t dx = point.x - g_last_hit_tracker.x[j]; + int16_t dy = point.y - g_last_hit_tracker.y[j]; + uint8_t dist = sqrt16(dx * dx + dy * dy); + uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist; + if (effect > 255) + effect = 255; + hsv.v = qadd8(hsv.v, 255 - effect); + } + hsv.v = scale8(hsv.v, rgb_matrix_config.val); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +bool rgb_matrix_solid_multisplash(effect_params_t* params) { + return rgb_matrix_solid_multisplash_range(0, params); +} + +bool rgb_matrix_solid_splash(effect_params_t* params) { + return rgb_matrix_solid_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); +} + +#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h new file mode 100644 index 000000000000..829d30eef51e --- /dev/null +++ b/quantum/rgb_matrix_animations/splash_anim.h @@ -0,0 +1,44 @@ +#pragma once +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) + +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +extern rgb_config_t rgb_matrix_config; +extern last_hit_t g_last_hit_tracker; + +static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, 0 }; + uint8_t count = g_last_hit_tracker.count; + for (uint8_t i = led_min; i < led_max; i++) { + hsv.h = rgb_matrix_config.hue; + hsv.v = 0; + point_t point = g_rgb_leds[i].point; + for (uint8_t j = start; j < count; j++) { + int16_t dx = point.x - g_last_hit_tracker.x[j]; + int16_t dy = point.y - g_last_hit_tracker.y[j]; + uint8_t dist = sqrt16(dx * dx + dy * dy); + uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist; + if (effect > 255) + effect = 255; + hsv.h += effect; + hsv.v = qadd8(hsv.v, 255 - effect); + } + hsv.v = scale8(hsv.v, rgb_matrix_config.val); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +bool rgb_matrix_multisplash(effect_params_t* params) { + return rgb_matrix_multisplash_range(0, params); +} + +bool rgb_matrix_splash(effect_params_t* params) { + return rgb_matrix_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); +} + +#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h new file mode 100644 index 000000000000..f7643d2b0c81 --- /dev/null +++ b/quantum/rgb_matrix_types.h @@ -0,0 +1,90 @@ +#pragma once + +#include +#include + +#if defined(__GNUC__) +#define PACKED __attribute__ ((__packed__)) +#else +#define PACKED +#endif + +#if defined(_MSC_VER) +#pragma pack( push, 1 ) +#endif + +#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) + #define RGB_MATRIX_KEYREACTIVE_ENABLED +#endif + +// Last led hit +#ifndef LED_HITS_TO_REMEMBER + #define LED_HITS_TO_REMEMBER 8 +#endif // LED_HITS_TO_REMEMBER + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +typedef struct PACKED { + uint8_t count; + uint8_t x[LED_HITS_TO_REMEMBER]; + uint8_t y[LED_HITS_TO_REMEMBER]; + uint8_t index[LED_HITS_TO_REMEMBER]; + uint16_t tick[LED_HITS_TO_REMEMBER]; +} last_hit_t; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + +typedef enum rgb_task_states { + STARTING, + RENDERING, + FLUSHING, + SYNCING +} rgb_task_states; + +typedef uint8_t led_flags_t; + +typedef struct PACKED { + uint8_t iter; + led_flags_t flags; + bool init; +} effect_params_t; + +typedef struct PACKED { + // Global tick at 20 Hz + uint32_t tick; + // Ticks since this key was last hit. + uint32_t any_key_hit; +} rgb_counters_t; + +typedef struct PACKED { + uint8_t x; + uint8_t y; +} point_t; + +typedef union { + uint8_t raw; + struct { + uint8_t row:4; // 16 max + uint8_t col:4; // 16 max + }; +} matrix_co_t; + +typedef struct PACKED { + matrix_co_t matrix_co; + point_t point; + uint8_t modifier:1; +} rgb_led; + +typedef union { + uint32_t raw; + struct PACKED { + bool enable :1; + uint8_t mode :7; + uint8_t hue :8; + uint8_t sat :8; + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} rgb_config_t; + +#if defined(_MSC_VER) +#pragma pack( pop ) +#endif From ca19cd8bb8f76cbc12b4f6461cbc78438bda9563 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 2 Apr 2019 20:33:17 -0400 Subject: [PATCH 424/445] remove uneeded returns floating around --- users/stanrc85/stanrc85.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index 4a46d61daacb..78b0c4a1496e 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -77,7 +77,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); set_mods(mods); } - return false; break; case KC_RDP: //Opens Windows RDP if (!record->event.pressed) { @@ -88,7 +87,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { send_string_with_delay_P(PSTR("mstsc"), 10); send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); } - return false; break; } return process_record_keymap(keycode, record); From 6c865772372f1266189270571d3b87a7dd3a2ac6 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Wed, 3 Apr 2019 11:41:00 +0800 Subject: [PATCH 425/445] [Keyboard] fix dz60rgb response speed (#5540) --- keyboards/dztech/dz60rgb/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index 3a6f4bcc07ee..f43b39810f83 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -24,6 +24,8 @@ #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_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH From 1a625ae2c0c2cbbb5e4761b577d242c6f90e23ea Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed, 3 Apr 2019 09:18:00 -0400 Subject: [PATCH 426/445] Removed duplicated zeal60 files --- users/stanrc85/rgb_backlight.c | 1964 ----------------------- users/stanrc85/rgb_backlight.h | 110 -- users/stanrc85/rgb_backlight_api.h | 43 - users/stanrc85/rgb_backlight_keycodes.h | 34 - 4 files changed, 2151 deletions(-) delete mode 100644 users/stanrc85/rgb_backlight.c delete mode 100644 users/stanrc85/rgb_backlight.h delete mode 100644 users/stanrc85/rgb_backlight_api.h delete mode 100644 users/stanrc85/rgb_backlight_keycodes.h diff --git a/users/stanrc85/rgb_backlight.c b/users/stanrc85/rgb_backlight.c deleted file mode 100644 index dc5d7834b702..000000000000 --- a/users/stanrc85/rgb_backlight.c +++ /dev/null @@ -1,1964 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 . - */ -#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) || 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" - -#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 -#endif - -#define BACKLIGHT_EFFECT_MAX 10 - -backlight_config g_config = { - .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, - .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, - .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, - .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, - .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, - .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, - .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, - .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, - .brightness = 125, - .effect = RGB_BACKLIGHT_EFFECT, - .effect_speed = 0, - .color_1 = { .h = 0, .s = 255 }, - .color_2 = { .h = 150, .s = 255 }, - .caps_lock_indicator = { .color = { .h = 200, .s = 255 }, .index = 3-1 }, //purple - .layer_1_indicator = { .color = { .h = 100, .s = 255 }, .index = 60-1 }, //green - .layer_2_indicator = { .color = { .h = 150, .s = 255 }, .index = 60-1 }, //blue - .layer_3_indicator = { .color = { .h = 0, .s = 0 }, .index = 60-1 }, //white - .alphas_mods = { - RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, -#if defined(RGB_BACKLIGHT_M6_B) - .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } -#endif -}; - -bool g_suspend_state = false; -uint8_t g_indicator_state = 0; - -// Global tick at 20 Hz -uint32_t g_tick = 0; - -// Ticks since this key was last hit. -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_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 -#define ISSI_ADDR_2 0x76 - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_8, C2_8, C3_8}, // LA8 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C8_8, C7_8, C6_8}, // LA17 - - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_12, C2_12, C3_12}, // LB4 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - {0, C1_15, C2_15, C3_15}, // LB7 - {0, C1_16, C2_16, C3_16}, // LB8 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C9_15, C8_15, C6_14}, // LB15 - {0, C9_16, C7_15, C6_15}, // LB16 - {0, C8_16, C7_16, C6_16}, // LB17 - - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_6, C2_6, C3_6}, // LC6 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_7, C8_7, C6_6}, // LC15 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C8_8, C7_8, C6_8}, // LC17 - - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C9_13, C8_13, C7_13}, // LD13 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C9_16, C7_15, C6_15}, // LD16 - {1, C8_16, C7_16, C6_16}, // LD17 -}; -#endif // !defined(RGB_BACKLIGHT_M6_B) - - -typedef struct Point { - uint8_t x; - uint8_t y; -} Point; - - -// index in range 0..71 (LA0..LA17, LB0..LB17, LC0..LC17, LD0..LD17) -// point values in range x=0..224 y=0..64 -// origin is center of top-left key (i.e Esc) -#if defined (RGB_BACKLIGHT_ZEAL65) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} -}; -#elif defined (RGB_BACKLIGHT_KOYU) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} -}; -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, - {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, - // LB0..LB17 - {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, - {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, - {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, - // LD0..LD17 - {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 -// 1 2 4 -const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} -}; -const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} -}; -#endif - -// This may seem counter-intuitive, but it's quite flexible. -// For each LED, get it's position to decide what color to make it. -// This solves the issue of LEDs (and switches) not aligning to a grid, -// or having a large "bitmap" and sampling them. -void map_led_to_point( uint8_t index, Point *point ) -{ - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); - -#if defined (RGB_BACKLIGHT_M6_B) - return; -#endif - - switch (index) - { - case 18+4: // LB4A - if ( g_config.use_split_backspace ) - point->x -= 8; - break; -#if defined (RGB_BACKLIGHT_ZEAL60) - case 18+14: // LB14A - if ( g_config.use_iso_enter ) - point->y += 8; // extremely pedantic - break; - case 54+5: // LD5A - if ( !g_config.use_iso_enter ) - point->x -= 10; - break; - case 36+16: // LC16A - if ( !g_config.use_split_left_shift ) - point->x += 8; - break; -#endif -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) - case 36+0: // LC0A - if ( g_config.use_7u_spacebar ) - point->x += 10; - break; - case 36+6: // LC6A - if ( g_config.use_7u_spacebar ) - point->x += 4; - break; - case 54+7: // LD7A - if ( !g_config.use_split_right_shift ) - point->x -= 8; - break; -#endif - } -} - -void map_led_to_point_polar( uint8_t index, Point *point ) -{ - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); -} - -// -// Maps switch matrix coordinate (row,col) to LED index -// - - -#if defined (RGB_BACKLIGHT_ZEAL65) -// Note: Left spacebar stab is at 4,2 (LC7) -// Right spacebar stab is at 4,9 (D14) -// -// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 -// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 -// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 -// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 -// C17, C8, C7, ---, ---, ---, ---, C0, ---, D14, D15, D16, D17, B17, B16 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 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, 18+15 }, - { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } -}; -#elif defined(RGB_BACKLIGHT_KOYU) -// Note: Left spacebar stab is at 4,4 (LC6) -// Right spacebar stab is at 4,10 (D14) -// -// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B6 -// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B7 -// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B8 -// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 -// C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, B17, B16 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 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, 18+15 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } -}; -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) -// Note: Left spacebar stab is at 4,3 (LC6) -// Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) -// -// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, -// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, -// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, -// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, -// C17, C8, C7, C6, ---, ---, ---, C0, ---, D13, D14, D15, D16, D17, -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, - { 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 -// 1 2 4 -const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0, 3, 5, 1, 2, 4 } -}; -#endif - -void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) -{ - *led = 255; - if ( row < MATRIX_ROWS && column < MATRIX_COLS ) - { - *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); - } -} - -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 ); -#endif -} - -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 -} - -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 -} - -void backlight_set_key_hit(uint8_t row, uint8_t column) -{ - uint8_t led; - map_row_column_to_led(row,column,&led); - g_key_hit[led] = 0; - - g_any_key_hit = 0; -} - -#if !defined(RGB_BACKLIGHT_HS60) -// This is (F_CPU/1024) / 20 Hz -// = 15625 Hz / 20 Hz -// = 781 -#define TIMER3_TOP 781 - -void backlight_timer_init(void) -{ - static uint8_t backlight_timer_is_init = 0; - if ( backlight_timer_is_init ) - { - return; - } - backlight_timer_is_init = 1; - - // Timer 3 setup - TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP - _BV(CS32) | _BV(CS30); // prescale by /1024 - // Set TOP value - uint8_t sreg = SREG; - cli(); - - OCR3AH = (TIMER3_TOP >> 8) & 0xff; - OCR3AL = TIMER3_TOP & 0xff; - SREG = sreg; -} - -void backlight_timer_enable(void) -{ - TIMSK3 |= _BV(OCIE3A); -} - -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) -{ - g_suspend_state = state; -} - -void backlight_set_indicator_state(uint8_t state) -{ - g_indicator_state = state; -} - -void backlight_effect_rgb_test(void) -{ - // Mask out bits 4 and 5 - // This 2-bit value will stay the same for 16 ticks. - switch ( (g_tick & 0x30) >> 4 ) - { - case 0: - { - backlight_set_color_all( 255, 0, 0 ); - break; - } - case 1: - { - backlight_set_color_all( 0, 255, 0 ); - break; - } - case 2: - { - backlight_set_color_all( 0, 0, 255 ); - break; - } - case 3: - { - backlight_set_color_all( 255, 255, 255 ); - break; - } - } -} - -#if defined(RGB_DEBUGGING_ONLY) -// This tests the LEDs -// Note that it will change the LED control registers -// in the LED drivers, and leave them in an invalid -// state for other backlight effects. -// ONLY USE THIS FOR TESTING LEDS! -void backlight_effect_single_LED_test(void) -{ - static uint8_t color = 0; // 0,1,2 for R,G,B - static uint8_t row = 0; - static uint8_t column = 0; - - static uint8_t tick = 0; - tick++; - - if ( tick > 2 ) - { - tick = 0; - column++; - } - if ( column > 14 ) - { - column = 0; - row++; - } - if ( row > 4 ) - { - row = 0; - color++; - } - if ( color > 2 ) - { - color = 0; - } - - uint8_t led; - map_row_column_to_led( row, column, &led ); - backlight_set_color_all( 255, 255, 255 ); - backlight_test_led( led, color==0, color==1, color==2 ); -} -#endif // defined(RGB_DEBUGGING_ONLY) - -// All LEDs off -void backlight_effect_all_off(void) -{ - backlight_set_color_all( 0, 0, 0 ); -} - -// Solid color -void backlight_effect_solid_color(void) -{ - HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); -} - -// alphas = color1, mods = color2 -void backlight_effect_alphas_mods(void) -{ - RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); - RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); - - for ( int row = 0; row < MATRIX_ROWS; row++ ) - { - for ( int column = 0; column < MATRIX_COLS; column++ ) - { - uint8_t index; - map_row_column_to_led( row, column, &index ); - if ( index < BACKLIGHT_LED_COUNT ) - { - if ( ( g_config.alphas_mods[row] & (1< 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - // Divide delta by 4, this gives the delta per row - deltaH /= 4; - - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; - RGB rgb; - Point point; - for ( int i=0; i>4); - // Relies on hue being 8-bit and wrapping - hsv.h = g_config.color_1.h + ( deltaH * y ); - hsv.s = g_config.color_1.s + ( deltaS * y ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} - -void backlight_effect_raindrops(bool initialize) -{ - int16_t h1 = g_config.color_1.h; - int16_t h2 = g_config.color_2.h; - int16_t deltaH = h2 - h1; - deltaH /= 4; - - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv; - RGB rgb; - - // Change one LED every tick - uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; - - for ( int i=0; i> 2; - hsv.h = g_config.color_1.h + offset2; - hsv.s = 127 + ( point.y >> 1 ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} - -#if defined(RGB_BACKLIGHT_M6_B) -void backlight_effect_custom_colors(void) -{ - RGB rgb; - for ( uint8_t i = 0; i < 6; i++ ) - { - HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; - rgb = hsv_to_rgb( hsv ); - uint8_t led; - map_row_column_to_led( 0, i, &led ); - backlight_set_color( led, rgb.r, rgb.g, rgb.b ); - } -} -#endif - -void backlight_effect_indicators_set_colors( uint8_t index, HS color ) -{ - HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - if ( index == 254 ) - { - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); - } - else - { - backlight_set_color( index, rgb.r, rgb.g, rgb.b ); - - // If the spacebar LED is the indicator, - // do the same for the spacebar stabilizers - if ( index == 36+0 ) // LC0 - { -#if defined (RGB_BACKLIGHT_ZEAL65) - backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined (RGB_BACKLIGHT_KOYU) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 - if ( g_config.use_7u_spacebar ) - { - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 - } -#endif - } - } -} - -// This runs after another backlight effect and replaces -// colors already set -void backlight_effect_indicators(void) -{ - if ( g_config.caps_lock_indicator.index != 255 && - ( g_indicator_state & (1< 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); - uint8_t effect = suspend_backlight ? 0 : g_config.effect; - - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - static uint8_t effect_last = 255; - bool initialize = effect != effect_last; - effect_last = effect; - - // this gets ticked at 20 Hz. - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch ( effect ) - { - case 0: - backlight_effect_all_off(); - break; - case 1: - backlight_effect_solid_color(); - break; - case 2: -#if defined(RGB_BACKLIGHT_M6_B) - backlight_effect_custom_colors(); -#else - backlight_effect_alphas_mods(); -#endif - break; - case 3: - backlight_effect_gradient_up_down(); - break; - case 4: - backlight_effect_raindrops( initialize ); - break; - case 5: - backlight_effect_cycle_all(); - break; - case 6: - backlight_effect_cycle_left_right(); - break; - case 7: - backlight_effect_cycle_up_down(); - break; - case 8: - backlight_effect_jellybean_raindrops( initialize ); - break; - case 9: - backlight_effect_cycle_radial1(); - break; - case 10: - backlight_effect_cycle_radial2(); - break; - default: - backlight_effect_all_off(); - break; - } - - if ( ! suspend_backlight ) - { -#if !defined(RGB_BACKLIGHT_M6_B) - backlight_effect_indicators(); -#endif - } -} - -void backlight_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) -{ - if ( row >= MATRIX_ROWS ) - { - // Special value, 255=none, 254=all - *index = row; - } - else - { - map_row_column_to_led( row, column, index ); - } -} - -void backlight_get_indicator_row_col( uint8_t index, uint8_t *row, uint8_t *column ) -{ - if ( index == 255 || index == 254 ) - { - // Special value, 255=none, 254=all - *row = index; - *column = 0; - return; - } - for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) - { - for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) - { - uint8_t i = 255; - map_row_column_to_led( r, c, &i ); - if ( i == index ) - { - *row = r; - *column = c; - return; - } - } - } -} - -// Some helpers for setting/getting HSV -void _set_color( HS *color, uint8_t *data ) -{ - color->h = data[0]; - color->s = data[1]; -} - -void _get_color( HS *color, uint8_t *data ) -{ - data[0] = color->h; - data[1] = color->s; -} - -void backlight_config_set_value( uint8_t *data ) -{ - bool reinitialize = false; - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { -#if defined (RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) - case id_use_split_backspace: - { - g_config.use_split_backspace = (bool)*value_data; - reinitialize = true; - break; - } -#endif -#if defined (RGB_BACKLIGHT_ZEAL60) - case id_use_split_left_shift: - { - g_config.use_split_left_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_split_right_shift: - { - g_config.use_split_right_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_7u_spacebar: - { - g_config.use_7u_spacebar = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_iso_enter: - { - g_config.use_iso_enter = (bool)*value_data; - reinitialize = true; - break; - } - case id_disable_hhkb_blocker_leds: - { - g_config.disable_hhkb_blocker_leds = (bool)*value_data; - reinitialize = true; - break; - } -#endif - case id_disable_when_usb_suspended: - { - g_config.disable_when_usb_suspended = (bool)*value_data; - break; - } - case id_disable_after_timeout: - { - g_config.disable_after_timeout = *value_data; - break; - } - case id_brightness: - { - g_config.brightness = *value_data; - break; - } - case id_effect: - { - g_config.effect = *value_data; - break; - } - case id_effect_speed: - { - g_config.effect_speed = *value_data; - break; - } - case id_color_1: - { - _set_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _set_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _set_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_1_indicator_color: - { - _set_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_2_indicator_color: - { - _set_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_3_indicator_color: - { - _set_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); - } - } -#if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } -#endif - } - - if ( reinitialize ) - { - backlight_init_drivers(); - } -} - -void backlight_config_get_value( uint8_t *data ) -{ - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { - case id_use_split_backspace: - { - *value_data = ( g_config.use_split_backspace ? 1 : 0 ); - break; - } - case id_use_split_left_shift: - { - *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); - break; - } - case id_use_split_right_shift: - { - *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); - break; - } - case id_use_7u_spacebar: - { - *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); - break; - } - case id_use_iso_enter: - { - *value_data = ( g_config.use_iso_enter ? 1 : 0 ); - break; - } - case id_disable_when_usb_suspended: - { - *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); - break; - } - case id_disable_hhkb_blocker_leds: - { - *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); - break; - } - case id_disable_after_timeout: - { - *value_data = g_config.disable_after_timeout; - break; - } - case id_brightness: - { - *value_data = g_config.brightness; - break; - } - case id_effect: - { - *value_data = g_config.effect; - break; - } - case id_effect_speed: - { - *value_data = g_config.effect_speed; - break; - } - case id_color_1: - { - _get_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _get_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _get_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_1_indicator_color: - { - _get_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_2_indicator_color: - { - _get_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_3_indicator_color: - { - _get_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - *(value_data+i*2) = g_config.alphas_mods[i] >> 8; - *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; - } - } -#if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } -#endif - } -} - -void backlight_config_set_alphas_mods( uint16_t *alphas_mods ) -{ - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = alphas_mods[i]; - } - - backlight_config_save(); -} - -void backlight_config_load(void) -{ - eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); -} - -void backlight_config_save(void) -{ - eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); -} - -void backlight_init_drivers(void) -{ - // Initialize I2C - i2c_init(); - -#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 ); - - for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) - { - // OR the possible "disabled" cases together, then NOT the result to get the enabled state - // LC6 LD13 not present on Zeal65 -#if defined (RGB_BACKLIGHT_ZEAL65) - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+6 ) || // LC6 - ( index == 54+13 ) ); // LD13 -#elif defined (RGB_BACKLIGHT_KOYU) - bool enabled = !( ( index == 36+15 ) || // LC15 - ( index == 54+13 ) || // LD13 - ( index == 54+17 ) ); // LD17 -#elif defined (RGB_BACKLIGHT_M60_A) - bool enabled = !( - // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) || // LB17 - // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A - ( index == 36+17 ) || // LC17 - ( index == 54+17 ) || // LD17 - ( index == 36+15 ) || // LC15 - ( index == 54+13 ) ); // LD13 -#elif defined (RGB_BACKLIGHT_ZEAL60) - // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 - ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 - ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 - ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 - ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) ); // LB17 -#endif - // This only caches it for later - IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); -#endif // !defined(RGB_BACKLIGHT_M6_B) - - // TODO: put the 1 second startup delay here? - - // clear the key hits - for ( int led=0; ledevent.pressed ) - { - backlight_set_key_hit( record->event.key.row, record->event.key.col ); - } - - switch(keycode) - { - case BR_INC: - if (record->event.pressed) - { - backlight_brightness_increase(); - } - return false; - break; - case BR_DEC: - if (record->event.pressed) - { - backlight_brightness_decrease(); - } - return false; - break; - case EF_INC: - if (record->event.pressed) - { - backlight_effect_increase(); - } - return false; - break; - case EF_DEC: - if (record->event.pressed) - { - backlight_effect_decrease(); - } - return false; - break; - case ES_INC: - if (record->event.pressed) - { - backlight_effect_speed_increase(); - } - return false; - break; - case ES_DEC: - if (record->event.pressed) - { - backlight_effect_speed_decrease(); - } - return false; - break; - case H1_INC: - if (record->event.pressed) - { - backlight_color_1_hue_increase(); - } - return false; - break; - case H1_DEC: - if (record->event.pressed) - { - backlight_color_1_hue_decrease(); - } - return false; - break; - case S1_INC: - if (record->event.pressed) - { - backlight_color_1_sat_increase(); - } - return false; - break; - case S1_DEC: - if (record->event.pressed) - { - backlight_color_1_sat_decrease(); - break; - } - return false; - break; - case H2_INC: - if (record->event.pressed) - { - backlight_color_2_hue_increase(); - } - return false; - break; - case H2_DEC: - if (record->event.pressed) - { - backlight_color_2_hue_decrease(); - } - return false; - break; - case S2_INC: - if (record->event.pressed) - { - backlight_color_2_sat_increase(); - } - return false; - break; - case S2_DEC: - if (record->event.pressed) - { - backlight_color_2_sat_decrease(); - break; - } - return false; - break; - } - - return true; -} - -// Deals with the messy details of incrementing an integer -uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) -{ - int16_t new_value = value; - new_value += step; - return MIN( MAX( new_value, min ), max ); -} - -uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) -{ - int16_t new_value = value; - new_value -= step; - return MIN( MAX( new_value, min ), max ); -} - -void backlight_effect_increase(void) -{ - g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); -} - -void backlight_effect_decrease(void) -{ - g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); -} - -void backlight_effect_speed_increase(void) -{ - g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); -} - -void backlight_effect_speed_decrease(void) -{ - g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); -} - -void backlight_brightness_increase(void) -{ - g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_brightness_decrease(void) -{ - g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_hue_increase(void) -{ - g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_hue_decrease(void) -{ - g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_sat_increase(void) -{ - g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_1_sat_decrease(void) -{ - g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_hue_increase(void) -{ - g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_hue_decrease(void) -{ - g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_sat_increase(void) -{ - g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); -} - -void backlight_color_2_sat_decrease(void) -{ - g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); -} - -#if defined(RGB_DEBUGGING_ONLY) -void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) -{ - for ( int i=0; i. - */ -#pragma once - -#if RGB_BACKLIGHT_ENABLED -#else -#error rgb_backlight.h included when RGB_BACKLIGHT_ENABLED == 0 -#endif // RGB_BACKLIGHT_ENABLED - -#include -#include - -#include "quantum/color.h" - -typedef struct PACKED -{ - uint8_t h; - uint8_t s; -} HS; - -typedef struct -{ - HS color; - uint8_t index; -} backlight_config_indicator; - -typedef struct -{ - bool use_split_backspace:1; // | - bool use_split_left_shift:1; // | - bool use_split_right_shift:1; // | - bool use_7u_spacebar:1; // | - bool use_iso_enter:1; // | - bool disable_when_usb_suspended:1; // | - bool disable_hhkb_blocker_leds:1; // | - bool __pad7:1; // 1 byte - uint8_t disable_after_timeout; // 1 byte - uint8_t brightness; // 1 byte - uint8_t effect; // 1 byte - uint8_t effect_speed; // 1 byte - HS color_1; // 2 bytes - HS color_2; // 2 bytes - backlight_config_indicator caps_lock_indicator; // 3 bytes - backlight_config_indicator layer_1_indicator; // 3 bytes - backlight_config_indicator layer_2_indicator; // 3 bytes - backlight_config_indicator layer_3_indicator; // 3 bytes - uint16_t alphas_mods[5]; // 10 bytes -#if defined(RGB_BACKLIGHT_M6_B) - HS custom_color[6]; // 12 bytes -#endif -} backlight_config; // = 31 bytes (M6-B = 43 bytes) - -void backlight_config_load(void); -void backlight_config_save(void); -void backlight_config_set_value( uint8_t *data ); -void backlight_config_get_value( uint8_t *data ); - -void backlight_init_drivers(void); - -void backlight_timer_init(void); -void backlight_timer_enable(void); -void backlight_timer_disable(void); - -void backlight_set_suspend_state(bool state); -void backlight_set_indicator_state(uint8_t state); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void backlight_update_pwm_buffers(void); - -// Handle backlight specific keycodes -bool process_record_backlight(uint16_t keycode, keyrecord_t *record); - -void backlight_set_key_hit(uint8_t row, uint8_t col); - -void backlight_effect_increase(void); -void backlight_effect_decrease(void); -void backlight_effect_speed_increase(void); -void backlight_effect_speed_decrease(void); - -void backlight_brightness_increase(void); -void backlight_brightness_decrease(void); - -void backlight_color_1_hue_increase(void); -void backlight_color_1_hue_decrease(void); -void backlight_color_1_sat_increase(void); -void backlight_color_1_sat_decrease(void); -void backlight_color_2_hue_increase(void); -void backlight_color_2_hue_decrease(void); -void backlight_color_2_sat_increase(void); -void backlight_color_2_sat_decrease(void); - -void backlight_test_led( uint8_t index, bool red, bool green, bool blue ); -void backlight_debug_led(bool state); - diff --git a/users/stanrc85/rgb_backlight_api.h b/users/stanrc85/rgb_backlight_api.h deleted file mode 100644 index 680ba4d99c26..000000000000 --- a/users/stanrc85/rgb_backlight_api.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 - -enum backlight_config_value -{ - id_use_split_backspace = 0x01, - id_use_split_left_shift = 0x02, - id_use_split_right_shift = 0x03, - id_use_7u_spacebar = 0x04, - id_use_iso_enter = 0x05, - id_disable_hhkb_blocker_leds = 0x06, - id_disable_when_usb_suspended = 0x07, - id_disable_after_timeout = 0x08, - id_brightness = 0x09, - id_effect = 0x0A, - id_effect_speed = 0x0B, - id_color_1 = 0x0C, - id_color_2 = 0x0D, - id_caps_lock_indicator_color = 0x0E, - id_caps_lock_indicator_row_col = 0x0F, - id_layer_1_indicator_color = 0x10, - id_layer_1_indicator_row_col = 0x11, - id_layer_2_indicator_color = 0x12, - id_layer_2_indicator_row_col = 0x13, - id_layer_3_indicator_color = 0x14, - id_layer_3_indicator_row_col = 0x15, - id_alphas_mods = 0x16, - id_custom_color = 0x17 -}; diff --git a/users/stanrc85/rgb_backlight_keycodes.h b/users/stanrc85/rgb_backlight_keycodes.h deleted file mode 100644 index ba7f03f89d4e..000000000000 --- a/users/stanrc85/rgb_backlight_keycodes.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * 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 - -// This is hardcoded at 0x5F00 so it's well after keycode value SAFE_RANGE -enum backlight_keycodes { - BR_INC = 0x5F00, // backlight brightness increase - BR_DEC, // backlight brightness decrease - EF_INC, // backlight effect increase - EF_DEC, // backlight effect decrease - ES_INC, - ES_DEC, - H1_INC, - H1_DEC, - S1_INC, - S1_DEC, - H2_INC, - H2_DEC, - S2_INC, - S2_DEC -}; From 67793b39122e2d16b6ac194c67e02df8a0c6e0c7 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed, 3 Apr 2019 09:19:22 -0400 Subject: [PATCH 427/445] remove call to custom rgb file --- users/stanrc85/rules.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 83e9cb6e42a6..4b66f9692db0 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -14,7 +14,3 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) # Include my fancy rgb functions source here SRC += layer_rgb.c endif - -ifeq ($(strip $(KEYBOARD)), hs60/v2) - SRC += rgb_backlight.c -endif From 0e10a66c05bfe4b0ea7514673f6e544885108cc5 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed, 3 Apr 2019 09:21:04 -0400 Subject: [PATCH 428/445] Call default zeal60 rgb file --- keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index e0c9ead8dd4c..c46a6b9528c2 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -1,5 +1,6 @@ # 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 From caefb1c61eca10dcb70ca6481a8a592057de7318 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 3 Apr 2019 09:47:55 -0700 Subject: [PATCH 429/445] [Keyboard] Quantrik Kyuu 65% Board (#5541) * initial commit * get rid of some of the vanilla cookie cutter code * Put in the matrix size and the pins * add LAYOUT macro and a suitable keymap * Add QMK Configurator support * set bootmagic to lite * put a RESET key into the default keymap * edit kyuu readme file for description and quantrik.com link * Update keyboards/quantrik/kyuu/config.h Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * fix captilization of keyboard name * fix keymap wrapping issue and add MO key * preserve RESET key location * use one of the macros --- keyboards/quantrik/kyuu/config.h | 245 ++++++++++++++++++ keyboards/quantrik/kyuu/info.json | 82 ++++++ .../quantrik/kyuu/keymaps/default/config.h | 19 ++ .../quantrik/kyuu/keymaps/default/keymap.c | 74 ++++++ .../quantrik/kyuu/keymaps/default/readme.md | 1 + keyboards/quantrik/kyuu/kyuu.c | 43 +++ keyboards/quantrik/kyuu/kyuu.h | 42 +++ keyboards/quantrik/kyuu/readme.md | 13 + keyboards/quantrik/kyuu/rules.mk | 81 ++++++ 9 files changed, 600 insertions(+) create mode 100644 keyboards/quantrik/kyuu/config.h create mode 100644 keyboards/quantrik/kyuu/info.json create mode 100644 keyboards/quantrik/kyuu/keymaps/default/config.h create mode 100644 keyboards/quantrik/kyuu/keymaps/default/keymap.c create mode 100644 keyboards/quantrik/kyuu/keymaps/default/readme.md create mode 100644 keyboards/quantrik/kyuu/kyuu.c create mode 100644 keyboards/quantrik/kyuu/kyuu.h create mode 100644 keyboards/quantrik/kyuu/readme.md create mode 100644 keyboards/quantrik/kyuu/rules.mk diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h new file mode 100644 index 000000000000..655314985d72 --- /dev/null +++ b/keyboards/quantrik/kyuu/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Quantrik +#define PRODUCT Kyuu +#define DESCRIPTION A 65% keyboard with blocker + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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 { B6, B5, B4, D7, D6 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C7, C6, F0, B7, D0, D5, D3, D2, D1, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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/quantrik/kyuu/info.json b/keyboards/quantrik/kyuu/info.json new file mode 100644 index 000000000000..05c1b40b95b3 --- /dev/null +++ b/keyboards/quantrik/kyuu/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Kyuu", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [ + {"label":"K00 (B6,F1)", "x":0, "y":0}, + {"label":"K01 (B6,F4)", "x":1, "y":0}, + {"label":"K02 (B6,F5)", "x":2, "y":0}, + {"label":"K03 (B6,F6)", "x":3, "y":0}, + {"label":"K04 (B6,F7)", "x":4, "y":0}, + {"label":"K05 (B6,C7)", "x":5, "y":0}, + {"label":"K06 (B6,C6)", "x":6, "y":0}, + {"label":"K07 (B6,F0)", "x":7, "y":0}, + {"label":"K08 (B6,B7)", "x":8, "y":0}, + {"label":"K09 (B6,D0)", "x":9, "y":0}, + {"label":"K0A (B6,D5)", "x":10, "y":0}, + {"label":"K0B (B6,D3)", "x":11, "y":0}, + {"label":"K0C (B6,D2)", "x":12, "y":0}, + {"label":"K0D (B6,D1)", "x":13, "y":0}, + {"label":"K0E (B6,B3)", "x":14, "y":0}, + {"label":"K2E (B4,B3)", "x":15, "y":0}, + {"label":"K10 (B5,F1)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B5,F4)", "x":1.5, "y":1}, + {"label":"K12 (B5,F5)", "x":2.5, "y":1}, + {"label":"K13 (B5,F6)", "x":3.5, "y":1}, + {"label":"K14 (B5,F7)", "x":4.5, "y":1}, + {"label":"K15 (B5,C7)", "x":5.5, "y":1}, + {"label":"K16 (B5,C6)", "x":6.5, "y":1}, + {"label":"K17 (B5,F0)", "x":7.5, "y":1}, + {"label":"K18 (B5,B7)", "x":8.5, "y":1}, + {"label":"K19 (B5,D0)", "x":9.5, "y":1}, + {"label":"K1A (B5,D5)", "x":10.5, "y":1}, + {"label":"K1B (B5,D3)", "x":11.5, "y":1}, + {"label":"K1C (B5,D2)", "x":12.5, "y":1}, + {"label":"K1D (B5,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B5,B3)", "x":15, "y":1}, + {"label":"K20 (B4,F1)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B4,F4)", "x":1.75, "y":2}, + {"label":"K22 (B4,F5)", "x":2.75, "y":2}, + {"label":"K23 (B4,F6)", "x":3.75, "y":2}, + {"label":"K24 (B4,F7)", "x":4.75, "y":2}, + {"label":"K25 (B4,C7)", "x":5.75, "y":2}, + {"label":"K26 (B4,C6)", "x":6.75, "y":2}, + {"label":"K27 (B4,F0)", "x":7.75, "y":2}, + {"label":"K28 (B4,B7)", "x":8.75, "y":2}, + {"label":"K29 (B4,D0)", "x":9.75, "y":2}, + {"label":"K2A (B4,D5)", "x":10.75, "y":2}, + {"label":"K2B (B4,D3)", "x":11.75, "y":2}, + {"label":"K2C (B4,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2D (B4,D1)", "x":15, "y":2}, + {"label":"K30 (D7,F1)", "x":0, "y":3, "w":2.25}, + {"label":"K31 (D7,F4)", "x":2.25, "y":3}, + {"label":"K32 (D7,F5)", "x":3.25, "y":3}, + {"label":"K33 (D7,F6)", "x":4.25, "y":3}, + {"label":"K34 (D7,F7)", "x":5.25, "y":3}, + {"label":"K35 (D7,C7)", "x":6.25, "y":3}, + {"label":"K36 (D7,C6)", "x":7.25, "y":3}, + {"label":"K37 (D7,F0)", "x":8.25, "y":3}, + {"label":"K38 (D7,B7)", "x":9.25, "y":3}, + {"label":"K39 (D7,D0)", "x":10.25, "y":3}, + {"label":"K3A (D7,D5)", "x":11.25, "y":3}, + {"label":"K3B (D7,D3)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3C (D7,D2)", "x":14, "y":3}, + {"label":"K3D (D7,D1)", "x":15, "y":3}, + {"label":"K40 (D6,F1)", "x":0, "y":4, "w":1.5}, + {"label":"K41 (D6,F4)", "x":1.5, "y":4}, + {"label":"K42 (D6,F5)", "x":2.5, "y":4, "w":1.5}, + {"label":"K46 (D6,C6)", "x":4, "y":4, "w":7}, + {"label":"K4A (D6,D5)", "x":11, "y":4, "w":1.5}, + {"label":"K4B (D6,D3)", "x":13, "y":4}, + {"label":"K4C (D6,D2)", "x":14, "y":4}, + {"label":"K4D (D6,D1)", "x":15, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/quantrik/kyuu/keymaps/default/config.h b/keyboards/quantrik/kyuu/keymaps/default/config.h new file mode 100644 index 000000000000..60dd02a9d0ee --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/quantrik/kyuu/keymaps/default/keymap.c b/keyboards/quantrik/kyuu/keymaps/default/keymap.c new file mode 100644 index 000000000000..077d7ac5a647 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 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_BSLS, KC_GRV, 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_BSPC, KC_PGUP, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = 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_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, QMKBEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + 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/quantrik/kyuu/keymaps/default/readme.md b/keyboards/quantrik/kyuu/keymaps/default/readme.md new file mode 100644 index 000000000000..f87ce36e38e5 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kyuu diff --git a/keyboards/quantrik/kyuu/kyuu.c b/keyboards/quantrik/kyuu/kyuu.c new file mode 100644 index 000000000000..e9a72a5749a9 --- /dev/null +++ b/keyboards/quantrik/kyuu/kyuu.c @@ -0,0 +1,43 @@ +/* Copyright 2019 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 "kyuu.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/quantrik/kyuu/kyuu.h b/keyboards/quantrik/kyuu/kyuu.h new file mode 100644 index 000000000000..82c024f2e7fb --- /dev/null +++ b/keyboards/quantrik/kyuu/kyuu.h @@ -0,0 +1,42 @@ +/* Copyright 2019 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 . + */ +#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( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k2E, \ + 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, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k46, k47, k4A, k4B, k4C, k4D \ +) \ +{ \ + { 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, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, k47, KC_NO, KC_NO, k4A, k4B, k4C, k4D, KC_NO }, \ +} + diff --git a/keyboards/quantrik/kyuu/readme.md b/keyboards/quantrik/kyuu/readme.md new file mode 100644 index 000000000000..2b3314098009 --- /dev/null +++ b/keyboards/quantrik/kyuu/readme.md @@ -0,0 +1,13 @@ +# kyuu + +Kyuu is a 65% keyboard inspired by the TGR 910's top right blocker. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Quantrik 65% PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97810.0), [quantrik.com](https://www.quantrik.com/collections/frontpage/products/kyuu-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make quantrik/kyuu: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/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk new file mode 100644 index 000000000000..3229957d9cb9 --- /dev/null +++ b/keyboards/quantrik/kyuu/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 = lite # 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 cb2f2fd258011e6637ed182f484a4317ac510db8 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 3 Apr 2019 10:17:25 -0700 Subject: [PATCH 430/445] [Keyboard] Small Refactor of Duck boards (#5521) * first [ass at pulling out common duck library functions * use new library in jetfire * use new library in duck lightsaver * use new library in octagon v2 * put Device into the library * refactor send_value * refactor send_value and send_color * use pragma once * use pragma once * use pragma once * use pragma once * rename backlight_led to indicator_leds to match with other duck boards * rename enum * make #define names consistent * rename ducklib to duck_led * update rules.mk ?= to = * put rgb in the correct order * add debounce debugging printouts * turn on bootmagic lite and set it to the top left most key commonly programmed as Escape * add reset key documentation * fix that typo * Update keyboards/duck/duck_led/duck_led.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * include the correct library --- keyboards/duck/duck_led/duck_led.c | 7 +++ keyboards/duck/duck_led/duck_led.h | 16 ++++++ keyboards/duck/eagle_viper/readme.md | 1 - keyboards/duck/eagle_viper/v2/config.h | 8 +-- .../duck/eagle_viper/v2/indicator_leds.c | 23 +++------ .../duck/eagle_viper/v2/indicator_leds.h | 1 - keyboards/duck/eagle_viper/v2/matrix.c | 3 ++ keyboards/duck/eagle_viper/v2/readme.md | 2 + keyboards/duck/eagle_viper/v2/rules.mk | 28 +++++------ keyboards/duck/eagle_viper/v2/v2.h | 4 +- keyboards/duck/jetfire/config.h | 4 ++ .../{backlight_led.c => indicator_leds.c} | 43 ++++++---------- .../{backlight_led.h => indicator_leds.h} | 11 +---- keyboards/duck/jetfire/jetfire.c | 10 ++-- keyboards/duck/jetfire/jetfire.h | 4 +- keyboards/duck/jetfire/readme.md | 2 +- keyboards/duck/jetfire/rules.mk | 6 +-- keyboards/duck/lightsaver/config.h | 8 +-- keyboards/duck/lightsaver/indicator_leds.c | 49 ++++++++----------- keyboards/duck/lightsaver/lightsaver.h | 4 +- keyboards/duck/lightsaver/matrix.c | 3 ++ keyboards/duck/lightsaver/rules.mk | 28 +++++------ keyboards/duck/octagon/v1/config.h | 9 ++-- keyboards/duck/octagon/v1/matrix.c | 3 ++ keyboards/duck/octagon/v1/rules.mk | 26 +++++----- keyboards/duck/octagon/v1/v1.h | 4 +- keyboards/duck/octagon/v2/config.h | 8 +-- keyboards/duck/octagon/v2/indicator_leds.c | 36 +++++--------- keyboards/duck/octagon/v2/indicator_leds.h | 6 +-- keyboards/duck/octagon/v2/matrix.c | 3 ++ keyboards/duck/octagon/v2/readme.md | 2 + keyboards/duck/octagon/v2/rules.mk | 28 +++++------ keyboards/duck/octagon/v2/v2.h | 4 +- 33 files changed, 192 insertions(+), 202 deletions(-) create mode 100644 keyboards/duck/duck_led/duck_led.c create mode 100644 keyboards/duck/duck_led/duck_led.h rename keyboards/duck/jetfire/{backlight_led.c => indicator_leds.c} (76%) rename keyboards/duck/jetfire/{backlight_led.h => indicator_leds.h} (70%) diff --git a/keyboards/duck/duck_led/duck_led.c b/keyboards/duck/duck_led/duck_led.c new file mode 100644 index 000000000000..2fa920e4b611 --- /dev/null +++ b/keyboards/duck/duck_led/duck_led.c @@ -0,0 +1,7 @@ +#include +#include "duck_led.h" +#include "quantum.h" + +void show(void) { + wait_us((RES / 1000UL) + 1); +} diff --git a/keyboards/duck/duck_led/duck_led.h b/keyboards/duck/duck_led/duck_led.h new file mode 100644 index 000000000000..2546366d0c5d --- /dev/null +++ b/keyboards/duck/duck_led/duck_led.h @@ -0,0 +1,16 @@ +#pragma once + +#define RES 6000 + +#define NS_PER_SEC (1000000000L) +#define CYCLES_PER_SEC (F_CPU) +#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) +#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) + +enum Device { + Device_PCBRGB, + Device_STATUSLED +}; + +void show(void); + diff --git a/keyboards/duck/eagle_viper/readme.md b/keyboards/duck/eagle_viper/readme.md index 14fb1666983f..3fec11bc0a82 100644 --- a/keyboards/duck/eagle_viper/readme.md +++ b/keyboards/duck/eagle_viper/readme.md @@ -9,4 +9,3 @@ Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127) Make example for this keyboard (after setting up your build environment): make duck/eagle_viper/v2:default - diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h index f454b2e0e1db..a0ce866cc354 100644 --- a/keyboards/duck/eagle_viper/v2/config.h +++ b/keyboards/duck/eagle_viper/v2/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -44,6 +43,9 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 4 +#define BOOTMAGIC_LITE_COLUMN 10 + #define TAPPING_TERM 200 -#endif diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.c b/keyboards/duck/eagle_viper/v2/indicator_leds.c index 03a93197da6b..fc90ed3fbda7 100644 --- a/keyboards/duck/eagle_viper/v2/indicator_leds.c +++ b/keyboards/duck/eagle_viper/v2/indicator_leds.c @@ -19,19 +19,13 @@ along with this program. If not, see . #include #include #include "indicator_leds.h" - -#define RES 6000 +#include "duck_led/duck_led.h" #define LED_T1H 600 #define LED_T1L 650 #define LED_T0H 250 #define LED_T0L 1000 -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) - void send_bit_d4(bool bitVal) { if(bitVal) { asm volatile ( @@ -66,14 +60,12 @@ void send_bit_d4(bool bitVal) { } } -void show(void) { - _delay_us((RES / 1000UL) + 1); -} - -void send_value(uint8_t byte) { +void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { - send_bit_d4(byte & 0b10000000); - byte <<= 1; + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + byte <<= 1; + } } } @@ -83,7 +75,8 @@ void indicator_leds_set(bool leds[8]) { cli(); for(led_cnt = 0; led_cnt < 8; led_cnt++) - send_value(leds[led_cnt] ? 255 : 0); + send_value(leds[led_cnt] ? 255 : 0, Device_STATUSLED); sei(); show(); } + diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.h b/keyboards/duck/eagle_viper/v2/indicator_leds.h index c174fa404da5..fe66eef6b2fc 100644 --- a/keyboards/duck/eagle_viper/v2/indicator_leds.h +++ b/keyboards/duck/eagle_viper/v2/indicator_leds.h @@ -1,2 +1 @@ void indicator_leds_set(bool leds[8]); -void show(void); diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c index 7003a7ae00df..a6bc5634225a 100644 --- a/keyboards/duck/eagle_viper/v2/matrix.c +++ b/keyboards/duck/eagle_viper/v2/matrix.c @@ -89,6 +89,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef V2_H -#define V2_H +#pragma once #include "quantum.h" @@ -78,4 +77,3 @@ #define LAYOUT_eagle LAYOUT_60_ansi -#endif diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index 4bc535b19260..774e28491835 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -48,6 +48,10 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 + /* 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). */ diff --git a/keyboards/duck/jetfire/backlight_led.c b/keyboards/duck/jetfire/indicator_leds.c similarity index 76% rename from keyboards/duck/jetfire/backlight_led.c rename to keyboards/duck/jetfire/indicator_leds.c index 7e9dca6e9f10..7dbdb1ff79b2 100644 --- a/keyboards/duck/jetfire/backlight_led.c +++ b/keyboards/duck/jetfire/indicator_leds.c @@ -17,21 +17,13 @@ along with this program. If not, see . #include #include #include -#include "backlight_led.h" +#include "indicator_leds.h" #include "quantum.h" -// #include "led.h" - -#define T1H 900 -#define T1L 600 -#define T0H 400 -#define T0L 900 -#define RES 6000 - -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 void send_bit_d4(bool bitVal) { @@ -48,8 +40,8 @@ void send_bit_d4(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -63,8 +55,8 @@ void send_bit_d4(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } @@ -83,8 +75,8 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -98,20 +90,15 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } -void show(void) -{ - _delay_us((RES / 1000UL) + 1); -} - void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { - if(device == Device_STATELED) { + if(device == Device_STATUSLED) { send_bit_d4(byte & 0b10000000); } if(device == Device_PCBRGB) { @@ -123,7 +110,7 @@ void send_value(uint8_t byte, enum Device device) void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { - send_value(g, device); send_value(r, device); + send_value(g, device); send_value(b, device); } diff --git a/keyboards/duck/jetfire/backlight_led.h b/keyboards/duck/jetfire/indicator_leds.h similarity index 70% rename from keyboards/duck/jetfire/backlight_led.h rename to keyboards/duck/jetfire/indicator_leds.h index 36d8d9aa9b3e..695e1db6d41e 100644 --- a/keyboards/duck/jetfire/backlight_led.h +++ b/keyboards/duck/jetfire/indicator_leds.h @@ -1,10 +1,6 @@ -#ifndef BACKLIGHT_LED_H -#define BACKLIGHT_LED_H +#pragma once -enum Device { - Device_PCBRGB, - Device_STATELED -}; +#include "duck_led/duck_led.h" void backlight_init_ports(void); void backlight_set_state(bool cfg[7]); @@ -13,6 +9,3 @@ void backlight_toggle_rgb(bool enabled); void backlight_set_rgb(uint8_t cfg[17][3]); void backlight_set(uint8_t level); void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device); -void show(void); - -#endif diff --git a/keyboards/duck/jetfire/jetfire.c b/keyboards/duck/jetfire/jetfire.c index 81bdb95ba1f9..0662489c6f26 100644 --- a/keyboards/duck/jetfire/jetfire.c +++ b/keyboards/duck/jetfire/jetfire.c @@ -14,9 +14,9 @@ * along with this program. If not, see . */ #include "jetfire.h" -#include "backlight_led.h" +#include "indicator_leds.h" -enum backlight_level { +enum BACKLIGHT_AREAS { BACKLIGHT_ALPHA = 0b0000001, BACKLIGHT_MOD = 0b0000010, BACKLIGHT_FROW = 0b0000100, @@ -137,15 +137,15 @@ void backlight_update_state() send_color(backlight_state_led & (1<. */ -#ifndef JETFIRE_H -#define JETFIRE_H +#pragma once #include "quantum.h" @@ -57,4 +56,3 @@ { K0A, K0B, K0C, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, K0I, KC_NO,KC_NO,KC_NO, K0M, K0N, K0O, K0P, K0Q, K0R, K0S, KC_NO } \ } -#endif diff --git a/keyboards/duck/jetfire/readme.md b/keyboards/duck/jetfire/readme.md index 34b351a7266b..8de2f5ced6fa 100644 --- a/keyboards/duck/jetfire/readme.md +++ b/keyboards/duck/jetfire/readme.md @@ -9,7 +9,7 @@ Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: Duck Jetfire PCB Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=92708.0) -To get into bootloader mode, hold the top top most key above the 2 navigation keys while connecting the USB cable. +**Reset Key:** To put the Jetfire into reset, hold top most key above the 2 navigation keys (`K5P`) while plugging in. Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index 8e05516df3da..c708593293a2 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -70,5 +70,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes -SRC += backlight_led.c \ - matrix.c +SRC += indicator_leds.c \ + matrix.c duck_led/duck_led.c diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h index 9e3a08fbd1a5..d302fb395322 100644 --- a/keyboards/duck/lightsaver/config.h +++ b/keyboards/duck/lightsaver/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -44,6 +43,9 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 + #define TAPPING_TERM 200 -#endif diff --git a/keyboards/duck/lightsaver/indicator_leds.c b/keyboards/duck/lightsaver/indicator_leds.c index 0a54e151e1d6..5d2e1ad9f638 100644 --- a/keyboards/duck/lightsaver/indicator_leds.c +++ b/keyboards/duck/lightsaver/indicator_leds.c @@ -18,17 +18,12 @@ along with this program. If not, see . #include #include #include +#include "duck_led/duck_led.h" -#define T1H 900 -#define T1L 600 -#define T0H 400 -#define T0L 900 -#define RES 6000 - -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 void send_bit_d4(bool bitVal) { if(bitVal) { @@ -44,8 +39,8 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -59,33 +54,31 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } -void show(void) { - _delay_us((RES / 1000UL) + 1); -} - -void send_value(uint8_t byte) { +void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { - send_bit_d4(byte & 0b10000000); - byte <<= 1; + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + byte <<= 1; + } } } -void send_color(uint8_t r, uint8_t g, uint8_t b) { - send_value(g); - send_value(r); - send_value(b); +void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { + send_value(r, device); + send_value(g, device); + send_value(b, device); } void indicator_leds_set(bool leds[8]) { cli(); - send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0); - send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0); - send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0); + send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0, Device_STATUSLED); + send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0, Device_STATUSLED); + send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0, Device_STATUSLED); sei(); show(); } diff --git a/keyboards/duck/lightsaver/lightsaver.h b/keyboards/duck/lightsaver/lightsaver.h index 19fcf36bacb4..1e1185713b17 100644 --- a/keyboards/duck/lightsaver/lightsaver.h +++ b/keyboards/duck/lightsaver/lightsaver.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef LIGHTSAVER_H -#define LIGHTSAVER_H +#pragma once #include "quantum.h" @@ -37,4 +36,3 @@ /* 5 */ { K0A, K0B, K0C, NO, NO, NO, NO, NO, K0I, NO, K0K, NO, K0M, K0N, K0O, K0P, K0Q, K0R } \ } -#endif diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c index a07cdd0d161a..543205c0b788 100644 --- a/keyboards/duck/lightsaver/matrix.c +++ b/keyboards/duck/lightsaver/matrix.c @@ -87,6 +87,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,6 +43,8 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 -#define TAPPING_TERM 200 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 -#endif +#define TAPPING_TERM 200 diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c index 8555349943ce..233404ed30f6 100644 --- a/keyboards/duck/octagon/v1/matrix.c +++ b/keyboards/duck/octagon/v1/matrix.c @@ -84,6 +84,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef V1_H -#define V1_H +#pragma once #include "quantum.h" @@ -49,4 +48,3 @@ { K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \ { K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \ } -#endif diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h index 78d18d3bb3b2..4aab587f663d 100644 --- a/keyboards/duck/octagon/v2/config.h +++ b/keyboards/duck/octagon/v2/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -44,6 +43,9 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 + #define TAPPING_TERM 200 -#endif diff --git a/keyboards/duck/octagon/v2/indicator_leds.c b/keyboards/duck/octagon/v2/indicator_leds.c index c24509f51441..116306fb7126 100644 --- a/keyboards/duck/octagon/v2/indicator_leds.c +++ b/keyboards/duck/octagon/v2/indicator_leds.c @@ -20,16 +20,10 @@ along with this program. If not, see . #include #include "indicator_leds.h" -#define T1H 900 -#define T1L 600 -#define T0H 400 -#define T0L 900 -#define RES 6000 - -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 void send_bit_d4(bool bitVal) { if(bitVal) { @@ -45,8 +39,8 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -60,8 +54,8 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } @@ -80,8 +74,8 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -95,15 +89,11 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } -void show(void) { - _delay_us((RES / 1000UL) + 1); -} - void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { if(device == Device_STATUSLED) { @@ -117,8 +107,8 @@ void send_value(uint8_t byte, enum Device device) { } void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { - send_value(g, device); send_value(r, device); + send_value(g, device); send_value(b, device); } diff --git a/keyboards/duck/octagon/v2/indicator_leds.h b/keyboards/duck/octagon/v2/indicator_leds.h index 9bb2c8ced93f..ad3ec54f52a9 100644 --- a/keyboards/duck/octagon/v2/indicator_leds.h +++ b/keyboards/duck/octagon/v2/indicator_leds.h @@ -1,11 +1,7 @@ -enum Device { - Device_PCBRGB, - Device_STATUSLED -}; +#include "duck_led/duck_led.h" void indicator_leds_set(bool leds[8]); void backlight_toggle_rgb(bool enabled); void backlight_set_rgb(uint8_t cfg[17][3]); void backlight_init_ports(void); void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device); -void show(void); \ No newline at end of file diff --git a/keyboards/duck/octagon/v2/matrix.c b/keyboards/duck/octagon/v2/matrix.c index a63a37640ffc..e6e7046b45bc 100644 --- a/keyboards/duck/octagon/v2/matrix.c +++ b/keyboards/duck/octagon/v2/matrix.c @@ -89,6 +89,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef V2_H -#define V2_H +#pragma once #include "quantum.h" @@ -49,4 +48,3 @@ { K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, K1P, KC_NO }, \ { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O, K0P, KC_NO } \ } -#endif From eb0bbe997b30f1e6fba1d95adb25d2af04302021 Mon Sep 17 00:00:00 2001 From: Wilba6582 Date: Wed, 3 Apr 2019 23:54:34 +1100 Subject: [PATCH 431/445] Added configurable defaults for RGB backlight indicators. --- keyboards/hs60/v2/config.h | 5 +++++ keyboards/zeal60/config.h | 5 +++++ keyboards/zeal60/rgb_backlight.c | 8 ++++---- keyboards/zeal65/config.h | 5 +++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index b0c56adf8916..bbf17251b4ea 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -119,6 +119,11 @@ along with this program. If not, see . #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F #define EEPROM_MAGIC_ADDR 32 diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h index e39b06cf6b23..94cc9989b74a 100644 --- a/keyboards/zeal60/config.h +++ b/keyboards/zeal60/config.h @@ -100,6 +100,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c index a965a13bbdf6..8d7a7fe8d10b 100644 --- a/keyboards/zeal60/rgb_backlight.c +++ b/keyboards/zeal60/rgb_backlight.c @@ -74,10 +74,10 @@ backlight_config g_config = { .effect_speed = 0, .color_1 = { .h = 0, .s = 255 }, .color_2 = { .h = 127, .s = 255 }, - .caps_lock_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .layer_1_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .layer_2_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .layer_3_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, + .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, + .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, + .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, + .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR, .alphas_mods = { RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h index 7406be865b0b..896deac8b8be 100644 --- a/keyboards/zeal65/config.h +++ b/keyboards/zeal65/config.h @@ -100,6 +100,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111110000000011 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage From 17e7762de7e3fdfc61c20aa61022f47370630c6a Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Thu, 4 Apr 2019 08:45:55 +1100 Subject: [PATCH 432/445] Eager Per Row Debouncing added (added to Ergodox) (#5498) * Implemented Eager Per Row debouncing algorithm. Good for when fingers can only press one row at a time (e.g. when keyboard is wired so that "rows" are vertical) * Added documentation for eager_pr * Ported ergodox_ez to eager_pr debouncing. * Removed check for changes in matrix_scan. * Added further clarification in docs. * Accidental merge with ergodox_ez * Small cleanup in eager_pr * Forgot to debounce_init - this would probably cause seg-faults. --- docs/feature_debounce_type.md | 5 +- keyboards/ergodox_ez/matrix.c | 458 +++++++++++++++------------------- keyboards/ergodox_ez/rules.mk | 1 + quantum/debounce/eager_pr.c | 100 ++++++++ quantum/debounce/readme.md | 2 +- 5 files changed, 302 insertions(+), 264 deletions(-) create mode 100644 quantum/debounce/eager_pr.c diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md index 5d4343f08b9b..38eca3f37c8c 100644 --- a/docs/feature_debounce_type.md +++ b/docs/feature_debounce_type.md @@ -33,7 +33,10 @@ The debounce code is compatible with split keyboards. # Changing between included debouncing methods You can either use your own code, by including your own debounce.c, or switch to another included one. Included debounce methods are: -* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key +* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row. +For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be +appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. +* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key * sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed. diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 860cf7b229a4..97f764113b27 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -33,14 +33,14 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include "matrix.h" +#include "debounce.h" #include QMK_KEYBOARD_H #ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" +# include "timer.h" #endif /* - * This constant define not debouncing time in msecs, but amount of matrix - * scan loops which should be made to get stable debounced results. + * This constant define not debouncing time in msecs, assuming eager_pr. * * On Ergodox matrix scan rate is relatively low, because of slow I2C. * Now it's only 317 scans/second, or about 3.15 msec/scan. @@ -52,26 +52,17 @@ along with this program. If not, see . */ #ifndef DEBOUNCE -# define DEBOUNCE 5 +# define DEBOUNCE 5 #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -/* - * matrix state(1:on, 0:off) - * contains the raw values without debounce filtering of the last read cycle. - */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; - -// Debouncing: store for each key the number of scans until it's eligible to -// change. When scanning the matrix, ignore any changes in keys that have -// already changed in the last DEBOUNCE scans. -static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values static matrix_row_t read_cols(uint8_t row); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; @@ -81,197 +72,137 @@ uint32_t matrix_timer; uint32_t matrix_scan_count; #endif +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_init_user(void) {} +__attribute__((weak)) void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) {} +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -void matrix_init(void) -{ - // initialize row and col +void matrix_init(void) { + // initialize row and col - mcp23018_status = init_mcp23018(); + mcp23018_status = init_mcp23018(); + unselect_rows(); + init_cols(); - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - for (uint8_t j=0; j < MATRIX_COLS; ++j) { - debounce_matrix[i * MATRIX_COLS + j] = 0; - } - } + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; + matrix_timer = timer_read32(); + matrix_scan_count = 0; #endif - - matrix_init_quantum(); - + debounce_init(MATRIX_ROWS); + matrix_init_quantum(); } void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); + mcp23018_status = init_mcp23018(); - unselect_rows(); - init_cols(); + unselect_rows(); + init_cols(); - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - } + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; + matrix_timer = timer_read32(); + matrix_scan_count = 0; #endif } -// Returns a matrix_row_t whose bits are set if the corresponding key should be -// eligible to change in this scan. -matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { - matrix_row_t result = 0; - matrix_row_t change = rawcols ^ raw_matrix[row]; - raw_matrix[row] = rawcols; - for (uint8_t i = 0; i < MATRIX_COLS; ++i) { - if (debounce_matrix[row * MATRIX_COLS + i]) { - --debounce_matrix[row * MATRIX_COLS + i]; - } else { - result |= (1 << i); - } - if (change & (1 << i)) { - debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; +uint8_t matrix_scan(void) { + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); + } } } - return result; -} - -matrix_row_t debounce_read_cols(uint8_t row) { - // Read the row without debouncing filtering and store it for later usage. - matrix_row_t cols = read_cols(row); - // Get the Debounce mask. - matrix_row_t mask = debounce_mask(cols, row); - // debounce the row and return the result. - return (cols & mask) | (matrix[row] & ~mask);; -} - -uint8_t matrix_scan(void) -{ - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); - } - } - } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; + matrix_scan_count++; - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); - matrix_timer = timer_now; - matrix_scan_count = 0; - } + matrix_timer = timer_now; + matrix_scan_count = 0; + } #endif #ifdef LEFT_LEDS - mcp23018_status = ergodox_left_leds_update(); -#endif // LEFT_LEDS - for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { - select_row(i); - // and select on left hand - select_row(i + MATRIX_ROWS_PER_SIDE); - // we don't need a 30us delay anymore, because selecting a - // left-hand row requires more than 30us for i2c. - - // grab cols from left hand - matrix[i] = debounce_read_cols(i); - // grab cols from right hand - matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); - - unselect_rows(); - } - - matrix_scan_quantum(); + mcp23018_status = ergodox_left_leds_update(); +#endif // LEFT_LEDS + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + select_row(i); + select_row(i + MATRIX_ROWS_PER_SIDE); + + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + // grab left + right cols. + raw_matrix[i] = read_cols(i); + raw_matrix[i+MATRIX_ROWS_PER_SIDE] = read_cols(i+MATRIX_ROWS_PER_SIDE); + + unselect_rows(); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, true); + matrix_scan_quantum(); - return 1; + return 1; } -bool matrix_is_modified(void) // deprecated and evidently not called. +bool matrix_is_modified(void) // deprecated and evidently not called. { - return true; + return true; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 2)); + uint8_t data = 0; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + return data; } + } else { + /* read from teensy + * bitmask is 0b11110011, but we want those all + * in the lower six bits. + * we'll return 1s for the top two, but that's harmless. + */ + + return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + } } /* Row pin configuration @@ -333,69 +266,70 @@ static matrix_row_t read_cols(uint8_t row) * row: 0 1 2 3 4 5 6 * pin: A0 A1 A2 A3 A4 A5 A6 */ -static void unselect_rows(void) -{ - // no need to unselect on mcp23018, because the select step sets all - // the other row bits high, and it's not changing to a different - // direction - - // unselect on teensy - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3); - PORTB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3); - DDRD &= ~(1<<2 | 1<<3); - PORTD &= ~(1<<2 | 1<<3); - DDRC &= ~(1<<6); - PORTC &= ~(1<<6); +static void unselect_rows(void) { + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + + // unselect on teensy + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); + PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); + DDRD &= ~(1 << 2 | 1 << 3); + PORTD &= ~(1 << 2 | 1 << 3); + DDRC &= ~(1 << 6); + PORTC &= ~(1 << 6); } -static void select_row(uint8_t row) -{ - if (row < 7) { - // select on mcp23018 - if (mcp23018_status) { // if there was an error - // do nothing - } else { - // set active row low : 0 - // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF & ~(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 . +*/ + +/* +Basic per-row algorithm. Uses an 8-bit counter per row. +After pressing a key, it immediately changes state, and sets a counter. +No further inputs are accepted until DEBOUNCE milliseconds have occurred. +*/ + +#include "matrix.h" +#include "timer.h" +#include "quantum.h" +#include + +#ifndef DEBOUNCE + #define DEBOUNCE 5 +#endif + + +#define debounce_counter_t uint8_t + +static debounce_counter_t *debounce_counters; + +#define DEBOUNCE_ELAPSED 251 +#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) + +void update_debounce_counters(uint8_t num_rows, uint8_t current_time); +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); + +//we use num_rows rather than MATRIX_ROWS to support split keyboards +void debounce_init(uint8_t num_rows) +{ + debounce_counters = (debounce_counter_t*)malloc(num_rows*sizeof(debounce_counter_t)); + for (uint8_t r = 0; r < num_rows; r++) + { + debounce_counters[r] = DEBOUNCE_ELAPSED; + } +} + +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) +{ + uint8_t current_time = timer_read() % MAX_DEBOUNCE; + update_debounce_counters(num_rows, current_time); + transfer_matrix_values(raw, cooked, num_rows, current_time); +} + +//If the current time is > debounce counter, set the counter to enable input. +void update_debounce_counters(uint8_t num_rows, uint8_t current_time) +{ + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < num_rows; row++) + { + if (*debounce_pointer != DEBOUNCE_ELAPSED) + { + if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { + *debounce_pointer = DEBOUNCE_ELAPSED; + } + } + debounce_pointer++; + } +} + +// upload from raw_matrix to final matrix; +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) +{ + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < num_rows; row++) + { + matrix_row_t existing_row = cooked[row]; + matrix_row_t raw_row = raw[row]; + + //determine new value basd on debounce pointer + raw value + if (*debounce_pointer == DEBOUNCE_ELAPSED && + (existing_row != raw_row)) + { + *debounce_pointer = current_time; + existing_row = raw_row; + } + cooked[row] = existing_row; + + debounce_pointer++; + } +} + +bool debounce_active(void) +{ + return true; +} + diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md index 5b318d845e91..f77f78c764f9 100644 --- a/quantum/debounce/readme.md +++ b/quantum/debounce/readme.md @@ -22,7 +22,7 @@ Here are a few that could be implemented: sym_g.c sym_pk.c sym_pr.c -sym_pr_cycles.c //currently used in ergo-dox +sym_pr_cycles.c eager_g.c eager_pk.c eager_pr.c //could be used in ergo-dox! From 63177760deaf23bb1f676974cecf211676285604 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Wed, 3 Apr 2019 18:01:17 -0500 Subject: [PATCH 433/445] Added encoder support to split common code (#5477) * Added slave encoder support to split common * Fixing handwired/xealous/rev1 compile error * Removed unnecessary ifdef --- quantum/encoder.c | 33 +++++++++++++- quantum/encoder.h | 8 ++-- quantum/split_common/matrix.c | 7 +++ quantum/split_common/transport.c | 77 ++++++++++++++++++++++++++------ 4 files changed, 106 insertions(+), 19 deletions(-) diff --git a/quantum/encoder.c b/quantum/encoder.c index 6629a098b86d..ddf6234ab8a1 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -17,6 +17,10 @@ #include "encoder.h" +// for memcpy +#include + + #ifndef ENCODER_RESOLUTION #define ENCODER_RESOLUTION 4 #endif @@ -35,7 +39,13 @@ static pin_t encoders_pad_b[NUMBER_OF_ENCODERS] = ENCODERS_PAD_B; static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; + +#ifdef SPLIT_KEYBOARD +// slave half encoders come over as second set of encoders +static int8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0}; +#else static int8_t encoder_value[NUMBER_OF_ENCODERS] = {0}; +#endif __attribute__ ((weak)) void encoder_update_user(int8_t index, bool clockwise) { } @@ -60,11 +70,30 @@ void encoder_read(void) { encoder_state[i] |= (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1); encoder_value[i] += encoder_LUT[encoder_state[i] & 0xF]; if (encoder_value[i] >= ENCODER_RESOLUTION) { - encoder_update_kb(i, COUNTRECLOCKWISE); + encoder_update_kb(i, false); } if (encoder_value[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise - encoder_update_kb(i, CLOCKWISE); + encoder_update_kb(i, true); } encoder_value[i] %= ENCODER_RESOLUTION; } } + +#ifdef SPLIT_KEYBOARD +void encoder_state_raw(uint8_t* slave_state) { + memcpy(slave_state, encoder_state, sizeof(encoder_state)); +} + +void encoder_update_raw(uint8_t* slave_state) { + for (int i = 0; i < NUMBER_OF_ENCODERS; i++) { + encoder_value[NUMBER_OF_ENCODERS + i] += encoder_LUT[slave_state[i] & 0xF]; + if (encoder_value[NUMBER_OF_ENCODERS + i] >= ENCODER_RESOLUTION) { + encoder_update_kb(NUMBER_OF_ENCODERS + i, false); + } + if (encoder_value[NUMBER_OF_ENCODERS + i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_update_kb(NUMBER_OF_ENCODERS + i, true); + } + encoder_value[NUMBER_OF_ENCODERS + i] %= ENCODER_RESOLUTION; + } +} +#endif diff --git a/quantum/encoder.h b/quantum/encoder.h index 2024fa303f34..ec09a8cc475a 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -19,11 +19,13 @@ #include "quantum.h" -#define COUNTRECLOCKWISE 0 -#define CLOCKWISE 1 - void encoder_init(void); void encoder_read(void); void encoder_update_kb(int8_t index, bool clockwise); void encoder_update_user(int8_t index, bool clockwise); + +#ifdef SPLIT_KEYBOARD +void encoder_state_raw(uint8_t* slave_state); +void encoder_update_raw(uint8_t* slave_state); +#endif diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index dcb96254f583..eb110bd23ade 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -29,6 +29,10 @@ along with this program. If not, see . #include "debounce.h" #include "transport.h" +#ifdef ENCODER_ENABLE + #include "encoder.h" +#endif + #if (MATRIX_COLS <= 8) # define print_matrix_header() print("\nr/c 01234567\n") # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) @@ -320,6 +324,9 @@ uint8_t matrix_scan(void) { matrix_scan_quantum(); } else { transport_slave(matrix + thisHand); +#ifdef ENCODER_ENABLE + encoder_read(); +#endif matrix_slave_scan_user(); } diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 8d408f6fdc6b..ab055ee6566c 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -1,4 +1,5 @@ #include +#include #include "config.h" #include "matrix.h" @@ -15,15 +16,45 @@ extern backlight_config_t backlight_config; #endif +#ifdef ENCODER_ENABLE +# include "encoder.h" +#endif + #if defined(USE_I2C) || defined(EH) # include "i2c_master.h" # include "i2c_slave.h" -# define I2C_BACKLIT_START 0x00 -// Need 4 bytes for RGB (32 bit) -# define I2C_RGB_START 0x01 -# define I2C_KEYMAP_START 0x05 +typedef struct __attribute__ ((__packed__)) { +#ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +#endif +#ifdef RGBLIGHT_ENABLE + uint32_t rgb_settings; +#endif +#ifdef ENCODER_ENABLE + uint8_t encoder_state[NUMBER_OF_ENCODERS]; +#endif + // Keep matrix last, we are only using this for it's offset + uint8_t matrix_start[0]; +} transport_values_t; + +__attribute__ ((unused)) +static transport_values_t transport_values; + +#ifdef BACKLIGHT_ENABLE +# define I2C_BACKLIT_START (uint8_t)offsetof(transport_values_t, backlight_level) +#endif + +#ifdef RGBLIGHT_ENABLE +# define I2C_RGB_START (uint8_t)offsetof(transport_values_t, rgb_settings) +#endif + +#ifdef ENCODER_ENABLE +# define I2C_ENCODER_START (uint8_t)offsetof(transport_values_t, encoder_state) +#endif + +#define I2C_KEYMAP_START (uint8_t)offsetof(transport_values_t, matrix_start) # define TIMEOUT 100 @@ -37,25 +68,28 @@ bool transport_master(matrix_row_t matrix[]) { // write backlight info # ifdef BACKLIGHT_ENABLE - static uint8_t prev_level = ~0; - uint8_t level = get_backlight_level(); - if (level != prev_level) { + uint8_t level = get_backlight_level(); + if (level != transport_values.backlight_level) { if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { - prev_level = level; + transport_values.backlight_level = level; } } # endif # ifdef RGBLIGHT_ENABLE - static uint32_t prev_rgb = ~0; - uint32_t rgb = rgblight_read_dword(); - if (rgb != prev_rgb) { + uint32_t rgb = rgblight_read_dword(); + if (rgb != transport_values.rgb_settings) { if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgb, sizeof(rgb), TIMEOUT) >= 0) { - prev_rgb = rgb; + transport_values.rgb_settings = rgb; } } # endif +# ifdef ENCODER_ENABLE + i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)transport_values.encoder_state, sizeof(transport_values.encoder_state), TIMEOUT); + encoder_update_raw(&transport_values.encoder_state[0]); +# endif + return true; } @@ -73,6 +107,10 @@ void transport_slave(matrix_row_t matrix[]) { // Update the RGB with the new data rgblight_update_dword(rgb); # endif + +# ifdef ENCODER_ENABLE + encoder_state_raw((uint8_t*)(i2c_slave_reg + I2C_ENCODER_START)); +# endif } void transport_master_init(void) { i2c_init(); } @@ -83,12 +121,15 @@ void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } # include "serial.h" -typedef struct _Serial_s2m_buffer_t { +typedef struct __attribute__ ((__packed__)) { +# ifdef ENCODER_ENABLE + uint8_t encoder_state[NUMBER_OF_ENCODERS]; +# endif // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack matrix_row_t smatrix[ROWS_PER_HAND]; } Serial_s2m_buffer_t; -typedef struct _Serial_m2s_buffer_t { +typedef struct __attribute__ ((__packed__)) { # ifdef BACKLIGHT_ENABLE uint8_t backlight_level; # endif @@ -147,6 +188,10 @@ bool transport_master(matrix_row_t matrix[]) { } # endif +# ifdef ENCODER_ENABLE + encoder_update_raw((uint8_t*)&serial_s2m_buffer.encoder_state); +# endif + return true; } @@ -162,6 +207,10 @@ void transport_slave(matrix_row_t matrix[]) { // Update RGB config with the new data rgblight_update_dword(serial_m2s_buffer.rgblight_config.raw); # endif + +# ifdef ENCODER_ENABLE + encoder_state_raw((uint8_t*)&serial_s2m_buffer.encoder_state); +# endif } #endif From 763b26cdb98c2702f7b2f8de239d4edba0fa4065 Mon Sep 17 00:00:00 2001 From: Daniel Prilik Date: Wed, 3 Apr 2019 18:30:47 -0700 Subject: [PATCH 434/445] RGB Matrix support for Massdrop CTRL/ALT (#5328) * port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR --- keyboards/massdrop/alt/config.h | 7 + keyboards/massdrop/alt/config_led.c | 148 +++++ keyboards/massdrop/alt/config_led.h | 25 +- .../massdrop/alt/keymaps/abishalom/keymap.c | 122 +--- .../massdrop/alt/keymaps/default/keymap.c | 122 +--- .../massdrop/alt/keymaps/default_md/keymap.c | 223 +++++++ .../massdrop/alt/keymaps/default_md/rules.mk | 2 + keyboards/massdrop/alt/keymaps/mac/keymap.c | 122 +--- .../massdrop/alt/keymaps/mac_md/keymap.c | 193 ++++++ .../massdrop/alt/keymaps/mac_md/rules.mk | 2 + .../massdrop/alt/keymaps/reywood/README.md | 5 + .../massdrop/alt/keymaps/reywood/rules.mk | 5 +- keyboards/massdrop/alt/rules.mk | 7 +- keyboards/massdrop/ctrl/config.h | 7 + keyboards/massdrop/ctrl/config_led.c | 144 +++++ keyboards/massdrop/ctrl/config_led.h | 25 +- .../massdrop/ctrl/keymaps/default/keymap.c | 126 +--- .../massdrop/ctrl/keymaps/default_md/keymap.c | 226 +++++++ .../massdrop/ctrl/keymaps/default_md/rules.mk | 2 + keyboards/massdrop/ctrl/keymaps/mac/keymap.c | 126 +--- .../massdrop/ctrl/keymaps/mac_md/keymap.c | 196 +++++++ .../massdrop/ctrl/keymaps/mac_md/rules.mk | 2 + .../ctrl/keymaps/responsive_pattern/README.md | 5 + .../ctrl/keymaps/responsive_pattern/keymap.c | 5 +- .../ctrl/keymaps/responsive_pattern/rules.mk | 2 + keyboards/massdrop/ctrl/led_programs.c | 120 ---- keyboards/massdrop/ctrl/rules.mk | 7 +- quantum/rgb_matrix.c | 19 +- quantum/rgb_matrix_types.h | 11 +- tmk_core/common/arm_atsam/suspend.c | 9 +- tmk_core/protocol/arm_atsam.mk | 5 +- .../protocol/arm_atsam/arm_atsam_protocol.h | 3 + tmk_core/protocol/arm_atsam/i2c_master.c | 8 +- tmk_core/protocol/arm_atsam/led_matrix.c | 554 ++++++++---------- tmk_core/protocol/arm_atsam/led_matrix.h | 84 +-- .../protocol/arm_atsam/led_matrix_programs.c | 5 +- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 16 +- tmk_core/protocol/arm_atsam/usb/usb2422.c | 6 +- 38 files changed, 1657 insertions(+), 1039 deletions(-) create mode 100644 keyboards/massdrop/alt/config_led.c create mode 100644 keyboards/massdrop/alt/keymaps/default_md/keymap.c create mode 100644 keyboards/massdrop/alt/keymaps/default_md/rules.mk create mode 100644 keyboards/massdrop/alt/keymaps/mac_md/keymap.c create mode 100644 keyboards/massdrop/alt/keymaps/mac_md/rules.mk create mode 100644 keyboards/massdrop/alt/keymaps/reywood/README.md create mode 100644 keyboards/massdrop/ctrl/config_led.c create mode 100644 keyboards/massdrop/ctrl/keymaps/default_md/keymap.c create mode 100644 keyboards/massdrop/ctrl/keymaps/default_md/rules.mk create mode 100644 keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c create mode 100644 keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk create mode 100644 keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md create mode 100644 keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk delete mode 100644 keyboards/massdrop/ctrl/led_programs.c rename keyboards/massdrop/alt/led_programs.c => tmk_core/protocol/arm_atsam/led_matrix_programs.c (99%) diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index d2f73a6a8e10..f63c38bf6f85 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -119,3 +119,10 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 15 +#define RGB_MATRIX_LED_FLUSH_LIMIT 10 +#define RGB_MATRIX_EXTRA_TOG + +#include "config_led.h" diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c new file mode 100644 index 000000000000..7d98e47c907b --- /dev/null +++ b/keyboards/massdrop/alt/config_led.c @@ -0,0 +1,148 @@ +#ifdef RGB_MATRIX_ENABLE +#include "alt.h" + +#include "led_matrix.h" +#include "rgb_matrix.h" +#include "config_led.h" + +// This table can be almost-automatically derived from ISSI3733_LED_MAP that is +// defined in config_led.h + +// You can calculate the (0-244, 0-64) x/y values from the x/y values defined in +// ISSI3733_LED_MAP with the following formula: +// uint8_t rgb_x = ((ISSI3733_LED_MAP[i].x - MIN_X) / (MAX_X - MIN_X)) * 224; +// uint8_t rgb_y = ((ISSI3733_LED_MAP[i].y - MIN_Y) / (MAX_Y - MIN_Y)) * 64; +// Where the min/max vars are the minimum and maximum "bounds" of x/y values +// present in ISSI3733_LED_MAP +// +// The row/col values need to be manually tweaked though, compensating for the +// "empty" cells that are a product of larger keys +// +// There is a quick-and-dirty implementation of this under ledvis.html + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC + /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1 + /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2 + /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3 + /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4 + /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5 + /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6 + /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7 + /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8 + /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9 + /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0 + /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS + /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL + /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC + /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL + /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB + /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q + /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W + /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E + /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R + /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T + /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y + /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U + /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I + /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O + /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P + /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC + /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC + /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS + /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME + /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS + /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A + /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S + /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D + /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F + /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G + /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H + /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J + /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K + /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L + /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN + /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT + /* _________________________________________ */ // ____ + /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT + /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP + /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT + /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z + /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X + /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C + /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V + /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B + /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N + /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M + /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM + /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT + /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH + /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT + /* _________________________________________ */ // ____ + /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP + /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN + /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL + /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI + /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT + /* _________________________________________ */ // ____ + /* _________________________________________ */ // ____ + /* _________________________________________ */ // ____ + /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC + /* _________________________________________ */ // ____ + /* _________________________________________ */ // ____ + /* _________________________________________ */ // ____ + /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT + /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1) + /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT + /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN + /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT + + // Underglow LEDs + { { 255 }, { 1, 1 }, 0 }, + { { 255 }, { 15, 0 }, 0 }, + { { 255 }, { 31, 0 }, 0 }, + { { 255 }, { 47, 0 }, 0 }, + { { 255 }, { 63, 0 }, 0 }, + { { 255 }, { 79, 0 }, 0 }, + { { 255 }, { 95, 0 }, 0 }, + { { 255 }, { 112, 0 }, 0 }, + { { 255 }, { 128, 0 }, 0 }, + { { 255 }, { 144, 0 }, 0 }, + { { 255 }, { 160, 0 }, 0 }, + { { 255 }, { 176, 0 }, 0 }, + { { 255 }, { 192, 0 }, 0 }, + { { 255 }, { 208, 0 }, 0 }, + { { 255 }, { 222, 1 }, 0 }, + { { 255 }, { 224, 13 }, 0 }, + { { 255 }, { 224, 25 }, 0 }, + { { 255 }, { 224, 38 }, 0 }, + { { 255 }, { 224, 50 }, 0 }, + { { 255 }, { 222, 62 }, 0 }, + { { 255 }, { 191, 64 }, 0 }, + { { 255 }, { 179, 64 }, 0 }, + { { 255 }, { 167, 64 }, 0 }, + { { 255 }, { 153, 64 }, 0 }, + { { 255 }, { 139, 64 }, 0 }, + { { 255 }, { 125, 64 }, 0 }, + { { 255 }, { 112, 64 }, 0 }, + { { 255 }, { 98, 64 }, 0 }, + { { 255 }, { 84, 64 }, 0 }, + { { 255 }, { 70, 64 }, 0 }, + { { 255 }, { 56, 64 }, 0 }, + { { 255 }, { 42, 64 }, 0 }, + { { 255 }, { 28, 64 }, 0 }, + { { 255 }, { 1, 62 }, 0 }, + { { 255 }, { 0, 50 }, 0 }, + { { 255 }, { 0, 38 }, 0 }, + { { 255 }, { 0, 25 }, 0 }, + { { 255 }, { 0, 13 }, 0 }, +}; + +#ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) +{ + led_matrix_indicators(); +} +#endif // USB_LED_INDICATOR_ENABLE + +#endif diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h index a049e38179a6..82117b33279e 100644 --- a/keyboards/massdrop/alt/config_led.h +++ b/keyboards/massdrop/alt/config_led.h @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _config_led_h_ -#define _config_led_h_ +#pragma once //Define number of ISSI3733 drivers being used (1...16) #define ISSI3733_DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT //Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic) #define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE } @@ -30,21 +30,24 @@ along with this program. If not, see . //Count of LED bodies #define ISSI3733_LED_COUNT 105 -//Default Global Current Register value (Default brightness 0 - 255) -#define ISSI3733_GCR_DEFAULT 128 - #define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus #define LED_GCR_STEP 10 //GCR increment/decrement value -//Automatic power rollback and recovery -#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) -#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) -#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) - +#ifdef USE_MASSDROP_CONFIGURATOR #define ANIMATION_SPEED_STEP 1 +#define BREATHE_STEP 1 #define BREATHE_MIN_STEP 0 #define BREATHE_MAX_STEP 255 +#endif + +//Default Global Current Register value (Default brightness 0 - 255) +#define ISSI3733_GCR_DEFAULT LED_GCR_MAX + +//Automatic power rollback and recovery +#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) +#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) +#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) //LED Mapping - More practically generated from a spreadsheet program //id: ID of the LED (Sync with PCB callouts) @@ -174,5 +177,3 @@ along with this program. If not, see . #define USB_LED_COMPOSE_SCANCODE 255 #define USB_LED_KANA_SCANCODE 255 #endif //USB_LED_INDICATOR_ENABLE - -#endif //_config_led_h_ diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c index 10bc62c1f0e6..a4519d404902 100644 --- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c +++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum alt_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [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_F12, KC_TRNS, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + 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_MUTE, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = 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_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 10bc62c1f0e6..a4519d404902 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum alt_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [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_F12, KC_TRNS, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + 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_MUTE, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = 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_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c new file mode 100644 index 000000000000..7969583df4b0 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -0,0 +1,223 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +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_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_HOME, \ + 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_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(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [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_F12, _______, KC_MUTE, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //LEDs are normally inactive, no processing is performed on them + //Flags are used in matching criteria for an LED to be active and indicate how to color it + //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //LED IDs can be found in config_led.h in the keyboard's directory + //Examples are below + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //Specific LEDs use the user's selected pattern while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 }, + + //Specific LEDs use specified RGB values while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, + + //All LEDs use the user's selected pattern + //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green + //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1) + //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //When layer 1 is active, key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007) + //When layer 1 is active, edge LEDs use green (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8) + //When layer 1 is active, edge LEDs use green (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF) + // { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF8000, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255, .layer = 1 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFFFFFFF8, .id3 = 0x000003FF, .g = 127, .layer = 1 }, + + //All key LEDs use red while edge LEDs use the active pattern + //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007) + //Edge uses active pattern (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8) + //Edge uses active pattern (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF) + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFFFFFFF8, .id3 = 0x000003FF }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/alt/keymaps/default_md/rules.mk b/keyboards/massdrop/alt/keymaps/default_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/default_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 639eb2da75ed..26a1c6d01488 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum alt_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [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_F12, KC_TRNS, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + 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_MUTE, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = 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_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c new file mode 100644 index 000000000000..8a052cc250ee --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -0,0 +1,193 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +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_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_HOME, \ + 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_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_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [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_F12, _______, KC_MUTE, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //Please see ../default_md/keymap.c for examples + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/alt/keymaps/mac_md/rules.mk b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/alt/keymaps/reywood/README.md b/keyboards/massdrop/alt/keymaps/reywood/README.md new file mode 100644 index 000000000000..5ee630dfb803 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/reywood/README.md @@ -0,0 +1,5 @@ +# THIS KEYMAP IS BROKEN + +The CTRL and ALT have both been switched to using the QMK RGB Matrix system, +rendering any custom effects that used the old, custom Massdrop lighting system, +BROKEN. diff --git a/keyboards/massdrop/alt/keymaps/reywood/rules.mk b/keyboards/massdrop/alt/keymaps/reywood/rules.mk index b5b961a0f3b2..956d1c700c29 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/rules.mk +++ b/keyboards/massdrop/alt/keymaps/reywood/rules.mk @@ -1,6 +1,4 @@ # project specific files -SRC = led_programs.c -SRC += matrix.c SRC += rgb_matrix_user.c #For platform and packs @@ -32,3 +30,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift + +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk index c5539158f580..aa45c68056d8 100644 --- a/keyboards/massdrop/alt/rules.mk +++ b/keyboards/massdrop/alt/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = led_programs.c -SRC += matrix.c +SRC = matrix.c +SRC += config_led.c #For platform and packs ARM_ATSAM = SAMD51J18A @@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift + +# Custom RGB matrix handling +RGB_MATRIX_ENABLE = custom diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 71ccac0f3991..df2e50921631 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -119,3 +119,10 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 15 +#define RGB_MATRIX_LED_FLUSH_LIMIT 10 +#define RGB_MATRIX_EXTRA_TOG + +#include "config_led.h" diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c new file mode 100644 index 000000000000..afdbf3a2227b --- /dev/null +++ b/keyboards/massdrop/ctrl/config_led.c @@ -0,0 +1,144 @@ +#ifdef RGB_MATRIX_ENABLE +#include "ctrl.h" + +#include "led_matrix.h" +#include "rgb_matrix.h" +#include "config_led.h" + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + // 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 + { { 0|(0<<4) }, { 7, 5 }, 0 }, + { { 0|(1<<4) }, { 31, 5 }, 0 }, + { { 0|(2<<4) }, { 43, 5 }, 0 }, + { { 0|(3<<4) }, { 55, 5 }, 0 }, + { { 0|(4<<4) }, { 67, 5 }, 0 }, + { { 0|(5<<4) }, { 85, 5 }, 0 }, + { { 0|(6<<4) }, { 97, 5 }, 0 }, + { { 0|(7<<4) }, { 109, 5 }, 0 }, + { { 6|(0<<4) }, { 121, 5 }, 0 }, + { { 6|(1<<4) }, { 139, 5 }, 0 }, + { { 6|(2<<4) }, { 151, 5 }, 0 }, + { { 6|(3<<4) }, { 163, 5 }, 0 }, + { { 6|(4<<4) }, { 175, 5 }, 0 }, + { { 6|(5<<4) }, { 193, 5 }, 0 }, + { { 6|(6<<4) }, { 205, 5 }, 1 }, + { { 6|(7<<4) }, { 217, 5 }, 0 }, + // 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 + { { 1|(0<<4) }, { 7, 20 }, 0 }, + { { 1|(1<<4) }, { 19, 20 }, 0 }, + { { 1|(2<<4) }, { 31, 20 }, 0 }, + { { 1|(3<<4) }, { 43, 20 }, 0 }, + { { 1|(4<<4) }, { 55, 20 }, 0 }, + { { 1|(5<<4) }, { 67, 20 }, 0 }, + { { 1|(6<<4) }, { 79, 20 }, 0 }, + { { 1|(7<<4) }, { 91, 20 }, 0 }, + { { 7|(0<<4) }, { 103, 20 }, 0 }, + { { 7|(1<<4) }, { 115, 20 }, 0 }, + { { 7|(2<<4) }, { 127, 20 }, 0 }, + { { 7|(3<<4) }, { 139, 20 }, 0 }, + { { 7|(4<<4) }, { 151, 20 }, 0 }, + { { 7|(5<<4) }, { 169, 20 }, 0 }, + { { 7|(6<<4) }, { 193, 20 }, 0 }, + { { 7|(7<<4) }, { 205, 20 }, 0 }, + { { 9|(7<<4) }, { 217, 20 }, 0 }, + // 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 + { { 2|(0<<4) }, { 10, 30 }, 0 }, + { { 2|(1<<4) }, { 25, 30 }, 0 }, + { { 2|(2<<4) }, { 37, 30 }, 0 }, + { { 2|(3<<4) }, { 49, 30 }, 0 }, + { { 2|(4<<4) }, { 61, 30 }, 0 }, + { { 2|(5<<4) }, { 73, 30 }, 0 }, + { { 2|(6<<4) }, { 85, 30 }, 0 }, + { { 2|(7<<4) }, { 97, 30 }, 0 }, + { { 8|(0<<4) }, { 109, 30 }, 0 }, + { { 8|(1<<4) }, { 121, 30 }, 0 }, + { { 8|(2<<4) }, { 133, 30 }, 0 }, + { { 8|(3<<4) }, { 145, 30 }, 0 }, + { { 8|(4<<4) }, { 157, 30 }, 0 }, + { { 8|(5<<4) }, { 172, 30 }, 0 }, + { { 8|(6<<4) }, { 193, 30 }, 0 }, + { { 8|(7<<4) }, { 205, 30 }, 0 }, + { { 9|(6<<4) }, { 217, 30 }, 0 }, + // 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 + { { 3|(0<<4) }, { 11, 39 }, 1 }, + { { 3|(1<<4) }, { 28, 39 }, 0 }, + { { 3|(2<<4) }, { 40, 39 }, 0 }, + { { 3|(3<<4) }, { 52, 39 }, 0 }, + { { 3|(4<<4) }, { 64, 39 }, 0 }, + { { 3|(5<<4) }, { 76, 39 }, 0 }, + { { 3|(6<<4) }, { 88, 39 }, 0 }, + { { 3|(7<<4) }, { 100, 39 }, 0 }, + { { 9|(0<<4) }, { 112, 39 }, 0 }, + { { 9|(1<<4) }, { 124, 39 }, 0 }, + { { 9|(2<<4) }, { 136, 39 }, 0 }, + { { 9|(3<<4) }, { 148, 39 }, 0 }, + { { 9|(4<<4) }, { 168, 39 }, 0 }, + // 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 + { { 4|(0<<4) }, { 14, 49 }, 0 }, + { { 4|(1<<4) }, { 34, 49 }, 0 }, + { { 4|(2<<4) }, { 46, 49 }, 0 }, + { { 4|(3<<4) }, { 58, 49 }, 0 }, + { { 4|(4<<4) }, { 70, 49 }, 0 }, + { { 4|(5<<4) }, { 82, 49 }, 0 }, + { { 4|(6<<4) }, { 94, 49 }, 0 }, + { { 4|(7<<4) }, { 106, 49 }, 0 }, + { { 10|(0<<4) }, { 118, 49 }, 0 }, + { { 10|(1<<4) }, { 130, 49 }, 0 }, + { { 10|(2<<4) }, { 142, 49 }, 0 }, + { { 10|(3<<4) }, { 165, 49 }, 0 }, + { { 9|(5<<4) }, { 205, 49 }, 0 }, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + { { 5|(0<<4) }, { 8, 59 }, 0 }, + { { 5|(1<<4) }, { 23, 59 }, 0 }, + { { 5|(2<<4) }, { 38, 59 }, 0 }, + { { 5|(3<<4) }, { 83, 59 }, 0 }, + { { 5|(4<<4) }, { 129, 59 }, 0 }, + { { 5|(5<<4) }, { 144, 59 }, 0 }, + { { 5|(6<<4) }, { 159, 59 }, 0 }, + { { 5|(7<<4) }, { 174, 59 }, 0 }, + { { 10|(4<<4) }, { 193, 59 }, 0 }, + { { 10|(5<<4) }, { 205, 59 }, 0 }, + { { 10|(6<<4) }, { 217, 59 }, 0 }, + // Underglow / Border + { { 0xFF }, { 222, 64 }, 0 }, + { { 0xFF }, { 204, 64 }, 0 }, + { { 0xFF }, { 186, 64 }, 0 }, + { { 0xFF }, { 167, 64 }, 0 }, + { { 0xFF }, { 149, 64 }, 0 }, + { { 0xFF }, { 130, 64 }, 0 }, + { { 0xFF }, { 112, 64 }, 0 }, + { { 0xFF }, { 94, 64 }, 0 }, + { { 0xFF }, { 75, 64 }, 0 }, + { { 0xFF }, { 57, 64 }, 0 }, + { { 0xFF }, { 38, 64 }, 0 }, + { { 0xFF }, { 20, 64 }, 0 }, + { { 0xFF }, { 0, 64 }, 0 }, + { { 0xFF }, { 0, 47 }, 0 }, + { { 0xFF }, { 0, 32 }, 0 }, + { { 0xFF }, { 0, 17 }, 0 }, + { { 0xFF }, { 0, 0 }, 0 }, + { { 0xFF }, { 20, 0 }, 0 }, + { { 0xFF }, { 38, 0 }, 0 }, + { { 0xFF }, { 57, 0 }, 0 }, + { { 0xFF }, { 75, 0 }, 0 }, + { { 0xFF }, { 94, 0 }, 0 }, + { { 0xFF }, { 112, 0 }, 0 }, + { { 0xFF }, { 130, 0 }, 0 }, + { { 0xFF }, { 149, 0 }, 0 }, + { { 0xFF }, { 167, 0 }, 0 }, + { { 0xFF }, { 186, 0 }, 0 }, + { { 0xFF }, { 204, 0 }, 0 }, + { { 0xFF }, { 222, 1 }, 0 }, + { { 0xFF }, { 224, 17 }, 0 }, + { { 0xFF }, { 224, 32 }, 0 }, + { { 0xFF }, { 224, 47 }, 0 }, +}; + +#ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) +{ + led_matrix_indicators(); +} +#endif // USB_LED_INDICATOR_ENABLE + +#endif diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h index 471ab7007d1f..0c91a0c80baf 100644 --- a/keyboards/massdrop/ctrl/config_led.h +++ b/keyboards/massdrop/ctrl/config_led.h @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _config_led_h_ -#define _config_led_h_ +#pragma once //Define number of ISSI3733 drivers being used (1...16) #define ISSI3733_DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT //Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic) #define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE } @@ -30,21 +30,24 @@ along with this program. If not, see . //Count of LED bodies #define ISSI3733_LED_COUNT 119 -//Default Global Current Register value (Default brightness 0 - 255) -#define ISSI3733_GCR_DEFAULT 128 - #define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus #define LED_GCR_STEP 10 //GCR increment/decrement value -//Automatic power rollback and recovery -#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) -#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) -#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) - +#ifdef USE_MASSDROP_CONFIGURATOR #define ANIMATION_SPEED_STEP 1 +#define BREATHE_STEP 1 #define BREATHE_MIN_STEP 0 #define BREATHE_MAX_STEP 255 +#endif + +//Default Global Current Register value (Default brightness 0 - 255) +#define ISSI3733_GCR_DEFAULT LED_GCR_MAX + +//Automatic power rollback and recovery +#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) +#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) +#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) //LED Mapping - More practically generated from a spreadsheet program //id: ID of the LED (Sync with PCB callouts) @@ -187,5 +190,3 @@ along with this program. If not, see . #define USB_LED_COMPOSE_SCANCODE 255 #define USB_LED_KANA_SCANCODE 255 #endif //USB_LED_INDICATOR_ENABLE - -#endif //_config_led_h_ diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index cdb627f9c4b5..182abbbad4fa 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum ctrl_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -36,21 +24,21 @@ 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, KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = 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_MUTE, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = 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_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c new file mode 100644 index 000000000000..16f88ffe1dc4 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c @@ -0,0 +1,226 @@ +#include QMK_KEYBOARD_H + +enum ctrl_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +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_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //LEDs are normally inactive, no processing is performed on them + //Flags are used in matching criteria for an LED to be active and indicate how to color it + //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //LED IDs can be found in config_led.h in the keyboard's directory + //Examples are below + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //Specific LEDs use the user's selected pattern while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 }, + + //Specific LEDs use specified RGB values while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, + + //All LEDs use the user's selected pattern + //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green + //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1) + //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //When layer 1 is active, key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF) + //When layer 1 is active, edge LEDs use green (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000) + //When layer 1 is active, edge LEDs use green (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF) + // { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF0000, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255, .layer = 1 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFF800000, .id3 = 0x00FFFFFF, .g = 127, .layer = 1 }, + + //All key LEDs use red while edge LEDs use the active pattern + //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF) + //Edge uses active pattern (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000) + //Edge uses active pattern (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF) + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFF800000, .id3 = 0x00FFFFFF }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index e41b5eba20ce..41cf82757240 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum ctrl_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = 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_MUTE, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = 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_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c new file mode 100644 index 000000000000..6dfc21378627 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +enum ctrl_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +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_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //Please see ../default_md/keymap.c for examples + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md new file mode 100644 index 000000000000..5ee630dfb803 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md @@ -0,0 +1,5 @@ +# THIS KEYMAP IS BROKEN + +The CTRL and ALT have both been switched to using the QMK RGB Matrix system, +rendering any custom effects that used the old, custom Massdrop lighting system, +BROKEN. diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index 0bdc15214016..58911aa75741 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -15,7 +15,6 @@ extern issi3733_led_t *lede; extern issi3733_led_t led_map[]; -extern led_disp_t disp; enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase @@ -238,8 +237,6 @@ void led_matrix_run(void) { led_cur = led_map; - disp.frame += 1; - breathe_mult = 1; if (led_animation_breathing) @@ -314,7 +311,7 @@ void led_matrix_run(void) } float pomod; - pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; + pomod = (float)(g_tick % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; //Add in any moving effects if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L))) diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/ctrl/led_programs.c b/keyboards/massdrop/ctrl/led_programs.c deleted file mode 100644 index ca27016454dc..000000000000 --- a/keyboards/massdrop/ctrl/led_programs.c +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 2018 Massdrop Inc. - -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 "ctrl.h" -#include "led_matrix.h" - -//Teal <-> Salmon -led_setup_t leds_teal_salmon[] = { - { .hs = 0, .he = 33, .rs = 24, .re = 24, .gs = 215, .ge = 215, .bs = 204, .be = 204, .ef = EF_NONE }, - { .hs = 33, .he = 66, .rs = 24, .re = 255, .gs = 215, .ge = 114, .bs = 204, .be = 118, .ef = EF_NONE }, - { .hs = 66, .he = 100, .rs = 255, .re = 255, .gs = 114, .ge = 114, .bs = 118, .be = 118, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Yellow -led_setup_t leds_yellow[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Off -led_setup_t leds_off[] = { - { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Red -led_setup_t leds_red[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Green -led_setup_t leds_green[] = { - { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Blue -led_setup_t leds_blue[] = { - { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_NONE }, - { .end = 1 }, -}; - -//White -led_setup_t leds_white[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE }, - { .end = 1 }, -}; - -//White with moving red stripe -led_setup_t leds_white_with_red_stripe[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE }, - { .hs = 0, .he = 15, .rs = 0, .re = 0, .gs = 0, .ge = 255, .bs = 0, .be = 255, .ef = EF_SCR_R | EF_SUBTRACT }, - { .hs = 15, .he = 30, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 0, .ef = EF_SCR_R | EF_SUBTRACT }, - { .end = 1 }, -}; - -//Black with moving red stripe -led_setup_t leds_black_with_red_stripe[] = { - { .hs = 0, .he = 15, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R }, - { .hs = 15, .he = 30, .rs = 255, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R }, - { .end = 1 }, -}; - -//Rainbow no scrolling -led_setup_t leds_rainbow_ns[] = { - { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER }, - { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER }, - { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER }, - { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER }, - { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER }, - { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER }, - { .end = 1 }, -}; - -//Rainbow scrolling -led_setup_t leds_rainbow_s[] = { - { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R }, - { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R }, - { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER | EF_SCR_R }, - { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R }, - { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R }, - { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER | EF_SCR_R }, - { .end = 1 }, -}; - -//Add new LED animations here using one from above as example -//The last entry must be { .end = 1 } -//Add the new animation name to the list below following its format - -void *led_setups[] = { - leds_rainbow_s, - leds_rainbow_ns, - leds_teal_salmon, - leds_yellow, - leds_red, - leds_green, - leds_blue, - leds_white, - leds_white_with_red_stripe, - leds_black_with_red_stripe, - leds_off -}; - -const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]); diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk index c5539158f580..aa45c68056d8 100644 --- a/keyboards/massdrop/ctrl/rules.mk +++ b/keyboards/massdrop/ctrl/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = led_programs.c -SRC += matrix.c +SRC = matrix.c +SRC += config_led.c #For platform and packs ARM_ATSAM = SAMD51J18A @@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift + +# Custom RGB matrix handling +RGB_MATRIX_ENABLE = custom diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 0728e2431fe6..413e5777fcdb 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -142,11 +142,28 @@ void rgb_matrix_update_pwm_buffers(void) { } void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { +#ifdef RGB_MATRIX_EXTRA_TOG + const bool is_key = g_rgb_leds[index].matrix_co.raw != 0xff; + if ( + (rgb_matrix_config.enable == RGB_ZONE_KEYS && !is_key) || + (rgb_matrix_config.enable == RGB_ZONE_UNDER && is_key) + ) { + rgb_matrix_driver.set_color(index, 0, 0, 0); + return; + } +#endif + rgb_matrix_driver.set_color(index, red, green, blue); } void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { +#ifdef RGB_MATRIX_EXTRA_TOG + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + rgb_matrix_set_color(i, red, green, blue); + } +#else rgb_matrix_driver.set_color_all(red, green, blue); +#endif } bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { @@ -494,7 +511,7 @@ void rgb_matrix_set_suspend_state(bool state) { } void rgb_matrix_toggle(void) { - rgb_matrix_config.enable ^= 1; + rgb_matrix_config.enable++; if (!rgb_matrix_config.enable) { rgb_task_state = STARTING; } diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index f7643d2b0c81..908e96da56d2 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h @@ -73,11 +73,18 @@ typedef struct PACKED { uint8_t modifier:1; } rgb_led; +typedef enum { + RGB_ZONE_OFF = 0, + RGB_ZONE_ALL, + RGB_ZONE_KEYS, + RGB_ZONE_UNDER, +} rgb_zone_t; + typedef union { uint32_t raw; struct PACKED { - bool enable :1; - uint8_t mode :7; + uint8_t enable :2; + uint8_t mode :6; uint8_t hue :8; uint8_t sat :8; uint8_t val :8; diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c index e34965df64e1..9c2c47d5610c 100644 --- a/tmk_core/common/arm_atsam/suspend.c +++ b/tmk_core/common/arm_atsam/suspend.c @@ -35,7 +35,9 @@ void suspend_power_down_kb(void) { */ void suspend_power_down(void) { +#ifdef RGB_MATRIX_ENABLE I2C3733_Control_Set(0); //Disable LED driver +#endif suspend_power_down_kb(); } @@ -75,10 +77,9 @@ void suspend_wakeup_init_kb(void) { * FIXME: needs doc */ void suspend_wakeup_init(void) { - /* If LEDs are set to enabled, enable the hardware */ - if (led_enabled) { - I2C3733_Control_Set(1); - } +#ifdef RGB_MATRIX_ENABLE + I2C3733_Control_Set(1); +#endif suspend_wakeup_init_kb(); } diff --git a/tmk_core/protocol/arm_atsam.mk b/tmk_core/protocol/arm_atsam.mk index 04e02790a0dc..8d6f724f0996 100644 --- a/tmk_core/protocol/arm_atsam.mk +++ b/tmk_core/protocol/arm_atsam.mk @@ -4,7 +4,10 @@ SRC += $(ARM_ATSAM_DIR)/adc.c SRC += $(ARM_ATSAM_DIR)/clks.c SRC += $(ARM_ATSAM_DIR)/d51_util.c SRC += $(ARM_ATSAM_DIR)/i2c_master.c -SRC += $(ARM_ATSAM_DIR)/led_matrix.c +ifeq ($(RGB_MATRIX_ENABLE),custom) + SRC += $(ARM_ATSAM_DIR)/led_matrix_programs.c + SRC += $(ARM_ATSAM_DIR)/led_matrix.c +endif SRC += $(ARM_ATSAM_DIR)/main_arm_atsam.c SRC += $(ARM_ATSAM_DIR)/spi.c SRC += $(ARM_ATSAM_DIR)/startup.c diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h index 928af8c7e170..88109186aad9 100644 --- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h +++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h @@ -34,7 +34,10 @@ along with this program. If not, see . #ifndef MD_BOOTLOADER #include "main_arm_atsam.h" +#ifdef RGB_MATRIX_ENABLE #include "led_matrix.h" +#include "rgb_matrix.h" +#endif #include "issi3733_driver.h" #include "./usb/compiler.h" #include "./usb/udc.h" diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c index d91a851f3776..1741d9ac5b02 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.c +++ b/tmk_core/protocol/arm_atsam/i2c_master.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "arm_atsam_protocol.h" -#ifndef MD_BOOTLOADER +#if !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) #include @@ -37,7 +37,7 @@ static uint8_t dma_sendbuf[I2C_DMA_MAX_SEND]; //Data being written to I2C volatile uint8_t i2c_led_q_running; -#endif //MD_BOOTLOADER +#endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) void i2c0_init(void) { @@ -112,7 +112,7 @@ void i2c0_stop(void) } } -#ifndef MD_BOOTLOADER +#if !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) void i2c1_init(void) { DBGC(DC_I2C1_INIT_BEGIN); @@ -583,4 +583,4 @@ uint8_t i2c_led_q_run(void) return 1; } -#endif //MD_BOOTLOADER +#endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index 04d05af6db65..e29fb6587c9f 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -17,9 +17,19 @@ along with this program. If not, see . #include "arm_atsam_protocol.h" #include "tmk_core/common/led.h" +#include "rgb_matrix.h" #include #include +#ifdef USE_MASSDROP_CONFIGURATOR +__attribute__((weak)) +led_instruction_t led_instructions[] = { { .end = 1 } }; +static void led_matrix_massdrop_config_override(int i); +#endif // USE_MASSDROP_CONFIGURATOR + +extern rgb_config_t rgb_matrix_config; +extern rgb_counters_t g_rgb_counters; + void SERCOM1_0_Handler( void ) { if (SERCOM1->I2CM.INTFLAG.bit.ERROR) @@ -51,14 +61,17 @@ void DMAC_0_Handler( void ) issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; -issi3733_led_t led_map[ISSI3733_LED_COUNT+1] = ISSI3733_LED_MAP; -issi3733_led_t *lede = led_map + ISSI3733_LED_COUNT; //End pointer of mapping +issi3733_led_t led_map[ISSI3733_LED_COUNT] = ISSI3733_LED_MAP; +RGB led_buffer[ISSI3733_LED_COUNT]; uint8_t gcr_desired; -uint8_t gcr_breathe; -uint8_t gcr_use; uint8_t gcr_actual; uint8_t gcr_actual_last; +#ifdef USE_MASSDROP_CONFIGURATOR +uint8_t gcr_breathe; +float breathe_mult; +float pomod; +#endif #define ACT_GCR_NONE 0 #define ACT_GCR_INC 1 @@ -73,11 +86,14 @@ static uint8_t v_5v_cat_hit; void gcr_compute(void) { uint8_t action = ACT_GCR_NONE; + uint8_t gcr_use = gcr_desired; +#ifdef USE_MASSDROP_CONFIGURATOR if (led_animation_breathing) + { gcr_use = gcr_breathe; - else - gcr_use = gcr_desired; + } +#endif //If the 5v takes a catastrophic hit, disable the LED drivers briefly, assert auto gcr mode, min gcr and let the auto take over if (v_5v < V5_CAT) @@ -151,6 +167,7 @@ void gcr_compute(void) gcr_actual -= LED_GCR_STEP_AUTO; gcr_min_counter = 0; +#ifdef USE_MASSDROP_CONFIGURATOR //If breathe mode is active, the top end can fluctuate if the host can not supply enough current //So set the breathe GCR to where it becomes stable if (led_animation_breathing == 1) @@ -160,12 +177,11 @@ void gcr_compute(void) // and the same would happen maybe one or two more times. Therefore I'm favoring // powering through one full breathe and letting gcr settle completely } +#endif } } } -led_disp_t disp; - void issi3733_prepare_arrays(void) { memset(issidrv,0,sizeof(issi3733_driver_t) * ISSI3733_DRIVER_COUNT); @@ -178,361 +194,309 @@ void issi3733_prepare_arrays(void) issidrv[i].addr = addrs[i]; } - issi3733_led_t *cur = led_map; - - while (cur < lede) + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { //BYTE: 1 + (SW-1)*16 + (CS-1) - cur->rgb.g = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swg-1)*16 + (cur->adr.cs-1)); - cur->rgb.r = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swr-1)*16 + (cur->adr.cs-1)); - cur->rgb.b = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swb-1)*16 + (cur->adr.cs-1)); + led_map[i].rgb.g = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swg-1)*16 + (led_map[i].adr.cs-1)); + led_map[i].rgb.r = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swr-1)*16 + (led_map[i].adr.cs-1)); + led_map[i].rgb.b = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swb-1)*16 + (led_map[i].adr.cs-1)); //BYTE: 1 + (SW-1)*2 + (CS-1)/8 //BIT: (CS-1)%8 - *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swg-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8)); - *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swr-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8)); - *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swb-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8)); - - cur++; + *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swg-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8)); + *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swr-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8)); + *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swb-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8)); } } -void disp_calc_extents(void) +void led_matrix_prepare(void) { - issi3733_led_t *cur = led_map; - - disp.left = 1e10; - disp.right = -1e10; - disp.top = -1e10; - disp.bottom = 1e10; - - while (cur < lede) + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { - if (cur->x < disp.left) disp.left = cur->x; - if (cur->x > disp.right) disp.right = cur->x; - if (cur->y < disp.bottom) disp.bottom = cur->y; - if (cur->y > disp.top) disp.top = cur->y; - - cur++; + *led_map[i].rgb.r = 0; + *led_map[i].rgb.g = 0; + *led_map[i].rgb.b = 0; } - - disp.width = disp.right - disp.left; - disp.height = disp.top - disp.bottom; - disp.max_distance = sqrtf(powf(disp.width, 2) + powf(disp.height, 2)); } -void disp_pixel_setup(void) +void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) { - issi3733_led_t *cur = led_map; - - while (cur < lede) + if (i < ISSI3733_LED_COUNT) { - cur->px = (cur->x - disp.left) / disp.width * 100; - cur->py = (cur->y - disp.bottom) / disp.height * 100; - *cur->rgb.r = 0; - *cur->rgb.g = 0; - *cur->rgb.b = 0; - - cur++; +#ifdef USE_MASSDROP_CONFIGURATOR + led_matrix_massdrop_config_override(i); +#else + led_buffer[i].r = r; + led_buffer[i].g = g; + led_buffer[i].b = b; +#endif } } -void led_matrix_prepare(void) +void led_set_all(uint8_t r, uint8_t g, uint8_t b) { - disp_calc_extents(); - disp_pixel_setup(); + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) + { + led_set_one(i, r, g, b); + } } -uint8_t led_enabled; -float led_animation_speed; -uint8_t led_animation_direction; -uint8_t led_animation_orientation; -uint8_t led_animation_breathing; -uint8_t led_animation_breathe_cur; -uint8_t breathe_step; -uint8_t breathe_dir; -uint8_t led_animation_circular; -uint64_t led_next_run; - -uint8_t led_animation_id; -uint8_t led_lighting_mode; - -issi3733_led_t *led_cur; -uint8_t led_per_run = 15; -float breathe_mult; - -__attribute__ ((weak)) -void led_matrix_run(void) +void init(void) { - float ro; - float go; - float bo; - float po; - - uint8_t led_this_run = 0; - led_setup_t *f = (led_setup_t*)led_setups[led_animation_id]; - - if (led_cur == 0) //Denotes start of new processing cycle in the case of chunked processing - { - led_cur = led_map; + DBGC(DC_LED_MATRIX_INIT_BEGIN); - disp.frame += 1; + issi3733_prepare_arrays(); - breathe_mult = 1; + led_matrix_prepare(); - if (led_animation_breathing) - { - led_animation_breathe_cur += breathe_step * breathe_dir; + gcr_min_counter = 0; + v_5v_cat_hit = 0; - if (led_animation_breathe_cur >= BREATHE_MAX_STEP) - breathe_dir = -1; - else if (led_animation_breathe_cur <= BREATHE_MIN_STEP) - breathe_dir = 1; + DBGC(DC_LED_MATRIX_INIT_COMPLETE); +} - //Brightness curve created for 256 steps, 0 - ~98% - breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur; - if (breathe_mult > 1) breathe_mult = 1; - else if (breathe_mult < 0) breathe_mult = 0; - } - } +void flush(void) +{ +#ifdef USE_MASSDROP_CONFIGURATOR + if (!led_enabled) { return; } //Prevent calculations and I2C traffic if LED drivers are not enabled +#else + if (!sr_exp_data.bit.SDB_N) { return; } //Prevent calculations and I2C traffic if LED drivers are not enabled +#endif - uint8_t fcur = 0; - uint8_t fmax = 0; + // Wait for previous transfer to complete + while (i2c_led_q_running) {} - //Frames setup - while (f[fcur].end != 1) + // Copy buffer to live DMA region + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { - fcur++; //Count frames + *led_map[i].rgb.r = led_buffer[i].r; + *led_map[i].rgb.g = led_buffer[i].g; + *led_map[i].rgb.b = led_buffer[i].b; } - fmax = fcur; //Store total frames count +#ifdef USE_MASSDROP_CONFIGURATOR + breathe_mult = 1; - while (led_cur < lede && led_this_run < led_per_run) + if (led_animation_breathing) { - ro = 0; - go = 0; - bo = 0; - - if (led_lighting_mode == LED_MODE_KEYS_ONLY && led_cur->scan == 255) - { - //Do not act on this LED - } - else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && led_cur->scan != 255) - { - //Do not act on this LED - } - else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) - { - //Do not act on this LED (Only show indicators) - } - else - { - //Act on LED - for (fcur = 0; fcur < fmax; fcur++) - { - - if (led_animation_circular) { - po = sqrtf((powf(fabsf((disp.width / 2) - (led_cur->x - disp.left)), 2) + powf(fabsf((disp.height / 2) - (led_cur->y - disp.bottom)), 2))) / disp.max_distance * 100; - } - else { - if (led_animation_orientation) - { - po = led_cur->py; - } - else - { - po = led_cur->px; - } - } - - float pomod; - pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; - - //Add in any moving effects - if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L))) - { - pomod *= 100.0f; - pomod = (uint32_t)pomod % 10000; - pomod /= 100.0f; - - po -= pomod; - - if (po > 100) po -= 100; - else if (po < 0) po += 100; - } - else if ((!led_animation_direction && f[fcur].ef & EF_SCR_L) || (led_animation_direction && (f[fcur].ef & EF_SCR_R))) - { - pomod *= 100.0f; - pomod = (uint32_t)pomod % 10000; - pomod /= 100.0f; - po += pomod; - - if (po > 100) po -= 100; - else if (po < 0) po += 100; - } + //+60us 119 LED + led_animation_breathe_cur += BREATHE_STEP * breathe_dir; + + if (led_animation_breathe_cur >= BREATHE_MAX_STEP) + breathe_dir = -1; + else if (led_animation_breathe_cur <= BREATHE_MIN_STEP) + breathe_dir = 1; + + //Brightness curve created for 256 steps, 0 - ~98% + breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur; + if (breathe_mult > 1) breathe_mult = 1; + else if (breathe_mult < 0) breathe_mult = 0; + } - //Check if LED's po is in current frame - if (po < f[fcur].hs) continue; - if (po > f[fcur].he) continue; - //note: < 0 or > 100 continue + //This should only be performed once per frame + pomod = (float)((g_rgb_counters.tick / 10) % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; + pomod *= 100.0f; + pomod = (uint32_t)pomod % 10000; + pomod /= 100.0f; - //Calculate the po within the start-stop percentage for color blending - po = (po - f[fcur].hs) / (f[fcur].he - f[fcur].hs); +#endif // USE_MASSDROP_CONFIGURATOR - //Add in any color effects - if (f[fcur].ef & EF_OVER) - { - ro = (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go = (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo = (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - else if (f[fcur].ef & EF_SUBTRACT) - { - ro -= (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go -= (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo -= (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - else - { - ro += (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go += (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo += (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - } - } + uint8_t drvid; - //Clamp values 0-255 - if (ro > 255) ro = 255; else if (ro < 0) ro = 0; - if (go > 255) go = 255; else if (go < 0) go = 0; - if (bo > 255) bo = 255; else if (bo < 0) bo = 0; + //NOTE: GCR does not need to be timed with LED processing, but there is really no harm + if (gcr_actual != gcr_actual_last) + { + for (drvid=0;drvidrgb.r = (uint8_t)ro; - *led_cur->rgb.g = (uint8_t)go; - *led_cur->rgb.b = (uint8_t)bo; + i2c_led_q_run(); +} -#ifdef USB_LED_INDICATOR_ENABLE - if (keyboard_leds()) +void led_matrix_indicators(void) +{ + uint8_t kbled = keyboard_leds(); + if (kbled && rgb_matrix_config.enable) + { + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { - uint8_t kbled = keyboard_leds(); if ( - #if USB_LED_NUM_LOCK_SCANCODE != 255 - (led_cur->scan == USB_LED_NUM_LOCK_SCANCODE && kbled & (1<scan == USB_LED_CAPS_LOCK_SCANCODE && kbled & (1<scan == USB_LED_SCROLL_LOCK_SCANCODE && kbled & (1<scan == USB_LED_COMPOSE_SCANCODE && kbled & (1<scan == USB_LED_KANA_SCANCODE && kbled & (1<rgb.r > 127) *led_cur->rgb.r = 0; - else *led_cur->rgb.r = 255; - if (*led_cur->rgb.g > 127) *led_cur->rgb.g = 0; - else *led_cur->rgb.g = 255; - if (*led_cur->rgb.b > 127) *led_cur->rgb.b = 0; - else *led_cur->rgb.b = 255; + led_buffer[i].r = 255 - led_buffer[i].r; + led_buffer[i].g = 255 - led_buffer[i].g; + led_buffer[i].b = 255 - led_buffer[i].b; } } -#endif //USB_LED_INDICATOR_ENABLE - - led_cur++; - led_this_run++; } -} -uint8_t led_matrix_init(void) -{ - DBGC(DC_LED_MATRIX_INIT_BEGIN); +} - issi3733_prepare_arrays(); +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = led_set_one, + .set_color_all = led_set_all +}; + +/*============================================================================== += Legacy Lighting Support = +==============================================================================*/ + +#ifdef USE_MASSDROP_CONFIGURATOR +// Ported from Massdrop QMK Github Repo + +// TODO?: wire these up to keymap.c +uint8_t led_animation_orientation = 0; +uint8_t led_animation_direction = 0; +uint8_t led_animation_breathing = 0; +uint8_t led_animation_id = 0; +float led_animation_speed = 4.0f; +uint8_t led_lighting_mode = LED_MODE_NORMAL; +uint8_t led_enabled = 1; +uint8_t led_animation_breathe_cur = BREATHE_MIN_STEP; +uint8_t breathe_dir = 1; + +static void led_run_pattern(led_setup_t *f, float* ro, float* go, float* bo, float pos) { + float po; - led_matrix_prepare(); + while (f->end != 1) + { + po = pos; //Reset po for new frame - disp.frame = 0; - led_next_run = 0; - - led_enabled = 1; - led_animation_id = 0; - led_lighting_mode = LED_MODE_NORMAL; - led_animation_speed = 4.0f; - led_animation_direction = 0; - led_animation_orientation = 0; - led_animation_breathing = 0; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_step = 1; - breathe_dir = 1; - led_animation_circular = 0; + //Add in any moving effects + if ((!led_animation_direction && f->ef & EF_SCR_R) || (led_animation_direction && (f->ef & EF_SCR_L))) + { + po -= pomod; - gcr_min_counter = 0; - v_5v_cat_hit = 0; + if (po > 100) po -= 100; + else if (po < 0) po += 100; + } + else if ((!led_animation_direction && f->ef & EF_SCR_L) || (led_animation_direction && (f->ef & EF_SCR_R))) + { + po += pomod; - //Run led matrix code once for initial LED coloring - led_cur = 0; - rgb_matrix_init_user(); - led_matrix_run(); + if (po > 100) po -= 100; + else if (po < 0) po += 100; + } - DBGC(DC_LED_MATRIX_INIT_COMPLETE); + //Check if LED's po is in current frame + if (po < f->hs) { f++; continue; } + if (po > f->he) { f++; continue; } + //note: < 0 or > 100 continue - return 0; -} + //Calculate the po within the start-stop percentage for color blending + po = (po - f->hs) / (f->he - f->hs); -__attribute__ ((weak)) -void rgb_matrix_init_user(void) { + //Add in any color effects + if (f->ef & EF_OVER) + { + *ro = (po * (f->re - f->rs)) + f->rs;// + 0.5; + *go = (po * (f->ge - f->gs)) + f->gs;// + 0.5; + *bo = (po * (f->be - f->bs)) + f->bs;// + 0.5; + } + else if (f->ef & EF_SUBTRACT) + { + *ro -= (po * (f->re - f->rs)) + f->rs;// + 0.5; + *go -= (po * (f->ge - f->gs)) + f->gs;// + 0.5; + *bo -= (po * (f->be - f->bs)) + f->bs;// + 0.5; + } + else + { + *ro += (po * (f->re - f->rs)) + f->rs;// + 0.5; + *go += (po * (f->ge - f->gs)) + f->gs;// + 0.5; + *bo += (po * (f->be - f->bs)) + f->bs;// + 0.5; + } + f++; + } } -#define LED_UPDATE_RATE 10 //ms - -//led data processing can take time, so process data in chunks to free up the processor -//this is done through led_cur and lede -void led_matrix_task(void) +static void led_matrix_massdrop_config_override(int i) { - if (led_enabled) - { - //If an update may run and frame processing has completed - if (timer_read64() >= led_next_run && led_cur == lede) - { - uint8_t drvid; + float ro = 0; + float go = 0; + float bo = 0; + + float po = (led_animation_orientation) + ? (float)g_rgb_leds[i].point.y / 64.f * 100 + : (float)g_rgb_leds[i].point.x / 224.f * 100; + + uint8_t highest_active_layer = biton32(layer_state); + + if (led_lighting_mode == LED_MODE_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw == 0xff) { + //Do not act on this LED + } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw != 0xff) { + //Do not act on this LED + } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { + //Do not act on this LED (Only show indicators) + } else { + led_instruction_t* led_cur_instruction = led_instructions; + while (!led_cur_instruction->end) { + // Check if this applies to current layer + if ((led_cur_instruction->flags & LED_FLAG_MATCH_LAYER) && + (led_cur_instruction->layer != highest_active_layer)) { + goto next_iter; + } - led_next_run = timer_read64() + LED_UPDATE_RATE; //Set next frame update time + // Check if this applies to current index + if (led_cur_instruction->flags & LED_FLAG_MATCH_ID) { + uint8_t modid = i / 32; //Calculate which id# contains the led bit + uint32_t modidbit = 1 << (i % 32); //Calculate the bit within the id# + uint32_t *bitfield = &led_cur_instruction->id0 + modid; //Add modid as offset to id0 address. *bitfield is now idX of the led id + if (~(*bitfield) & modidbit) { //Check if led bit is not set in idX + goto next_iter; + } + } - //NOTE: GCR does not need to be timed with LED processing, but there is really no harm - if (gcr_actual != gcr_actual_last) - { - for (drvid=0;drvidflags & LED_FLAG_USE_RGB) { + ro = led_cur_instruction->r; + go = led_cur_instruction->g; + bo = led_cur_instruction->b; + } else if (led_cur_instruction->flags & LED_FLAG_USE_PATTERN) { + led_run_pattern(led_setups[led_cur_instruction->pattern_id], &ro, &go, &bo, po); + } else if (led_cur_instruction->flags & LED_FLAG_USE_ROTATE_PATTERN) { + led_run_pattern(led_setups[led_animation_id], &ro, &go, &bo, po); } - for (drvid=0;drvid 255) ro = 255; else if (ro < 0) ro = 0; + if (go > 255) go = 255; else if (go < 0) go = 0; + if (bo > 255) bo = 255; else if (bo < 0) bo = 0; - led_cur = 0; //Signal next frame calculations may begin + if (led_animation_breathing) + { + ro *= breathe_mult; + go *= breathe_mult; + bo *= breathe_mult; } } - //Process more data if not finished - if (led_cur != lede) - { - //DBG_1_OFF; //debug profiling - led_matrix_run(); - //DBG_1_ON; //debug profiling - } + led_buffer[i].r = (uint8_t)ro; + led_buffer[i].g = (uint8_t)go; + led_buffer[i].b = (uint8_t)bo; } +#endif // USE_MASSDROP_CONFIGURATOR diff --git a/tmk_core/protocol/arm_atsam/led_matrix.h b/tmk_core/protocol/arm_atsam/led_matrix.h index 4513234e7f37..1316efd9a4fd 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.h +++ b/tmk_core/protocol/arm_atsam/led_matrix.h @@ -18,6 +18,8 @@ along with this program. If not, see . #ifndef _LED_MATRIX_H_ #define _LED_MATRIX_H_ +#include "quantum.h" + //From keyboard #include "config_led.h" @@ -75,25 +77,20 @@ typedef struct issi3733_led_s { uint8_t scan; //Key scan code from wiring (set 0xFF if no key) } issi3733_led_t; -typedef struct led_disp_s { - uint64_t frame; - float left; - float right; - float top; - float bottom; - float width; - float height; - float max_distance; -} led_disp_t; +extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; -uint8_t led_matrix_init(void); -void rgb_matrix_init_user(void); +extern uint8_t gcr_desired; +extern uint8_t gcr_breathe; +extern uint8_t gcr_actual; +extern uint8_t gcr_actual_last; -#define LED_MODE_NORMAL 0 //Must be 0 -#define LED_MODE_KEYS_ONLY 1 -#define LED_MODE_NON_KEYS_ONLY 2 -#define LED_MODE_INDICATORS_ONLY 3 -#define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY //Must be highest value +void gcr_compute(void); + +void led_matrix_indicators(void); + +/*------------------------- Legacy Lighting Support ------------------------*/ + +#ifdef USE_MASSDROP_CONFIGURATOR #define EF_NONE 0x00000000 //No effect #define EF_OVER 0x00000001 //Overwrite any previous color information with new @@ -114,33 +111,48 @@ typedef struct led_setup_s { uint8_t end; //Set to signal end of the setup } led_setup_t; -extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; +extern const uint8_t led_setups_count; +extern void *led_setups[]; -extern uint8_t gcr_desired; -extern uint8_t gcr_breathe; -extern uint8_t gcr_actual; -extern uint8_t gcr_actual_last; +//LED Extra Instructions +#define LED_FLAG_NULL 0x00 //Matching and coloring not used (default) +#define LED_FLAG_MATCH_ID 0x01 //Match on the ID of the LED (set id#'s to desired bit pattern, first LED is id 1) +#define LED_FLAG_MATCH_LAYER 0x02 //Match on the current active layer (set layer to desired match layer) +#define LED_FLAG_USE_RGB 0x10 //Use a specific RGB value (set r, g, b to desired output color values) +#define LED_FLAG_USE_PATTERN 0x20 //Use a specific pattern ID (set pattern_id to desired output pattern) +#define LED_FLAG_USE_ROTATE_PATTERN 0x40 //Use pattern the user has cycled to manually + +typedef struct led_instruction_s { + uint16_t flags; // Bitfield for LED instructions + uint32_t id0; // Bitwise id, IDs 0-31 + uint32_t id1; // Bitwise id, IDs 32-63 + uint32_t id2; // Bitwise id, IDs 64-95 + uint32_t id3; // Bitwise id, IDs 96-127 + uint8_t layer; + uint8_t r; + uint8_t g; + uint8_t b; + uint8_t pattern_id; + uint8_t end; +} led_instruction_t; + +extern led_instruction_t led_instructions[]; +extern uint8_t led_animation_breathing; extern uint8_t led_animation_id; -extern uint8_t led_enabled; extern float led_animation_speed; extern uint8_t led_lighting_mode; -extern uint8_t led_animation_direction; -extern uint8_t led_animation_orientation; -extern uint8_t led_animation_breathing; +extern uint8_t led_enabled; extern uint8_t led_animation_breathe_cur; +extern uint8_t led_animation_direction; extern uint8_t breathe_dir; -extern uint8_t led_animation_circular; -extern const uint8_t led_setups_count; -extern void *led_setups[]; - -extern issi3733_led_t *led_cur; -extern issi3733_led_t *lede; - -void led_matrix_run(void); -void led_matrix_task(void); +#define LED_MODE_NORMAL 0 //Must be 0 +#define LED_MODE_KEYS_ONLY 1 +#define LED_MODE_NON_KEYS_ONLY 2 +#define LED_MODE_INDICATORS_ONLY 3 +#define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY //Must be highest value -void gcr_compute(void); +#endif // USE_MASSDROP_CONFIGURATOR #endif //_LED_MATRIX_H_ diff --git a/keyboards/massdrop/alt/led_programs.c b/tmk_core/protocol/arm_atsam/led_matrix_programs.c similarity index 99% rename from keyboards/massdrop/alt/led_programs.c rename to tmk_core/protocol/arm_atsam/led_matrix_programs.c index b3b7a7e90e76..cf7478dc312e 100644 --- a/keyboards/massdrop/alt/led_programs.c +++ b/tmk_core/protocol/arm_atsam/led_matrix_programs.c @@ -15,7 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "alt.h" +#ifdef USE_MASSDROP_CONFIGURATOR + #include "led_matrix.h" //Teal <-> Salmon @@ -118,3 +119,5 @@ void *led_setups[] = { }; const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]); + +#endif diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index eaad66e9fc8e..0974a230d4c1 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -203,13 +203,6 @@ void main_subtask_usb_state(void) } } -void main_subtask_led(void) -{ - if (g_usb_state != USB_FSMSTATUS_FSMSTATE_ON_Val) return; //Only run LED tasks if USB is operating - - led_matrix_task(); -} - void main_subtask_power_check(void) { static uint64_t next_5v_checkup = 0; @@ -221,7 +214,9 @@ void main_subtask_power_check(void) v_5v = adc_get(ADC_5V); v_5v_avg = 0.9 * v_5v_avg + 0.1 * v_5v; +#ifdef RGB_MATRIX_ENABLE gcr_compute(); +#endif } } @@ -240,7 +235,6 @@ void main_subtask_usb_extra_device(void) void main_subtasks(void) { main_subtask_usb_state(); - main_subtask_led(); main_subtask_power_check(); main_subtask_usb_extra_device(); } @@ -263,7 +257,9 @@ int main(void) SR_EXP_Init(); +#ifdef RGB_MATRIX_ENABLE i2c1_init(); +#endif // RGB_MATRIX_ENABLE matrix_init(); @@ -281,8 +277,7 @@ int main(void) DBG_LED_OFF; - led_matrix_init(); - +#ifdef RGB_MATRIX_ENABLE while (I2C3733_Init_Control() != 1) {} while (I2C3733_Init_Drivers() != 1) {} @@ -292,6 +287,7 @@ int main(void) for (uint8_t drvid = 0; drvid < ISSI3733_DRIVER_COUNT; drvid++) I2C_LED_Q_ONOFF(drvid); //Queue data +#endif // RGB_MATRIX_ENABLE keyboard_setup(); diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.c b/tmk_core/protocol/arm_atsam/usb/usb2422.c index d6e192242910..76ec3aaaa76f 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb2422.c +++ b/tmk_core/protocol/arm_atsam/usb/usb2422.c @@ -365,8 +365,10 @@ void USB_ExtraSetState(uint8_t state) if (usb_extra_state == USB_EXTRA_STATE_ENABLED) CDC_print("USB: Extra enabled\r\n"); else if (usb_extra_state == USB_EXTRA_STATE_DISABLED) { - CDC_print("USB: Extra disabled\r\n"); - if (led_animation_breathing) gcr_breathe = gcr_desired; + CDC_print("USB: Extra disabled\r\n"); +#ifdef USE_MASSDROP_CONFIGURATOR + if (led_animation_breathing) gcr_breathe = gcr_desired; +#endif } else if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) CDC_print("USB: Extra disabled until replug\r\n"); else CDC_print("USB: Extra state unknown\r\n"); From b463415d84867b34f35de2277d419676a602ddb0 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 3 Apr 2019 18:35:53 -0700 Subject: [PATCH 435/445] [Keyboard] V60 Type R - Turn on leds for Configurator + Refactor (#5546) * use pragma once where applicable * remove ? * update default keymap readme * remove un need include * update readme with newbs guide * set underglow and backlight to be on by default, and explicitly set them to no for the default keymap to handle the non Polestar case. * put mine and benlyall's name in the code * update readme --- keyboards/v60_type_r/config.h | 7 ++--- keyboards/v60_type_r/keymaps/default/config.h | 2 +- keyboards/v60_type_r/keymaps/default/keymap.c | 2 +- .../v60_type_r/keymaps/default/readme.md | 5 ++-- keyboards/v60_type_r/keymaps/default/rules.mk | 2 ++ keyboards/v60_type_r/keymaps/vimouse/config.h | 9 ++---- keyboards/v60_type_r/keymaps/vimouse/keymap.c | 2 +- keyboards/v60_type_r/readme.md | 16 +---------- keyboards/v60_type_r/rules.mk | 28 +++++++++---------- keyboards/v60_type_r/v60_type_r.c | 2 +- keyboards/v60_type_r/v60_type_r.h | 6 ++-- 11 files changed, 29 insertions(+), 52 deletions(-) create mode 100644 keyboards/v60_type_r/keymaps/default/rules.mk diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 703745d56429..e3e00a9f80de 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 REPLACE_WITH_YOUR_NAME +Copyright 2017 benlyall, 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 @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -190,5 +189,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/v60_type_r/keymaps/default/config.h b/keyboards/v60_type_r/keymaps/default/config.h index 6f235f6ba843..744bea207b3b 100644 --- a/keyboards/v60_type_r/keymaps/default/config.h +++ b/keyboards/v60_type_r/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, 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 diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 77546c0a6549..831def0789bd 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, 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 diff --git a/keyboards/v60_type_r/keymaps/default/readme.md b/keyboards/v60_type_r/keymaps/default/readme.md index 57ac901ada0b..9b3c6f064330 100644 --- a/keyboards/v60_type_r/keymaps/default/readme.md +++ b/keyboards/v60_type_r/keymaps/default/readme.md @@ -1,5 +1,4 @@ -KB Paradise V60 Type R Default Layout -====================== +# KB Paradise V60 Type R Default Layout This is the default layout as defined by the KBP V60 Type R manual/keycaps @@ -9,4 +8,4 @@ This is the default layout as defined by the KBP V60 Type R manual/keycaps ### Build -To build this keymap, simply run `make KEYMAP=default`. \ No newline at end of file +To build this keymap, simply run `make v60_type_r:default`. diff --git a/keyboards/v60_type_r/keymaps/default/rules.mk b/keyboards/v60_type_r/keymaps/default/rules.mk new file mode 100644 index 000000000000..b6c9a2580598 --- /dev/null +++ b/keyboards/v60_type_r/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/v60_type_r/keymaps/vimouse/config.h b/keyboards/v60_type_r/keymaps/vimouse/config.h index 3937420d00db..285cb4fa2385 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/config.h +++ b/keyboards/v60_type_r/keymaps/vimouse/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, 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 @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define V60_POLESTAR @@ -27,5 +24,3 @@ #define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 - -#endif diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index 2586683127f6..8b0019e7ba1b 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, 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 diff --git a/keyboards/v60_type_r/readme.md b/keyboards/v60_type_r/readme.md index 06ff749b8660..76cb5f39fc4a 100644 --- a/keyboards/v60_type_r/readme.md +++ b/keyboards/v60_type_r/readme.md @@ -13,17 +13,6 @@ Please note that other variants of the KBP V60 are not fully programmable. Backlight and RGB Underglow are both supported. -To use the backlight and/or RGB underglow: -* Create a new keymap -* Create a rules.mk file in the keymap -* Add RGBLIGHT_ENABLE = yes and/or BACKLIGHT_ENABLE = yes to the rules.mk -* Setup your keymap to your preference. Use [the `vimouse` keymap](keymaps/vimouse/keymap.c) as a starting point -* Some extra keys are defined to allow you to set the red, green and blue values of the underglow directly, rather than using the HSV spectrum. These are RGB_RI, RGB_RD, RGB_GI, RGB_GD, RGB_BI, RGB_BD for increase and decrease of the red, green and blue channels respectively. - -The provided `default` keymap pretty closely matches the default V60 Type R keymap, minus the backlight and underglow control keys. The `vimouse` keymap is completely customised and makes use of many of the possibilities, including mouse keys, backlighting, RGB underglow, etc. - -Note for those customising: The configuration used in the `vimouse` keymap results in about 93% of the available flash being utilised. Keep that in mind if you're adding functionality. - Note: By default the V60 Type R uses TMK. You should know what you're doing and none of this is guaranteed to work. If you want to stick with the TMK default, then the KB Paradise preferred way of creating the hex file is by using https://tkg.io/, selecting Fantastic60 and then defining your keymap. You will then have to use tkg-toolkit to finish the flashing @@ -40,7 +29,4 @@ or make v60_type_r:vimouse -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. - - - +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/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 7a1340a1aca7..54a20a78154b 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -52,21 +52,21 @@ BOOTLOADER = atmel-dfu # 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 +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 +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 the 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 +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable the 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 LAYOUTS = 60_ansi diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c index 86d87e12da2a..41eb75807d08 100644 --- a/keyboards/v60_type_r/v60_type_r.c +++ b/keyboards/v60_type_r/v60_type_r.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, 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 diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h index 3d7aef7eaf09..25097ed48e8e 100644 --- a/keyboards/v60_type_r/v60_type_r.h +++ b/keyboards/v60_type_r/v60_type_r.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, 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 @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef V60_TYPE_R_H -#define V60_TYPE_R_H +#pragma once #include "quantum.h" @@ -106,4 +105,3 @@ enum my_keycodes { { k40, k41, k42, k43, k44, k45, k46, k47 } \ } -#endif From 4f4fad83737546db6dd04af9e26320ef7d0610dd Mon Sep 17 00:00:00 2001 From: Nicholas Shaff Date: Thu, 4 Apr 2019 00:54:30 -0500 Subject: [PATCH 436/445] [Keyboard] Doro67 Multi PCB port (#5539) * Initial portover of the doro68.json with corrected column pins. * Initial setup of LAYOUT_ansi and it's use in the default keymap. * Added F keys to default kemap on layer 1. * Added split space (and everything else) layout and a base keymap to be updated. * Renamed split_space to multi. * Changed product_id for doro. * Created a basic doro LAYOUT_iso and default keymap. * Copied over basic layout and keymap. * Added readme.md for doro67 multi. * Removed basic keyboad layout and keymap because it's a separate PCB. * Added backlight controls to the various keymaps. * Added explicit backlight pin define. * Increased number of backlight levels for flexibility. * Removed unnecessary line slashes and unified keymcaps. * Corrected ISO layout and switched position with multi. * Added keymap readme.md files. * Corrected ISO keymap. * Added Layouts to info.json for toolbox. * Re-added slashes as they were necessary here... * Corrected info.json/keymap discreptancies. * Updated copyright messages (and fixed small readme error). * Added missing line break spaces in readme.md Co-Authored-By: ShadeDream * Keymap alignments on default_multi readme.md Co-Authored-By: ShadeDream * Keymap alignments on default_multi readme.md Co-Authored-By: ShadeDream * Keymap alignments on default_multi readme.md Co-Authored-By: ShadeDream * Small alignment adjustment on the default keymap readme.md Co-Authored-By: ShadeDream --- keyboards/doro67/multi/config.h | 33 +++++++++++ keyboards/doro67/multi/info.json | 18 ++++++ .../doro67/multi/keymaps/default/keymap.c | 36 +++++++++++ .../doro67/multi/keymaps/default/readme.md | 36 +++++++++++ .../doro67/multi/keymaps/default_iso/keymap.c | 36 +++++++++++ .../multi/keymaps/default_iso/readme.md | 36 +++++++++++ .../multi/keymaps/default_multi/keymap.c | 36 +++++++++++ .../multi/keymaps/default_multi/readme.md | 39 ++++++++++++ keyboards/doro67/multi/multi.c | 43 ++++++++++++++ keyboards/doro67/multi/multi.h | 59 +++++++++++++++++++ keyboards/doro67/multi/readme.md | 16 +++++ keyboards/doro67/multi/rules.mk | 47 +++++++++++++++ 12 files changed, 435 insertions(+) create mode 100644 keyboards/doro67/multi/config.h create mode 100644 keyboards/doro67/multi/info.json create mode 100644 keyboards/doro67/multi/keymaps/default/keymap.c create mode 100644 keyboards/doro67/multi/keymaps/default/readme.md create mode 100644 keyboards/doro67/multi/keymaps/default_iso/keymap.c create mode 100644 keyboards/doro67/multi/keymaps/default_iso/readme.md create mode 100644 keyboards/doro67/multi/keymaps/default_multi/keymap.c create mode 100644 keyboards/doro67/multi/keymaps/default_multi/readme.md create mode 100644 keyboards/doro67/multi/multi.c create mode 100644 keyboards/doro67/multi/multi.h create mode 100644 keyboards/doro67/multi/readme.md create mode 100644 keyboards/doro67/multi/rules.mk diff --git a/keyboards/doro67/multi/config.h b/keyboards/doro67/multi/config.h new file mode 100644 index 000000000000..4a15063cc26e --- /dev/null +++ b/keyboards/doro67/multi/config.h @@ -0,0 +1,33 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xD070 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Backprop Studio +#define PRODUCT Doro67 Multi PCB +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 7 diff --git a/keyboards/doro67/multi/info.json b/keyboards/doro67/multi/info.json new file mode 100644 index 000000000000..03252140dd56 --- /dev/null +++ b/keyboards/doro67/multi/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Doro67 Multi PCB", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "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":"Ins", "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":"Del", "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":"PgUp", "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":"PgDn", "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, "w":1.25}, {"label":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "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":"Ins", "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Del", "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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "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, "w":1.25}, {"label":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_multi": { + "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":"Back", "x":13, "y":0}, {"label":"F2", "x":14, "y":0}, {"label":"Ins", "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":"Del", "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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"F1", "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":"PgDn", "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"MO(1)", "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/doro67/multi/keymaps/default/keymap.c b/keyboards/doro67/multi/keymaps/default/keymap.c new file mode 100644 index 000000000000..dd40a6c3faa9 --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 ShadeDream + * + * 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_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_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_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_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_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/doro67/multi/keymaps/default/readme.md b/keyboards/doro67/multi/keymaps/default/readme.md new file mode 100644 index 000000000000..6e63cde3a16a --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default/readme.md @@ -0,0 +1,36 @@ +# Default Doro67 ANSI layout. + +This is the default ANSI layout that comes flashed on the Doro67 multi PCB with +the exception of adding backtick as it was not mapped. + +Default Layer: + +``` +,---------------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins| +|---------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del| +|---------------------------------------------------------------| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp| +|---------------------------------------------------------------| +|Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| +|---------------------------------------------------------------| +|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt| +`---------------------------------------------------------------' +``` + +FN Layer: + +``` +,---------------------------------------------------------------. +|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | +|---------------------------------------------------------------| +|BLTog|Stp|Dec|Inc| | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | +`---------------------------------------------------------------' +``` diff --git a/keyboards/doro67/multi/keymaps/default_iso/keymap.c b/keyboards/doro67/multi/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..2e8d8398204f --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_iso/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 ShadeDream + * + * 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_iso( + 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_INS, + 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_ENT, KC_DEL, + 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_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_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_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, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/doro67/multi/keymaps/default_iso/readme.md b/keyboards/doro67/multi/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..d375f0cc5d2b --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_iso/readme.md @@ -0,0 +1,36 @@ +# Default Doro67 ISO layout. + +This is the default ISO layout that comes flashed on the Doro67 multi PCB with +the exception of adding backtick and UK ISO specific keycodes as they were not mapped. + +Default Layer: + +``` +,---------------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins| +|---------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del| +|------------------------------------------------------|Entr|---| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| #| |PUp| +|---------------------------------------------------------------| +|Shft| \| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| +|---------------------------------------------------------------| +|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt| +`---------------------------------------------------------------' +``` + +FN Layer: + +``` +,---------------------------------------------------------------. +|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | +|---------------------------------------------------------------| +|BLTog|Stp|Dec|Inc| | | | | | | | | | | | +|------------------------------------------------------| |---| +| | | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | +`---------------------------------------------------------------' +``` diff --git a/keyboards/doro67/multi/keymaps/default_multi/keymap.c b/keyboards/doro67/multi/keymaps/default_multi/keymap.c new file mode 100644 index 000000000000..e57dce1ea2be --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_multi/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 ShadeDream + * + * 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_multi( + 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_F2, KC_INS, + 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_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_F1, 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_multi( + 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_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/doro67/multi/keymaps/default_multi/readme.md b/keyboards/doro67/multi/keymaps/default_multi/readme.md new file mode 100644 index 000000000000..e32f820c289c --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_multi/readme.md @@ -0,0 +1,39 @@ +# Default Doro67 Multi layout. + +This is the default Multi layout that comes flashed on the Doro67 multi PCB with +the exception of adding backtick as it was not mapped. + +This layout supports both the blocker and non-blocker layouts (2 & 4) with the +difference that the blocker layout lacks the right control key. + +Default Layer: + +``` +,---------------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS| F2|Ins| +|---------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del| +|---------------------------------------------------------------| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp| +|---------------------------------------------------------------| +|Shft| F1| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| +|---------------------------------------------------------------| +|Ctrl |GUI |Alt | Space |Space| Space |Alt|MO1|Ctl|Lft|Dwn|Rgt| +`---------------------------------------------------------------' +``` + +FN Layer: + +``` +,---------------------------------------------------------------. +|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | +|---------------------------------------------------------------| +|BLTog|Stp|Dec|Inc| | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | +`---------------------------------------------------------------' +``` diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c new file mode 100644 index 000000000000..477ab245c34b --- /dev/null +++ b/keyboards/doro67/multi/multi.c @@ -0,0 +1,43 @@ +/* Copyright 2019 ShadeDream + * + * 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 "multi.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/doro67/multi/multi.h b/keyboards/doro67/multi/multi.h new file mode 100644 index 000000000000..0b68aed42608 --- /dev/null +++ b/keyboards/doro67/multi/multi.h @@ -0,0 +1,59 @@ +/* Copyright 2019 ShadeDream + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ansi( \ + 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, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +) { \ + { 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, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + +#define LAYOUT_iso( \ + 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, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +) { \ + { 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, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + +#define LAYOUT_multi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K48, 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, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K44, K45, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { 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, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/doro67/multi/readme.md b/keyboards/doro67/multi/readme.md new file mode 100644 index 000000000000..ac1484cd7435 --- /dev/null +++ b/keyboards/doro67/multi/readme.md @@ -0,0 +1,16 @@ +Doro67 Multi PCB +=== + +A custom 65% keyboard with multiple layout support. + +Do not flash RGB firmware for this board. + +Keyboard Maintainer: [ShadeDream](https://github.com/shadedream) +Hardware Supported: Doro67 Multi PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) + +Make example for this keyboard (after setting up your build environment): + + make doro67/multi: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/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk new file mode 100644 index 000000000000..387ce74822c9 --- /dev/null +++ b/keyboards/doro67/multi/rules.mk @@ -0,0 +1,47 @@ +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +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 = lite # 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 = yes # 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 debd902a3d5788beab8580a26c84d7db2365a638 Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Thu, 4 Apr 2019 14:56:22 +0900 Subject: [PATCH 437/445] [Keyboard] add treeadstone48 (#5405) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization --- keyboards/treadstone48/common/glcdfont.c | 244 ++++++++ keyboards/treadstone48/common/oled_helper.c | 83 +++ keyboards/treadstone48/common/oled_helper.h | 35 ++ keyboards/treadstone48/config.h | 43 ++ keyboards/treadstone48/i2c.c | 162 +++++ keyboards/treadstone48/i2c.h | 46 ++ .../treadstone48/keymaps/default/config.h | 60 ++ .../treadstone48/keymaps/default/keymap.c | 278 +++++++++ .../treadstone48/keymaps/default/readme.md | 5 + .../treadstone48/keymaps/default/readme_jp.md | 80 +++ .../treadstone48/keymaps/default/rules.mk | 67 ++ .../treadstone48/keymaps/like_jis/config.h | 60 ++ .../treadstone48/keymaps/like_jis/keymap.c | 278 +++++++++ .../treadstone48/keymaps/like_jis/readme.md | 5 + .../keymaps/like_jis/readme_jp.md | 80 +++ .../treadstone48/keymaps/like_jis/rules.mk | 67 ++ .../treadstone48/keymaps/like_jis_rs/config.h | 60 ++ .../treadstone48/keymaps/like_jis_rs/keymap.c | 342 ++++++++++ .../keymaps/like_jis_rs/readme.md | 5 + .../keymaps/like_jis_rs/readme_jp.md | 84 +++ .../treadstone48/keymaps/like_jis_rs/rules.mk | 67 ++ keyboards/treadstone48/pro_micro.h | 362 +++++++++++ keyboards/treadstone48/readme.md | 18 + keyboards/treadstone48/rev1/config.h | 133 ++++ keyboards/treadstone48/rev1/info.json | 261 ++++++++ keyboards/treadstone48/rev1/matrix.c | 357 +++++++++++ keyboards/treadstone48/rev1/rev1.c | 15 + keyboards/treadstone48/rev1/rev1.h | 202 ++++++ keyboards/treadstone48/rev1/rules.mk | 3 + keyboards/treadstone48/rev1/serial_config.h | 8 + .../rev1/serial_config_simpleapi.h | 8 + keyboards/treadstone48/rev1/split_scomm.c | 92 +++ keyboards/treadstone48/rev1/split_scomm.h | 21 + keyboards/treadstone48/rev1/split_util.c | 70 +++ keyboards/treadstone48/rev1/split_util.h | 16 + keyboards/treadstone48/rules.mk | 73 +++ keyboards/treadstone48/serial.c | 590 ++++++++++++++++++ keyboards/treadstone48/serial.h | 86 +++ keyboards/treadstone48/ssd1306.c | 342 ++++++++++ keyboards/treadstone48/ssd1306.h | 90 +++ keyboards/treadstone48/treadstone48.c | 1 + keyboards/treadstone48/treadstone48.h | 15 + 42 files changed, 4914 insertions(+) create mode 100644 keyboards/treadstone48/common/glcdfont.c create mode 100644 keyboards/treadstone48/common/oled_helper.c create mode 100644 keyboards/treadstone48/common/oled_helper.h create mode 100644 keyboards/treadstone48/config.h create mode 100644 keyboards/treadstone48/i2c.c create mode 100644 keyboards/treadstone48/i2c.h create mode 100644 keyboards/treadstone48/keymaps/default/config.h create mode 100644 keyboards/treadstone48/keymaps/default/keymap.c create mode 100644 keyboards/treadstone48/keymaps/default/readme.md create mode 100644 keyboards/treadstone48/keymaps/default/readme_jp.md create mode 100644 keyboards/treadstone48/keymaps/default/rules.mk create mode 100644 keyboards/treadstone48/keymaps/like_jis/config.h create mode 100644 keyboards/treadstone48/keymaps/like_jis/keymap.c create mode 100644 keyboards/treadstone48/keymaps/like_jis/readme.md create mode 100644 keyboards/treadstone48/keymaps/like_jis/readme_jp.md create mode 100644 keyboards/treadstone48/keymaps/like_jis/rules.mk create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/config.h create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/keymap.c create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/readme.md create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/rules.mk create mode 100644 keyboards/treadstone48/pro_micro.h create mode 100644 keyboards/treadstone48/readme.md create mode 100644 keyboards/treadstone48/rev1/config.h create mode 100644 keyboards/treadstone48/rev1/info.json create mode 100644 keyboards/treadstone48/rev1/matrix.c create mode 100644 keyboards/treadstone48/rev1/rev1.c create mode 100644 keyboards/treadstone48/rev1/rev1.h create mode 100644 keyboards/treadstone48/rev1/rules.mk create mode 100644 keyboards/treadstone48/rev1/serial_config.h create mode 100644 keyboards/treadstone48/rev1/serial_config_simpleapi.h create mode 100644 keyboards/treadstone48/rev1/split_scomm.c create mode 100644 keyboards/treadstone48/rev1/split_scomm.h create mode 100644 keyboards/treadstone48/rev1/split_util.c create mode 100644 keyboards/treadstone48/rev1/split_util.h create mode 100644 keyboards/treadstone48/rules.mk create mode 100644 keyboards/treadstone48/serial.c create mode 100644 keyboards/treadstone48/serial.h create mode 100644 keyboards/treadstone48/ssd1306.c create mode 100644 keyboards/treadstone48/ssd1306.h create mode 100644 keyboards/treadstone48/treadstone48.c create mode 100644 keyboards/treadstone48/treadstone48.h diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c new file mode 100644 index 000000000000..32c688e2bb38 --- /dev/null +++ b/keyboards/treadstone48/common/glcdfont.c @@ -0,0 +1,244 @@ +// 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 + +static 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, + 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, 0x10, 0x10, 0x10, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c new file mode 100644 index 000000000000..500d3c0dc10c --- /dev/null +++ b/keyboards/treadstone48/common/oled_helper.c @@ -0,0 +1,83 @@ +#ifdef SSD1306OLED +#include QMK_KEYBOARD_H +#include "ssd1306.h" + +void render_logo(struct CharacterMatrix *matrix) { + + const char logo_buf[]={ + 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_buf); +} + +static char keylog_buf[24] = "Key state ready."; +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 update_key_status(uint16_t keycode, keyrecord_t *record) { + + if (!record->event.pressed) return; + + char name = (keycode < 60) ? code_to_name[keycode] : ' '; + snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c", + record->event.key.row, record->event.key.col, + (uint16_t)keycode, name); +} + +void render_key_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, keylog_buf); +} + +static char lock_buf[24] = "Lock state ready.\n"; +void update_lock_status(void) { + + uint8_t leds = host_keyboard_leds(); + char *num_lock = (leds & (1< +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +// GCC include 'config.h" sequence in qmk_firmware/keyboards/treadstone48/ +// -include keyboards/treadstone48/config.h +// -include keyboards/treadstone48/rev?/config.h +// -include keyboards/treadstone48/rev?/keymaps/MAPNAME/config.h +// XXXX.c + +#include + +// GCC include search path in qmk_firmare/keyboards/treadstone48/ +// #include "..." search starts here: +// #include <...> search starts here: +// keyboards/treadstone48/rev?/keymaps/MAPNAME +// keyboards/treadstone48 +// keyboards/treadstone48/rev? +// . +// ./tmk_core +// ...... + +// MACRO and FUNCTION are features that are depreciated. +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/treadstone48/i2c.c b/keyboards/treadstone48/i2c.c new file mode 100644 index 000000000000..4bee5c639829 --- /dev/null +++ b/keyboards/treadstone48/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(); diff --git a/keyboards/treadstone48/keymaps/default/config.h b/keyboards/treadstone48/keymaps/default/config.h new file mode 100644 index 000000000000..3f63a0cfbbd2 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/config.h @@ -0,0 +1,60 @@ +/* +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 . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +// #define PREVENT_STUCK_MODIFIERS +// #define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c new file mode 100644 index 000000000000..406f11292124 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -0,0 +1,278 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include "../common/oled_helper.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, + TD_SLRO, +}; + +// Layer Mode aliases +#define _____ KC_TRNS +#define XXXXX KC_NO + +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) + +#define KC_SCCL TD(TD_SCCL) +#define KC_SLRO TD(TD_SLRO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\ + //`-------------------------------------------------------------------------------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWER] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, KC_SCLN, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, XXXXX, KC_COMM, KC_DOT, KC_GRV, KC_PGUP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_RAISE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_ADJUST] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ) +}; + +#define L_BASE _BASE +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef SSD1306OLED +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_LOWER, "Lower"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, layer_status_buf); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() +#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +#else + +#define UPDATE_KEYMAP_STATUS() +#define RENDER_KEYMAP_STATUS(a) + +#endif + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case KANJI: + 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); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} + +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 + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +static inline 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; + } +} + +static inline void render_status(struct CharacterMatrix *matrix) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(matrix); + RENDER_KEYMAP_STATUS(matrix); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(matrix); + RENDER_KEY_STATUS(matrix); +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + matrix_clear(&matrix); + if (is_master) { + render_status(&matrix); + } + + matrix_update(&display, &matrix); +} + +#endif diff --git a/keyboards/treadstone48/keymaps/default/readme.md b/keyboards/treadstone48/keymaps/default/readme.md new file mode 100644 index 000000000000..bb835d169c1a --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default keymap for treadstone48 + +## Description + +## How to use diff --git a/keyboards/treadstone48/keymaps/default/readme_jp.md b/keyboards/treadstone48/keymaps/default/readme_jp.md new file mode 100644 index 000000000000..6043c93cbce0 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/readme_jp.md @@ -0,0 +1,80 @@ +# US配列ライクデフォルトキーマップ + +## 概要 + + US配列ライクなデフォルトキーマップです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 +キーマップに書くときは「KC_」を省略して書いています。 +例:KC_A → A + +Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。 +例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。 + Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。 + マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。 + +## 48キー目について + + このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。 + + 各レイヤーの最下段の + +```c + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. +``` + + のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## NUMPADモードについて + + Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。 + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk new file mode 100644 index 000000000000..c53226431d33 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -0,0 +1,67 @@ + +# 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. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes + +# If your custom treadstone48 pcb, you can rewrite to yes. +OLED_ENABLE = no # OLED_ENABLE +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" +# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. +ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) +# OPT_DEFS += -DRHYMESTONE_RIGHTHAND +# endif + +ifeq ($(strip $(ANGELINA_KEYMAP)), yes) + OPT_DEFS += -DANGELINA_KEYMAP +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 + +# If you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/keymaps/like_jis/config.h b/keyboards/treadstone48/keymaps/like_jis/config.h new file mode 100644 index 000000000000..3f63a0cfbbd2 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/config.h @@ -0,0 +1,60 @@ +/* +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 . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +// #define PREVENT_STUCK_MODIFIERS +// #define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c new file mode 100644 index 000000000000..b63b0c9f4958 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -0,0 +1,278 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include "../common/oled_helper.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, + TD_SLRO, +}; + +// Layer Mode aliases +#define _____ KC_TRNS +#define XXXXX KC_NO + +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) + +#define KC_SCCL TD(TD_SCCL) +#define KC_SLRO TD(TD_SLRO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\ + //`-------------------------------------------------------------------------------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWER] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_RAISE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_ADJUST] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ) +}; + +#define L_BASE _BASE +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef SSD1306OLED +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_LOWER, "Lower"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, layer_status_buf); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() +#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +#else + +#define UPDATE_KEYMAP_STATUS() +#define RENDER_KEYMAP_STATUS(a) + +#endif + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case KANJI: + 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); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} + +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 + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +static inline 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; + } +} + +static inline void render_status(struct CharacterMatrix *matrix) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(matrix); + RENDER_KEYMAP_STATUS(matrix); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(matrix); + RENDER_KEY_STATUS(matrix); +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + matrix_clear(&matrix); + if (is_master) { + render_status(&matrix); + } + + matrix_update(&display, &matrix); +} + +#endif diff --git a/keyboards/treadstone48/keymaps/like_jis/readme.md b/keyboards/treadstone48/keymaps/like_jis/readme.md new file mode 100644 index 000000000000..796df6c4cd78 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone48 + +## Description + +## How to use diff --git a/keyboards/treadstone48/keymaps/like_jis/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md new file mode 100644 index 000000000000..305ded471da8 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md @@ -0,0 +1,80 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 +キーマップに書くときは「KC_」を省略して書いています。 +例:KC_A → A + +Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。 +例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。 + Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。 + マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。 + +## 48キー目について + + このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。 + + 各レイヤーの最下段の + +```c + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. +``` + + のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## NUMPADモードについて + + Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。 + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk new file mode 100644 index 000000000000..c53226431d33 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk @@ -0,0 +1,67 @@ + +# 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. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes + +# If your custom treadstone48 pcb, you can rewrite to yes. +OLED_ENABLE = no # OLED_ENABLE +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" +# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. +ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) +# OPT_DEFS += -DRHYMESTONE_RIGHTHAND +# endif + +ifeq ($(strip $(ANGELINA_KEYMAP)), yes) + OPT_DEFS += -DANGELINA_KEYMAP +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 + +# If you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/config.h b/keyboards/treadstone48/keymaps/like_jis_rs/config.h new file mode 100644 index 000000000000..e8acd5c76d4d --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/config.h @@ -0,0 +1,60 @@ +/* +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 . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +#define PREVENT_STUCK_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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/treadstone48/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c new file mode 100644 index 000000000000..0e4ec063ccb6 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c @@ -0,0 +1,342 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include "../common/oled_helper.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE = 0, + _BASES, + _LOWER, + _LOWRS, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + BASES, + LOWER, + LOWRS, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, + TD_SLRO, +}; + +// Layer Mode aliases +#define _____ KC_TRNS +#define XXXXX KC_NO + +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) +#define KC_SFUC LSFT(KC_RO) +#define KC_RSBR LSFT(KC_8) +#define KC_REBR LSFT(KC_9) + +#define KC_ZSFT LSFT_T(KC_Z) +#define KC_ESCT LCTL_T(KC_ESC) +#define KC_TBAL LALT_T(KC_TAB) +#define KC_11SF LSFT_T(KC_F11) + +#define KC_SCCL TD(TD_SCCL) +#define KC_SLRO TD(TD_SLRO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_NLCK,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, LOWER, KC_P0, KC_PDOT, KC_PPLS, KC_BSPC,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWER] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_A, KC_B, KC_C, KC_JYEN, KC_HASH,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_D, KC_E, KC_F, KC_PERC, KC_SFUC,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, BASES, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_RSBR, KC_REBR, KC_RBRC, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, XXXXX, KC_COMM, KC_JEQL, KC_DEL,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_BASES] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_Q, KC_W, KC_E, KC_R, KC_T,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_ZSFT, KC_X, KC_C, KC_V, KC_B,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, KC_ESCT, KC_TBAL, KC_LGUI, LOWRS, KC_BSPC,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWRS] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, BASE, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_11SF, KC_F12, BASE, KANJI, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, _____, _____, _____, KC_DEL,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_RAISE] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_ADJUST] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ) +}; + +#define L_BASE _BASE +#define L_BASES (1<<_BASES) +#define L_LOWER (1<<_LOWER) +#define L_LOWRS (1<<_LOWRS) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef SSD1306OLED +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 7 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_BASES, "BaseSpl"}, + {L_LOWER, "Lower"}, + {L_LOWRS, "LowrSpl"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, layer_status_buf); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() +#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +#else + +#define UPDATE_KEYMAP_STATUS() +#define RENDER_KEYMAP_STATUS(a) + +#endif + +void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case BASE: + if (record->event.pressed) { + default_layer_set(L_BASE); + } + break; + case BASES: + if (record->event.pressed) { + default_layer_set(L_BASES); + } + break; + case LOWRS: + update_change_layer(record->event.pressed, _LOWRS, _RAISE, _ADJUST); + break; + case KANJI: + 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); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} + +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 + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +static inline 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; + } +} + +static inline void render_status(struct CharacterMatrix *matrix) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(matrix); + RENDER_KEYMAP_STATUS(matrix); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(matrix); + RENDER_KEY_STATUS(matrix); +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + matrix_clear(&matrix); + if (is_master) { + render_status(&matrix); + } + + matrix_update(&display, &matrix); +} + +#endif diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md new file mode 100644 index 000000000000..796df6c4cd78 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone48 + +## Description + +## How to use diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md new file mode 100644 index 000000000000..5a6fc1d73b83 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md @@ -0,0 +1,84 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + オプションのRhymestone用のマップを使用するために拡張しています。RhymestoneのpromicroにもTreadstone48のキーマップを入れてください。 + Rhymestoneは基本的には左手側を使うことを想定していますが、右手側を使用する場合はrules.mkにあるRHYMESTONE_RIGHTHAND設定をyesにすれば使えるようになります。 + +```RHYMESTONE_RIGHTHAND=yes``` + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 +キーマップに書くときは「KC_」を省略して書いています。 +例:KC_A → A + +Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。 +例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。 + Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。 + マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。 + +## 48キー目について + + このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。 + + 各レイヤーの最下段の + +```c + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. +``` + + のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## NUMPADモードについて + + Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。 + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk new file mode 100644 index 000000000000..c34bb2e34a03 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk @@ -0,0 +1,67 @@ + +# 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. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes + +# If your custom treadstone48 pcb, you can rewrite to yes. +OLED_ENABLE = no # OLED_ENABLE +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" +RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. +ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) + OPT_DEFS += -DRHYMESTONE_RIGHTHAND +endif + +ifeq ($(strip $(ANGELINA_KEYMAP)), yes) + OPT_DEFS += -DANGELINA_KEYMAP +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 + +# If you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h new file mode 100644 index 000000000000..f9e7ed75d9d5 --- /dev/null +++ b/keyboards/treadstone48/pro_micro.h @@ -0,0 +1,362 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +// Workaround for wrong definitions in "iom32u4.h". +// This should be fixed in the AVR toolchain. +#undef UHCON +#undef UHINT +#undef UHIEN +#undef UHADDR +#undef UHFNUM +#undef UHFNUML +#undef UHFNUMH +#undef UHFLEN +#undef UPINRQX +#undef UPINTX +#undef UPNUM +#undef UPRST +#undef UPCONX +#undef UPCFG0X +#undef UPCFG1X +#undef UPSTAX +#undef UPCFG2X +#undef UPIENX +#undef UPDATX +#undef TCCR2A +#undef WGM20 +#undef WGM21 +#undef COM2B0 +#undef COM2B1 +#undef COM2A0 +#undef COM2A1 +#undef TCCR2B +#undef CS20 +#undef CS21 +#undef CS22 +#undef WGM22 +#undef FOC2B +#undef FOC2A +#undef TCNT2 +#undef TCNT2_0 +#undef TCNT2_1 +#undef TCNT2_2 +#undef TCNT2_3 +#undef TCNT2_4 +#undef TCNT2_5 +#undef TCNT2_6 +#undef TCNT2_7 +#undef OCR2A +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 +#undef OCR2B +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 + +#define NUM_DIGITAL_PINS 30 +#define NUM_ANALOG_INPUTS 12 + +#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) +#define TXLED0 PORTD |= (1<<5) +#define TXLED1 PORTD &= ~(1<<5) +#define RXLED0 PORTB |= (1<<0) +#define RXLED1 PORTB &= ~(1<<0) + +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; +#define LED_BUILTIN 13 + +// Map SPI port to 'new' pins D14..D17 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; + +// Mapping of analog pins as digital I/O +// A6-A11 share with digital pins +static const uint8_t ADC0 = 18; +static const uint8_t ADC1 = 19; +static const uint8_t ADC2 = 20; +static const uint8_t ADC3 = 21; +static const uint8_t ADC4 = 22; +static const uint8_t ADC5 = 23; +static const uint8_t ADC6 = 24; // D4 +static const uint8_t ADC7 = 25; // D6 +static const uint8_t ADC8 = 26; // D8 +static const uint8_t ADC9 = 27; // D9 +static const uint8_t ADC10 = 28; // D10 +static const uint8_t ADC11 = 29; // D12 + +#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) +#define digitalPinToPCICRbit(p) 0 +#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) +#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) + +// __AVR_ATmega32U4__ has an unusual mapping of pins to channels +extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; +#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) + +#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) + +#ifdef ARDUINO_MAIN + +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA32U4 / ARDUINO LEONARDO +// +// D0 PD2 RXD1/INT2 +// D1 PD3 TXD1/INT3 +// D2 PD1 SDA SDA/INT1 +// D3# PD0 PWM8/SCL OC0B/SCL/INT0 +// D4 A6 PD4 ADC8 +// D5# PC6 ??? OC3A/#OC4A +// D6# A7 PD7 FastPWM #OC4D/ADC10 +// D7 PE6 INT6/AIN0 +// +// D8 A8 PB4 ADC11/PCINT4 +// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 +// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 +// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 +// D12 A11 PD6 T1/#OC4D/ADC9 +// D13# PC7 PWM10 CLK0/OC4A +// +// A0 D18 PF7 ADC7 +// A1 D19 PF6 ADC6 +// A2 D20 PF5 ADC5 +// A3 D21 PF4 ADC4 +// A4 D22 PF1 ADC1 +// A5 D23 PF0 ADC0 +// +// New pins D14..D17 to map SPI port to digital pins +// +// MISO D14 PB3 MISO,PCINT3 +// SCK D15 PB1 SCK,PCINT1 +// MOSI D16 PB2 MOSI,PCINT2 +// SS D17 PB0 RXLED,SS/PCINT0 +// +// Connected LEDs on board for TX and RX +// TXLED D24 PD5 XCK1 +// RXLED D17 PB0 +// HWB PE2 HWB + +// these arrays map port names (e.g. port B) to the +// appropriate addresses for various functions (e.g. reading +// and writing) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &DDRB, + (uint16_t) &DDRC, + (uint16_t) &DDRD, + (uint16_t) &DDRE, + (uint16_t) &DDRF, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PORTB, + (uint16_t) &PORTC, + (uint16_t) &PORTD, + (uint16_t) &PORTE, + (uint16_t) &PORTF, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PINB, + (uint16_t) &PINC, + (uint16_t) &PIND, + (uint16_t) &PINE, + (uint16_t) &PINF, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + PD, // D0 - PD2 + PD, // D1 - PD3 + PD, // D2 - PD1 + PD, // D3 - PD0 + PD, // D4 - PD4 + PC, // D5 - PC6 + PD, // D6 - PD7 + PE, // D7 - PE6 + + PB, // D8 - PB4 + PB, // D9 - PB5 + PB, // D10 - PB6 + PB, // D11 - PB7 + PD, // D12 - PD6 + PC, // D13 - PC7 + + PB, // D14 - MISO - PB3 + PB, // D15 - SCK - PB1 + PB, // D16 - MOSI - PB2 + PB, // D17 - SS - PB0 + + PF, // D18 - A0 - PF7 + PF, // D19 - A1 - PF6 + PF, // D20 - A2 - PF5 + PF, // D21 - A3 - PF4 + PF, // D22 - A4 - PF1 + PF, // D23 - A5 - PF0 + + PD, // D24 - PD5 + PD, // D25 / D6 - A7 - PD7 + PB, // D26 / D8 - A8 - PB4 + PB, // D27 / D9 - A9 - PB5 + PB, // D28 / D10 - A10 - PB6 + PD, // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + _BV(2), // D0 - PD2 + _BV(3), // D1 - PD3 + _BV(1), // D2 - PD1 + _BV(0), // D3 - PD0 + _BV(4), // D4 - PD4 + _BV(6), // D5 - PC6 + _BV(7), // D6 - PD7 + _BV(6), // D7 - PE6 + + _BV(4), // D8 - PB4 + _BV(5), // D9 - PB5 + _BV(6), // D10 - PB6 + _BV(7), // D11 - PB7 + _BV(6), // D12 - PD6 + _BV(7), // D13 - PC7 + + _BV(3), // D14 - MISO - PB3 + _BV(1), // D15 - SCK - PB1 + _BV(2), // D16 - MOSI - PB2 + _BV(0), // D17 - SS - PB0 + + _BV(7), // D18 - A0 - PF7 + _BV(6), // D19 - A1 - PF6 + _BV(5), // D20 - A2 - PF5 + _BV(4), // D21 - A3 - PF4 + _BV(1), // D22 - A4 - PF1 + _BV(0), // D23 - A5 - PF0 + + _BV(5), // D24 - PD5 + _BV(7), // D25 / D6 - A7 - PD7 + _BV(4), // D26 / D8 - A8 - PB4 + _BV(5), // D27 / D9 - A9 - PB5 + _BV(6), // D28 / D10 - A10 - PB6 + _BV(6), // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + TIMER0B, /* 3 */ + NOT_ON_TIMER, + TIMER3A, /* 5 */ + TIMER4D, /* 6 */ + NOT_ON_TIMER, + + NOT_ON_TIMER, + TIMER1A, /* 9 */ + TIMER1B, /* 10 */ + TIMER0A, /* 11 */ + + NOT_ON_TIMER, + TIMER4A, /* 13 */ + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, +}; + +const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { + 7, // A0 PF7 ADC7 + 6, // A1 PF6 ADC6 + 5, // A2 PF5 ADC5 + 4, // A3 PF4 ADC4 + 1, // A4 PF1 ADC1 + 0, // A5 PF0 ADC0 + 8, // A6 D4 PD4 ADC8 + 10, // A7 D6 PD7 ADC10 + 11, // A8 D8 PB4 ADC11 + 12, // A9 D9 PB5 ADC12 + 13, // A10 D10 PB6 ADC13 + 9 // A11 D12 PD6 ADC9 +}; + +#endif /* ARDUINO_MAIN */ + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_USBVIRTUAL Serial +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +#endif /* Pins_Arduino_h */ diff --git a/keyboards/treadstone48/readme.md b/keyboards/treadstone48/readme.md new file mode 100644 index 000000000000..eef39c39b334 --- /dev/null +++ b/keyboards/treadstone48/readme.md @@ -0,0 +1,18 @@ +# treadstone48 + +![treadstone48](https://github.com/marksard/Keyboards/raw/master/_image/20181219-PC190003.jpg) + +A 47 (or 48) keys Symmetric Staggered keyboard. + +Keyboard Maintainer: [marksard](https://github.com/marksard) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make treadstone48:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstpne48/documents/treadstone48_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone48) diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h new file mode 100644 index 000000000000..aa6dd9e6349d --- /dev/null +++ b/keyboards/treadstone48/rev1/config.h @@ -0,0 +1,133 @@ +/* +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 REV1_CONFIG_H +#define REV1_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA3 +#define DEVICE_VER 0x0010 +#define MANUFACTURER marksard +#define PRODUCT treadstone48 +#define DESCRIPTION Symmetrical staggered 47+1 Keys Keyboard + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 150 + +/* Use I2C or Serial */ +#define USE_I2C +#define USE_SERIAL +//#define USE_MATRIX_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// OLED support +// see ./rules.mk: OLED_ENABLE=yes or no +#ifdef OLED_ENABLE + #define SSD1306OLED +#endif + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 16 +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } + +// wiring of each half +#define MATRIX_COLS 6 +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +// treadstone48 keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#define RGBLED_NUM 12 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for treadstone48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * 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 + + +#endif diff --git a/keyboards/treadstone48/rev1/info.json b/keyboards/treadstone48/rev1/info.json new file mode 100644 index 000000000000..df9e7591b509 --- /dev/null +++ b/keyboards/treadstone48/rev1/info.json @@ -0,0 +1,261 @@ +{ + "keyboard_name": "Treadstone48", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 14.75, + "height": 4, + "layouts": { + "LAYOUT_base": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "Q", + "x": 2.25, + "y": 0 + }, + { + "label": "W", + "x": 3.25, + "y": 0 + }, + { + "label": "E", + "x": 4.25, + "y": 0 + }, + { + "label": "R", + "x": 5.25, + "y": 0 + }, + { + "label": "T", + "x": 6.25, + "y": 0 + }, + { + "label": "Y", + "x": 7.75, + "y": 0 + }, + { + "label": "U", + "x": 8.75, + "y": 0 + }, + { + "label": "I", + "x": 9.75, + "y": 0 + }, + { + "label": "O", + "x": 10.75, + "y": 0 + }, + { + "label": "P", + "x": 11.75, + "y": 0 + }, + { + "label": "-", + "x": 13.75, + "y": 0 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "A", + "x": 2.5, + "y": 1 + }, + { + "label": "S", + "x": 3.5, + "y": 1 + }, + { + "label": "D", + "x": 4.5, + "y": 1 + }, + { + "label": "F", + "x": 5.5, + "y": 1 + }, + { + "label": "G", + "x": 6.5, + "y": 1 + }, + { + "label": "H", + "x": 7.5, + "y": 1 + }, + { + "label": "J", + "x": 8.5, + "y": 1 + }, + { + "label": "K", + "x": 9.5, + "y": 1 + }, + { + "label": "L", + "x": 10.5, + "y": 1 + }, + { + "label": ":", + "x": 11.5, + "y": 1 + }, + { + "label": "Enter", + "x": 12.5, + "y": 1, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 2, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 2 + }, + { + "label": "X", + "x": 3.25, + "y": 2 + }, + { + "label": "C", + "x": 4.25, + "y": 2 + }, + { + "label": "V", + "x": 5.25, + "y": 2 + }, + { + "label": "B", + "x": 6.25, + "y": 2 + }, + { + "label": "N", + "x": 7.75, + "y": 2 + }, + { + "label": "M", + "x": 8.75, + "y": 2 + }, + { + "label": "<", + "x": 9.75, + "y": 2 + }, + { + "label": ">", + "x": 10.75, + "y": 2 + }, + { + "label": "?", + "x": 11.75, + "y": 2 + }, + { + "label": "\u2191", + "x": 12.75, + "y": 2 + }, + { + "label": "Ctrl", + "x": 0.75, + "y": 3, + "w": 1.25 + }, + { + "label": "Win", + "x": 2, + "y": 3, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.25, + "y": 3, + "w": 1.25 + }, + { + "label": "Lower", + "x": 4.5, + "y": 3 + }, + { + "label": "BackSpace", + "x": 5.5, + "y": 3, + "w": 2 + }, + { + "x": 7.5, + "y": 3, + "w": 2 + }, + { + "label": "Raise", + "x": 9.5, + "y": 3 + }, + { + "label": "Menu", + "x": 10.5, + "y": 3, + "w": 1.25 + }, + { + "label": "\u2190", + "x": 11.75, + "y": 3 + }, + { + "label": "\u2193", + "x": 12.75, + "y": 3 + }, + { + "label": "\u2192", + "x": 13.75, + "y": 3 + }, + { + "label": "_", + "x": 12.75, + "y": 0 + } + ] + } + } +} diff --git a/keyboards/treadstone48/rev1/matrix.c b/keyboards/treadstone48/rev1/matrix.c new file mode 100644 index 000000000000..8685a8125e49 --- /dev/null +++ b/keyboards/treadstone48/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, sizeof(serial_slave_buffer)); + 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, sizeof(serial_master_buffer)); + 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], sizeof(serial_master_buffer)); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], sizeof(serial_master_buffer)); +#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/treadstone48/rev1/rev1.c b/keyboards/treadstone48/rev1/rev1.c new file mode 100644 index 000000000000..2637864271a8 --- /dev/null +++ b/keyboards/treadstone48/rev1/rev1.c @@ -0,0 +1,15 @@ +#include "treadstone48.h" + + +#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 + +void matrix_init_kb(void) { + + matrix_init_user(); +}; + diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h new file mode 100644 index 000000000000..c6145398dd89 --- /dev/null +++ b/keyboards/treadstone48/rev1/rev1.h @@ -0,0 +1,202 @@ +#ifndef REV1_H +#define REV1_CONFIG_H + +#include "../treadstone48.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +// full Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#define LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R00, R01, R02, R03, R04, R05, R40, R41, R42, R43, R44, R45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R10, R11, R12, R13, R14, R15, R50, R51, R52, R53, R54, R55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R20, R21, R22, R23, R24, R25, R60, R61, R62, R63, R64, R65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R30, R31, R32, R33, R34, R35, R70, R71, R72, R73, R74, R75 \ + ) \ + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R45, R44, R43, R42, R41, R40 }, \ + { R55, R54, R53, R52, R51, R50 }, \ + { R65, R64, R63, R62, R61, R60 }, \ + { R75, R74, R73, R72, R71, R70 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + } + +#define K_N KC_NO + +////////////////////////////////////////////////////////////////////////////// +// When only use Treadstone48. +// L75 is ExtraKey +////////////////////////////////////////////////////////////////////////////// +#define LAYOUT_base( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ + ) + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_base_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ + ) \ + LAYOUT_base( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ + ) +////////////////////////////////////////////////////////////////////////////// + + +////////////////////////////////////////////////////////////////////////////// +// When connecting Rhymestone to Treadstone48. +// L75 is ExtraKey +////////////////////////////////////////////////////////////////////////////// +#define LAYOUT_rs( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ + ) + +// When use right hand side of the Rhymestone. +#ifdef RHYMESTONE_RIGHTHAND +#undef LAYOUT_rs +#define LAYOUT_rs( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R70, R71, R72, R73, R74 \ + ) +#endif + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_rs_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ + ) \ + LAYOUT_rs( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ + ) +////////////////////////////////////////////////////////////////////////////// + + + +////////////////////////////////////////////////////////////////////////////// +// Alpha version keymap. +// L30 is ExtraKey +////////////////////////////////////////////////////////////////////////////// +#ifdef ANGELINA_KEYMAP +#undef LAYOUT_base +#undef LAYOUT_base_kc +#undef LAYOUT_rs +#undef LAYOUT_rs_kc + +#define LAYOUT_base( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, L30 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ + ) + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_base_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ + ) \ + LAYOUT_base( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ + ) + +#define LAYOUT_rs( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74, L30 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ + ) + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_rs_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ + ) \ + LAYOUT_rs( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ + ) + +#endif +////////////////////////////////////////////////////////////////////////////// + +#endif diff --git a/keyboards/treadstone48/rev1/rules.mk b/keyboards/treadstone48/rev1/rules.mk new file mode 100644 index 000000000000..6028b5a5b95a --- /dev/null +++ b/keyboards/treadstone48/rev1/rules.mk @@ -0,0 +1,3 @@ +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c diff --git a/keyboards/treadstone48/rev1/serial_config.h b/keyboards/treadstone48/rev1/serial_config.h new file mode 100644 index 000000000000..37135213d55f --- /dev/null +++ b/keyboards/treadstone48/rev1/serial_config.h @@ -0,0 +1,8 @@ +//// #error rev2 serial config + +#ifndef SOFT_SERIAL_PIN +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 + +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/treadstone48/rev1/serial_config_simpleapi.h b/keyboards/treadstone48/rev1/serial_config_simpleapi.h new file mode 100644 index 000000000000..e2d22a41e7bc --- /dev/null +++ b/keyboards/treadstone48/rev1/serial_config_simpleapi.h @@ -0,0 +1,8 @@ +#ifndef SERIAL_CONFIG_SIMPLEAPI_H +#define SERIAL_CONFIG_SIMPLEAPI_H + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/treadstone48/rev1/split_scomm.c b/keyboards/treadstone48/rev1/split_scomm.c new file mode 100644 index 000000000000..ada7867960b9 --- /dev/null +++ b/keyboards/treadstone48/rev1/split_scomm.c @@ -0,0 +1,92 @@ +#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 %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3], + serial_slave_buffer[4] ); +#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/treadstone48/rev1/split_scomm.h b/keyboards/treadstone48/rev1/split_scomm.h new file mode 100644 index 000000000000..16887eb74f7b --- /dev/null +++ b/keyboards/treadstone48/rev1/split_scomm.h @@ -0,0 +1,21 @@ +#pragma once + +#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 diff --git a/keyboards/treadstone48/rev1/split_util.c b/keyboards/treadstone48/rev1/split_util.c new file mode 100644 index 000000000000..e1ff8b4379dc --- /dev/null +++ b/keyboards/treadstone48/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); diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk new file mode 100644 index 000000000000..6ddbdaf80eb5 --- /dev/null +++ b/keyboards/treadstone48/rules.mk @@ -0,0 +1,73 @@ +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# MCU name +#MCU = at90usb1287 +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) + +# 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 +# +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. +SUBPROJECT_rev1 = 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 + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = treadstone48/rev1 diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c new file mode 100644 index 000000000000..6006ebf1bdb2 --- /dev/null +++ b/keyboards/treadstone48/serial.c @@ -0,0 +1,590 @@ +/* + * 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 +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#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 //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +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 result; + result = soft_serial_transaction(); + return result; +} + +#endif // end of 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) + +// 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 + +#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 + #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 + #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 + #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 + #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 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 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#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) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#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); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + 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); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +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, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +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 = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +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 = 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(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + 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) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + 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 + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + 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; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +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(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#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(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // 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; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // 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; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#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/treadstone48/serial.h b/keyboards/treadstone48/serial.h new file mode 100644 index 000000000000..5deaf789e30c --- /dev/null +++ b/keyboards/treadstone48/serial.h @@ -0,0 +1,86 @@ +#pragma once + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #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 OLD API (compatible with let's split serial.c) +// ex. +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// +// //// USE NEW API +// //// USE simple API (using signle-type transaction function) +// #define SERIAL_USE_SINGLE_TRANSACTION +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + + +//////////////// for backward compatibility //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + #endif + + void serial_master_init(void); + void serial_slave_init(void); + int serial_update_buffers(void); + +#endif // end of USE OLD API +//////////////////////////////////////////////////////////////////////////// + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + 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, int sstd_table_size); +// target is interrupt accept side +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 +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif diff --git a/keyboards/treadstone48/ssd1306.c b/keyboards/treadstone48/ssd1306.c new file mode 100644 index 000000000000..dd3290ba0cc8 --- /dev/null +++ b/keyboards/treadstone48/ssd1306.c @@ -0,0 +1,342 @@ + +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifndef LOCAL_GLCDFONT +#include "common/glcdfont.c" +#else +#include +#endif +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +// 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 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/treadstone48/ssd1306.h b/keyboards/treadstone48/ssd1306.h new file mode 100644 index 000000000000..49f258efa921 --- /dev/null +++ b/keyboards/treadstone48/ssd1306.h @@ -0,0 +1,90 @@ +#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_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/treadstone48/treadstone48.c b/keyboards/treadstone48/treadstone48.c new file mode 100644 index 000000000000..faadb269065a --- /dev/null +++ b/keyboards/treadstone48/treadstone48.c @@ -0,0 +1 @@ +#include "treadstone48.h" diff --git a/keyboards/treadstone48/treadstone48.h b/keyboards/treadstone48/treadstone48.h new file mode 100644 index 000000000000..3123d1de5315 --- /dev/null +++ b/keyboards/treadstone48/treadstone48.h @@ -0,0 +1,15 @@ +#pragma once + +#ifdef KEYBOARD_treadstone48_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif From 76d982febaf5f154e633d45a9e53cbc21f3853ae Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu, 4 Apr 2019 01:57:41 -0400 Subject: [PATCH 438/445] [Keymap] New HS60/v2 HHKB keymap for goatmaster (#5545) * Adding new keymap folder for goadmaster * add switch break * zeal60 rgb backlight files * modified for red caps lock key * Remove return statement * Files removed * Add new RGB options * Back to original file --- keyboards/hs60/v2/keymaps/goatmaster/config.h | 37 ++++++++++ keyboards/hs60/v2/keymaps/goatmaster/keymap.c | 71 +++++++++++++++++++ .../hs60/v2/keymaps/goatmaster/readme.md | 6 ++ keyboards/hs60/v2/keymaps/goatmaster/rules.mk | 66 +++++++++++++++++ 4 files changed, 180 insertions(+) create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/config.h create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/readme.md create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/rules.mk diff --git a/keyboards/hs60/v2/keymaps/goatmaster/config.h b/keyboards/hs60/v2/keymaps/goatmaster/config.h new file mode 100644 index 000000000000..f63c9035567d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/config.h @@ -0,0 +1,37 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* 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 + +#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 255 }, .index = 3-1 } //red diff --git a/keyboards/hs60/v2/keymaps/goatmaster/keymap.c b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c new file mode 100644 index 000000000000..6273dbc646e4 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the HHKB version of the PCB + +enum macro_keys { + KC_EML = SAFE_RANGE +}; + +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 ), + +[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, 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) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_EML: //use "KC_EML" as keycode in layers above to call macro + if (!record->event.pressed) { + send_string_with_delay_P(PSTR("example@email.com"), 10); //change email value here + } + break; + } + return true; +} diff --git a/keyboards/hs60/v2/keymaps/goatmaster/readme.md b/keyboards/hs60/v2/keymaps/goatmaster/readme.md new file mode 100644 index 000000000000..ea9803cc0bbb --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/readme.md @@ -0,0 +1,6 @@ +The default keymap for HHKB HS60 V2. VIA support enabled. +========================================================= + +![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/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk new file mode 100644 index 000000000000..a2850a83057d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk @@ -0,0 +1,66 @@ +# 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 +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +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 From 3c7cb5cf5dbf9e97db9b98e32beca9ee58a1c246 Mon Sep 17 00:00:00 2001 From: Deckweiss Date: Thu, 4 Apr 2019 15:05:06 +0200 Subject: [PATCH 439/445] Added Hacked Motospeed keyboard (#5534) * Added first configuration for handwired hacked motosped keyboard * Added first keymap * Fixed h file key layout * Swapped Y and Z in default keymap * Added name, email and description * Moved hacked motospeed keyboard to handwired * Changed make command in readme * Formatted readme to be displayed properly with markdown * Formatted keymap and layout to better reflect the physical keyboard * Fixed info.json * Update keyboards/handwired/hacked_motospeed/info.json Co-Authored-By: Deckweiss * Removed .directory from .gitignore Co-Authored-By: Deckweiss * Minor changes and cleanup * Update keyboards/handwired/hacked_motospeed/hacked_motospeed.h Added back newline needed for properly parsing Co-Authored-By: Deckweiss --- keyboards/handwired/hacked_motospeed/config.h | 249 ++++++++++++++++++ .../hacked_motospeed/hacked_motospeed.c | 43 +++ .../hacked_motospeed/hacked_motospeed.h | 46 ++++ .../handwired/hacked_motospeed/info.json | 12 + .../hacked_motospeed/keymaps/default/config.h | 19 ++ .../hacked_motospeed/keymaps/default/keymap.c | 65 +++++ .../keymaps/default/readme.md | 1 + .../handwired/hacked_motospeed/readme.md | 23 ++ keyboards/handwired/hacked_motospeed/rules.mk | 81 ++++++ 9 files changed, 539 insertions(+) create mode 100644 keyboards/handwired/hacked_motospeed/config.h create mode 100644 keyboards/handwired/hacked_motospeed/hacked_motospeed.c create mode 100644 keyboards/handwired/hacked_motospeed/hacked_motospeed.h create mode 100644 keyboards/handwired/hacked_motospeed/info.json create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/default/config.h create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/default/readme.md create mode 100644 keyboards/handwired/hacked_motospeed/readme.md create mode 100644 keyboards/handwired/hacked_motospeed/rules.mk diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h new file mode 100644 index 000000000000..59300e0d27ef --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 Vladislav Opara + +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 0x0690 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MMO_Corp +#define PRODUCT hacked_motospeed +#define DESCRIPTION Motospeed Numpads wired to Teensy++2.0 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 12 + +/* + * 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) + * +*/ + +// WR XR YR ZR VR ZL YL XL WL VL +#define MATRIX_ROW_PINS { B3, B5, F1, B4, B6, D5, D4, D6, D7, C4} + +// ER DR CR BR AR FR FL AL BL CL DL EL +#define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * 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 \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.c b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c new file mode 100644 index 000000000000..21643895d75b --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Vladislav Opara + * + * 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 "hacked_motospeed.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); +} \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.h b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h new file mode 100644 index 000000000000..1063fd2e6231 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h @@ -0,0 +1,46 @@ +/* Copyright 2019 Vladislav Opara + * + * 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( \ + EWR, DWR, CWR, BWR, AWR, FXR, FYL, AZL, BZL, CZL, DZL, \ + DXR, CXR, BXR, AXR, FZR, DVL, AYL, BYL, CYL, DYL, EZL, \ + EZR, DYR, CYR, BYR, AYR, DVR, FZL, AXL, BXL, CXL, DXL, \ + DZR, CZR, BZR, AZR, FYR, FXL, AWL, BWL, CWL, DWL, EWL \ +) \ +{ \ + { EWR, DWR, CWR, BWR, AWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, DXR, CXR, BXR, AXR, FXR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, DYR, CYR, BYR, AYR, FYR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { EZR, DZR, CZR, AZR, BZR, FZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, DVR, 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, KC_NO, KC_NO, FZL, BZL, AZL, CZL, DZL, EZL }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FYL, AYL, BYL, CYL, DYL, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FXL, AXL, BXL, CXL, DXL, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, AWL, BWL, CWL, DWL, EWL }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, DVL, KC_NO } \ +} diff --git a/keyboards/handwired/hacked_motospeed/info.json b/keyboards/handwired/hacked_motospeed/info.json new file mode 100644 index 000000000000..7ca92785ebd8 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Hacked Motospeed", + "url": "", + "maintainer": "Deckweiss", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"ESC", "x":0, "y":0, "h":2}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Z", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0, "w":2}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":"(", "x":11, "y":1}, {"label":")", "x":12, "y":1}, {"label":"=", "x":0, "y":2}, {"label":"Y", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":",", "x":9, "y":2}, {"label":".", "x":10, "y":2}, {"label":"?", "x":11, "y":2}, {"label":"Fn", "x":0, "y":3, "w":2}, {"label":"Num", "x":2, "y":3}, {"label":"Bksp", "x":3, "y":3}, {"label":"Enter", "x":4, "y":3}, {"label":"Spc", "x":5, "y":3}, {"label":"LShift", "x":7, "y":3}, {"label":"LCtrl", "x":8, "y":3}, {"label":"LAlt", "x":9, "y":3}, {"label":"RAlt", "x":10, "y":3}, {"label":"Meta", "x":11, "y":3}, {"label":"Fn", "x":12, "y":2, "h":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/config.h b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h new file mode 100644 index 000000000000..72de214ba723 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Vladislav Opara + * + * 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 \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c new file mode 100644 index 000000000000..bdec8f246154 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2019 Vladislav Opara + * + * 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( /* Base */ + KC_ESC, 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_LPRN, KC_RPRN, \ + KC_PEQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUES, \ + XXXXXXX, XXXXXXX, KC_BSPC, KC_ENT, KC_SPC, KC_LSFT, KC_LCTRL, KC_LALT, KC_ALGR, KC_LWIN, XXXXXXX \ + ), +}; + +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) { + +} \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md new file mode 100644 index 000000000000..4c740bd9a550 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hacked_motospeed \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/readme.md b/keyboards/handwired/hacked_motospeed/readme.md new file mode 100644 index 000000000000..ac2d4afc28a5 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/readme.md @@ -0,0 +1,23 @@ +# hacked_motospeed + +This is a + - tiny (44key), + - budget (~50€ total expense), + - portable (HID bluetooth & 5aH battery) + - easy to diy (little wiring & soldering needed), + +mechanical keyboard. +It is made by wiring two Motospeed K22 numpads to a Teensy++ 2.0, while reusing as much of the original PCB as possible. +The numpads come with Outemu red linear switches. +(A detailed guide will be posted and linked later) + + +Keyboard Maintainer: [Deckweiss](https://github.com/Deckweiss) +Hardware Supported: Motospeed K22 numpads wired to Teensy++ 2.0 according to my guide (upcoming). +Hardware Availability: Ebay, AliExpress + +Make example for this keyboard (after setting up your build environment): + + make handwired/hacked_motospeed: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/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk new file mode 100644 index 000000000000..1dc955718fbd --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/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 = halfkay + + +# 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=1024 + + +# Build Options +# change yes to no to disable +# +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 = 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # 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) \ No newline at end of file From 852d125413388aa3e71d2be91f04ddea534f2af3 Mon Sep 17 00:00:00 2001 From: Wilba Date: Fri, 5 Apr 2019 01:10:07 +1100 Subject: [PATCH 440/445] [Keyboard] Added configurable defaults for RGB backlight parameters. (#5549) * Added configurable defaults for RGB backlight indicators. * Added more configurable defaults --- keyboards/hs60/v2/config.h | 10 ++++++++++ keyboards/rama/m60_a/config.h | 15 +++++++++++++++ keyboards/rama/m6_b/config.h | 15 +++++++++++++++ keyboards/zeal60/config.h | 10 ++++++++++ keyboards/zeal60/rgb_backlight.c | 8 ++++---- keyboards/zeal65/config.h | 10 ++++++++++ 6 files changed, 64 insertions(+), 4 deletions(-) diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index bbf17251b4ea..05255d133104 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -102,9 +102,19 @@ along with this program. If not, see . // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + #define DRIVER_COUNT 2 #define DRIVER_LED_TOTAL 64 diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h index 2b54cda790db..1cbdee5ae355 100644 --- a/keyboards/rama/m60_a/config.h +++ b/keyboards/rama/m60_a/config.h @@ -87,9 +87,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods @@ -101,6 +111,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h index c2a225d53aaf..0d690bffafc5 100644 --- a/keyboards/rama/m6_b/config.h +++ b/keyboards/rama/m6_b/config.h @@ -120,9 +120,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods @@ -134,6 +144,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h index 94cc9989b74a..a5e41116dca4 100644 --- a/keyboards/zeal60/config.h +++ b/keyboards/zeal60/config.h @@ -86,9 +86,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c index 8d7a7fe8d10b..d5f206fdcec9 100644 --- a/keyboards/zeal60/rgb_backlight.c +++ b/keyboards/zeal60/rgb_backlight.c @@ -69,11 +69,11 @@ backlight_config g_config = { .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, - .brightness = 255, + .brightness = RGB_BACKLIGHT_BRIGHTNESS, .effect = RGB_BACKLIGHT_EFFECT, - .effect_speed = 0, - .color_1 = { .h = 0, .s = 255 }, - .color_2 = { .h = 127, .s = 255 }, + .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED, + .color_1 = RGB_BACKLIGHT_COLOR_1, + .color_2 = RGB_BACKLIGHT_COLOR_2, .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h index 896deac8b8be..224fce1f65b2 100644 --- a/keyboards/zeal65/config.h +++ b/keyboards/zeal65/config.h @@ -86,9 +86,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods From f698f1e3f4f51431473d54512fd6c0609b9b72ee Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 4 Apr 2019 14:25:35 -0700 Subject: [PATCH 441/445] [Keyboard] Add Budget96 by Donut Cables (#5550) * initial commit of budget96 * non logic changes * add my name to readme * update matrix.c * make the matrix representation of the layout macro * fix up LAYOUT macro * add missing character * initial keymap commit * put KC_NO where they belong * basic keymap * fix matrix row and col definition * The diagram I was sent and the pins used I was sent were in opposite order from each other. This should fix the issues * update the readme * change up manufacturer for budget96 * update copyright date * fix up the switch matrix and provide a keymap * forgot the keymap * other matrix fixes * missing a few keys in the switch matrix * messed up the row tracing * tweak keymap a bit * use a lower case k * fix spacing for markdown rendering * put in the reset key documentation * clean up the file a little * use LAYOUT_96_ansi * add a second layer for lighting controls * add in lighting support * add QMK Configurator support * use pragma once * remove un needed matrix.c * convert to GPIO methods * turn on rgblight_enable and get rid of custom matrix * set bootloadhid_bootloader to 1 * set bootmagic to lite and set it to k50 * add reset information to readme * use i2c_master instead of custom i2c * restore the custom i2c code * introduce reset key and eep_rst in function layer 1 * fix up pip3 install commands * fix up device and manufacturer names * remove un needed comments * add an ALL layout macro along with QMK Configurator support * move budget96 into donutcables directory since he actually has different boards * add a short donut cables blurb taken from his website * update readme for make instructions to point to the new path * Update keyboards/donutcables/budget96/config.h Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/donutcables/budget96/readme.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/donutcables/budget96/info.json Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * turn on backlight * Update keyboards/donutcables/budget96/readme.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * remove extra UART and BOOTLOADER settings that are not needed --- keyboards/donutcables/budget96/budget96.c | 80 ++++ keyboards/donutcables/budget96/budget96.h | 56 +++ keyboards/donutcables/budget96/config.h | 47 +++ keyboards/donutcables/budget96/i2c.c | 106 +++++ keyboards/donutcables/budget96/i2c.h | 24 ++ keyboards/donutcables/budget96/info.json | 16 + .../budget96/keymaps/default/config.h | 19 + .../budget96/keymaps/default/keymap.c | 35 ++ .../budget96/keymaps/default/readme.md | 1 + keyboards/donutcables/budget96/readme.md | 44 ++ keyboards/donutcables/budget96/rules.mk | 49 +++ keyboards/donutcables/budget96/usbconfig.h | 394 ++++++++++++++++++ keyboards/donutcables/readme.md | 12 + 13 files changed, 883 insertions(+) create mode 100644 keyboards/donutcables/budget96/budget96.c create mode 100644 keyboards/donutcables/budget96/budget96.h create mode 100644 keyboards/donutcables/budget96/config.h create mode 100644 keyboards/donutcables/budget96/i2c.c create mode 100644 keyboards/donutcables/budget96/i2c.h create mode 100644 keyboards/donutcables/budget96/info.json create mode 100644 keyboards/donutcables/budget96/keymaps/default/config.h create mode 100644 keyboards/donutcables/budget96/keymaps/default/keymap.c create mode 100644 keyboards/donutcables/budget96/keymaps/default/readme.md create mode 100644 keyboards/donutcables/budget96/readme.md create mode 100644 keyboards/donutcables/budget96/rules.mk create mode 100644 keyboards/donutcables/budget96/usbconfig.h create mode 100644 keyboards/donutcables/readme.md diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c new file mode 100644 index 000000000000..966dd4c12991 --- /dev/null +++ b/keyboards/donutcables/budget96/budget96.c @@ -0,0 +1,80 @@ +/* Copyright 2019 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 "budget96.h" + +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} +#endif + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + + void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } + } diff --git a/keyboards/donutcables/budget96/budget96.h b/keyboards/donutcables/budget96/budget96.h new file mode 100644 index 000000000000..561d0cbfa220 --- /dev/null +++ b/keyboards/donutcables/budget96/budget96.h @@ -0,0 +1,56 @@ +/* Copyright 2019 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k46, k47, k48, k49, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k26, k27, k28, k29, \ + k10, k03, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, k19, \ + k00, k01, k02, k65, k75, k0A, k0B, k66, k67, k69, k06, k08, k09 \ +) \ +{ \ + { k00, k01, k02, k03, KC_NO, KC_NO, k06, KC_NO, k08, k09, k0A, k0B, KC_NO, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, KC_NO, k1D, KC_NO }, \ + { 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, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \ + { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \ +} + +#define LAYOUT_96_ansi( \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \ + k10, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, \ + k00, k01, k02, k65, k75, k0B, k66, k67, k69, k06, k08, k09 \ +) \ +{ \ + { k00, k01, k02, KC_NO, KC_NO, KC_NO, k06, KC_NO, k08, k09, KC_NO, k0B, KC_NO, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, KC_NO, k1A, k1B, KC_NO, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \ + { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \ + { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \ +} diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h new file mode 100644 index 000000000000..369cbdd07b77 --- /dev/null +++ b/keyboards/donutcables/budget96/config.h @@ -0,0 +1,47 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER DonutCables +#define PRODUCT budget96 + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +// Set bootmagic lite key to the key commonly programmed as Esc. +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* key combination for command */ diff --git a/keyboards/donutcables/budget96/i2c.c b/keyboards/donutcables/budget96/i2c.c new file mode 100644 index 000000000000..e8c4455ad1b4 --- /dev/null +++ b/keyboards/donutcables/budget96/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/donutcables/budget96/info.json b/keyboards/donutcables/budget96/info.json new file mode 100644 index 000000000000..40a942127f48 --- /dev/null +++ b/keyboards/donutcables/budget96/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "budget96", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 6, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3, "w":1.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":18, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":5}] + }, + + "LAYOUT_96_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1, "w":2}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5, "w":1.5}, {"x":11.5, "y":5, "w":1.5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":4, "h":2}] + } + } +} diff --git a/keyboards/donutcables/budget96/keymaps/default/config.h b/keyboards/donutcables/budget96/keymaps/default/config.h new file mode 100644 index 000000000000..a3ed4f762a6e --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/donutcables/budget96/keymaps/default/keymap.c b/keyboards/donutcables/budget96/keymaps/default/keymap.c new file mode 100644 index 000000000000..dcb79780e086 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_96_ansi(\ + 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_INS, KC_HOME, KC_PGUP, KC_PSLS, \ + 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_END, KC_PGDN, KC_PSLS, KC_PAST, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT, KC_PENT), \ + +[1] = LAYOUT_96_ansi(\ + RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, 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_SAI, RGB_VAI, RGB_SPI, KC_TRNS, 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_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, 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/donutcables/budget96/keymaps/default/readme.md b/keyboards/donutcables/budget96/keymaps/default/readme.md new file mode 100644 index 000000000000..acbac7b4e0b4 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for budget96 diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md new file mode 100644 index 000000000000..e44b9a3e72f9 --- /dev/null +++ b/keyboards/donutcables/budget96/readme.md @@ -0,0 +1,44 @@ +# budget96 + +96 key atmega32a keyboard. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Budget96 PCB +Hardware Availability: [DonutCables](https://donutcables.com/) + +Make example for this keyboard (after setting up your build environment): + + make donutcables/budget96:default + +Flashing + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. You may also hold down the key located at `K50`, commonly programmed as the `Esc` key. + +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://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/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). diff --git a/keyboards/donutcables/budget96/rules.mk b/keyboards/donutcables/budget96/rules.mk new file mode 100644 index 000000000000..e25b037279d7 --- /dev/null +++ b/keyboards/donutcables/budget96/rules.mk @@ -0,0 +1,49 @@ +# 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 . + +# 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 = lite +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +SRC = i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/donutcables/budget96/usbconfig.h b/keyboards/donutcables/budget96/usbconfig.h new file mode 100644 index 000000000000..223b69bb94cc --- /dev/null +++ b/keyboards/donutcables/budget96/usbconfig.h @@ -0,0 +1,394 @@ +/* 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 $ + */ + +#pragma once + +#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 'D', 'o', 'n', 'u', 't', 'C', 'a', 'b', 'l', 'e', 's' +#define USB_CFG_VENDOR_NAME_LEN 11 +/* 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 'b', 'u', 'd', 'g', 'e', 't', '9', '6' +#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 + diff --git a/keyboards/donutcables/readme.md b/keyboards/donutcables/readme.md new file mode 100644 index 000000000000..d68b6a743cce --- /dev/null +++ b/keyboards/donutcables/readme.md @@ -0,0 +1,12 @@ +# Donut Cables + +Donut Cables LLC is located in North Carolina, USA. + +Website: https://donutcables.com/ + +**Contact Donut Cables at the following:** + +Email: contact@donutcables.com +Reddit: /u/donutcat_cables +Geekhack/DeskThority: donutcat +Discord: @donutcat on the #mechkeys Discord \ No newline at end of file From 60668ef39deab4634dbe7fc1119d9de5ee751b28 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu, 4 Apr 2019 17:41:55 -0400 Subject: [PATCH 442/445] [Keymap] Additional RGB options set (#5551) * Add new RGB backlight options to config * Add new RGB options --- keyboards/hs60/v2/keymaps/stanrc85/config.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h index 4576211f1025..5aab3098c7df 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/config.h +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -20,3 +20,22 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 //Setting \ key to "MOD" instead of "ALPHA" for lighting #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 + +#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR +#undef RGB_BACKLIGHT_LAYER_1_INDICATOR +#undef RGB_BACKLIGHT_LAYER_2_INDICATOR +#undef RGB_BACKLIGHT_LAYER_3_INDICATOR + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 200, .s = 255 }, .index = 3-1 } //purple +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 100, .s = 255 }, .index = 60-1 } //green +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 150, .s = 255 }, .index = 60-1 } //blue +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 60-1 } //white + +#undef RGB_BACKLIGHT_BRIGHTNESS +#define RGB_BACKLIGHT_BRIGHTNESS 175 + +#undef RGB_BACKLIGHT_COLOR_1 +#undef RGB_BACKLIGHT_COLOR_2 + +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 } From 7e5c107d43890eb517184d6fddff9a6da165fc3d Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 4 Apr 2019 15:16:59 -0700 Subject: [PATCH 443/445] [Keyboard] Move scrabblepad into donutcables directory (#5553) * move scrabblepad into donutcables directory * use pragma once * update scrabblepad readme --- keyboards/{ => donutcables}/scrabblepad/config.h | 7 ++----- keyboards/{ => donutcables}/scrabblepad/info.json | 0 .../{ => donutcables}/scrabblepad/keymaps/default/config.h | 0 .../{ => donutcables}/scrabblepad/keymaps/default/keymap.c | 0 .../scrabblepad/keymaps/default/readme.md | 0 .../{ => donutcables}/scrabblepad/keymaps/random/keymap.c | 0 .../{ => donutcables}/scrabblepad/keymaps/random/readme.md | 0 keyboards/{ => donutcables}/scrabblepad/readme.md | 4 ++-- keyboards/{ => donutcables}/scrabblepad/rules.mk | 0 keyboards/{ => donutcables}/scrabblepad/scrabblepad.c | 0 keyboards/{ => donutcables}/scrabblepad/scrabblepad.h | 5 +---- 11 files changed, 5 insertions(+), 11 deletions(-) rename keyboards/{ => donutcables}/scrabblepad/config.h (98%) rename keyboards/{ => donutcables}/scrabblepad/info.json (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/default/config.h (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/default/keymap.c (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/default/readme.md (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/random/keymap.c (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/random/readme.md (100%) rename keyboards/{ => donutcables}/scrabblepad/readme.md (67%) rename keyboards/{ => donutcables}/scrabblepad/rules.mk (100%) rename keyboards/{ => donutcables}/scrabblepad/scrabblepad.c (100%) rename keyboards/{ => donutcables}/scrabblepad/scrabblepad.h (98%) diff --git a/keyboards/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h similarity index 98% rename from keyboards/scrabblepad/config.h rename to keyboards/donutcables/scrabblepad/config.h index 8c23ccdabd48..bf3d3db72a85 100644 --- a/keyboards/scrabblepad/config.h +++ b/keyboards/donutcables/scrabblepad/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -49,7 +48,7 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -// #define BACKLIGHT_PIN +// #define BACKLIGHT_PIN // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 @@ -188,5 +187,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/scrabblepad/info.json b/keyboards/donutcables/scrabblepad/info.json similarity index 100% rename from keyboards/scrabblepad/info.json rename to keyboards/donutcables/scrabblepad/info.json diff --git a/keyboards/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/scrabblepad/keymaps/default/config.h similarity index 100% rename from keyboards/scrabblepad/keymaps/default/config.h rename to keyboards/donutcables/scrabblepad/keymaps/default/config.h diff --git a/keyboards/scrabblepad/keymaps/default/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c similarity index 100% rename from keyboards/scrabblepad/keymaps/default/keymap.c rename to keyboards/donutcables/scrabblepad/keymaps/default/keymap.c diff --git a/keyboards/scrabblepad/keymaps/default/readme.md b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md similarity index 100% rename from keyboards/scrabblepad/keymaps/default/readme.md rename to keyboards/donutcables/scrabblepad/keymaps/default/readme.md diff --git a/keyboards/scrabblepad/keymaps/random/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c similarity index 100% rename from keyboards/scrabblepad/keymaps/random/keymap.c rename to keyboards/donutcables/scrabblepad/keymaps/random/keymap.c diff --git a/keyboards/scrabblepad/keymaps/random/readme.md b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md similarity index 100% rename from keyboards/scrabblepad/keymaps/random/readme.md rename to keyboards/donutcables/scrabblepad/keymaps/random/readme.md diff --git a/keyboards/scrabblepad/readme.md b/keyboards/donutcables/scrabblepad/readme.md similarity index 67% rename from keyboards/scrabblepad/readme.md rename to keyboards/donutcables/scrabblepad/readme.md index 0227b988fa8c..f0b05cbcedf3 100644 --- a/keyboards/scrabblepad/readme.md +++ b/keyboards/donutcables/scrabblepad/readme.md @@ -12,6 +12,6 @@ Hardware Availability: [Donut Cables](https://donutcables.com/) Make example for this keyboard (after setting up your build environment): - make scrabblepad:default + make donutcables/scrabblepad:default -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. +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/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk similarity index 100% rename from keyboards/scrabblepad/rules.mk rename to keyboards/donutcables/scrabblepad/rules.mk diff --git a/keyboards/scrabblepad/scrabblepad.c b/keyboards/donutcables/scrabblepad/scrabblepad.c similarity index 100% rename from keyboards/scrabblepad/scrabblepad.c rename to keyboards/donutcables/scrabblepad/scrabblepad.c diff --git a/keyboards/scrabblepad/scrabblepad.h b/keyboards/donutcables/scrabblepad/scrabblepad.h similarity index 98% rename from keyboards/scrabblepad/scrabblepad.h rename to keyboards/donutcables/scrabblepad/scrabblepad.h index fbe0dfc7276e..b4ac8b2c4f53 100644 --- a/keyboards/scrabblepad/scrabblepad.h +++ b/keyboards/donutcables/scrabblepad/scrabblepad.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef SCRABBLEPAD_H -#define SCRABBLEPAD_H +#pragma once #include "quantum.h" @@ -53,5 +52,3 @@ { kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, }, \ { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE } \ } - -#endif From dad66cad40131bbc5b7c85bdf107c664a721ba07 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Fri, 5 Apr 2019 15:44:33 +1100 Subject: [PATCH 444/445] [Keyboard] Simplified handwired/xealous since most of the features are in core now. (#5556) --- keyboards/handwired/xealous/config.h | 12 +- keyboards/handwired/xealous/debounce.c | 63 ----- keyboards/handwired/xealous/matrix.c | 329 +------------------------ keyboards/handwired/xealous/rules.mk | 6 +- 4 files changed, 12 insertions(+), 398 deletions(-) delete mode 100644 keyboards/handwired/xealous/debounce.c diff --git a/keyboards/handwired/xealous/config.h b/keyboards/handwired/xealous/config.h index 7bce502c1544..251e85d4c122 100644 --- a/keyboards/handwired/xealous/config.h +++ b/keyboards/handwired/xealous/config.h @@ -20,20 +20,11 @@ along with this program. If not, see . #include "config_common.h" /* Use I2C or Serial, not both */ - #define USE_I2C -#define SCL_CLOCK 400000UL - -// #define USE_SERIAL -/* serial.c configuration for split keyboard */ -// #define SOFT_SERIAL_PIN D0 +#define SCL_CLOCK 800000UL /* Select hand configuration */ - #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - //#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate. #define FORCE_NKRO @@ -41,6 +32,7 @@ along with this program. If not, see . #define QMK_KEYS_PER_SCAN 4 //if we press four keys simultaneously, lets process them simultaneously... #define DIODE_DIRECTION COL2ROW + #ifdef AUDIO_ENABLE #define C6_AUDIO #define STARTUP_SONG SONG(STARTUP_SOUND) diff --git a/keyboards/handwired/xealous/debounce.c b/keyboards/handwired/xealous/debounce.c deleted file mode 100644 index 65a99f27f261..000000000000 --- a/keyboards/handwired/xealous/debounce.c +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include "config.h" -#include "matrix.h" -#include "timer.h" -#include "quantum.h" - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -//Debouncing counters -typedef uint8_t debounce_counter_t; -#define DEBOUNCE_COUNTER_MODULO 250 -#define DEBOUNCE_COUNTER_INACTIVE 251 - -static debounce_counter_t *debounce_counters; - -void debounce_init(uint8_t num_rows) -{ - debounce_counters = malloc(num_rows*MATRIX_COLS); - memset(debounce_counters, DEBOUNCE_COUNTER_INACTIVE, num_rows*MATRIX_COLS); -} - -void update_debounce_counters(uint8_t num_rows, uint8_t current_time) -{ - for (uint8_t row = 0; row < num_rows; row++) - { - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (debounce_counters[row*MATRIX_COLS + col] != DEBOUNCE_COUNTER_INACTIVE) - { - if (TIMER_DIFF(current_time, debounce_counters[row*MATRIX_COLS + col], DEBOUNCE_COUNTER_MODULO) >= DEBOUNCING_DELAY) { - debounce_counters[row*MATRIX_COLS + col] = DEBOUNCE_COUNTER_INACTIVE; - } - } - } - } -} - -void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) -{ - for (uint8_t row = 0; row < num_rows; row++) - { - matrix_row_t delta = raw[row] ^ cooked[row]; - - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (debounce_counters[row*MATRIX_COLS + col] == DEBOUNCE_COUNTER_INACTIVE && (delta & (1<. #include "matrix_scanrate.h" #endif - - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# error "only i2c supported" -#endif - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 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* debouncing_matrix_hand_offsetted; //pointer to matrix_debouncing for our hand -static matrix_row_t* matrix_hand_offsetted; // pointer to matrix for our hand - -//Debouncing counters -typedef uint8_t debounce_counter_t; -#define DEBOUNCE_COUNTER_MODULO 250 -#define DEBOUNCE_COUNTER_INACTIVE 251 -static debounce_counter_t debounce_counters[MATRIX_ROWS * MATRIX_COLS]; -static debounce_counter_t *debounce_counters_hand_offsetted; - - -#if (DIODE_DIRECTION == ROW2COL) - error "Only Col2Row supported"; -#endif -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static void unselect_row(uint8_t row); -static matrix_row_t optimized_col_reader(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) { -} - -__attribute__ ((weak)) -void matrix_slave_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) -{ -#ifdef DISABLE_JTAG - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<= (b) ? (a) - (b) : (max) - (b) + (a)) -void update_debounce_counters(uint8_t current_time) -{ - debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted; - for (uint8_t row = 0; row < ROWS_PER_HAND; row++) - { - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (*debounce_pointer != DEBOUNCE_COUNTER_INACTIVE) - { - if (TIMER_DIFF(current_time, *debounce_pointer, DEBOUNCE_COUNTER_MODULO) >= - DEBOUNCING_DELAY) { - *debounce_pointer = DEBOUNCE_COUNTER_INACTIVE; - } - } - debounce_pointer++; - } - } -} - -void transfer_matrix_values(uint8_t current_time) -{ - //upload from debounce_matrix to final matrix; - debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted; - for (uint8_t row = 0; row < ROWS_PER_HAND; row++) - { - matrix_row_t row_value = matrix_hand_offsetted[row]; - matrix_row_t debounce_value = debouncing_matrix_hand_offsetted[row]; - - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - bool final_value = debounce_value & (1 << col); - bool current_value = row_value & (1 << col); - if (*debounce_pointer == DEBOUNCE_COUNTER_INACTIVE - && (current_value != final_value)) - { - *debounce_pointer = current_time; - row_value ^= (1 << col); - } - debounce_pointer++; - } - matrix_hand_offsetted[row] = row_value; - } -} - -uint8_t _matrix_scan(void) -{ - uint8_t current_time = timer_read() % DEBOUNCE_COUNTER_MODULO; - - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { - select_row(current_row); - asm volatile ("nop"); asm volatile("nop"); - - debouncing_matrix_hand_offsetted[current_row] = optimized_col_reader(); - // Unselect row - unselect_row(current_row); - } - - update_debounce_counters(current_time); - transfer_matrix_values(current_time); - - return 1; -} - - -// 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(I2C_KEYMAP_START); - 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; -} - -uint8_t matrix_scan(void) +void matrix_scan_user(void) { #ifdef DEBUG_MATRIX_SCAN_RATE matrix_check_scan_rate(); matrix_time_between_scans(); #endif - uint8_t ret = _matrix_scan(); - - if( i2c_transaction() ) { - // 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; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i]; - } - - matrix_slave_scan_user(); -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } + } -inline -static matrix_row_t optimized_col_reader(void) { +// Copy this code to split_common/matrix.c, +// and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920 +// Also remove the sleep_us(30), not necessary for this keyboard. +// In usb_descriptor.c, set .PollingIntervalMS = 0x01 +#define ROW_SHIFTER ((uint8_t)1) +inline static matrix_row_t optimized_col_reader(void) { //MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } return (PINB & (1 << 6) ? 0 : (ROW_SHIFTER << 0)) | (PINB & (1 << 2) ? 0 : (ROW_SHIFTER << 1)) | @@ -351,26 +61,3 @@ static matrix_row_t optimized_col_reader(void) { } -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 -} - -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 -} - -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 - } -} - diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 7d07c9aa5ff3..ef3357982ea4 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -1,5 +1,4 @@ -#SRC += matrix_scanrate.c matrix.c -SRC += debounce.c +SRC += matrix_scanrate.c matrix.c # MCU name MCU = atmega32u4 @@ -67,8 +66,7 @@ SUBPROJECT_rev1 = 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 -CUSTOM_MATRIX = no -DEBOUNCE_TYPE = custom +DEBOUNCE_TYPE = eager_pk LAYOUTS = split60 From 4c1760883e2e0ed710348f02bc791786ed0c1b04 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Sat, 6 Apr 2019 02:20:43 +1000 Subject: [PATCH 445/445] Update ps2avrgb template to use standard matrix/i2c code (#4957) * Update ps2avrgb template to use standard matrix/i2c code * Default to an 8x11 matrix in the ps2avrgb template --- quantum/template/avr/template.c | 30 ++++--- quantum/template/ps2avrgb/config.h | 13 ++-- quantum/template/ps2avrgb/i2c.c | 106 ------------------------- quantum/template/ps2avrgb/i2c.h | 27 ------- quantum/template/ps2avrgb/matrix.c | 112 --------------------------- quantum/template/ps2avrgb/rules.mk | 4 +- quantum/template/ps2avrgb/template.c | 77 ++++++++++++++++-- 7 files changed, 99 insertions(+), 270 deletions(-) delete mode 100644 quantum/template/ps2avrgb/i2c.c delete mode 100644 quantum/template/ps2avrgb/i2c.h delete mode 100644 quantum/template/ps2avrgb/matrix.c diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c index 1e4ce26cd162..86dc69abce72 100644 --- a/quantum/template/avr/template.c +++ b/quantum/template/avr/template.c @@ -15,29 +15,37 @@ */ #include "%KEYBOARD%.h" +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); + 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 + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + 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 + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); + led_set_user(usb_led); } + +*/ diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 01cdf932ede8..8d9a993cf1f4 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -21,17 +21,20 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 #define MANUFACTURER You #define PRODUCT %KEYBOARD% +#define DESCRIPTION A custom keyboard #define RGBLED_NUM 16 -#define MATRIX_ROWS 2 -#define MATRIX_COLS 3 +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 -#define MATRIX_ROW_PINS { D0, D5 } -#define MATRIX_COL_PINS { F1, F0, B0 } -#define UNUSED_PINS +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } +// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, D7 } +#define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 diff --git a/quantum/template/ps2avrgb/i2c.c b/quantum/template/ps2avrgb/i2c.c deleted file mode 100644 index e8c4455ad1b4..000000000000 --- a/quantum/template/ps2avrgb/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -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 - -#ifndef __I2C_H__ -#define __I2C_H__ - -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); - -#endif diff --git a/quantum/template/ps2avrgb/matrix.c b/quantum/template/ps2avrgb/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/quantum/template/ps2avrgb/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -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/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index bcd7dff99919..191a1384463f 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -42,9 +42,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC += i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c index 08156c562c8d..3f920de48c5c 100644 --- a/quantum/template/ps2avrgb/template.c +++ b/quantum/template/ps2avrgb/template.c @@ -13,13 +13,78 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "%KEYBOARD%.h" -#include -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +#ifdef RGBLIGHT_ENABLE + +#include +#include "i2c_master.h" +#include "rgblight.h" + +extern rgblight_config_t rgblight_config; + +void matrix_init_kb(void) { + i2c_init(); + // call user level keymaps, if any + matrix_init_user(); +} + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + memset(led, 0, 3 * RGBLED_NUM); + } + + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} + +bool rgb_init = false; + +void matrix_scan_kb(void) { + // if LEDs were previously on before poweroff, turn them back on + if (rgb_init == false && rgblight_config.enable) { + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + rgb_init = true; + } + + rgblight_task(); + matrix_scan_user(); +} + +#endif -__attribute__ ((weak)) -void matrix_scan_user(void) { +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +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); +} + +*/